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: Message at top for users not logged in  (Read 3165 times)

0 Members and 1 Guest are viewing this topic.

harmzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Message at top for users not logged in
« on: December 05, 2006, 03:57:17 pm »

Hi,


Is there a way to to display a message at the top.. for users that have not logged in and once they have it dissapears... or if possible a message is displayed according to what group they belong in...

thanks


Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Message at top for users not logged in
« Reply #1 on: December 05, 2006, 05:24:29 pm »

you can modify this plugin to your needs
http://forum.coppermine-gallery.net/index.php?topic=33349.0

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Message at top for users not logged in
« Reply #2 on: December 05, 2006, 11:25:29 pm »

Or use anycontent.php, with code similar to this:
Code: [Select]
<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
if (!
USER_ID) {
        
starttable("100%""Not logged in");

        
?>

        <tr><td class="tableb" >
        Hello guest,<br />
        You're currently not logged in. You should do so now - you're missing the best stuff if you don't.
        <a href="register.php"Register</a> for free if you haven't already. If you have, then <a href="login.php">log in</a>.
        </td></tr>
        <?php
        endtable
();
} else {
    
// your code here that should be executed if a user IS logged in.
}
?>
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.