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: red box  (Read 3297 times)

0 Members and 1 Guest are viewing this topic.

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
red box
« on: August 06, 2008, 09:09:58 pm »

So I put a msg on my website to remind people to login so they can comment and rate pics. I codded it so it only shows when not logged in. I used css to put it in a red box so its more noticable, now the box wont go away

code for the meassge using a custom header
Code: [Select]
<?php
$customloginmsg1 
'Welcome to Hot Rides User Web Gallery. Please login or register to more fully use our site, After logging in you will be able to upload pictures and comment and rate others.';
$customloginmsg2 '';

if (!
USER_ID) {
  echo 
$customloginmsg1;
} else {
  echo 
$customloginmsg2;
}  
?>

code in template.html of theme to make it show
Code: [Select]


<div class="CUSTOM_HEADER">
{CUSTOM_HEADER}
</div>

css code
Code: [Select]
.CUSTOM_HEADER{
background: #FF0000;
display: block;
margin-left: 25%;
margin-right: 25%;
height: 40px;
width: 50%;
padding: 5px;
border: 4px;
text-align : center;
text-decoration: bold;
}

how can I male the red box disappear with the message?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: red box
« Reply #1 on: August 06, 2008, 10:06:09 pm »

custom_header:
Code: [Select]
<?php
if (!USER_ID) {
  echo <<< EOT
    <div class="CUSTOM_HEADER">
        Welcome to Hot Rides User Web Gallery. Please login or register to more fully use our site, After logging in you will be able to upload pictures and comment and rate others.
    </div>
EOT;

?>

template.html:
Code: [Select]
{CUSTOM_HEADER}Pretty straightforward if you ask me.
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: red box
« Reply #2 on: August 06, 2008, 11:42:58 pm »

looks like Im trying to make things too hard again, lol
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.