Quote:
Originally Posted by Logician
@kall: Please feel free to release your code here. I don't use that script, nor I created their integration script so it is better if you release it yourself as you should take the credit for it. If you post it into this thread, I'll link it in the first post of the hack. thx!
|
Kall's DFH-vBA_CMPS Integration :
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:
global $pages, $stylevar, $headinclude, $header, $footer, $vboptions, $vba_options, $navbar,
After, add:
Then, find:
PHP Code:
if ($vba_options['portal_shownavbar'] AND empty($navbar))
Above, add:
PHP Code:
// 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.)