Login/Logout. Login/Logout.
 

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

Main Menu

Login/Logout.

Started by mixmasterhank, July 25, 2004, 07:04:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mixmasterhank

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:

       <?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.

Joachim Müller

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

mixmasterhank

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.

mixmasterhank

miniCMS work with CPG1.3.1?

Joachim Müller

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

GauGau

mixmasterhank

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?

Joachim Müller

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