Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Trying To Unpublish Menu

Trying To Unpublish Menu

When trying to unpublish a menu for "all logged in users" I get the following error,

CHAMELEON DEBUG ON
Current date and time: "2013-04-22 10:13:44am" in timezone "UTC"
Processing rule id 4 ("Guest Menu Chameleon")
- Cookie not found
Started FAIL action for rule id 4
Finished FAIL action: default template style not changed
Finished all rules
Final template style unchanged

I tried using sessions instead of cookies, but the same error results except it says "Session Variable not found".

Please advise

netician
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Trying To Unpublish Menu

Do you really need to be searching for the cookies or session variables? If you simply want to detect logged in users, then you can put this in the PHP box:

if ($user->id == 0) return true;

That will make the rule SUCCEED if the user is a guest.

(Note: this is for ChameleonLite on Joomla 1.5. In the paid-for Pro versions there is a GUI control for selecting logged-in users or guests)

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1681
Total Polls:
6
Total Posts:
5912
Posts this week:
6
User Info:
 
Total Users:
11501
Newest User:
riley58745
Members Online:
0
Guests Online:
156

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked