(2011-10-28, 04:23 PM)pavemen Wrote: [ -> ]no, you need to find the function listed and correct it as needed. the "reference check" needs an "&" before the variable
function myfunction($var)
becomes
function myfunction(&$var)
for the return code you need to find the variable being passed and add as the last line of the function (usually)
return $var
We will wait for the 1.6.5 running, or we can update already even if our forum is running 1.6.4 ?
You can update plugins now.
(2011-10-28, 06:03 PM)Dylan M. Wrote: [ -> ]You can update plugins now.
Updating them will cause an effect on previous version of mybb? like 1.6.3 etc
(2011-10-28, 06:44 PM)sunjava1 Wrote: [ -> ] (2011-10-28, 06:03 PM)Dylan M. Wrote: [ -> ]You can update plugins now.
Updating them will cause an effect on previous version of mybb? like 1.6.3 etc
For the last time,
no. There should be
0 adverse effects. I've already updated all of my plugins on a 1.6.4 install and it doesn't make any difference.
Thank appreciate to advised tell me
Make it clear for me , what exactly changes in it?
$plugins->add_hook("pre_output_page", "hello_world");
$plugins->add_hook("postbit", "hello_world_postbit");
function hello_info()
{
/**
* Array of information about the plugin.
* name: The name of the plugin
* description: Description of what the plugin does
* website: The website the plugin is maintained at (Optional)
* author: The name of the author of the plugin
* authorsite: The URL to the website of the author (Optional)
* version: The version number of the plugin
* guid: Unique ID issued by the MyBB Mods site for version checking
* compatibility: A CSV list of MyBB versions supported. Ex, "121,123", "12*". Wildcards supported.
*/
return array(
"name" => "Hello World!",
"description" => "A sample plugin that prints hello world and prepends the content of each post to 'Hello world!'",
"website" => "http://mybb.com",
"author" => "MyBB Group",
"authorsite" => "http://mybb.com",
"version" => "1.0",
"guid" => "",
"compatibility" => "*"
);
}
function hello_world($page)
{
$page = str_replace("<div id=\"content\">", "<div id=\"content\"><p>Hello World!<br />This is a sample MyBB Plugin (which can be disabled!) that displays this message on all pages.</p>", $page);
return $page;
}
function hello_world_postbit($post)
{
$post['message'] = "<strong>Hello world!</strong><br /><br />{$post['message']}";
}
?>
For hooks in the first list:
Existing:
$plugins->add_hook("postbit", "my_postbit_modifier");
function my_postbit_modifier(&$post)
{
global $stuff;
//do things to modify $post or not
}
Change to:
$plugins->add_hook("postbit", "my_postbit_modifier");
function my_postbit_modifier($post)
{
global $stuff;
//do things to modify $post or not, BUT YOU NEED OT RETURN IT
return $post;
}
For hooks in the second list
Existing:
$plugins->add_hook("datahandler_post_insert_post", "my_post_modifier");
function my_post_modifier($post)
{
global $stuff;
//do things to modify $post
}
Change to:
$plugins->add_hook("datahandler_post_insert_post", "my_post_modifier");
function my_post_modifier(&$post)
{
global $stuff;
//do things to modify $post
}
so if our servers are already running php 5.3.x and is not affecting the plugins we're using on 1.6.4 is it likely to have any effect when we update to 1.6.5
(2011-10-28, 07:37 PM)adbrad Wrote: [ -> ]so if our servers are already running php 5.3.x and is not affecting the plugins we're using on 1.6.4 is it likely to have any effect when we update to 1.6.5
It really depends on if your server is configured to display deprecation warnings or not. If it is, then you aren't likely using any of the hooks described. If it isn't, then who knows. I suggest you simply run pavemens' script for checking for the hooks and get any plugins you have using them updated.