How to not have a side bar on the admin pages only
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) { include_once(PATH_PLUGINS.DS.'SideBarLinks'.DS.'class.FriendsLinks.php'); $AddFriends = new FriendsLinks($Sender); $AddFriends->GetData($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
-
hbf MVP
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.
0
Answers
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.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
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.
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...
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
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
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.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained