red box red box
 

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

red box

Started by Hot Rides, August 06, 2008, 09:09:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hot Rides

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

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



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


css code

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

Joachim Müller

custom_header:<?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:{CUSTOM_HEADER}Pretty straightforward if you ask me.

Hot Rides

looks like Im trying to make things too hard again, lol