SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: bisbebri on May 26, 2009, 07:10:06 PM

Title: Colors Not showing up
Post by: bisbebri on May 26, 2009, 07:10:06 PM
I have the color mod installed on my forums, but it seems with this version of simple portal (upgrading to 2.2.1 sunday) in the recent topics block the colors don't show. Is this fixed in 2.2.1 or is there some work around?  Thanks!
Title: Re: Colors Not showing up
Post by: Nathaniel on May 26, 2009, 07:24:53 PM
Which color mod? What is it meant to do?

Did it work with the last version of SimplePortal?
Title: Re: Colors Not showing up
Post by: bisbebri on May 26, 2009, 07:31:49 PM
It worked on the last version, when I switched to 2.2 it stopped working. Its called members color link.
I attached a screenshot... The colors of their name should show up on the recent topics but it doesn't.
Title: Re: Colors Not showing up
Post by: Nathaniel on May 26, 2009, 07:49:52 PM
Reported as bug:
http://simpleportal.net/index.php?issue=205.0

Quick Fix for the Recent Topics block only (I haven't tested it, but it should work):

Replace this code (SPortal2.php):
Code: [Select]
function sp_recentTopics($parameters, $id, $return_parameters = false)
{
global $context, $scripturl, $txt, $settings;

With this code:
Code: [Select]
function sp_recentTopics($parameters, $id, $return_parameters = false)
{
global $context, $scripturl, $txt, $settings, $color_profile;

Replace this code:
Code: [Select]
if (empty($topics))
{
echo '
', $txt['error_sp_no_topics_found'];
return;
}

With this code:
Code: [Select]
if (empty($topics))
{
echo '
', $txt['error_sp_no_topics_found'];
return;
}

$colorids = array();

foreach ($topics as $topic)
$colorids[] = $topic['poster']['id'];

if (!empty($colorids) && sp_loadColors($colorids) !== false)
{
foreach ($topics as $k => $topic)
{
if (!empty($color_profile[$topic['poster']['id']]['link']))
$topics[$k]['poster']['link'] = $color_profile[$topic['poster']['id']]['link'];
}
}
Title: Re: Colors Not showing up
Post by: bisbebri on May 26, 2009, 07:51:21 PM
Thanks! Should this work when I upgrade to 2.2.1?
Title: Re: Colors Not showing up
Post by: Nathaniel on May 26, 2009, 07:57:45 PM
No, it hasn't been fixed with 2.2.1, you will have to apply the edits in my post above to add the colors.

It looks like this issue was introduced when those blocks were rewritten for 2.2. It should be fixed with the next bugfix release. :)
Title: Re: Colors Not showing up
Post by: bisbebri on May 26, 2009, 08:00:00 PM
Ok, thanks for your quick responses! :D :D
Title: Re: Colors Not showing up
Post by: [SiNaN] on May 26, 2009, 11:59:22 PM
Install SSI extension for Member Color Link mod.
Title: Re: Colors Not showing up
Post by: bisbebri on May 27, 2009, 06:37:35 AM
Install SSI extension for Member Color Link mod.
SSI Extension?
Title: Re: Colors Not showing up
Post by: Nathaniel on May 27, 2009, 06:58:56 AM
Its attached to the post below: http://www.simplemachines.org/community/index.php?topic=32101.0
Title: Re: Colors Not showing up
Post by: [SiNaN] on May 27, 2009, 10:24:10 AM
Yeah, this was intentional. We may add this back in future versions.
SimplePortal 2.3.8 © 2008-2024, SimplePortal