SimplePortal

Customization => Custom Coding => Topic started by: Grammy on June 14, 2016, 02:40:25 PM

Title: Enabling SimplePortal breaks my profile Look And Layout view.
Post by: Grammy on June 14, 2016, 02:40:25 PM
Hi, guys; if you could help, I'd be so grateful.  I have 2.0.11 default.

The issue is how SimplePortal affects an old mod made by JohnyB (Bulakbol) called "Colorize Post".  Another mod author recently supplied me with the necessary edits to port it to 2.0.x and it installed and functions beautifully.  But I couldn't figure out why, when I view Profile-->Look and Layout, the field for its settings were broken.  Part of it appeared at the top of the page and part of it appeared at the bottom.  (Please see the two screenshots attached).  It should all be at the bottom of the page. 

I installed a fresh test forum today and the issue was gone.  One by one, I began reinstalling each mod, testing each time to see what was causing the problem.  Unfortunately, it is SimplePortal.  When I disable it, everything appears as it should (3rd screenshot).  The minute I enable it, the page "breaks". 

The files that SimplePortal and Colorize Post have in common are:  Load.php, Recent.php, ManagePermissions.php and Display.template.php.  I don't know which of these is affecting my profile's Look and Layout view.  I would guess the template?  I'm attaching Colorize Post's XML file and asking if you guys see any conflict in edits that would cause this to happen.

The Colorize Post is the only one of its kind that allows users to preset their favorite font and color.  Otherwise, I would simply try another kind.  I would appreciate any insight you could offer into this.

Thanks so much.
Title: Re: Enabling SimplePortal breaks my profile Look And Layout view.
Post by: emanuele on June 14, 2016, 04:47:13 PM
If I got the colorize file right (as a suggestion, next time post a link to the mods you are talking about, and if multiple files are present which one you downloaded so that anyone trying to help will be able to quickly pick up the situation) the issue is that the template of the mod is wrote for a very old version of SMF (namely 2.0 RC1) that had a completely different HTML markup (involving tables).

So, to fix this behaviour there is to rewrite the template in the function template_profile_modify_font present in Profile.template.php.
Probably, changing the various:
Code: [Select]
<tr><td>with:
Code: [Select]
<li>and the:
Code: [Select]
</td></tr>with:
Code: [Select]
</li>should do most of the trick.
Title: Re: Enabling SimplePortal breaks my profile Look And Layout view.
Post by: Grammy on June 14, 2016, 05:11:12 PM
Oh, thank you so much; that sorted it!  I'm really happy to be able to turn on my SimplePortal again; it's looking so nice and the users are loving it.  :)

Thank you for fixing an issue that, it turns out, really wasn't SimplePortal's issue to fix.  I'm confused, I have to say, as to why just that one mod's simple
Code: [Select]
<tr><td></td></tr> reacted when the portal was enabled, when that whole file seems filled with those same tags.  It's hard to say, without digging in, which were put there by SMF and which were added by mods, but nothing else seems to be affected by SimplePortal.  So that's a big sigh of relief! 

The link to that mod (in case anyone reading this at a later time wonders) is:

http://custom.simplemachines.org/mods/index.php?mod=1061 (http://custom.simplemachines.org/mods/index.php?mod=1061)

However, it isn't the zip I uploaded, since mine has the more current edits. 

Thank you again, for your kind help; very appreciated!
Title: Re: Enabling SimplePortal breaks my profile Look And Layout view.
Post by: emanuele on June 15, 2016, 08:32:12 AM
The normal layout doesn't use tables. SP, on the other hand, uses a big table to wrap the whole page and create the areas. So, when you enable SP, the browser will associate the <tr>s from the mod with those from SP messing things up.
SimplePortal 2.3.8 © 2008-2024, SimplePortal