PDA

View Full Version : How can I show the welcome message instead of login info in navbar?


yl88
06-13-2004, 02:11 AM
I want to show the welcome message for guests instead of login info in navbar since there is a login at the side block.

I want to add something like below in the "adv_portal"
<if condition="$show['guest']">
showing Welcome message for guest
</ if>


I try to add one template called "navbar_welcome", then call this template in "adv_portal", but it doesnt work!

Thanks!

yl

ogetbilo
06-13-2004, 10:08 AM
the part you want to modify is
between <!-- login form --> and <!-- / login form -->
in the navbar template.

your may try to replace the contents of that interval with:

<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont">GUEST WELCOME MESSAGE</td></tr></table>

Our Sponsors
 

TexasOutdoors
06-13-2004, 02:02 PM
What will you do if the users are on the forum? And there is no login box in the navbar? Just curious.

yl88
06-13-2004, 09:43 PM
What will you do if the users are on the forum? And there is no login box in the navbar? Just curious.

yes, this is why i hesitate at editing the code between <!-- login form --> and <!-- / login form -->.


What I want to do is adding a new template as following.
navbar_welcome
<table align="center" class="page" cellspacing="0" cellpadding="0"width="100%">

<tr valign="top">
<td class="tcat" colspan="6"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
</tr>
<tr>
<td class="alt1" colspan="6">
<phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
</td>
</tr>
</table>

then, I edit the adv_portal like below:

.............
$navbar


<if condition="$show['guest']">
<!-- guest welcome message -->
$navbar_welcome
<!-- / guest welcome message -->
</if>

<table align="center" .....................


unfortunately, it doesnt show the welcome message up.

Any idea where I did wrong?

Our Sponsors
 

yl88
06-15-2004, 03:29 AM
Any one can help?

Brian
06-15-2004, 11:22 AM
Try this instead:

<if condition="!$bbuserinfo['userid']">

yl88
06-16-2004, 12:28 PM
I even add it without condition, it still doesnt show up the message.

adv_portal:

.............
$navbar



$navbar_welcome

<table align="center" .....................


Please give me some idea.

thanks!

Brian
06-16-2004, 12:56 PM
Sorry, I just realized how you did that. $navbar_welcome isn't going to do anything unless you add some code to define what that variable should be. Just add the code to your adv_portal template where you currently have $navbar_welcome.