View Full Version : heres an idea ?
Mickie D
09-28-2004, 05:51 AM
i love the CMPS its the best by far portal about ;)
thank you.
here is the questions :)
1. I have modules i dont want to display on the forums main portal but i would like to display on extra pages i have added (basicly they are inactive but i would like them active on another page)
is this possible
2. I installed your very easy to use instructions for adding side bars to the forum :( (brilliant) but i had an idea after i done a poll on my site found most found it useful but alot did not like it
so i made an addon to display the sidemenu in the FORUMHOME by default and i added a user profile field then re-coded the index.php and now my members can switch of or on the side bar on the forumhome
if you want me to release it i will but if it has already been done i am sorry
but i really need help with question one as my php is ok but not that good :(
Brian
09-28-2004, 02:34 PM
1). Just make the module active on that particular page (there are options to set which modules are active on a per-page basis when editing pages).
2). As far as I know there hasn't been anything like that released, so I'm sure others would find that useful. :)
Mickie D
10-01-2004, 09:14 AM
i made the option to switch of the side bars its very basic and could do with some work but this works ;)
what this hack does
it allows you to switch off your sidebar (menu or module) via your usercp options :)
ONLY USE THIS ADDON IF YOU HAVE THE SIDEBAR IN FORUMHOME (index.php) INSTALLED
Step 1
add a new user profile field
multiple selection check box
Title = Switch off forum sidebars
Description = Checking this box will switch off the forum side bars
Limit Selection = 1
boxes per line = 1
Display order this is very important to remember this for the php code edits below
Field required = NO
Field edited by user - YES
private field = YES
Field Searchable on Members List =NO
Show on Members List = NO
Step 2
RIGHT NOW FOR THE PHP EDITS
IN index.php FIND
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');
REPLACE THAT CODE WITH THIS
if ($bbuserinfo['fieldXX'] == False)
{
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');
}else{
}
dont forget to replace fieldXX with the field from your user profile field (step1)
i.e mine is 21 so fieldXX would become field21
FIND (still in index.php)
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('$HTML = "' . fetch_template('FORUMHOME') . '";');
print_portal_output($home, $HTML);
REPLACE WITH
if ($bbuserinfo['fieldXX'] == False)
{
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('$HTML = "' . fetch_template('FORUMHOME') . '";');
print_portal_output($home, $HTML);
}
else{
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('FORUMHOME') . '");');
}
again change fieldXX to your field the same as you done above
DONE !!!
late addition is i found that i did not want a menu for every style :)
so....
change (2 instances in index.php)
if ($bbuserinfo['fieldXX'] == False)
TO
if ($bbuserinfo['fieldXX'] == False AND $styleid != XX)
change XX to whatever style you dont want the menu to be shown on.. and dont forget to change the fieldXX again ;)
have fun
Mickie D
10-01-2004, 09:25 AM
1). Just make the module active on that particular page (there are options to set which modules are active on a per-page basis when editing pages).
hi brian when i try and click one its shaded out its inactive on the main page so i cant enable it on any other pages :(
Brian
10-01-2004, 09:59 AM
That means you have the module completely inactive then. Just edit the module and set 'Active' to yes. ;)
Mickie D
10-01-2004, 10:06 AM
yeah but then it is active on my main page and i dont want it active on there ?
Brian
10-01-2004, 10:07 AM
Then turn it off on that page.
Mickie D
10-01-2004, 10:14 AM
DOH just noticed that the defualt homepage is in the edit pages section
sorry to bother you :(
thanks again and i hope someone finds my addon useful if you want i can move it to another location in your hacks section its up 2 you :)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.