Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
LeaderBox on Bootstrap theme
![Tof](https://us.v-cdn.net/5018160/uploads/userpics/124/nI37NDHGGVT5G.png)
Vanilla 2.2
Theme Bootstrap
Serveur de Test : http://88.181.151.128:8080/
Hi all,
I would like to have this on all pages
Despite my research, I can not do it:
https://vanillaforums.org/discussion/comment/220790#Comment_220790
https://blog.vanillaforums.com/help/vanilla-forums-friday-theme-tip-adding-leaderboard/
Thanks all
Tagged:
0
Comments
You would need to add the modules to you class.themehooks.php file from your theme if there is one. If you do not have one you can create one and call it class.bootstrapthemehooks.php or the name of the theme you are using and place it in the bootstrap theme folder.
This is an example themehooks file only you need to find the real name of the module :
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You could also edit the YAGA application.
In the class.hooks.php in the settings folder for yaga file find line 566 look for this code
Then add bellow it
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
hi,
Thank you for your answer,
it not working (Error 500)
I have put the code after line 606:
I also cleared the cache
If you want it on every page, I would disable the default display of the leaderboard via the yaga dashboard and add the module to every page via a plugin or via a smarty tag in your master template file.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
ok thank
What is the plugin ?
No, you did not understand, of course you get an error if add the same function. Please look at the second comment.
The first code block is already there for the activity controller. You must add the others bellow that one. Do not add it twice.
The themehooks file is like a plugin as the example in the first comment shows.
Adding it to the master template will add the leaderboard in places that are not useful. In other words in every single page such as entry or plugin pages.
If that is what you want then disable the leaderboard from the dashboard so it does not load it, but it will load via your theme. That is what hgtonight suggested.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Sorry my English is very bad ...
I have not understood yet ...
I open the file ../applications/yaga/setting/class.hooks.php
I seek your second comment, that I understand
I then tried to paste the code ... But still errors ...
You can find my class.hooks.php file below:
http://www.tablette-chinoise.net/Download/class.hooks.zip
Ok, see if this will work. Remember to disable the application and delete the .ini file from the cache before you re enable the Yaga application.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thanks again,
I can not activate YAGA with your file. (Cache cleared)
I'm looking the code, this is normal?
$this->_AddResources($Sender);
I replaced with this:
$this->AddResources($Sender);
But, it's not working
No, I can't test all this now because I am traveling and don't have all my files with me. However if this still does not work, since i am not sure what the error is exactly, it should say in the cgi error logs where you host your files and forum. It could be something simple like an extra } or a missing } bracket. Or it could be something else but it would show in the error log.
If this does not work, then try adding a themehooks file as example 1 in my first comment.
Or add the module in the tpl of the theme in the panel asset div
find asset panel in the default.master.tpl file from bootstrap theme add the module as I did bellow bellow the panel.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Hi,
I created a theme class.bootstrap hooks.php file to the root of the theme BOOTSTRAP
I put in the information of example 1
I'm an error 500
Sorry![;) ;)](https://open.vanillaforums.com/plugins/emojiextender/emoji/little/wink.png)
Did you remember to disable the leaderboard from the dashboard ? If you add the hooks file and you do not disable the leaderboard from the dashboard, that could cause a problem.
Try adding the third option to your default.master.tpl as already explained above please re read that part.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Hi,
I disabled Leader BOX
1. Replaced the class.hooks.php file
2. clearing the cache
Result : I always error 500
In the second Temp
Result: I always error 500
With only {module name="LeaderBoardModule"}
The leaders of the display appears
How can I make show Leader of the week (leader de la semaine)
It's ok
just simply add this to his theme default.master.tpl
Open
default.master.tpl
Find
{asset name="Panel"}
Add just after
No changes to the file : class.hooks.php