Intex
06-06-2004, 05:34 AM
Brian
Although I've only ever installed vB CMPS rather than vBadvanced, I notice there are quite a few hacks created for vBAdvanced over at vB.org. I wondered whether you could provide us with a brief guide as to where core modifications should be made so we can get these other hacks working (example below). In vBadvanced I can see there is a main index.php file that really controlled the whole thing, but now the cmps_index.php file contains relatively little.
As an example, I wanted to use Logician's dynamic announcements on the CMPS homepage. The instructions for this were simply:
>>>
Edit vbadvanced's index.php
Find:
'bbcode_quote'
);
Add under
// Logician Hack: Dynamic Forum Announcements Hack
$globaltemplates[] = 'dfh_announcement';
$globaltemplates[] = 'dfh_announcement_headercode';
$globaltemplates[] = 'dfh_announcement_popup';
// Logician Hack: Dynamic Forum Announcements Hack
Find
######################### News #########################
Add ABOVE
// 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
The template stuff is pretty much self-explanatory, so it's just where you change the relevant code as above. There are quite a lot of other hacks out there that were written for vBadvanced, so some general guidelines would be good and very much appreciated :).
Thanks
Although I've only ever installed vB CMPS rather than vBadvanced, I notice there are quite a few hacks created for vBAdvanced over at vB.org. I wondered whether you could provide us with a brief guide as to where core modifications should be made so we can get these other hacks working (example below). In vBadvanced I can see there is a main index.php file that really controlled the whole thing, but now the cmps_index.php file contains relatively little.
As an example, I wanted to use Logician's dynamic announcements on the CMPS homepage. The instructions for this were simply:
>>>
Edit vbadvanced's index.php
Find:
'bbcode_quote'
);
Add under
// Logician Hack: Dynamic Forum Announcements Hack
$globaltemplates[] = 'dfh_announcement';
$globaltemplates[] = 'dfh_announcement_headercode';
$globaltemplates[] = 'dfh_announcement_popup';
// Logician Hack: Dynamic Forum Announcements Hack
Find
######################### News #########################
Add ABOVE
// 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
The template stuff is pretty much self-explanatory, so it's just where you change the relevant code as above. There are quite a lot of other hacks out there that were written for vBadvanced, so some general guidelines would be good and very much appreciated :).
Thanks