2016-09-12, 02:04 PM
Hello,
i'm trying to program a plugin for my mybb Page, but somehow it's now working.
The Plugin is named scrolling_gallery and this is the code:
In the template I have added {scrolling_gallery} and like I read, that should work.
But nothing happend...
MyBB Version :1.8.7
Someone an idea?
Edit:
Maybe I clearify "nothing happened".
Nothing showed on the Page, where my default string should appear.
When I add a return-Statement, the site is blank "like i thought" (in this moment)
i'm trying to program a plugin for my mybb Page, but somehow it's now working.
The Plugin is named scrolling_gallery and this is the code:
if(!defined('IN_MYBB'))
die('This file cannot be accessed directly.');
$plugins->add_hook('index_start','scrolling_gallery');
function scrolling_gallery(){
global $mybb, $templates, $scrolling_gallery;
$str = 'hello world';
$scrolling_gallery=null;
eval('$scrolling_gallery="' . $str . '";');
}
function scrolling_gallery_info()
{
return array(
"name" => "Scrolling Gallery",
"description" => "Nothing interesting here",
"website" => "",
"author" => "Denis D",
"authorsite" => "Under Construction!",
"version" => "1.0.0",
"compatibility" => "18*",
"guid" => "",
);
}
In the template I have added {scrolling_gallery} and like I read, that should work.
But nothing happend...
MyBB Version :1.8.7
Someone an idea?
Edit:
Maybe I clearify "nothing happened".
Nothing showed on the Page, where my default string should appear.
When I add a return-Statement, the site is blank "like i thought" (in this moment)