MyBB Community Forums

Full Version: help needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i need help on this mod

the activation and deactivation is all correct but the function is not working its not following the function onto the template veiwing and its in the template


any help with this would be good



just modify and reupload the file

i will give credits who ever helps me
I checked your plugin and at a first glance I noticed that your using yes/no for settings. In MyBB 1.4 we use 1/0. Read here for more information: http://community.mybboard.net/thread-24122.html

Quote:All of the yes/no columns have been converted to 1/0 for better storage and search efficiency. So if you have for instance a setting in your plugin that is "yesno" or "onoff" you will now need to check it against 1/0.


So as an example:

$set_adstats_newuser = array(
		"sid" => "NULL",
		"name" => "set_adstats_newuser",
		"title" => "New users today",
		"description" => "Display new users today on index page?",
		"optionscode" => "yesno",
		"value" => "yes",
		"disporder" => "1",
		"gid" => intval($gid),
		);

would become

$set_adstats_newuser = array(
		"sid" => "NULL",
		"name" => "set_adstats_newuser",
		"title" => "New users today",
		"description" => "Display new users today on index page?",
		"optionscode" => "yesno",
		"value" => "1",
		"disporder" => "1",
		"gid" => intval($gid),
		);

and

if($mybb->settings['set_adstats_newuser'] == "yes") {

would become

if($mybb->settings['set_adstats_newuser'] == "1") {
ok i've done what you told me its fixed up a lot i also was missing the hook

its now showing every its suppose to but not getting the requied data from the sql

its in function adstats()
i think its something which simple_select

here is the updated attachment


its not getting the data from the sql which i want it to
You want to fetch the 'count'; that's one single field.
Use
$newusers = $db->fetch_field($db->simple_select("users", "COUNT(*) AS newusers", "regdate>'$timecut'"), "newusers"); 

Edit;

And why 4 new templates ? =/
Deactivate yours; reupload the attached one and test.
thanks lex and tikiti for this

i will try this file lex and the reason of templates is the source file mybb 1.2 version has them so i reprogramed them the same as it but i see for 1.4 its easier to do it like this