Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: N3lson - joulukuu 28, 2005, 01:49:28 IP

Otsikko: This mod does`nt work , why?
Kirjoitti: N3lson - joulukuu 28, 2005, 01:49:28 IP
Hi , i´ve installed Experience Bar Mod, it work fine in default but in my theme no, why is that?
I implemented in Modifications_portuguese, and Display_template, and activated , and move the pictures...

This is the code i have in Display_template, it seems wright, whta is wrong , or what i must do more....

// Since we know this person isn't a guest, you *can* message them.
                                if ($context['can_send_pm'])
                                        echo '
                                                                <a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'], '</a>';
                        }
//Bar of Experience Mod

$bar_posts = $message['member']['posts'];

barExp();

if (!empty($modSettings['bar_exp_enabled']))
$bar_exper = '<br /><br />' . $bar_exps . '<br />';
else
$bar_exper = '';

echo '
<br /><br />', $bar_exper, '<br />';
                       }
   
   

                // Otherwise, show the guest's email.

Otsikko: Re: This mod does`nt work , why?
Kirjoitti: JayBachatero - joulukuu 28, 2005, 02:25:06 IP
How to make mods work with themes? (http://www.simplemachines.org/community/index.php?topic=34526.0)

-JayBachatero
Otsikko: Re: This mod does`nt work , why?
Kirjoitti: N3lson - joulukuu 28, 2005, 03:25:56 IP
i did xcorrectly but nothing hapened.....
Otsikko: Re: This mod does`nt work , why?
Kirjoitti: JayBachatero - joulukuu 28, 2005, 05:03:04 IP
Can you post the Dsplay.template.php for the theme you want to add it to?

-JayBachatero
Otsikko: Re: This mod does`nt work , why?
Kirjoitti: kegobeer - joulukuu 28, 2005, 09:02:50 IP
You don't have any opening braces, so why do you have two closing braces in your code?
Otsikko: Re: This mod does`nt work , why?
Kirjoitti: 1948Pal - joulukuu 28, 2005, 11:38:28 IP
There are also 2 more files that should be edited, in $sources/ModSettings.php, and Display.php! Did these modifications go through as well?
Otsikko: Re: This mod does`nt work , why?
Kirjoitti: N3lson - joulukuu 29, 2005, 01:45:07 AP
Yes , but to my them only need to change these templates:

There it is my Display template, (default and of my theme), i put both because in defualt theme it works.....


EDIT


Problem solved.....

It was missing one line in the top of display.template

   global $bar_exps, $bar_posts;

Thank you to all..and happy new year
Otsikko: Re: This mod does`nt work , why?
Kirjoitti: TuXie - huhtikuu 01, 2006, 11:07:26 AP
i installed it too. it is very interesting mod.