Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
1 Registered (driv), 28 Guests and 25 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
Gizmo 11678
Rick 7551
Ian 4099
Mark S 3969
ntdoc 3102
Sirdude 2041
jgeoff 1876
David Dreezer 1750
driv 1557
AllenAyres 1523
Latest Photos
Carrie - So Very
Testing
Test Photo
4TH of July at the river!
Test shots from D300 part 3
Topic Options
Rate This Topic
#129339 - 06/14/06 02:00 AM V6.5.5: little xhtml minor bug
Zarzal Offline
old hand

Registered: 06/05/06
Posts: 1055
Loc: Berlin, Germany
If someone use the ubb img tag in his signature threads convert it to img src but without selfclosing /> on its end. This gives a verify error in W3C Markup Validation Service.
_________________________
my board: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen

Top
#129340 - 06/14/06 02:27 AM Re: V6.5.5: little xhtml minor bug
Zarzal Offline
old hand

Registered: 06/05/06
Posts: 1055
Loc: Berlin, Germany
and another one: ubbthreads/templates/default/showflat.tmpl. there is a missing close ancor tag and the # is too much.

found in line 156:
Code:
<a name="#{$postrow[$i]['Number']}">#<span id="number$i">{$postrow[$i]['Number']}</span> - {$postrow[$i]['time']} <i>{$postrow[$i]['IP']}</i> {$postrow[$i]['filelink']}



should be:
Code:
<a name="{$postrow[$i]['Number']}">#<span id="number$i">{$postrow[$i]['Number']}</span> - {$postrow[$i]['time']} <i>{$postrow[$i]['IP']}</i> {$postrow[$i]['filelink']}</a>

_________________________
my board: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen

Top
#129341 - 06/14/06 02:45 AM Re: V6.5.5: little xhtml minor bug
Zarzal Offline
old hand

Registered: 06/05/06
Posts: 1055
Loc: Berlin, Germany
I found the xhtml bug for the missing selfclosing tag:

in /ubbthreads/ubbt.inc.php line 806:
Code:
$Body = preg_replace("/(\[IMG\]|\[{$ubbt_lang['TEXT_IMAGE']}\])http([^\[]*)\.(gif|jpg|png)(\[\/IMG\]|\[\/{$ubbt_lang['TEXT_IMAGE']}\])/i","<img src=\"http\\2.\\3\">",$Body);



should be:
Code:
$Body = preg_replace("/(\[IMG\]|\[{$ubbt_lang['TEXT_IMAGE']}\])http([^\[]*)\.(gif|jpg|png)(\[\/IMG\]|\[\/{$ubbt_lang['TEXT_IMAGE']}\])/i","<img src=\"http\\2.\\3\" alt=\"\" />",$Body);

_________________________
my board: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen

Top
#129342 - 06/20/06 11:43 AM Re: V6.5.5: little xhtml minor bug
Zarzal Offline
old hand

Registered: 06/05/06
Posts: 1055
Loc: Berlin, Germany
mmhh, this fix the bug for the first time, but a new problem comes up. If I change the preg_replace ubb code for img got converted to html if I edit the post and if you try to submit this edit and html is off in this board the image is gone and text will be displayed.

How does this work? There must be another place to change a bit of code to solve this.
_________________________
my board: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen

Top
#129343 - 09/16/06 07:14 AM Re: V6.5.5: little xhtml minor bug
PaNTerSan Offline
stranger
*****

Registered: 05/10/06
Posts: 3
Loc: EU, Slovenia
function undo_markup:
Code:
 
// Convert image markup
if ($config['allowimages'] || ($config['sigimage'] && $type=="sig")) {
$Body = preg_replace("/<img src=\"([^\>]*)\">/i","[{$ubbt_lang['TEXT_IMAGE']}]\\1[/{$ubbt_lang['TEXT_IMAGE']}]",$Body);
}

_________________________
Kind regards,
PaNTerSan

Top


Shout Box

Recent Topics
Community Spotlight
by Thelockman
Yesterday at 08:04 AM
Protecting Board from hackers
by duquesne
Yesterday at 04:48 AM
Change New Topic text
by MLD
08/25/08 04:59 PM
Reason for deleting a thread
by MattUK
08/24/08 09:40 PM
Adding rss feed to a custom portal island
by alex26101
08/23/08 09:29 PM
Forum Stats
4016 Members
33 Forums
30842 Topics
156619 Posts

Max Online: 978 @ 06/24/07 08:19 PM