News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

see mods on other therms

Started by tuga, December 21, 2005, 02:19:20 PM

Previous topic - Next topic

tuga

some mods i install i only see on default, how can i do for see in other to like helios etc

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

tuga

the mod is this one Membergroup_Color_Legend what i do ther im very newbie

redone

Install the mod as usual via the package manager and follow the instructions provided above for making that mod work with your theme.

:)

tuga

hi, no dont work, i enable in adminas well, so im using the RC1 with helios multi but i cant see on index, but if i change to default its ok i see normaly.

so i open the xml but i dont found the lines for change, can you say to me where they are? im leaving the code here and just replace for the good one

thx


<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
   <id>JayBachatero:membergroup_color_legend_ver1_smf1_1_b3-rc1</id>
   <version>1.0</version>
   <homepage>http://kevmundial.com</homepage>
   <file name="$sourcedir/ModSettings.php">
      <operation>
         <search position="after"><![CDATA[
         array('text', 'default_personalText'),
]]></search>
         <add><![CDATA[
         array('check', 'enableMCL'),
]]></add>
      </operation>
   </file>
   <file name="$themedir/BoardIndex.template.php">
      <operation>
         <search position="after"><![CDATA[
   if ($context['show_who'])
      echo '
]]></search>
         <add><![CDATA[
   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 />';
        }
]]></add>
      </operation>
   </file>
   <file name="$themedir/languages/Help.english.php">
      <operation>
         <search position="before"><![CDATA[
   </ul>';
]]></search>
         <add><![CDATA[

$helptxt['enableMCL'] = 'Show a legend with the members position and color ex. [Administrator], [Newbie] and so on.';
]]></add>
      </operation>
   </file>
   <file name="$themedir/languages/ModSettings.english.php">
      <operation>
         <search position="after"><![CDATA[
$txt['default_personalText'] = 'Default personal text';
]]></search>
         <add><![CDATA[
$txt['enableMCL'] = 'Enable Membergroup Color Legend in board index';
]]></add>
      </operation>
   </file>
</modification>

Bigguy

