Example #1
0
$wgSpecialPageGroups['CreateBlogPage'] = 'wikia';
$wgSpecialPageGroups['CreateBlogListingPage'] = 'wikia';
/**
 * ajax functions
 */
$wgAjaxExportList[] = "CreateBlogListingPage::axBlogListingCheckMatches";
/**
 * hooks
 */
$wgHooks['AlternateEdit'][] = 'BlogArticle::alternateEditHook';
$wgHooks['ArticleFromTitle'][] = 'BlogArticle::ArticleFromTitle';
$wgHooks['CategoryViewer::getOtherSection'][] = 'BlogArticle::getOtherSection';
$wgHooks['CategoryViewer::addPage'][] = 'BlogArticle::addCategoryPage';
$wgHooks['onSkinTemplateNavigation'][] = 'BlogArticle::skinTemplateTabs';
$wgHooks['EditPage::showEditForm:checkboxes'][] = 'BlogArticle::editPageCheckboxes';
$wgHooks['LinksUpdate'][] = 'BlogArticle::linksUpdate';
$wgHooks['UnwatchArticleComplete'][] = 'BlogArticle::UnwatchBlogComments';
$wgHooks['AfterCategoriesUpdate'][] = 'BlogArticle::clearCountCache';
$wgHooks['SpecialSearchProfiles'][] = 'BlogsHelper::OnSpecialSearchProfiles';
/**
 * load other parts
 */
include dirname(__FILE__) . "/BlogTemplate.php";
include dirname(__FILE__) . "/BlogArticle.php";
include dirname(__FILE__) . "/BlogLockdown.php";
/**
 * add task
 */
if (function_exists("extAddBatchTask")) {
    extAddBatchTask(dirname(__FILE__) . "/BlogTask.php", "blog", "BlogTask");
}
<?php

/**
 * @package MediaWiki
 * @subpackage SpecialPage
 * @author Bartek Lapinski for Wikia.com
 * @author Piotr Molski <*****@*****.**> for Wikia.com
 * @copyright (C) 2008, Wikia Inc.
 * @licence GNU General Public Licence 2.0 or later
 */
if (!defined('MEDIAWIKI')) {
    echo "This is MediaWiki extension named MultiWikiEdit.\n";
    exit(1);
}
require_once dirname(__FILE__) . '/MultiTasksCore.php';
$wgExtensionCredits['specialpage'][] = array("name" => "Multi Wiki Edit", "description" => "Special Multi Wiki Edit", "author" => "Bartek Łapiński, Piotr Molski");
$wgExtensionMessagesFiles["Multiwikiedit"] = dirname(__FILE__) . '/MultiTasks.i18n.php';
$wgExtensionMessagesFiles['MultiwikieditAliases'] = __DIR__ . '/MultiTasks.aliases.php';
$wgAvailableRights[] = 'multiwikiedit';
$wgGroupPermissions['staff']['multiwikiedit'] = true;
$wgGroupPermissions['helper']['multiwikiedit'] = true;
require_once $IP . "/extensions/wikia/TaskManager/BatchTask.php";
extAddBatchTask(dirname(__FILE__) . "/Tasks/MultiWikiEditTask.php", "multiwikiedit", "MultiWikiEditTask");
extAddSpecialPage(dirname(__FILE__) . '/SpecialMultiWikiEdit_body.php', 'Multiwikiedit', 'Multiwikiedit');
$wgSpecialPageGroups['Multiwikiedit'] = 'pagetools';
 public static function BlogArticle($cv_name, $city_id, $value)
 {
     Wikia::log(__METHOD__, $city_id, "{$cv_name} = {$value}");
     if ($cv_name == "wgEnableBlogArticles" && $value == true) {
         /**
          * add task to TaskManager
          */
         if (!class_exists('BlogTask')) {
             global $IP;
             extAddBatchTask("{$IP}/extensions/wikia/Blogs/BlogTask.php", "blog", "BlogTask");
         }
         $Task = new BlogTask();
         $Task->createTask(array("city_id" => $city_id), TASK_QUEUED);
     }
     return true;
 }
