Version: 1.00, by ladyfyre
Developer Last Online: Apr 2007
Version: 2.2.x
Rating:
Released: 08-05-2002
Last Update: Never
Installs: 13
No support by the author.
Ok all...this is my VERY first hack written all by myself...so if it sucks, don't pick on me!!!!!
What it does: Well, the primary purpose is to give you separate user navigation/button bar for users who are logged in vs. users who have not registered or are not logged in.
**hint** this could also be used to encourage users to register. You can also add banners at the bottom of the unreg_navbar template which will appear to non-members, but will not appear to members. As they say...membership has it's priviledges
Now...my own site is EXTENSIVELY hacked. Many template changes and a few VERY minor hacks here and there of my own invention, along with 35+ hacks from here. If the code in the templates doesn't work perfectly for your site, feel free to change it around. You can also choose to simply copy the code you are currently using in your header file, and delete whatever doesn't apply to each group for that template.
In my version, I have prefixed each image with the imagesfolder replacement code. This is because I offer my users several styles to choose from, and this allows me to easily implement new styles without having things get wonky. Feel free to remove that part if you wish.
Time to implement: about 5 minutes.
Files edited: global.php (1 addition, 1 insertion)
templates edited: header
templates added: loggedin_navbar and unreg_navbar
Ok...here are the steps we need to take:
1. create a new template called loggedin_navbar and paste the contents of the .txt file by that name inside it.
2. create a new template called unreg_navbar and paste the contents of the .txt file by that name inside it.
3. BACKUP YOUR ORIGINAL FIRST, then open global.php and do the following:
// parse PHP include ##################
eval(gettemplate('phpinclude',0,0));
Add After it:
PHP Code:
//In or Out Hack
if ($bbuserinfo['userid']<1) {
eval("\$menu_navbar = \"".gettemplate("unreg_navbar")."\";");
} else {
eval("\$menu_navbar = \"".gettemplate("loggedin_navbar")."\";");
}
//In or Out Hack
4. Last but not least...
Edit your header template.
You can remove everything between these lines:
PHP Code:
<!-- logo and buttons -->
<!-- logo and buttons -->
and replace them with this:
PHP Code:
$menu_navbar
and that is all there was to it.
yeah...i know....kid stuff here...but everyone has to start somewhere..and since most of what i have hacked into our boards is only really applicable there, I am glad to finally have something to share here, since the folks here have given so much to me and my site!!!
If support or help is needed, post it here, and I will happily help if I can
Zip and instructions update to include merge the two variables into one.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
// parse PHP include ##################
eval(gettemplate('phpinclude',0,0));
Add After it:
PHP Code:
//In or Out Hack
if_($bbuserinfo['userid']<1) {
eval("\$menu_navbar = \"".gettemplate("unreg_navbar")."\";");
} else {
eval("\$menu_navbar = \"".gettemplate("loggedin_navbar")."\";");
}
//In or Out Hack
There's an error in your instructions. The line that says:
PHP Code:
if_($bbuserinfo['userid']<1) {
Should say:
PHP Code:
if ($bbuserinfo['userid']<1) {
The underscore causes a fatal error. You may probably want to fix it in the first post here as well as the instructions. Thanks for the useful hack.
Actually, the underscore i think somehow got added here on the forums, because it doesn't exist in the zip file instructions.....and none of my other copies have it there either.