[ php-blog-Bugs-1530425 ] BBCode displayed in recent comment sidebar
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.serendipity.trackers |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1530425, was opened at 2006-07-28 14:36 Message generated for change (Comment added) made by garvinhicking You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1530425&group_id=75065 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Plugins Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jude Anthony (slothman) Assigned to: Jude Anthony (slothman) Summary: BBCode displayed in recent comment sidebar Initial Comment: BBCode is displayed in the recent comments sidebar. reference sites: http://myspace.com/coreylafferty http://myspace.com/actofbetrayal <a href="http://nopaste.php-q.net/227841">Modified Plugin, handles first bbcode</a> Forum link: <a href="http://www.s9y.org/forums/viewtopic.php?t=6075&postdays=0&postorder=asc&start=0>forum</a> ---------------------------------------------------------------------- >Comment By: Garvin Hicking (garvinhicking) Date: 2007-05-28 14:21 Message: Logged In: YES user_id=473563 Originator: NO Yes, if templates COULD handle it, that would be best. But the hard linewraps need to be done in PHP scope, they cannot be achieved via CSS. If you think they can, please provide the code how "hahahahahahahahaaaaaaaaaa" would be split WITHOUT using a scrollbar. That would be most appreciated, because I do not know about such a solution. The problem is even if special markup is trimmed, it gets converted to HTML, which would still be split. It's very hard to ensure that an opened tag is always closed, because if I prepend "[B]" before a 200kb comment, and at the end use "[/B]" I would have to emit the whole code to get the ending string. ---------------------------------------------------------------------- Comment By: Lars Becker (lbecker) Date: 2007-05-28 13:46 Message: Logged In: YES user_id=1711351 Originator: NO If the main reason is to preserve the layout i think handling of overflows should be in the domain of the templates not in the domain of program logic. We have the ability to do this with css which has none of the unwanted sideeffects the current implementation has. The only remaining problem then would be the handling of markup at the end of strings, that still get cut. Maybe parsing special markup should occur before trimming the strings? ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2007-05-28 12:33 Message: Logged In: YES user_id=473563 Originator: NO Hi! The main reason is, that the comment sidebar plugin needs to ensure that lines are cut after X characters (using wordwrap() PHP function). We need to force cutting, because otherwise the sidebar can be broken by user comments like "hahaaaaaaaaaaaaaaaaaaaaahahaaaaaaaaaaaaaaaaaaaahahaha", which is of course what we need to prevent in first instance. Because of this cutting, it can happen that a [bbcode] instance is broken in the middle, and because of that, the bbcode markup cannot be applied. Some people prevent the wordwrapping bug by setting the wordwrap number to "999999" and then using CSS and "overflow: hidden" as well as a "width" property in the templates Stylesheet. So if you don't see a need in hard linebreaks, you can use that method. HTH, Garvin ---------------------------------------------------------------------- Comment By: Lars Becker (lbecker) Date: 2007-05-28 12:29 Message: Logged In: YES user_id=1711351 Originator: NO Hi Garvin, before I reported the bug i took a short look into the relevant code, so i'm aware that it is not as simple as it seems. I would have fixed it by myself. The question i have is: what's the reason for cutting the strings. I see no use in hard linebreaks. To me it seems they are causing trouble but have no true benefit. It's not only BBCode that gets broken by it. Normal text is sometimes also broken in the midst of a word. best regards Lars ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2007-05-28 11:47 Message: Logged In: YES user_id=473563 Originator: NO Hi lbecker, sadly BBCode truncating is not as trivial as it seems (read the mentioned URLs in the original tracker item), so there hasn't been progress on this. Actually, I don't think this can really be resolved. Whenever you cut strings in a hard way to force linebreaks in the browser, you cannot be sure to not truncate bbcode or HTML in the middle without really performanse intensive parsing. ---------------------------------------------------------------------- Comment By: Lars Becker (lbecker) Date: 2007-05-27 12:37 Message: Logged In: YES user_id=1711351 Originator: NO Are there any updates on this? I experience the same problems with BBCode which are somewhat annoying since "BBCode" and "recent comments" both are core plugins of s9y. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1530425&group_id=75065 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/