Author Topic: Removal of login box  (Read 8588 times)

0 Members and 1 Guest are viewing this topic.

Offline Graeme1978

  • Pre-Newbie
  • Posts: 3
    • View Profile
Removal of login box
« 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Removal of login box
« Reply #1 on: March 31, 2005, 03:02:34 AM »
user_loginform.html template.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Graeme1978

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Removal of login box
« Reply #2 on: March 31, 2005, 03:08:30 AM »
Are you saying to remove that file?  If I do that I get the following error when viewing the gallery...

Quote
Template Error: Couldn't open Template ./templates/default/user_loginform.html

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Removal of login box
« Reply #3 on: March 31, 2005, 03:10:20 AM »
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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Graeme1978

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Removal of login box
« Reply #4 on: March 31, 2005, 03:17:22 AM »
Cheers - which part of user_loginform.html do I need to edit??

Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: Removal of login box
« Reply #5 on: April 01, 2005, 11:18:35 AM »
First backup your files, following was not tested ;)
I think it´s one way with fewest edits ?


home.html
FIND & delete
Code: [Select]
<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
Code: [Select]
<table width="100%" border="0" cellpadding="4" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>

OR
user_loginform.html
Replace all code with for example
Code: [Select]
<!-- nothing -->

I don´t know which Style/templates you use(??), but you can make a new template for example

CREATE login.html
Code: [Select]
{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>&nbsp;
        <a href="{url_new_images}"><font class="navtxt">{lang_new_images}</font></a>&nbsp;&nbsp;
       </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>
      &raquo; <a href="{url_lost_password}">{lang_lost_password}</a><br />
  &raquo; <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>&nbsp;</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
Code: [Select]
$lang['registered_user'] = "Registrierte Benutzer";
Replace with
Code: [Select]
$lang['registered_user'] = "";

EDIT
On closer examination it seems that removing login box needs a global editing  :?
For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: Removal of login box
« Reply #6 on: April 01, 2005, 01:32:50 PM »
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)
Code: [Select]
<table width="100%" border="0" cellpadding="4" cellspacing="0">
  <tr>
    <td valign="top" align="left">
     &raquo; <a href="{url_home}">{site_name}</a><br /> 
     &raquo; <a href="{cat_url}">{cat_name}</a><br /><br>
     &raquo; <a href="{url_top_images}">{lang_top_images}</a><br />
     &raquo; <a href="{url_new_images}">{lang_new_images}</a><br /> 
     &raquo; <a href="{url_search}">{lang_advanced_search}</a><br />
     
     </td>
  </tr>
</table>

So it looks:


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 ?
For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages