ezportal problems: javascript errors in frontpage
 
 
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> Select Expand BBCodes
View previous topic :: View next topic  
Author Message
Quakes69
Starter
Starter


Joined: 18 Feb 2006
Posts: 1

PostPosted: Sat Feb 18, 2006 9:00 am    Post subject: ezportal problems: javascript errors in frontpage Reply with quote

I installed your hack and It's quite usefull. But I have a slight problem with the announcements on the EzPortal. View pic below.

All other Select Expand works fine accept on the EzPortal. is there something that needs to be changed in fetchpost? or maybe some other place.

Thanks,
Quake
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Feb 18, 2006 12:15 pm    Post subject: Reply with quote

Hi!

Looking at the source page in your site, it looks like ezportal is inserting <br /> where it shouldn't. Hence, it generates javascript parser errors.

PHP:
<script type="text/javascript" src="./templates/select_expand_bbcodes.js"></script><br />
<script type="text/javascript"><br />
<br />
<!--<br />
<br />
    var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));<br />
    SXBB[id] = new _SXBB(id);<br />
    SXBB[id].T['select'] = 'Select';<br />
    SXBB[id].T['expand'] = 'Expand';<br />
    SXBB[id].T['contract'] = 'Contract';<br />
    SXBB[id].writeCmd();<br />
<br />
//--><br />
<br />
</script><br />


This is how the same snippet looks in your forum:

PHP:
<script type="text/javascript" src="./templates/select_expand_bbcodes.js"></script>
<script type="text/javascript">

<!--

    var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
    SXBB[id] = new _SXBB(id);
    SXBB[id].T['select'] = 'Select';
    SXBB[id].T['expand'] = 'Expand';
    SXBB[id].T['contract'] = 'Contract';
    SXBB[id].writeCmd();

//-->

</script>


I can't do much to fix that, I'm afraid. I do not know how ezportal works, but this is probably caused by the function they use to parse posts?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Feb 18, 2006 12:53 pm    Post subject: Reply with quote

The same problem was also reported here:
http://forums.phpmix.org/viewtopic.php?t=540

Searching at smartor's site I've found he reported the problem here:
http://smartor.is-root.com/viewtopic.php?t=14521

Unfortunately, I don't know if/how MaXShoT found a solution.

If you can find the solution, please report it back, so it might help the next one who falls here with the same problem. Cool

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Mon Apr 10, 2006 5:10 pm    Post subject: Reply with quote

ok, it seems there's a fix:
http://smartor.is-root.com/viewtopic.php?t=3325

GooGui wrote:
find (fetchpost.php)

$posts[$i]['post_text'] = nl2br($posts[$i]['post_text']);

replace by

$posts[$i]['post_text'] = str_replace("\n", "\n<br />\n", $posts[$i]['post_text']);

end

note from phpbb coders : we use this rather than nl2br because till recently it wasn't XHTML compliant


Can anyone here confirm?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> Select Expand BBCodes All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum