Hiding Menu bar from Guests |
| |||
How do I hide my menu from guests but only logged in members can see the menu that is the> Browse, News Feed, Phots, Blogs,Videos
|
| |||
in your phpmyadmin, table jcow_menu in all menu's of the type community, set the field protected to 1. then in your admin area you can set who can see this pages
|
| |||
how do i set who can see the pages?
|
| |||
or you can edit the code in /themes/yourtheme/page.tpl.php find: Replace with:
|
| |||
http://your-url/index.php?p=admin/permissions all menu items with the protected field set to 1 will show up. Just check the checkboxes for every role that has permission to view the menu item
|
| |||
I have upgraded to 4.1 and I have tried to change the menu and hide it from guest as earlier but I cant find the code. Please help
|
| |||
anyone know how to do this on the facebook theme? ive tried using the script above and it just removes the menu all together
|
| |||
[quote=vthing]anyone know how to do this on the facebook theme? ive tried using the script above and it just removes the menu all together[/quote] I use the Facebook theme & the most efficient way to do this is by the PHPmyadmin method that falcone mentioned above. When in phpmyadmin, click on your jcow database file in left panel, when your database file appears scroll down till you find "jcow_menu" click on this, when tables load in right panel, scroll across until you come to a column called protected. If you enter a value of 1 into every row of the field you want to make for members only, the tabs will be removed for logged out viewers. Example: say I want to make photos for members only, I scroll to, in my case ID#5 I click edit, then enter 1 in protected field row, then press go. This tab is now for members only and will not appear to logged out viewers. I'm sure there is a more permanent way, or proper way to do this, but this worked for me.
|
| |||
thats what it is for what effect are you looking for???
|
| |||
Only problem with that method is that if admin adds modules to site it resets settings and you will have to redo it again..
|
| |||
for Facebook theme Find this in your page.inc.php file [code] if (is_array($community_menu)) {
} and change to this [code] echo '<li '.check_menu_on('home/index').'>'.url(uhome(),t('Home')).'</li>'; if (is_array($community_menu)) {
}
|
| |||
Im guessing you mean page.tpl.php as theres no lines in page.inc that match that. everytime i add the above code then try to view the page errors just keep coming up, and I cant even load up my phpmyadmin when i type in the url above i just get a white page
|