How to disable parts of the CZUser Info Block for Guests...

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How to disable parts of the CZUser Info Block for Guests...
Xandur
CZ Newbie
Xandur has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 12, 2004
0.00 posts per day
Posts: 8
Points: 442
   
I'm curious how I would edit the block-CZUser-Info.php file so that when a guest shows up, all he can see of the info block is the "register here", "lost password" and login section. Basically I'm looking for how I would set it up so the "membership", Most Online", and "Online Info" was only visible to logged in members.

Thanks in advance for any ideas or help!



Back to top Reply with quote
#2   re: How to disable parts of the CZUser Info Block for Guests
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
if (!is_user($user)) {
$content .= "CONTENT FOR ANONYMOUS";
} else {
if (is_user($user)) {
$content .= "CONTENT FOR USERS";
}
}




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: How to disable parts of the CZUser Info Block for Guests
Xandur
CZ Newbie
Xandur has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 12, 2004
0.00 posts per day
Posts: 8
Points: 442
   
Hey Telli,thank alot for the reply. I'm kind of a php noob, where would I place that code in the block-CZUser-Info.php file?

Thx alot again!



Back to top Reply with quote
#4   re: How to disable parts of the CZUser Info Block for Guests
Xandur
CZ Newbie
Xandur has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 12, 2004
0.00 posts per day
Posts: 8
Points: 442
   
Nevermind!!! I figured it out man. 1 little water bracket makes all the difference lol. Again, Thanks alot!



Back to top Reply with quote
#5   re: How to disable parts of the CZUser Info Block for Guests
Justsilvie
CZ Newbie
 Codezwiz Site Donator
Justsilvie has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Occupation: Whatever it takes
Gender: Female
Status: Offline
Joined: Sep 01, 2004
0.00 posts per day
Posts: 25
Points: 3,757
   


if (!is_user($user)) {
$content .= "CONTENT FOR ANONYMOUS";
} else {
if (is_user($user)) {
$content .= "CONTENT FOR USERS";
}
}


First this site has been a great help, and second can you please tell me a bit more about where to place the code above.

I want to make it so that the Membership info is not available for guests.

thanks in advance for any help you can provide. icon_smile.gif




_________________
Too bad that all the people who know how to run the country are busy driving taxicabs and cutting hair. -- George Burns 1896-1996
Back to top Reply with quote
#6   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
That "CONTENT FOR ANONYMOUS" would be the main content so where in the block you want it is where you would place it. Also after looking the above code should work but this one will also:


if (!is_user($user)) {
$content .= "CONTENT FOR ANONYMOUS";
} elseif (is_user($user)) {
$content .= "CONTENT FOR USERS";
}




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: How to disable parts of the CZUser Info Block for Guests
Justsilvie
CZ Newbie
 Codezwiz Site Donator
Justsilvie has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Occupation: Whatever it takes
Gender: Female
Status: Offline
Joined: Sep 01, 2004
0.00 posts per day
Posts: 25
Points: 3,757
   
Thanks for the reply, but I am just to dumb or to tired or both to figure it out, Everything I have tried has been wrong... icon_rolleyes.gif icon_sad.gif icon_redface.gif

I am clueless and I will never learn php.... doubt.gif eusa_doh.gif




_________________
Too bad that all the people who know how to run the country are busy driving taxicabs and cutting hair. -- George Burns 1896-1996
Back to top Reply with quote
#8   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Post the code your trying to use it in and exactly what your trying to do.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#9   re: How to disable parts of the CZUser Info Block for Guests
Justsilvie
CZ Newbie
 Codezwiz Site Donator
Justsilvie has been a member for over 20 year's 20 Year Member
usa.gif texas.gif
Occupation: Whatever it takes
Gender: Female
Status: Offline
Joined: Sep 01, 2004
0.00 posts per day
Posts: 25
Points: 3,757
   
I am try to do the same thing as Xandur. But he is a bit brighter then I am.

I would edit the block-CZUser-Info.php file so that when a guest shows up, all he can see of the info block is the "register here", "lost password" and login section. Basically I'm looking for how I would set it up so the "membership", Most Online", and "Online Info" was only visible to logged in members.

Thanks for taking time out to help. I am currently reading everything in this forum so I won't have to ask so many question. icon_eek.gif




_________________
Too bad that all the people who know how to run the country are busy driving taxicabs and cutting hair. -- George Burns 1896-1996
Back to top Reply with quote
#10   Re: re: How to disable parts of the CZUser Info Block for Gu
wolf
CZ Active Member
usa.gif indiana.gif
Occupation: Student; Flash, HTML, PHP developer
Age: 34
Gender: Male
Status: Offline
Joined: Jul 25, 2003
0.02 posts per day
Posts: 168
Points: 10,417
AIM Address Yahoo Messenger MSN Messenger 
Download the following file and REPLACE the original. Note to Telli: All copyright information is still there. I didn't add anything that advertises my site or my name.



Attached Files
block.zip (3.16 KB, Downloaded: 5248 Time(s))



_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum