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.

How to not have a side bar on the admin pages only

YohnYohn New
edited April 2012 in Vanilla 2.0 - 2.8

I added a friends link area on my website, and I used the following to get the links to show up

 public function Base_Render_Before(&$Sender) {
 $AddFriends = new FriendsLinks($Sender);
 $Sender->AddModule($AddFriends, 'Panel');

and it does what i wanted, by adding the friends links to all the pages, but it also puts it on the admin pages.. its fine thats its there, but it just looks a little funny having it there..
I'm thinking its because I used Base_Render_Before, but I couldnt find another way to add it to all the pages

I'll prolly add this plugin to the site sometime in the near future, I just wanted to get it perfect first


Best Answer


  • Options
    hbfhbf wiki guy? MVP
    Answer ✓

    no need to perfect the plugin before uploading... it's open source so if the plugin is basically useful, others will download it and recommend tweaks to help it along.

    It's better to hook into the controllers you specifically are interested in rather than the base hooks, as they will spam all pages.

  • Options

    yeah I wanted it to be on all the pages, but didnt expect it to be on the dashboard as well lol..

    I just uploaded it to the add ons, its not the best because I didnt understand how to use the ->Form handler, but I'm getting the hang of it now.. Been working on a picture gallery, and I believe I just about have it figured out.

  • Options
    hbfhbf wiki guy? MVP

    I strongly recommend adding a few screen shots of what the plugin does to the ad-on page.

    I'm not sure i understand the plugin... I thought it was a way to identify other users as 'friends' on the site... not sure what the links stuff is or how it would work without database calls...

  • Options
    YohnYohn New
    edited April 2012

    alright, i just uploaded a picture of how it displays on the forum on the side.. theres not much to it just another box with links to other websites or to wherever the user wants to link to

  • Options
    hbfhbf wiki guy? MVP

    oh, i get it now.

    ok, so this isn't really a plugin i would necessarily use -- the idea of being able to friend users on the forum sounded great.

    But i'll download it and give you a few pointers next weekend unless someone else beats me to it.

    Either way you basically have two options, you can use a reg-ex to test the url of the page you are on and exclude anything dashboard related, or do as i recommended earlier and only load using controller specific hooks, i would gothe controller way, as it's less messy.

    I've done both... and for the reg-ex based solution, i still find myself adding new exclusions for random pages frequently.

Sign In or Register to comment.