bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

links longer than page width!

(11 posts)
  • Started 3 days ago by joneywalker4u
  • Latest reply from _ck_
  • This topic is not resolved

Tags:

  1. joneywalker4u
    Member

    Hi, installed newer version of bbpress 0.9.2.
    Problem: text entered between backtricks`treated as code. Width is larger than page width. look here

    [url=http://img140.imageshack.us/my.php?image=88594514gy3.jpg][img=http://img140.imageshack.us/img140/6366/88594514gy3.th.jpg][/url]

    There should be a scrollbar for the purpose of restricting width and hyper links shouldn't be active. How can I do that?

    Posted 3 days ago #
  2. bobbyh
    Member

    Change the attribute for overflow of the relevant class to like:

    .post {overflow:scroll;}

    Posted 3 days ago #
  3. joneywalker4u
    Member

    Thanks man but it changes whole post and a scroll appears, but in RSS feeds it doesnot.

    I require scroll only to appear where I have entered text in between backtricks and not in the whole post.

    Besides overflow firefox displays the links in one line but IE7 breaks it into more than one line, why is that?

    Posted 3 days ago #
  4. bobbyh
    Member

    try this then:

    .post code {overflow:scroll;}

    Posted 3 days ago #
  5. WP-Chunk ported to bbPress, inserts a break into long links so they wrap:

    http://bbpress.org/forums/topic/limit-long-words#post-9648

    Posted 3 days ago #
  6. joneywalker4u
    Member

    This is not what I meant, haven't you seen phpbb3 that sort of thing, scrollbar only under [code][/code] and hyper links are not active in that box.

    please people suggest.

    Posted 3 days ago #
  7. joneywalker4u
    Member

    Got it somewhat.
    Edit style.css file in themes and enter

    1)To align text both sides
    .post {text-align: justify;}

    2)To prevent overflow

    .post code {
    	overflow: auto;
    	display: block;
    	height: auto;
    	max-height: 200px;
    	white-space: normal;
    	padding-top: 5px;
    	padding-bottom: 5px;
    	font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
    	line-height: 1.3em;
    	background: #ffffff;
    	margin: 2px 0;
    }

    Sill one more thing - how to remove hyperlink in the text entered. That is why <a href=" etc gets added to text I enter between code tag.

    Posted 3 days ago #
  8. bobbyh
    Member

    Can you just use CSS to style links so they look just like your text.? If so, something like this might work (obviously modify this as appropriate for your theme):

    .post code a, .post code a:link, .post code a:visited {
    color: #9c0;
    text-decoration: none;
    font-size: 8pt;
    font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
    color: #000;
    }

    Posted 2 days ago #
  9. joneywalker4u
    Member

    I don't want my text that i enter between [code][/code] to be trated as hyperlink even if it is. What @bobbyh say will only change the formatting but not remove hyperlink.

    Posted 2 days ago #
  10. bobbyh
    Member

    joneywalker4u, to remove the hyperlinkification of URLs for text inside of code tags, you could write a plugin that removes the filter that hyperlinkifies URLs for the entire post, and then create a new filter that splits the post into strings-enclosed-by-code-tags and strings-not-enclosed-by-code-tags, apply the filter that hyperlinkifies URLs to the strings-not-enclosed-by-code-tags, and then glue the strings together.

    This is totally doable, but it seems like a lot of work, which is why I suggested the CSS approach...

    Posted 2 days ago #
  11. It would be easier to disable the auto-link entirely for a post when [code] is detected than to parse it out, if that will do. Somehow I missed the original question was scrolling on code, sorry about that but as you found it's very simple CSS.

    Disabling auto-link is something like: (untested)

    remove_filter('post_text', 'make_clickable');
    add_filter('post_text', 'make_clickable_if_not_code');
    function make_clickable_if_not_code($text) {
    if (strpos($text,'<code>')===false) {return make_clickable($text);}
    return $text;
    }
    Posted 9 hours ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.