<?php

$app = F::app();
$dir = dirname(__FILE__) . '/';
/**
 * controllers
 */
$app->registerClass('UserRollbackSpecialController', $dir . 'UserRollbackSpecialController.class.php');
$app->registerClass('UserRollbackRequest', $dir . 'UserRollbackRequest.class.php');
/**
 * special pages
 */
$app->registerSpecialPage('UserRollback', 'UserRollbackSpecialController');
/**
 * message files
 */
$app->registerExtensionMessageFile('UserRollback', $dir . 'UserRollback.i18n.php');
/**
 * setup rights
 */
$wgAvailableRights[] = 'userrollback';
$wgGroupPermissions['*']['userrollback'] = false;
$wgGroupPermissions['util']['userrollback'] = true;
/**
 * task manager
 */
extAddBatchTask(dirname(__FILE__) . "/UserRollbackTask.class.php", "userrollback", "UserRollbackTask");
 * Special page-based tool to review images uploaded by Wiki Admins
 * to Wikia Visualization
 */
// dependency on main component
if (!class_exists('ImageReviewSpecialController')) {
    include "{$IP}/extensions/wikia/ImageReview/ImageReview.setup.php";
}
// extension setup
$wgExtensionCredits['specialpage'][] = array('name' => 'Admin Upload Tool Image Review', 'desc' => 'Internal tool to enable reviewing of images uploaded by Wiki Admins
				Before putting them to Wikia Visualization', 'authors' => array('Andrzej "nAndy" Łukaszewski', 'Marcin Maciejewski', 'Sebastian Marzjan'));
$dir = dirname(__FILE__) . '/modules/PromoteImage/';
$app = F::app();
// classes
$wgAutoloadClasses['PromoteImageReviewTask'] = $dir . 'PromoteImageReviewTask.php';
if (function_exists('extAddBatchTask')) {
    extAddBatchTask($dir . "PromoteImageReviewTask.php", "promoteimagereview", "PromoteImageReviewTask");
}
$wgAutoloadClasses['Wikia\\Tasks\\Tasks\\PromoteImageReviewTask'] = "{$dir}/PromoteImageReviewTask.class.php";
$wgAutoloadClasses['PromoteImageReviewSpecialController'] = $dir . 'PromoteImageReviewSpecialController.class.php';
$wgAutoloadClasses['PromoteImageReviewHelper'] = $dir . 'PromoteImageReviewHelper.class.php';
$wgSpecialPages['PromoteImageReview'] = 'PromoteImageReviewSpecialController';
// hooks
$wgHooks['WikiFactory::onPostChangesApplied'][] = 'CityVisualization::onWikiDataUpdated';
$wgHooks['CreatePromoImageReviewTask'][] = 'PromoteImageReviewHelper::onCreatePromoteImageReviewTask';
// rights
$wgAvailableRights[] = 'promoteimagereview';
$wgGroupPermissions['util']['promoteimagereview'] = true;
$wgGroupPermissions['vstf']['promoteimagereview'] = true;
$wgAvailableRights[] = 'promoteimagereviewquestionableimagereview';
$wgGroupPermissions['util']['promoteimagereviewquestionableimagereview'] = true;
$wgAvailableRights[] = 'promoteimagereviewrejectedimagereview';
Example #6
0
$wgAutoloadClasses['RenameUserHelper'] = dirname(__FILE__) . '/RenameUserHelper.class.php';
$wgAutoloadClasses['RenameUserProcess'] = dirname(__FILE__) . '/RenameUserProcess.class.php';
$wgAutoloadClasses['RenameUserLogFormatter'] = dirname(__FILE__) . '/RenameUserLogFormatter.class.php';
//constants
//define('ENV_DEVBOX', true);//TODO: used for some debug switches, comment out as soon as the code hits production!
define('USERRENAME_ROWS_PER_LOOP', 500);
define('USERRENAME_LOOP_PAUSE', 5);
define('COMMUNITY_CENTRAL_CITY_ID', 177);
//city_id for community.wikia.com
//log type
global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions;
$wgLogTypes[] = 'renameuser';
$wgLogNames['renameuser'] = '******';
$wgLogHeaders['renameuser'] = '******';
//task types
if (function_exists("extAddBatchTask")) {
    extAddBatchTask(dirname(__FILE__) . "/UserRenameLocalTask.php", "renameuser_local", "UserRenameLocalTask");
    extAddBatchTask(dirname(__FILE__) . "/UserRenameGlobalTask.php", "renameuser_global", "UserRenameGlobalTask");
} else {
    die('The User Rename Tool extension requires the Task Manager extension to be enabled.');
}
//hooks
$wgHooks['StaffLog::formatRow'][] = 'UserRenameToolStaffLogFormatRow';
function UserRenameToolStaffLogFormatRow($type, $row, $time, $linker, &$out)
{
    if ($type == "renameuser") {
        $out = "{$time} Rename - {$row->slog_comment}";
        return false;
    }
    return true;
}
/**
 * add all task which should be visible here
 */
require_once dirname(__FILE__) . "/BatchTask.php";
extAddBatchTask(dirname(__FILE__) . "/Tasks/CloseWikiTask.php", "closewiki", "CloseWikiTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/MultiRestoreTask.php", "multirestore", "MultiRestoreTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/ImageGrabberTask.php", "imagegrabber", "ImageGrabberTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/ImageImporterTask.php", "imageimporter", "ImageImporterTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/PageGrabberTask.php", "pagegrabber", "PageGrabberTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/PageGrabberDumpTask.php", "pagegrabberdump", "PageGrabberDumpTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/PageImporterTask.php", "pageimporter", "PageImporterTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/SWMSendToGroupTask.php", "SWMSendToGroup", "SWMSendToGroupTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/LocalMaintenanceTask.php", "local-maintenance", "LocalMaintenanceTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/RebuildLocalisationCacheTask.php", "rebuild_localisation_cache", "RebuildLocalisationCacheTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/UpdateSpecialPagesTask.php", "update_special_pages", "UpdateSpecialPagesTask");
extAddBatchTask(dirname(__FILE__) . "/../AchievementsII/EnableAchievementsTask.php", "enableachievements", "EnableAchievementsTask");
/**
 * permissions
 */
$wgAvailableRights[] = 'taskmanager';
$wgGroupPermissions['vstf']['taskmanager'] = true;
$wgGroupPermissions['helper']['taskmanager'] = true;
$wgGroupPermissions['staff']['taskmanager'] = true;
$wgAvailableRights[] = 'taskmanager-action';
$wgGroupPermissions['util']['taskmanager'] = true;
$wgGroupPermissions['util']['taskmanager-action'] = true;
/**
 * message file
 */
$wgExtensionMessagesFiles[$sSpecialPage] = dirname(__FILE__) . "/Special{$sSpecialPage}.i18n.php";
/**
Example #8
0
 */
if (!defined('MEDIAWIKI')) {
    echo "This is MediaWiki extension and cannot be used standalone.\n";
    exit(1);
}
$sSpecialPage = "TaskManager";
$wgExtensionCredits['specialpage'][] = array("name" => $sSpecialPage, "descriptionmsg" => "taskmanager-desc", "author" => "Krzysztof Krzyżaniak (eloy)", "url" => "https://github.com/Wikia/app/tree/dev/extensions/wikia/TaskManager");
$dir = __DIR__;
/**
 * add all task which should be visible here
 */
require_once $dir . "/BatchTask.php";
extAddBatchTask($dir . "/Tasks/PageImporterTask.php", "pageimporter", "PageImporterTask");
extAddBatchTask($dir . "/Tasks/SWMSendToGroupTask.php", "SWMSendToGroup", "SWMSendToGroupTask");
extAddBatchTask($dir . "/Tasks/LocalMaintenanceTask.php", "local-maintenance", "LocalMaintenanceTask");
extAddBatchTask($dir . "/Tasks/UpdateSpecialPagesTask.php", "update_special_pages", "UpdateSpecialPagesTask");
/**
 * permissions
 */
$wgAvailableRights[] = 'taskmanager';
$wgGroupPermissions['vstf']['taskmanager'] = true;
$wgGroupPermissions['helper']['taskmanager'] = true;
$wgGroupPermissions['staff']['taskmanager'] = true;
$wgAvailableRights[] = 'taskmanager-action';
$wgGroupPermissions['util']['taskmanager'] = true;
$wgGroupPermissions['util']['taskmanager-action'] = true;
/**
 * message file
 */
$wgExtensionMessagesFiles[$sSpecialPage] = $dir . "/Special{$sSpecialPage}.i18n.php";
/**
Example #9
0
}
$app->registerClass('WallMessage', $dir . '/WallMessage.class.php');
$app->registerClass('WallController', $dir . '/WallController.class.php');
$app->registerClass('WallExternalController', $dir . '/WallExternalController.class.php');
$app->registerClass('WallHistoryController', $dir . '/WallHistoryController.class.php');
$app->registerClass('WallHooksHelper', $dir . '/WallHooksHelper.class.php');
$app->registerClass('WallRailHelper', $dir . '/WallRailHelper.class.php');
$app->registerClass('WallRailController', $dir . '/WallRailController.class.php');
$app->registerClass('WallHelper', $dir . '/WallHelper.class.php');
$app->registerClass('WallHistory', $dir . '/WallHistory.class.php');
$app->registerClass('WallBaseController', $dir . '/WallBaseController.class.php');
$app->registerClass('VoteHelper', $dir . '/VoteHelper.class.php');
$app->registerClass('WallRelatedPages', $dir . '/WallRelatedPages.class.php');
// register task in task manager
if (function_exists("extAddBatchTask")) {
    extAddBatchTask(dirname(__FILE__) . "/WallCopyFollowsTask.class.php", "wallcopyfollows", "WallCopyFollowsTask");
}
include $dir . '/notification/WallNotifications.setup.php';
$app->registerExtensionMessageFile('Wall', $dir . '/Wall.i18n.php');
$app->registerHook('ArticleViewHeader', 'WallHooksHelper', 'onArticleViewHeader');
$app->registerHook('SkinTemplateTabs', 'WallHooksHelper', 'onSkinTemplateTabs');
$app->registerHook('AlternateEdit', 'WallHooksHelper', 'onAlternateEdit');
$app->registerHook('AfterEditPermissionErrors', 'WallHooksHelper', 'onAfterEditPermissionErrors');
$app->registerHook('BeforePageProtect', 'WallHooksHelper', 'onBeforePageProtect');
$app->registerHook('BeforePageUnprotect', 'WallHooksHelper', 'onBeforePageUnprotect');
$app->registerHook('BeforePageDelete', 'WallHooksHelper', 'onBeforePageDelete');
$app->registerHook('PersonalUrls', 'WallHooksHelper', 'onPersonalUrls');
$app->registerHook('UserPagesHeaderModuleAfterGetTabs', 'WallHooksHelper', 'onUserPagesHeaderModuleAfterGetTabs');
$app->registerHook('SkinSubPageSubtitleAfterTitle', 'WallHooksHelper', 'onSkinSubPageSubtitleAfterTitle');
$app->registerHook('SkinTemplateContentActions', 'WallHooksHelper', 'onSkinTemplateContentActions');
$app->registerHook('PageHeaderIndexAfterActionButtonPrepared', 'WallHooksHelper', 'onPageHeaderIndexAfterActionButtonPrepared');
Example #10
0
<?php

/**
 * Special page-based tool to review images post-upload to screen against Terms of Use violations.
 * 
 * @date 2012-03-09
 *
 * @todo add logging of actions
 */
$wgExtensionCredits['specialpage'][] = array('name' => 'Image Review', 'desc' => 'Internal tool to help review images post-upload and remove Terms of Use violations', 'authors' => array('[http://www.wikia.com/wiki/User:OwenDavis Owen Davis]', '[http://www.wikia.com/wiki/User:TomekO Tomasz Odrobny]', 'Saipetch Kongkatong', "[http://www.wikia.com/wiki/User:Macbre Maciej 'Macbre' Brencz]", '[http://www.wikia.com/wiki/User:Mech.wikia Jacek Woźniak]', "[http://community.wikia.com/wiki/User:TOR Lucas 'TOR' Garczewski]"));
$dir = dirname(__FILE__) . '/';
$app = F::app();
// classes
$app->registerClass('ImageReviewTask', $dir . 'ImageReviewTask.php');
if (function_exists('extAddBatchTask')) {
    extAddBatchTask($dir . "../ImageReview/ImageReviewTask.php", "imagereview", "ImageReviewTask");
}
$app->registerClass('ImageReviewSpecialController', $dir . 'ImageReviewSpecialController.class.php');
$app->registerClass('ImageReviewHelperBase', $dir . 'ImageReviewHelperBase.class.php');
$app->registerClass('ImageReviewHelper', $dir . 'ImageReviewHelper.class.php');
$app->registerSpecialPage('ImageReview', 'ImageReviewSpecialController');
// rights
$wgAvailableRights[] = 'imagereview';
$wgGroupPermissions['util']['imagereview'] = true;
$wgGroupPermissions['vstf']['imagereview'] = true;
$wgGroupPermissions['reviewer']['imagereview'] = true;
$wgGroupPermissions['reviewer']['edit'] = false;
$wgAvailableRights[] = 'questionableimagereview';
$wgGroupPermissions['util']['questionableimagereview'] = true;
$wgAvailableRights[] = 'rejectedimagereview';
$wgGroupPermissions['util']['rejectedimagereview'] = true;
Example #11
0
<?php

/**
 * @package MediaWiki
 * @subpackage SpecialPage
 * @author Piotr Molski <*****@*****.**> for Wikia.com
 * @copyright (C) 2008, Wikia Inc.
 * @licence GNU General Public Licence 2.0 or later
 */
if (!defined('MEDIAWIKI')) {
    echo "This is MediaWiki extension named MultiWikiDelete.\n";
    exit(1);
}
require_once dirname(__FILE__) . '/MultiTasksCore.php';
$wgExtensionCredits['specialpage'][] = array("name" => "Multi Wiki Delete", "description" => "Special Multi Wiki Delete", "author" => "Bartek Łapiński, Piotr Molski");
$wgExtensionMessagesFiles["Multidelete"] = dirname(__FILE__) . '/MultiTasks.i18n.php';
$wgExtensionMessagesFiles['MultideleteAliases'] = __DIR__ . '/MultiTasks.aliases.php';
$wgAvailableRights[] = 'multidelete';
$wgGroupPermissions['staff']['multidelete'] = true;
$wgGroupPermissions['helper']['multidelete'] = true;
$wgGroupPermissions['vstf']['multidelete'] = true;
extAddSpecialPage(dirname(__FILE__) . '/SpecialMultiDelete_body.php', 'Multidelete', 'Multidelete');
require_once $IP . "/extensions/wikia/TaskManager/BatchTask.php";
extAddBatchTask(dirname(__FILE__) . "/Tasks/MultiDeleteTask.php", "multidelete", "MultiDeleteTask");
# add multi move page here
extAddBatchTask(dirname(__FILE__) . "/Tasks/MultiMoveTask.php", "multimove", "MultiMoveTask");
$wgSpecialPageGroups['Multidelete'] = 'pagetools';