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: How do I edit the login page?  (Read 2130 times)

0 Members and 1 Guest are viewing this topic.

SimonH

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
How do I edit the login page?
« on: March 15, 2009, 09:08:20 pm »

I want to place a message on the login page, which will say something like in order to view images you will need to register...

how do I do this please?
Logged

chzuqi

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Puzzz Jigsaw World
Re: How do I edit the login page?
« Reply #1 on: March 16, 2009, 10:12:41 am »

Code: [Select]
pageheader($lang_login_php['login']);
$referer = urlencode($referer);

put your code here

Code: [Select]
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
Logged

SimonH

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How do I edit the login page?
« Reply #2 on: March 16, 2009, 05:05:05 pm »

Do i need to enter code or can I just put my message there?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How do I edit the login page?
« Reply #3 on: March 17, 2009, 09:09:47 am »

Edit login.php, find
Code: [Select]
pageheader($lang_login_php['login']);
$referer = urlencode($referer);
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
and replace with
Code: [Select]
pageheader($lang_login_php['login']);
[tt]?>[/tt]
Your custom text goes here
<?php
$referer 
urlencode($referer);
echo 
'<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
You can replace
Code: [Select]
Your custom text goes herein that example with just text or HTML. No need to write PHP code there, as the line ?> is actually a command that means "parsing of PHP will stop, plain HTML will be read. The line
Code: [Select]
<?php turns the PHP mode back on.

Alternatively, you could replace
Code: [Select]
pageheader($lang_login_php['login']);
$referer = urlencode($referer);
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
with
Code: [Select]
pageheader($lang_login_php['login']);
$referer = urlencode($referer);
echo 'Your message here';
echo '<form action="login.php?referer='.$referer.'" method="post" name="loginbox">';
, which would mean that you wouldn't be ending and restarting PHP-processing - your message would be written on the login page using PHP's command "echo".

Either way, I don't think that it's really necessary to write on the login page that you have to register first - that should be pretty self-explanatory, as this is the case on all sites that require authentification. In my opinion, your site visitors will know that they need to register first before they can log in.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.