I think this is the part of the code you want to look at, I think. I`m just trying to help:

</add>
      </operation>
   </file>
   <file name="$themedir/BoardIndex.template.php">
      <operation>
         <search position="after"><![CDATA[
   if ($context['show_who'])
      echo '
]]></search>
         <add><![CDATA[
   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 />';
        }

beemer

#6
you need to modify manually the changes listed in the install to

helios theme folder/BoardIndex.template.php

find

if ($context['show_who'])
      echo '


And add below

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 />';
        }




http://www.bmw7resource.co.uk
SMF 1.1 RC1
MKP 1.1 RC1
Helios Multi RC1
-------------------------------------------------------
http://www.thefishsheadnhorsesarse.co.uk
SMF 1.1 RC2
TinyPortal 0.8.6

Bigguy

If everything works on the default theme wouldnt he just have to modify the "boardindex.template.php". ???

EDIT: Sorry I didnt see your edit.

tuga

yes on default works fine, but on helios dont   :'(

1MileCrash

did you read ANY of the above posts?
Quote from: beemer on December 22, 2005, 06:02:38 PM
you need to modify manually the changes listed in the install to

helios theme folder/BoardIndex.template.php

find

if ($context['show_who'])
      echo '


And add below

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 />';
        }





The only thing php can't do is tell you how much milk is left in the fridge.



tuga

yes i did, but got this error

Execute Modification ./Themes/default/BoardIndex.template.php Test failed

1MileCrash

huh?

you need to edit it manually.
The only thing php can't do is tell you how much milk is left in the fridge.



beemer

Quote from: Bigguy on December 22, 2005, 06:06:04 PM
If everything works on the default theme wouldnt he just have to modify the "boardindex.template.php". ???

EDIT: Sorry I didnt see your edit.

Sorry bigguy "posted it" read it thought "naah that aint right"
http://www.bmw7resource.co.uk
SMF 1.1 RC1
MKP 1.1 RC1
Helios Multi RC1
-------------------------------------------------------
http://www.thefishsheadnhorsesarse.co.uk
SMF 1.1 RC2
TinyPortal 0.8.6

tuga

i do like that...

open xml and looking for...

if ($context['show_who'])
      echo '

after i copy this code and past on xml

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 />';
       }

and the result is this


<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
   <id>JayBachatero:membergroup_color_legend_ver1_smf1_1_b3-rc1</id>
   <version>1.0</version>
   <homepage>http://kevmundial.com</homepage>
   <file name="$sourcedir/ModSettings.php">
      <operation>
         <search position="after"><![CDATA[
         array('text', 'default_personalText'),
]]></search>
         <add><![CDATA[
         array('check', 'enableMCL'),
]]></add>
      </operation>
   </file>
   <file name="$themedir/BoardIndex.template.php">
      <operation>
         <search position="after"><![CDATA[
   if ($context['show_who'])
      echo '
      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 />';
       }
]]></search>
         <add><![CDATA[
   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 />';
       }
]]></add>
      </operation>
   </file>
   <file name="$themedir/languages/Help.english.php">
      <operation>
         <search position="before"><![CDATA[
   </ul>';
]]></search>
         <add><![CDATA[

$helptxt['enableMCL'] = 'Show a legend with the members position and color ex. [Administrator], [Newbie] and so on.';
]]></add>
      </operation>
   </file>
   <file name="$themedir/languages/ModSettings.english.php">
      <operation>
         <search position="after"><![CDATA[
$txt['default_personalText'] = 'Default personal text';
]]></search>
         <add><![CDATA[
$txt['enableMCL'] = 'Enable Membergroup Color Legend in board index';
]]></add>
      </operation>
   </file>
</modification>



i do wrong???


Oldiesmann

Quote from: Tippmaster on December 22, 2005, 06:26:31 PM
did you read ANY of the above posts?
Quote from: beemer on December 22, 2005, 06:02:38 PM
you need to modify manually the changes listed in the install to

helios theme folder/BoardIndex.template.php

find

if ($context['show_who'])
      echo '


And add below

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 />';
        }






Actually it's the other way around. You need to add that stuff before the echo statement.

<search position="after"> means that the code we're looking for should go after what we're adding.
Michael Eshom
Christian Metal Fans

tuga

i would say thank you for all of you for try help me but i cant do, i dont foun way to do correcly.

P.S. can anyone just edit the code and paste here? like that i copy also and aply

;)

1MileCrash

Quote from: tuga on December 22, 2005, 06:53:34 PM
i do like that...

open xml and looking for...

if ($context['show_who'])
      echo '

after i copy this code and past on xml

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 />';
        }

and the result is this


<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
   <id>JayBachatero:membergroup_color_legend_ver1_smf1_1_b3-rc1</id>
   <version>1.0</version>
   <homepage>http://kevmundial.com</homepage>
   <file name="$sourcedir/ModSettings.php">
      <operation>
         <search position="after"><![CDATA[
         array('text', 'default_personalText'),
]]></search>
         <add><![CDATA[
         array('check', 'enableMCL'),
]]></add>
      </operation>
   </file>
   <file name="$themedir/BoardIndex.template.php">
      <operation>
         <search position="after"><![CDATA[
   if ($context['show_who'])
      echo '
      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 />';
        }
]]></search>
         <add><![CDATA[
   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 />';
        }
]]></add>
      </operation>
   </file>
   <file name="$themedir/languages/Help.english.php">
      <operation>
         <search position="before"><![CDATA[
   </ul>';
]]></search>
         <add><![CDATA[

$helptxt['enableMCL'] = 'Show a legend with the members position and color ex. [Administrator], [Newbie] and so on.';
]]></add>
      </operation>
   </file>
   <file name="$themedir/languages/ModSettings.english.php">
      <operation>
         <search position="after"><![CDATA[
$txt['default_personalText'] = 'Default personal text';
]]></search>
         <add><![CDATA[
$txt['enableMCL'] = 'Enable Membergroup Color Legend in board index';
]]></add>
      </operation>
   </file>
</modification>



i do wrong???



no! you dont edit the xml. you do what the xml tells you to. it says open Boardindex.template.php, find this

if ($context['show_who'])
      echo '


and above it, add

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 />';
        }


that is what the modification is telling you to do.

The only thing php can't do is tell you how much milk is left in the fridge.



tuga

so, i open the Boardindex.template.php (helios) and search for this

if ($context['show_who'])
      echo '

and past above this

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 />';
        }

so the code shoul be...

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 '


its correctly?

1MileCrash

The only thing php can't do is tell you how much milk is left in the fridge.



tuga

ok thank you all members who try help me, its OK now

:D keep the good work guys

Advertisement: