Vergleich inc/plugins/hello.php - 1.8.7 - 1.8.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 13Zeile 13
{
die('This file cannot be accessed directly.');
}

{
die('This file cannot be accessed directly.');
}

	



// cache templates - this is important when it comes to performance
// THIS_SCRIPT is defined by some of the MyBB scripts, including index.php
if(defined('THIS_SCRIPT'))

// cache templates - this is important when it comes to performance
// THIS_SCRIPT is defined by some of the MyBB scripts, including index.php
if(defined('THIS_SCRIPT'))

Zeile 74Zeile 74
	return array(
'name' => 'Hello World!',
'description' => $lang->hello_desc,

	return array(
'name' => 'Hello World!',
'description' => $lang->hello_desc,

		'website'		=> 'http://mybb.com',

		'website'		=> 'https://mybb.com',

		'author'		=> 'MyBB Group',

		'author'		=> 'MyBB Group',

		'authorsite'	=> 'http://www.mybb.com',

		'authorsite'	=> 'https://mybb.com',

		'version'		=> '2.0',
'compatibility' => '18*',
'codename' => 'hello'

		'version'		=> '2.0',
'compatibility' => '18*',
'codename' => 'hello'

Zeile 318Zeile 318

// Delete deprecated entries.
$db->delete_query('settings', "gid='{$gid}' AND description='HELLODELETEMARKER'");


// Delete deprecated entries.
$db->delete_query('settings', "gid='{$gid}' AND description='HELLODELETEMARKER'");

	



	// This is required so it updates the settings.php file as well and not only the database - they must be synchronized!
rebuild_settings();

// Include this file because it is where find_replace_templatesets is defined
require_once MYBB_ROOT.'inc/adminfunctions_templates.php';

	// This is required so it updates the settings.php file as well and not only the database - they must be synchronized!
rebuild_settings();

// Include this file because it is where find_replace_templatesets is defined
require_once MYBB_ROOT.'inc/adminfunctions_templates.php';

	



	// Edit the index template and add our variable to above {$forums}
find_replace_templatesets('index', '#'.preg_quote('{$forums}').'#', "{\$hello}\n{\$forums}");
}

	// Edit the index template and add our variable to above {$forums}
find_replace_templatesets('index', '#'.preg_quote('{$forums}').'#', "{\$hello}\n{\$forums}");
}

Zeile 339Zeile 339
function hello_deactivate()
{
require_once MYBB_ROOT.'inc/adminfunctions_templates.php';

function hello_deactivate()
{
require_once MYBB_ROOT.'inc/adminfunctions_templates.php';

	



	// remove template edits
find_replace_templatesets('index', '#'.preg_quote('{$hello}').'#', '');
}

	// remove template edits
find_replace_templatesets('index', '#'.preg_quote('{$hello}').'#', '');
}