The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Auto Logout navbar on html page

View previous topic View next topic 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.

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.

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 mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6756
Reputation : 428
Language : English, Spanish, and French
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

View previous topic View next topic Back to top


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