The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals Details »» | |||||||||||||||||||||||||||
Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals
Developer Last Online: Nov 2023
(This hacks works with both 3.5.x and 3.6.x)
This hack allows you to post powerful dynamic announcements (changing according to different conditions) on forum home page. It differs from vbulletin's default announcements in 2 ways:
This version of the hack is for vbulletin 3.5.x and 3.6.x (vb 3.0.x version is here and vb 2.x version is here. 3.5 version is coded as a plugin so you can install it WITHOUT modifying vb PHP files. It is easily installed in 2 steps through your admin cp. Basic Usage of This Hack: You can set a text in your Admin CP and it's displayed in forum home to all users. Alternatively if you want, you can set another text as a popup announcement and it is displayed to all as a pop up announcement (it can't be killed with popup killers software!) Advanced Usage : With conditionals you can set different texts/notifications/messages/announcements and they will be displayed if your pre-configured condition applies. This allows you to create powerful announcements/private messages/texts which address their receipt only if a certain condition is met. Some examples: You can set to show an announcement in forum home IF:
Here is a Screenshot from a popup announcement. Some Features:
* For CMPS Integration see here * French Translation by Allan : https://vborg.vbsupport.ru/showpost....&postcount=143 * Nested Conditionals by dc3dreamer : https://vborg.vbsupport.ru/showpost....&postcount=175 * Hack Annoucement appears in all vb pages: https://vborg.vbsupport.ru/showthrea...498#post911498 IMPORTANT FOR 3.x USERS: If you were already using this hack in 3.0.x, remember to do 2 things: BEFORE YOU INSTALL THIS HACK : Follow this instructions to remove the remnants of 3.0.x hack. AFTER YOU INSTALL THIS HACK : Go to your admin cp / styles, find these 3 styles: dfh_announcement dfh_announcement_headercode dfh_announcement_popup and REVERT THEM so that your new templates that comes with 3.5 version will apply. About vb4.x version: I didn't consider porting this hack to vb4 because vbulletin has now a VERY SIMILAR feature in vb4 called "NOTICES". You can find it under your admin cp/Notices submenu/Notice Manager. It is not as powerful as this hack as this hack allows you to use any kind of conditional to produce your announcement but it is more user friendly because you don't need to deal with conditional syntax, you simply build your announcement (notice) with menus If you install the hack, click INSTALL, thank you.. Logician \\=^)) Show Your Support
|
Comments |
#82
|
|||
|
|||
not working for me damn
|
#83
|
||||
|
||||
Quote:
|
#84
|
|||
|
|||
Quote:
Fatal error: (null)(): Failed opening required './includes/functions_dfha.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dafirm2/public_html/forums/index.php(459) : eval()'d code on line 5 |
#85
|
||||
|
||||
Quote:
|
#86
|
||||
|
||||
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--> 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. |
#87
|
||||
|
||||
Quote:
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> |
#88
|
||||
|
||||
Ah, thanks for that. I knew vb2 really well but I've been out of it for so long. VB 3.5.0 might as well be phpbb2 for all I know now.
Where is the best place to find out about this new in-built conditional functionality? And also I need to work out the new variables for $avatarimage, $welcometext, $newposts and others. Any insight would be helpful and sorry to take the thread of course a bit. |
#89
|
||||
|
||||
I'm getting there slowly.
|
#90
|
||||
|
||||
Hi I've done all the steps ,but ,I got this error when home page is loaded :
Fatal error: Call to undefined function: dynamic_a() in C:\Inetpub\vhosts\arabic-av.com\httpdocs\forum\index.php(459) : eval()'d code on line 158 And yes,I have done everything including uploading,modifying ...etc . |
#91
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|