View Full Version : Adding Dynamic Forum Announcements to VBa CMPS
I know there is a thread about it located here:
http://www.vbadvanced.com/forum/showthread.php?t=1505&highlight=announcement
But i tried and failed. The template i changed without a problem but i am at a loss to what i need to add to the php files and where.
The thread for the hack is located here:
http://www.vbulletin.org/forum/showthread.php?t=64189
Thanks !
I know there is a thread about it located here:
http://www.vbadvanced.com/forum/showthread.php?t=1505&highlight=announcement
But i tried and failed. The template i changed without a problem but i am at a loss to what i need to add to the php files and where.
The thread for the hack is located here:
http://www.vbulletin.org/forum/showthread.php?t=64189
Thanks !
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
global $pages, $stylevar, $headinclude, $header, $footer, $vboptions, $vba_options, $navbar,
After, add:
$bbuserinfo,
Then, find:
if ($vba_options['portal_shownavbar'] AND empty($navbar))
Above, add:
// Logician Hack: Dynamic Forum Announcements Hack
if ($vboptions['dynamic_fha'] OR $vboptions['dynamic_popup']) {require_once('./includes/functions_bbcodeparse.php');}
if ($vboptions['dynamic_fha'])
{
eval('$dynamic_fha = "' . addslashes($vboptions['dynamic_fha']) . '";');
$dynamic_fha=str_replace("\\'", "'", $dynamic_fha);
$dfh_announcement_announcementtopaste = dynamic_a($dynamic_fha);
if (trim($dfh_announcement_announcementtopaste)) {eval('$dfh_announcement = "' . fetch_template('dfh_announcement') . '";');}
}
if ($vboptions['dynamic_popup'])
{
eval('$dynamic_popup = "' . addslashes($vboptions['dynamic_popup']) . '";');
$dynamic_popup=str_replace("\\'", "'", $dynamic_popup);
$dfh_announcement_popuptopaste = dynamic_a($dynamic_popup);
if (trim($dfh_announcement_popuptopaste))
{
eval('$dfh_announcement_headercode = "' . fetch_template('dfh_announcement_headercode') . '";');
eval('$dfh_announcement_popup = "' . fetch_template('dfh_announcement_popup') . '";');
}
}
// Logician Hack: Dynamic Forum Announcements Hack
Then do the template mod as per the original hack, to your adv_portal template.
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.)
the wiz
08-15-2004, 10:36 AM
Awesome, works like a dream. But you really don't have to have one of the modules call the annoucement templates. I didn't and it works fine.
Chuckie
08-15-2004, 05:36 PM
(Don't know if this is the best way to go about this, but it works for me.)
That looks nice and clean.
I did the same thing only I made it a module so as to not add to much to the /includes/vba_cmps_include_bottom.php,
That way when an update from Brian comes around I will have 1 less thing to worry about needing to re-add to my site.
I will share it if you want to look at it.
bloodydecks
04-16-2005, 04:54 PM
Still can't seem to get this working right. I've used the code as instructed by kall, but nothing is showing up. I've got the box in the forums but still not showing on CMPS.
sunnycher
04-19-2005, 01:29 AM
Doesn't it suck when you see that someone has solved a problem and they don't give you step-by-step instructions? :)
Yes, it does! I have found many many posts on these forums asking for help and then saying nevermind I fixed it and never telling how LOL!
Thanks for sharing your fix!!!
femsawyer
04-21-2005, 12:50 PM
Ok...I installed the Dynamic Forum Annoucements Hack and then when trying to access my index page, I get the following error:
Fatal error: Call to undefined function: strip_bbcode() in /MySitePath/forum/includes/functions_forumdisplay.php on line 121
Every other page of my site shows up just fine...including other cmps pages.
I turned the news, news archive, and latest posts to Not Active and then I got a similar error but it concerned the mini calendar, so I turned that off and the page showed up fine.
My problem is, I want to turn that other stuff back on but can't or I get the errors.
Any help would be appreciated.
how can I have this for the lastest version of CMPS 2.X?
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.