Main Menu and Members Menu

Need A Custom Modification To Your Webdate Script. Ask For Help Here.

Main Menu and Members Menu

Postby Gnus on Tue Jul 29, 2008 1:16 pm

Ok I'm trying to have a main menu for user that are not registered or logged in and use the members_menu for user logged in and registered. Is there a way to identify a person who is not registered or logged in and only display the main_menu for them and for registered user to only display the members menu and not both.

Gary
Gnus
 
Posts: 10
Joined: Mon Jun 30, 2008 10:46 pm

Re: Main Menu and Members Menu

Postby paul on Tue Jul 29, 2008 10:04 pm

open engine/pages/members_menu.php

at the end of the file find:

Code: Select all
parseVariables("templates/members_menu.html");   
   }
?>


add an else into this code so it will now look like this:

Code: Select all
parseVariables("templates/members_menu.html");   
   } else { parseVariables("templates/notmembers_menu.html");}
?>


now you need to create a file:

templates/notmembers_menu.html

add the html links you want to appear in place of the logged in members menu... make sure you put a message like LOG IN so members know they are not logged in while viewing this menu

let me know if you need any further help

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Main Menu and Members Menu

Postby Gnus on Wed Jul 30, 2008 11:01 am

Never mind I got it.

Gary
Last edited by Gnus on Wed Jul 30, 2008 3:29 pm, edited 1 time in total.
Gnus
 
Posts: 10
Joined: Mon Jun 30, 2008 10:46 pm

Re: Main Menu and Members Menu

Postby Gnus on Wed Jul 30, 2008 3:22 pm

Never mind Paul got it figured out. Something happened when uploading the html file. Thanks for the help.

Gary
Gnus
 
Posts: 10
Joined: Mon Jun 30, 2008 10:46 pm

Re: Main Menu and Members Menu

Postby Gnus on Wed Jul 30, 2008 3:26 pm

What I did is what you told me, plus I did this, that way it would do the same on the index page.

paul wrote:if you want it to appear on the index page for people who are logged in only..

you would open in your root directory

index.php

find the lines:

Code: Select all
if($current_page != "index" && $current_page != "tell_friend" && !$admin_preview)
       {
          ob_start();
          include "engine/pages/members_menu.php";
          $members_menu = ob_get_contents();
          ob_end_clean();
       }


should be near 300 somewhere.

change it to:

Code: Select all
if($current_page != "tell_friend" && !$admin_preview)
       {
          ob_start();
          include "engine/pages/members_menu.php";
          $members_menu = ob_get_contents();
          ob_end_clean();
       }


if you want the member menu to be viewed by anyone even not logged in you need to modify the file

engine/pages/members_menu.php

Paul


Gary
Gnus
 
Posts: 10
Joined: Mon Jun 30, 2008 10:46 pm


Return to Need A Modification To Your Webdate Script?

Who is online

Users browsing this forum: No registered users and 4 guests

cron