SimplePortal

Customization => Custom Coding => Topic started by: Tridrac on September 16, 2009, 05:38:18 AM

Title: Problem with cutoff (solved)
Post by: Tridrac on September 16, 2009, 05:38:18 AM
Hi Nathaniel,

As I said in the other message, here is the query translated in english:

Well, the point is that I want my forum to be W3C compliant and recently I passed the validator to the portal,
And got an odd error:

Quote
.jpg" alt="" border="0" /></div><br [...]<br /><br />

That is line 225 of SPortal1-1.php (careful, I have modified by replacing the <a ref...> by a simple [...] because did not want the dots of the cutoff as a link)

Quote
if ($cutoff !== false)
$row['body'] = $func['substr']($row['body'], 0, $cutoff);
$row['body'] .= ' [...]';

overlaps the line 60 of SPortal1-1.template.php

Quote
<div class="post">', !empty($article['category']['picture']['href']) ? '<img src="' . $article['category']['picture']['href'] . '" alt="' . $article['category']['name'] . '" width="100%" align="left" />' : '', $article['message']['body'], '<br /><br />

And I say this is curious because it only happens in the articles that used the tag "center" (but never on the news) ¿?
(well, actually applies to almost any tag added to the tag [img )

This means that if I put the header of the article, for example, an image with the labels [center [/ center]http://ie (remove a bracket to not run the code)

Quote
[center [img http://img.uptodown.com/screen/windows/desc/VLC%20Media%20Player%200.9.8a-1.jpg[/img][/center]

Then the following error occurs:

Quote
<div class="post">VLC Media Player es un reproductor multimedia multiplataforma y de código abierto que permite reproducir prácticamente todos los formatos de vídeo y audio más utilizados en la actualidad.<br /><br /><div align="center"><img src="http://img.uptodown.com/screen/windows/desc/VLC%20Media%20Player%200.9.8a-1.jpg" alt="" border="0" /></div><br [...]<br /><br />

Does anyone have any idea what might this be?
It is clearly a problem of the cutoff (cut the text of the message), but I can not understand why it overlap the previous label ¿?

Thanks and best regards. ;)

Note: obviously, despite the error, the code runs smoothly as if it were a "short tag", but the W3C validator does not accept it and so I need to fix it.
SimplePortal 2.3.8 © 2008-2024, SimplePortal