Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: anycontent change content with an if code (logged in/not logged in)  (Read 4288 times)

0 Members and 1 Guest are viewing this topic.

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28

Hello!
Is there anyway to make the content of anycontet change depends on if you are logged in or not,
like if you not are logged in it says LOG IN!
and if you are logged in it says Welcome [nick]! (or something)?
thanks/Gustav
« Last Edit: September 30, 2004, 02:07:34 pm by hooch »
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: one small question..(refer when loggin in)
« Reply #1 on: September 28, 2004, 01:45:10 am »

removed..sorry
« Last Edit: September 28, 2004, 03:57:10 pm by hooch »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: one small question..(refer when loggin in)
« Reply #2 on: September 28, 2004, 08:41:53 am »

we have a "one question per thread" policy on this board.
Anycontent will always be displayed, but it can contain php, so you could add the switch (if/then) yourself. I rather suggest looking at the mods board, there's a mod that will do what you request. Please always do a search before posting.

Joachim
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: one small question..(refer when loggin in)
« Reply #3 on: September 29, 2004, 04:08:11 pm »

i have serched but could not find the answer..(im not that good at php yes but i know how to do an if thing but it wont work..:

Code: [Select]
<?php
 
if (!USER_IDcpg_die(ERROR
'Your have to  <a href="login.php">log in</a> !<br>
Not<a href="register.php"> registered</a> yet? Do it now!'
__FILE____LINE__);


else {
print 
"You are in logged $name";
}
 
?>

« Last Edit: September 30, 2004, 02:05:13 pm by hooch »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: one small question..(refer when loggin in)
« Reply #4 on: September 30, 2004, 07:05:05 am »

I already answered the other one that you deleted. Don't do this stunt again, it makes the thread unusable by others, as there's an answer to a question that appears never to have been asked.

Joachim
Logged

hooch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: one small question..(refer when loggin in)
« Reply #5 on: September 30, 2004, 02:06:15 pm »

i changed the topic and took away the question..

but this question remains..(how to do the if thing in anycontent.php, see "" Reply #1 & #3  ""

thanks in advance!
/Gustav (soon good on php :D)
« Last Edit: October 01, 2004, 02:24:40 am by hooch »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: anycontent change content with an if code (logged in/not logged in)
« Reply #6 on: October 01, 2004, 06:42:36 am »

to stop you editing this thread further I locked it. ::)

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.