1

Topic: Can someone attempt this?

Id like to use the login box mod http://punbb.org/forums/viewtopic.php?id=10787


but after you login Id like to have a link next to the user name for logging OUT. That way I can remove login, register, and logout links from the menu and make room for my own links.


Thanks!!

Re: Can someone attempt this?

To have the logout link you require

in header.php
replace

    $tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<ul class="conl">'."\n\t\t\t\t".'<li>'.$lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong></li>'."\n\t\t\t\t".'<li>'.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'</li>';

with

    $tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<ul class="conl">'."\n\t\t\t\t".'<li>'.$lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong> - <a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a></li>'."\n\t\t\t\t".'<li>'.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'</li>';

3

Re: Can someone attempt this?

This is after I install the login box mod? Then I change this code?

Re: Can someone attempt this?

this

http://forum1.dharmil.info/

http://www.dharmil.info/ - My site

http://www.yourarcadesite.1.vg/ - My Arcade, Play 250 games online for free and Save your high score!

http://www.forums.dharmil.info/ - My forums i created using php/mysql still working on them about 15% or more done

Re: Can someone attempt this?

dharmil wrote:

this

http://forum1.dharmil.info/

Do you know that you have a problem with your categorys that close and open. They dont sit right....

6 (edited by artic chill 2006-03-20 22:49)

Re: Can someone attempt this?

^^ I am sure he knows ^^


Let me code something up and then i will send... Give me a bit to make...(Well more like 5 min) then i will have this done for you!

-------------------------------------------------
Edit:
ARe you talking about the header that says Index, Userlist, Rules, ect??

If not look at the end of the download it has a add on that you can use

here it is:

##################################################
#Below adds you are "logged in as Username" after person is logged in
#and logout link below your punbb header!
##################################################

#
#-----[ 1. Open ]----------------------------------
#

include/user/login.php

#
#-----[ 2. Find ]-----------------------------------
#
        </div>
<?php
    }
}

#
#------[ 4. Replace with]-------------------------------
#

        </div>
<?php
    }
}else
{
?>
        <div class="logintop">
            <p>
                <?php echo $lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong>  |  <a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>'; ?>
            </p>
        </div>
<?php
}
My PunRes Wiki Mods:
1.) Remove Post Icon in View Topic And in Index
2.) Bold Links In Header
[img]http://www.the-artbreak.com/forum/img/smilies/socom.png[/img]

Re: Can someone attempt this?

StevenBullen wrote:
dharmil wrote:

this

http://forum1.dharmil.info/

Do you know that you have a problem with your categorys that close and open. They dont sit right....

yeah but i dont know how to fix it

http://www.dharmil.info/ - My site

http://www.yourarcadesite.1.vg/ - My Arcade, Play 250 games online for free and Save your high score!

http://www.forums.dharmil.info/ - My forums i created using php/mysql still working on them about 15% or more done

8

Re: Can someone attempt this?

Thanks everyone. Got it Artic. I replaced pun_status in the main.tpl so that "you are logged in as xxx" isnt listed twice and the login box sits right below the breadcrumbs. Pretty sweet.


Artic what do I need to add to make the "login, logout, register" links bold?


Thanks!!