Please code the script taking into consideration the new google's penalty. Thanks.
That's a recent searches plugin people added themselves. You don't have to add it.
Please code the script taking into consideration the new google's penalty. Thanks.
Core::load()->config(array_merge(
Core::load()->parseConfig('admin_links'),
array(
array('someURL', 'SomeText')
)
);
function myAdminPage($go) {
if($go != 'myadminpage') return false;
}
function myAdminPageInit() {
if(!Core::load()->config('myConfig')) {
// check if my config is set, if not, set it
Core::load()->config('myConfig', 'someValuesWoot');
}
$admin = Core::load()->parseConfig('admin_links');
// Check here if $admin array contains your changes
// if not, set them
}
Core::load()->hook('AdminHandleContent', 'myAdminPage');
Core::load()->hook('Init', 'myAdminPageInit');
function myAdminPage($go) {
if($go != 'myAdminPage') return false;
// output some html here
// and handle things
}
Core::load()->hook('AdminHandleContent', 'myAdminPage');
Core::load()->config('name', 'value');
function myAdminLinks() {
$links = Core::load()->parseConfig('admin_links');
$linksCount = count($links);
$myLinks = array(
array('?go=myAdmin', 'SomeThing'),
array('?go=myOtherAdmin', 'Another Thing')
);
// I didnt use array_merge because it will allow duplicate entries
$links = Common::arrayMergeUnique($links, $myLinks);
if(count($links) != $linksCount)
Core::load()->config('admin_links', $links);
}
Core::load()->hook('AdminInit', 'myAdminLinks');
function updateChecker($go) {
if($go != 'updateChecker') return false;
foreach(Core::load()->getModules() as $module) {
// $module is an array($filename, $path)
// $filename being like 'wcddl_mymod.php'
$name = substr($module[0], 6, -4);
if(function_exists($name . '_updateCheck')) {
$updateNeeded = call_user_func($name . '_updateCheck');
if($updateNeeded)
echo $name . ' - UPDATE AVAILABLE!<br />';
}
}
}
Core::load()->hook('AdminHandleContent', 'updateChecker');
Hooks exist for you to implement such features.
You can make the update thing by hooking to the admin content, e.g. make an updateCheck page which loops through Core::load()->getModules() and checks each for an update method.
Example:.....