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:
This hack is the VB3 version of my Dynamic Forum Home Announcement Hack and it is a bit more improved in that it is now able to display your announcement as it was before AND also in DHTML popup box as well which ever you prefer better or even both. (DHTML poupup announcement is not technically a popup so popup killers can not kill it either.) Basic Usage : You can set a text in your Admin CP and it's displayed in forum home to all users. 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:
It's tested in vb versions from v.3.0.0 to 3.0.9 and works fine with all of them. It will work for all future 3.0.x versions too. For vb2 version click here. Here is a Screenshot from a general table announcement. Here is a Screenshot from a popup announcement. Some Features:
If you install the hack, click INSTALL, thank you.. Hacks of the hack: * Hack 1: Puts the announcement into header instead of forum home page so that announcement appears in all forum pages. * Hack 2: Integrates announcement with vBA_CMPS portal hack. * Hack 3: Popup announcement will popup once in every XX hours. Logician \\=^)) Show Your Support
|
Comments |
#132
|
||||
|
||||
Awesome Hack!! Thanks So Much!!
Just wanted to tell everyone, that this DOES work on 3.0.3 *clicks install |
#133
|
|||
|
|||
Logician,
I hate to bother you for that, but I tried to do it alone, and failed miserably. I have no experience with php, so it's hard for me. What would make this hack perfect (at least for me), would be to have an additional parameter in AdminCP, Dynamic Forum Announcements, right below the Forum Home Table Announcement and before Forum Home PopUp Announcement. Let's say we call it "display_homeonly". This should be a Yes/No parameter. Then, inside the templates, one could add something like: For FORUMHOME: <if $vboptions[display_homeonly]="Yes"> $dfh_announcement </if> For other templates: <if $vboptions[display_homeonly]="No"> $dfh_announcement </if> In that way, the table announcement could be either viewable in the forum home, or in every page of the site, depending on the AdminCP parameter. My problems are: - How do you add such a parameter in AdminCP? I can replicate the steps you describe in the installation file, for the dynamic_fha, but I do not know what Option Code to use for this one, obviously it's not a textarea. - What shall I add in global.php to read it from the database? I assume something like $display_homeonly=$vboptions[display_homeonly] is needed. Am I correct? Or can I check $vboptions[display_homeonly] directly from the templates? I am sure I'll be able to manage the templates <if> structure from there on. Again, sorry if this is way beyong your role here, I just can't find any place to read about these issues. If you could guide me somewhere, I would appreciate it. Kind regards and again, many thanks for THE most useful hack. ---------- John |
#134
|
|||
|
|||
Logician,
I am trying to add the following HTML code in the standard annnouncement: HTML Code:
<table cellspacing="0" border="0" width=98% align="center"> <tr> <td width=20% align="center"> <IMG SRC="http://www.m1911.org/images/greece/gr-flag.gif"> </TD> <TD width=60% align="center"> <FONT COLOR="blue"><H1>Greece wins the European<BR>Football Championship 2004<BR></H1></FONT> </TD> <TD width=20% align="center"> <IMG SRC="http://www.m1911.org/images/greece/gr-flag.gif"> </TD> </TR> </TABLE> Rgds and tnx |
#135
|
||||
|
||||
Quote:
Eg. HTML Code:
<table cellspacing="0" border="0" width=98% align="center"><tr><td width=20% align="center">................................ |
#136
|
|||
|
|||
Quote:
Oh, I got it, I can change that phrase and add a note about this trick, below your name. Thanks Logician. Rgds |
#137
|
||||
|
||||
It is because you enter this HTML code to a "vbulletin option box" and vbulletin replaces new lines with <br>s in option boxes when submitted.
|
#138
|
||||
|
||||
AWESOME!
Hope I'm still not too late to click *Install* Thumbs up! |
#139
|
|||
|
|||
Logician,
After using the hack for some days, I would like to ask for an additional feature. I am using the dfh_announcement, in a ... hidden way, in other words, my members have to click on a link to see whatever I have in there. The link is shown only when there are announcements. However, if there is more than one announcements in there, people see the link and visit it. Then next day, they see it and visit it again, and they see nothing new, because I haven't added anything new. I would like to add a field in the dynamic_fha group, which will be a date field. I can change that manually, when I enter a new announcement. Then, next to my "announcements" link on forumhome, I can add that date, so that members can check and see if this is something new or not. (I might even check if this date is newer than their "last_visit" date, dreaming!!!). My problem is that I have no idea on how to add that "date" field in the admincp. I think I can handle it from there, but I have no idea on how to add the Code Option etc, so I would appreciate your help in adding the "dynamic_fha_date" in the admincp. The date does not have to be fancy to enter, with drop-down menus etc, a simple "28/07/2004" field is fine. Many thanks and best regards After some experimentation: Please have a look at http://forum.m1911.org. Notice, right below the navbar, there is an announcement link. Also notice that there is a date there. Well, this is just a text, it's not a date. I managed to create a "dynamic_fha_date" item, in the admincp, but the Code Option I used, is text area. If I could make this a date, then I could compare it with the last date the member visited, and hide or show the link accordingly. However, I have no idea how to make that a valid "date" field. This is where I would need your help. Many thanks and kind regards again. |
#140
|
|||
|
|||
Awesome hack. My brain thanks you greatly! I've been beating my head for a few days to get a dhtml popup for Guests only... should have known to check here first
Installed with no problems, now to design the popup I want for Guests. Update: I had a problem with a text box. The other admin got it going using iframe and a text file. |
#141
|
||||
|
||||
Quote:
Doesn't it suck when you see that someone has solved a problem and they don't give you step-by-step instructions? I'm re-doing it for my site, so here we go.. In /includes/vba_cmps_include_bottom.php: Find PHP Code:
PHP Code:
PHP Code:
PHP Code:
Add dfh_announcement, dfh_announcement_popup and dfh_announcement_headercode as templates being called in one of your modules. (Don't know if this is the best way to go about this, but it works for me.) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|