4images Forum & Community
4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: Graeme1978 on March 31, 2005, 02:57:23 AM
-
Hi all,
Is there any way of removing the login box from the 4images gallery frontpage? I've got a small gallery for which I do not require users to register or login.
If anybody can tell me exactly what info I need to remove and from which files I would be most grateful :)
Regards,
Graeme
-
user_loginform.html template.
-
Are you saying to remove that file? If I do that I get the following error when viewing the gallery...
Template Error: Couldn't open Template ./templates/default/user_loginform.html
-
no, not remove, but edit it, otherwise u'll need do changes in includes/page_header.php (wich is not very a good idea) or edit every main template and remove {user_box} tag from each.
-
Cheers - which part of user_loginform.html do I need to edit??
-
First backup your files, following was not tested ;)
I think it´s one way with fewest edits ?
home.html
FIND & delete
<tr>
<td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
</tr>
user_loginform.html
Replace all code with for example
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
OR
user_loginform.html
Replace all code with for example
<!-- nothing -->
I don´t know which Style/templates you use(??), but you can make a new template for example
CREATE login.html
{header}
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="navbar" height="23">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" width="50%">
<img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" /><font class="navtxt">DüsiPixel Home</font>
</td>
<td align="right" width="50%">
<a href="{url_top_images}"><font class="navtxt">{lang_top_images}</font></a>
<a href="{url_new_images}"><font class="navtxt">{lang_new_images}</font></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="row2" valign="top">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">{user_box} </td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{if random_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">
<br />
{random_image}
<br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_image}
<p align="center">
<?php
echo date("d.m.Y, H:i");
?>
</p>
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="18" height="18" /></td>
<td width="100%" valign="top"> <br />
<b class="title">Login</b>
<hr size="1" />
<p><br><br><table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td valign="top" align="left">
<form action="{url_login}" method="post">
{lang_user_name}<br />
<input type="text" size="10" name="user_name" class="logininput" />
<br />
{lang_password}<br />
<input type="password" size="10" name="user_password" class="logininput" />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>
<input type="checkbox" name="auto_login" value="1" />
</td>
<td><span class="smalltext">{lang_auto_login}</span></td>
</tr>
</table>
<br />
<input type="submit" value="{lang_login}" class="button" />
</form>
» <a href="{url_lost_password}">{lang_lost_password}</a><br />
» <a href="{url_register}">{lang_register}</a></td>
</tr>
</table><br /><br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{category_dropdown_form}</td>
<td align="right">{setperpage_dropdown_form}</td>
</tr>
</table>
<p> </p>
</td>
<td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
{footer}
And now you can reach the loginform via "yourdomain.com/index.php?template=login"
or you login via yourdomain.com/admin/index.php
perhaps you have to edit
language/yourlanguage/main.php
Find
$lang['registered_user'] = "Registrierte Benutzer";
Replace with
$lang['registered_user'] = "";
EDIT
On closer examination it seems that removing login box needs a global editing :?
-
I have solved it like this (not removed it, just replaced with navigationmenue, it´s just easier) :
Find user_loginform.html
Replace code with this one (example)
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td valign="top" align="left">
» <a href="{url_home}">{site_name}</a><br />
» <a href="{cat_url}">{cat_name}</a><br /><br>
» <a href="{url_top_images}">{lang_top_images}</a><br />
» <a href="{url_new_images}">{lang_new_images}</a><br />
» <a href="{url_search}">{lang_advanced_search}</a><br />
</td>
</tr>
</table>
So it looks:
(http://people.freenet.de/roaddogg2k2/withoutloginform.jpg)
1st link -> Link to mainpage
2nd link -> link to random categorie (according to random image)
3rd link -> top pictures
4th link -> new pictures
5th link -> search
You can fit it by your wishes ;)
I want to display only random maincategories, not every cat, but I don´t know how? Is it possible ?