Marcin Kalak
07-26-2013, 12:27 PM
I'm trying to add a custom bbcodes for vBulletin. I created a file core/packages/vbenterprisetranslator/api/bbcode.php of content:
<?php
class vbenterprisetranslator_Api_Bbcode extends vB_Api_Extensions
{
public $product = 'vbenterprisetranslator';
public $version = '5.0.0';
public $developer = 'vBET';
public $title = 'vB Enterprise Translator';
public $minver = '5.0.0';
public $maxver = '6.0.0';
public $infourl = '';
public $checkurl = '';
public $AutoInstall = 1;
public $extensionOrder = 5;
public function fetchTagList($tag_list, $prepend_path = '', $force_all = false)
{
print_log("fetchTagList");
//body
return $tag_list;
}
}
function print_log($string) {
global $request_last;
$request_now = microtime(true) * 1000;
$file = fopen(DIR . "/devlog.log", "a");
//vbulletin->userinfo['username'] . " " .
$diff = (int)($request_now - $request_last);
fwrite($file, $diff . ' '. date("d.m.Y H:i:s") . " " . $string . " " . $_SERVER['REQUEST_URI'] . "\n");
fclose($file);
$request_last = $request_now;
}
?>
However, my function fetchTagList does not start.
<?php
class vbenterprisetranslator_Api_Bbcode extends vB_Api_Extensions
{
public $product = 'vbenterprisetranslator';
public $version = '5.0.0';
public $developer = 'vBET';
public $title = 'vB Enterprise Translator';
public $minver = '5.0.0';
public $maxver = '6.0.0';
public $infourl = '';
public $checkurl = '';
public $AutoInstall = 1;
public $extensionOrder = 5;
public function fetchTagList($tag_list, $prepend_path = '', $force_all = false)
{
print_log("fetchTagList");
//body
return $tag_list;
}
}
function print_log($string) {
global $request_last;
$request_now = microtime(true) * 1000;
$file = fopen(DIR . "/devlog.log", "a");
//vbulletin->userinfo['username'] . " " .
$diff = (int)($request_now - $request_last);
fwrite($file, $diff . ' '. date("d.m.Y H:i:s") . " " . $string . " " . $_SERVER['REQUEST_URI'] . "\n");
fclose($file);
$request_last = $request_now;
}
?>
However, my function fetchTagList does not start.