Membergroup Color Legend

Started by JayBachatero, October 15, 2005, 03:05:00 AM

Previous topic - Next topic

JayBachatero

Nope.  I suggest you ask Oldiesmann though.  He was the one that provided the code I just turned it into a mod.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Dannii

Coolness. I shall ask him.

I'd like to incorporate this, and then add links to the pages of my mod which will soon have public descriptions of the groups. So in your example, you'd see "[Lead Mod Developer]", clicking it will take you to that group's page, where there could be a brief (or lengthy) description saying what they do and how to contact them for example.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Arcath

kewl mod, i will certanily be using it

jsdoyle

#44
I am getting the following error code generated for every visitor when they hit the index.php page.
8: Undefined index: enableMCL
File: /var/www/html/forum/smf1/Themes/default/BoardIndex.template.php (eval?)
Line: 375


The section that this occurs in is:

// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';

if ($modSettings['enableMCL'])
        {
        foreach($context['online_groups'] AS $group)
        {
            if(!empty($group['color']) && $group['color'] != '')
                    echo '[<span style="color:' . $group['color'] . '">' . $group['name'] . '</span>] ';
        }
            echo '<br />';
        }

if ($context['show_who'])
echo '
<a href="', $scripturl, '?action=who">';

echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];



I have the latest version of the mod "Membergroup Color Legend" installed on a RC1 forum.   Other than the error being generated the site works fine and the colors show up for the various member groups.

Thanks,

Scott Doyle

JayBachatero

Ok it seems like its adding this line wrong.  I will have to update this mod soon.  I might just update in in a few and have it out by tonight.  Just add this line to Themes/default/Help.english.php before ?>

$helptxt['enableMCL'] = 'Show a legend with the members position and color ex. [Administrator], [Newbie] and so on.';

That should fix it.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

jsdoyle

Themes/default/Languages/Help.english.php already has this added.

Is there a different file?

Thanks!

JayBachatero

Ok I gave you the wrong line.  It's
$txt['enableMCL'] = 'Enable Membergroup Color Legend in board index';add it before ?> on $themedir/languages/ModSettings.english.php

What I think happened you might have updated or installed a mod that provides its own ModSettings.english.php file and that line was removed.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

jsdoyle

Nope.  That's there too!   :-[

Maybe I should uninstall and then reinstall?  Any other suggestions?

Thanks!

JayBachatero

Run this querry in phpmyadmin so it will return a more descriptive message.  It will change eval() to require()


INSERT INTO smf_settings VALUES ('disableTemplateEval', '1');


What message do you get after you changed that?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

jsdoyle

Okay, I'll have to do that later this evening.  Can't access the phpMyAdmin from work.

I'll let you know later.

Thanks,

Scott

JayBachatero

I just went to your website and I didn't see it there.  Is it by anychance enabled?
Admin > Features and options > Enable Membergroup Color Legend in board index
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

jsdoyle

I am such a dumb a$$.  At least now you know what error is generated when someone doesn't enable the feature!

Sorry to waste your time!

It is working and the error log looks clean.

JayBachatero

Ok this is something that I will take a look at.  It is not supposed to spit an error.  I have an idea of what is causing this.

SMF has a built in feature that when you add a permission or something to that matter it will aadd the info to the correct table in the database.  Since it was not enabled it didn't have information on whether it was on or off since it didn't have a row in the database.  I will make a query that will add this automatically.

Thanks for helping me spot this issue out.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

eriktm

The message I got is: The file is not valid or corrupt

WHAT SHALL I DO???

Please; help me!

JayBachatero

What version of SMF are you using?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

eriktm


JayBachatero

Quote from: erikman on December 07, 2005, 02:55:00 PM
version 1.0.5

This mod is for 1.1 and above you can do this here to install it manually.
Small thing but?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

pcigre

I have 1.1 RC1 and instalation was error free, and I enable it but it still doesnt show it on index... Any solution?

Prasad007

Quote from: pcigre on December 18, 2005, 09:57:06 AM
I have 1.1 RC1 and instalation was error free, and I enable it but it still doesnt show it on index... Any solution?
you have to enable it from admin cp

Advertisement: