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 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:
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:
The conditionals even allows you to design "Board Tips" ever changing according to user's seniority or post number. See how-to document for conditional usage and more info.. It's tested in both v.2.2.6 and v.2.2.7 but it should work with any versions > 2.0.3. (v.2.2.8 or later Users READ HERE!) I'm using it in my own board and a friend's board for more than a month and found it quite stable and released it. Although not likely, if you found any bugs, holler and I'll fix it.. Here is a Screenshot from a "general announcement". Here is a Screenshot of announcement which is addressed to a certain user. Some Features:
If you have problems displaying HTML/smilie/bbcode in your announcements, make this tiny change in hack code If you install the hack, click INSTALL, thank you.. Logician \\=^)) Show Your Support
|
Comments |
#102
|
|||
|
|||
Just installed it and everything works fine.....except I can't embed bbcode (e.g. , ) in the announcement. I have no conditionals....so just an announcement everyone can see. Ideas?
|
#103
|
||||
|
||||
Quote:
|
#104
|
|||
|
|||
Yes, but which post? Maybe best if you quote a little bit of it....i'll manage then! ta
|
#105
|
||||
|
||||
Quote:
IMPORTANT NOTICE FOR V.2.2.8 (OR LATER) USERS: |
#106
|
|||
|
|||
Yes, the contents of that post are in the installation instructions and applied correctly.
|
#107
|
|||
|
|||
Incidentally, I don't get the symptoms as described in that post. The CONDITIONALS appear to work fine. It's the vbCode that don't (e.g. "[b]").
Other than that - fantastic hack! |
#108
|
||||
|
||||
Quote:
2- Can you use $bbuserinfo[username]? 3- Can you use smilies? 4- What's your vb version? 5- Can you use other vb code like quote or php or font 6- Do URL converted well? 7- Is there any chance that you modified default vb code for bold or italic in Admin CP/BB Code section? |
#109
|
|||
|
|||
Quote:
2. No 3. No. 4. 2.2.8 (Yes I have installed the patch for 2.2.8 as described above) 5. No 6. Not sure what you mean 7. No - they work fine in actual postings. |
#110
|
||||
|
||||
Quote:
Only thing I can think of is the existance of another hack in your board which clashes with this one in the function.php. To test it, try this: In hack code find, PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#111
|
|||
|
|||
No dice. This is how the bottom of functions.php looks post the above eidt being applied.......
Code:
// Logician Dynamic Forum Announcements Hack function dynamic_a($logician_dfa_incoming1) { extract ($GLOBALS); while (preg_match("/\[\[(.*)\]\](.*)\[\[(\/\\1)\]\]/siU",$logician_dfa_incoming1,$matches14)) { /* echo "<br> conditional parse- 1=".$matches14[1]; echo '$matches14[0]'.$matches14[0].'<br><br>';// => Whole text echo '$matches14[1]'.$matches14[1].'<br><br>';// => conditional itself echo '$matches14[2]'.$matches14[2].'<br><br>';// => Text between conditional echo '$matches14[3]'.$matches14[3].'<br><br>';// => conditional close tag (with closing /) */ @eval ('if ('.stripslashes($matches14[1]).') { $eval_deger= "1"; } else { $eval_deger= "0"; }'); if ($eval_deger==1) //if conditional applied { //$logician_dfa_incoming1=preg_replace("/\[\[(.*)\]\](.*)\[\[(\/\\1)\]\]/siU", "\\2", $logician_dfa_incoming1); //echo "conditional $matches14[1] applied!<br>" ; $matches14[2]=bbcodeparse(trim($matches14[2]),1,1,1,1); eval("\$dfh_announcement1 = \"".gettemplate("dfh_announcement")."\";"); return $dfh_announcement1; } else //conditional not applied so let's delete it so that it wont be matched in preg_match again.. {$logician_dfa_incoming1=str_replace($matches14[0], '', $logician_dfa_incoming1);} } //echo "no conditional found or applies<br>"; $matches14[2]=trim($logician_dfa_incoming1); if (trim($matches14[2])) {$matches14[2]=bbcodeparse($matches14[2],1,1,1,1);eval("\$dfh_announcement1 = \"".gettemplate("dfh_announcement")."\";");} return $dfh_announcement1; } // Logician Dynamic Forum Announcements Hack ?> I changed announcement text and saved it too. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|