hi there, I have am setting up a forum at http://www.forum4finance.com/discuss. I have added icons just under the menu to make it look more appealing. I was able to get the "Register" button working. Also the "login" button is working, but partially. I click on the login button and get to the login page, but after logging in i still see the login image... i want to display a logout image instead. Its like new users should see "Login" and logged in user should see "Logout" The same goes for Subscribe to Topic/Forum... Members should see "Subscribe" and subscribed members should see "Unsubscribed".. I am playing around with overall_header for login/logout and overall_footer for subscribe/unsubscribe... But can't get this too buttons to work... Any help in this matter would be of great help.. Thanks in advance..
Hey.. there is no one here who can help me with this... ? There are some "if" statements that i guess are not working properly.. i mean i am not able to get them work properly...
There are some guides for phpBB's template engine syntax. You can use: <!-- IF S_USER_LOGGED_IN --> Logout button <!-- ELSE --> Login button <!-- ENDIF -->
You are a genius... It worked... Images change... But there is no links on the images ??? how can i add links to the images... see http://forum4finance.com/discuss thanks again
You can use the template engine's variable "U_LOGIN_LOGOUT", which will provide a link to either the login or logout page, depending on whether you're logged in or not. Just use this: <a href="{U_LOGIN_LOGOUT}" alt="{L_LOGIN_LOGOUT}"> <!-- IF S_USER_LOGGED_IN --> Logout image here <!-- ELSE --> Login image here <!-- ENDIF --> </a> Code (markup):
That worked... thanks a ton buddy.. . will also try the same method for subscribe / unsubscribe button...
Hey there... I worked on the subscribe / unsubscribe thing.. this is how i out it up.. <!-- IF S_WATCHING_FORUM --><img src="http://www.forum4finance.com/images/unsubscribe.gif" width="85" height="76" alt="Unsubscribe" /><!-- ELSE --><img src="http://www.forum4finance.com/images/subscribe.gif" width="85" height="76" alt="Subscribe" /><!-- ENDIF --><!-- IF S_WATCHING_TOPIC --><img src="http://www.forum4finance.com/images/unsubscribe.gif" width="85" height="76" alt="Unsubscribe" /><!-- ELSE --><img src="http://www.forum4finance.com/images/subscribe.gif" width="85" height="76" alt="Subscribe" /><!-- ENDIF --> PHP: but now i see two icons on my icon menu...
Well, the coding as it is now is supposed to show 2 images... If I understood what you're trying to do, use this code: <!-- IF S_WATCHING_FORUM OR S_WATCHING_TOPIC --><img src="http://www.forum4finance.com/images/unsubscribe.gif" width="85" height="76" alt="Unsubscribe" /><!-- ELSE --><img src="http://www.forum4finance.com/images/subscribe.gif" width="85" height="76" alt="Subscribe" /><!-- ENDIF --> HTML:
hi, I added the code, but now I see an error. Parse error: syntax error, unexpected T_VARIABLE in /home/bizzu0/public_html/forum4finance/discuss/includes/template.php(614) : eval()'d code on line 201 PHP:
Try a lowercase "OR". <!-- IF S_WATCHING_FORUM or S_WATCHING_TOPIC --><img src="http://www.forum4finance.com/images/unsubscribe.gif" width="85" height="76" alt="Unsubscribe" /><!-- ELSE --><img src="http://www.forum4finance.com/images/subscribe.gif" width="85" height="76" alt="Subscribe" /><!-- ENDIF --> HTML:
Hey thanks for replying... The error is gone... but still the function is not working... What I need is the "subscribe to forum" & "subscribe to thread" option which is there in the footer to come up in the icon...
Okay, I understand the part about getting subscribed to a thread. However I can't seem to find any trace about being subscripted to a forum...? 0.o
Hey... he is an example.... when you visit here: http://www.phpbb.com/community/viewforum.php?f=14 in the footer you will see an option "Subscribe forum" and when you go here: http://www.phpbb.com/community/viewtopic.php?f=14&t=358419 in the footer you will see an option "Subscribe topic" This is what I want to replicate on top of my forum. The code for the same in the footer looks like this <!-- IF not S_IS_BOT --> <!-- IF S_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe-forum"<!-- ELSE -->class="icon-subscribe-forum"<!-- ENDIF -->><a href="{S_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF --> <!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe-topic"<!-- ELSE -->class="icon-subscribe-topic"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a></li><!-- ENDIF --> <!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li><!-- ENDIF --> Code (markup):