Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Login/Logout.  (Read 5348 times)

0 Members and 1 Guest are viewing this topic.

mixmasterhank

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Login/Logout.
« on: July 25, 2004, 07:04:46 pm »

I've moved the navigation bar from the template to the main of my site. And have begun to use the coppermine's login/user database for all of my site. However I can't seem to get the login/logout links to appear correctly on my mainpage. This is the code that I've got:

Code: [Select]
       <?php
if (!USER_ID){
?>

        <a target="ifm" href="http://www.destinationundefined.com/imgal/register.php">Register</a><br>
        <a target="ifm" href="http://www.destinationundefined.com/imgal/login.php">Login</a>
        <?php
}
else{
?>

        <a target="ifm" href="http://www.destinationundefined.com/imgal/logout.php">Logout</a>
        <? } ?>

http://www.destinationundefined.com/index2.php is the website, take a look to get an idea of what I'm trying to do.
« Last Edit: July 25, 2004, 07:20:40 pm by mixmasterhank »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Login/Logout.
« Reply #1 on: July 25, 2004, 07:42:48 pm »

how is your main site suppossed to "know" USER_ID? Unless you make your main site part of coppermine, or you add a routine to read coppermine's cookie, you simply won't be able to do what you're trying to do.
I suggest you take a look at the mods/hacks board and look into "miniCMS for Coppermine", this might be what you're looking for.

Although frames/iframes might appear as an elegant solution in the first place I recommend not using this technique, as there are great disadvantages that come with frames/iframes.

GauGau
Logged

mixmasterhank

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Login/Logout.
« Reply #2 on: July 25, 2004, 08:53:07 pm »

Yeah, but this was the only solution i could find to making the layout the way I wanted to. is there a way to make my index page be able to read the coppermine cookie? and i'll take a look at the minicms right now.
Logged

mixmasterhank

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Login/Logout.
« Reply #3 on: July 25, 2004, 09:11:26 pm »

miniCMS work with CPG1.3.1?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Login/Logout.
« Reply #4 on: July 26, 2004, 06:52:16 am »

I can see no reason why it should not work. Please try it and report back.

GauGau
Logged

mixmasterhank

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Login/Logout.
« Reply #5 on: July 26, 2004, 08:34:39 pm »

Well I've decided I don't want to use any sort of CMS system because I can't really get the layout to look like I want, how my website looks right now http://www.destinationundefined.com/index2.php. So is there any way that I can make my index read the CPG cookies or am I out of luck?

You understand what I'm trying to do though, right?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Login/Logout.
« Reply #6 on: July 27, 2004, 07:31:44 am »

take a look at Coppermine's cookie mechanism in include/init.inc.php (around // Do some cleanup in GET, POST and cookie data and un-register global vars). If you know php, you can easily create a custom function that will read the cookie set by coppermine and do the needfull.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.