Auto Logout navbar on html page

Go down

Auto Logout navbar on html page

Post by betistapir on January 27th 2012, 1:51 am

here is my homepage, i made html page as my home page

i just made my navbar on that homepage
and the problem is, i already login and can i change it automatically to logout? ...
just like the default navbar on forum
any script of that?

or can i put the default navbar forum to my html page without adding header and footer inside? study

betistapir
New Member

Male Posts : 20
Reputation : 1
Language : indonesia

Back to top Go down

Re: Auto Logout navbar on html page

Post by betistapir on January 28th 2012, 4:56 pm

bump

betistapir
New Member

Male Posts : 20
Reputation : 1
Language : indonesia

Back to top Go down

Re: Auto Logout navbar on html page

Post by Mr_Waffle on January 28th 2012, 6:12 pm

Try
Code:
<!-- BEGIN switch_user_logged_in -->
HTML for logged in users
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_user_logged_out -->
HTML for logged out users
<!-- END switch_user_logged_out -->
That works on punBB. Idk about other versions.
avatar
Mr_Waffle
New Member

Posts : 24
Reputation : 0
Language : Dutch | HTML | CSS | JavaScript | jQuery | Java | MIPS ASM | Learning C#

Back to top Go down

Re: Auto Logout navbar on html page

Post by betistapir on January 28th 2012, 6:48 pm

just like this?
Code:

<!-- BEGIN switch_user_logged_in -->
   <a href="http://url/login" title="Login">Login</a>
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_user_logged_out -->
        <a href="http://url/login?logout title="Logout">Logout</a>
<!-- END switch_user_logged_out -->

i tried it but doesnt work ...

betistapir
New Member

Male Posts : 20
Reputation : 1
Language : indonesia

Back to top Go down

Re: Auto Logout navbar on html page

Post by Mr_Waffle on January 28th 2012, 6:55 pm

You're using a custom HTML page or editing the templates?

In the first case, you'll have to use some way to see if a user is logged in. You'll need to use Javascript for this. The above method won't work.

If you're using the templates this should work fine.
avatar
Mr_Waffle
New Member

Posts : 24
Reputation : 0
Language : Dutch | HTML | CSS | JavaScript | jQuery | Java | MIPS ASM | Learning C#

Back to top Go down

Re: Auto Logout navbar on html page

Post by Sir Chivas™ on January 28th 2012, 6:56 pm

Hey,

betistapir may i get the link of your forum?




Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please y it as solved.


avatar
Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6810
Reputation : 433
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum