Quote:
Originally Posted by NexDog
Hi Logician,
I have had this hack working great on our VB2 board for two years but now we are finally upgrading to vb 3.5.0 and this hack is integral to our design. What we do is show a message on the left menu that either displays user info for members or a "Sign Up" messgae for visitors. See here - http://nexusportal.net.
I'm having trouble getting this to work in VB 3.5.0 though. We don't need the pop-up or separate table - we need to keep the current integration. Therefore your step 2 maybe shouldn't apply? In the forumhome template on vb2 I put:
<!-- Begin Conditional Hack-->
[[($bbuserinfo[userid]!=0)]]
Stuff here
[[/($bbuserinfo[userid]!=0)]]
[[($bbuserinfo[userid]==0)]]
Other stuff here
[[/($bbuserinfo[userid]==0)]]
<!-- /End Conditional Hack-->
I put $dfh_announcement in the forumhome template where I want the message to show and then put the code in the box in the vbulletin settings section which is:
Code:
<!-- Begin Conditional Hack-->
[[($bbuserinfo[userid]!=0)]]
<td align="center"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>USER
INFORMATION </strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td width="185" height="100%" align="left" valign="top" background="nexica_01/main/sidebar_bg.jpg"><table width="162" border="0" cellpadding="1" cellspacing="1" valign="top">
<tr>
<td height="3" valign="top"></td>
</tr>
<tr>
<td valign="top"><smallfont>
<p>
<center>
$avatarimage</a>
</center>
<br>
$welcometext<strong><br>
<br>
Total Posts: <font color="#3A3D65">$bbuserinfo[posts]</font><br>
<b>Credits:</b> <font color="#3A3D65">$storepoints</font>
<br>
<br>
You Last Visited:</strong><br>
$bbuserinfo[lastvisitdate].<br>
<br>
<strong>Time Now:</strong> $timenow.<br>
<br>
<img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
<a href="store.php?s=$session[sessionhash]&action=main">Your Store</a><br>
<br>
<img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
$newposts<br><br>
</smallfont>
</p></td>
</tr>
<tr id="cat">
<td height="19" align="center" background="nexica_01/main/side_title.gif"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>PRIVATE
MESSAGES </strong></font></td>
</tr>
<tr>
<td valign="top"><p><smallfont> <b>$bbuserinfo[username]</b>
- You have <b>$newpm[messages]</b> new message(s)
since your last visit.<br>
<b>Unread Messages:</b> $unreadpm[messages]
<br>
<b>Total Messages:</b> $allpm[messages]<br>
<br>
<font face="verdana,arial,helvetica" size="1"><img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
</font><a href="private.php?s=$session[sessionhash]">Open
Your PM Inbox</a><br>
<br>
</smallfont></p></td>
</tr>
[[/($bbuserinfo[userid]!=0)]] [[($bbuserinfo[userid]==0)]]
<td align="center"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>THE
NEXUSPORTAL! </strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td width="185" height="100%" align="left" valign="top" background="nexica_01/main/sidebar_bg.jpg"><table width="162" border="0" cellpadding="1" cellspacing="1" valign="top">
<tr>
<td valign="top"><smallfont> <p> <strong>Welcome
to NexusPortal!</strong> This site is open
to all current and prospective Nexus members.
Take full advantage of this site! Register
now to gain:<br>
<br>
<b><img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
Full Posting Privileges.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
<img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
Access to all areas.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
<img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
Community Support.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
<img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
Ability to Interact.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"></b></p>
<p align="center"><img src="nexica_01/customicons/arrow01.gif" width="9" height="9"> <img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
<a href="register.php?s=$session[sessionhash]&action=signup"><strong>REGISTER
NOW!</strong></a> <img src="nexica_01/customicons/arrow02.gif" width="9" height="9"> <img src="nexica_01/customicons/arrow02.gif" width="9" height="9"></p>
<p>$newposts<br>
<br>
</p></td>
</tr>
[[/($bbuserinfo[userid]==0)]]
<!-- /End Conditional Hack-->
This is one of our testbeds:
http://test.nexusportal.net/index.php?styleid=4
You can see the USER INFORMATION on the top of the left menu but after that it's all a mess. Can you not put HTML in there?
The vb2 version was so simple. 
|
I think you confuse this hack with my vb2 template conditionals hack.
This hack is for putting an announcement to forum home (with conditionals if you like) and the other hack was to use conditionals in any vb template you like.
If you need to put a fixed conditional to your forumhome template, you don't need this hack, you can use built-in conditionals of vb3.x: (In other words my vb2 template conditionals hack is now a built-in feature in vb 3.0.x and above)
IE.
<if condition = "$bbuserinfo[userid]>0">
Stuff to display to members
</if>
<if condition = "$bbuserinfo[userid]==0">
Stuff to display to guests
</if>