Extension talk:WhoIsWatchingTabbed

From MediaWiki.org

Jump to: navigation, search

Contents

[edit] Some issues

Once entering a &acion=watch page your in a vicious circle and can't get out of the watching pages. So where ever you link &action=watch.. there should also be a normal page link given. You can combine that with some stats (X) numbers:

[edit] &action=watching

I'm not too sure if it's a good idea to display the real names of the users (maybe make it optional). I would prefer it this way:
[[User:Subfader|Subfader]] is watching [[userwatcheswhatlink|X]] pages

[edit] &action=watching&user_name=

namespace seems redicilous
[[Help:Formatting]] is watched by [[userwatcheswhatlink|X]] pages
Please link to the user page from there ;)

[edit] URL

Another thing is the URL: Go to Main Page > click watching > click a user > URL is Main_Page&action=watching&user_name=...
Is there no way I can link to the pages I'm watching? Esp. not internally? E.g. [[...|Check my watchlist]]

Great extension idea at all, just needs some tweaks if you want to use it for all users and not just sysops etc wher it might be ok as it is :) --Subfader 19:00, 13 May 2008 (UTC)

[edit] The tab

I would prefer if it simplifies and merges with the existing tab: [ watch (3) ] but that might be a problem with the linking since the whole tab is linked and not the text. --Subfader 19:00, 13 May 2008 (UTC)

[edit] Issues on different Namespaces

I recieved errors on pages with different namespaces "Warning: constant() [function.constant]: Couldn't find constant NS_DISKUSSION in <...>\WhoIsWatchingTabbed.php on line 279"

After editiing this

   function onSkinTemplateTabs(&$skin, &$content_actions) {
    global $wgRequest, $wgUser, $wgSitename;
    $action = $wgRequest->getText('action');
    $db = &wfGetDB(DB_SLAVE);
 
    $page_title = $_REQUEST['title'];
    $page_namespace = 0;
    $pt = explode(":",$_REQUEST['title']);
    if(sizeof($pt)>1) {
      if(strtoupper($pt[0])==strtoupper($wgSitename)) {
        $page_namespace = constant("NS_PROJECT");
      } else {
        $page_namespace = constant("NS_".strtoupper($pt[0]));
      }
      $page_title = $pt[1];
    }

to this:

  function onSkinTemplateTabs(&$skin, &$content_actions) {
    global $wgRequest, $wgUser, $wgSitename;
    $action = $wgRequest->getText('action');
    $db = &wfGetDB(DB_SLAVE);
 
    $page_title = $_REQUEST['title'];
    $page_namespace = 0;
    $pt = explode(":",$_REQUEST['title']);
    if(sizeof($pt)>1) {
      if(strtoupper($pt[0])==strtoupper($wgSitename)) {
        $page_namespace = constant("NS_PROJECT");
      } else {
        $page_namespace = "NS_".strtoupper($pt[0]);
      }
      $page_title = $pt[1];
    }

it seems to work.
hope this help anyone.
regards --TurboKanne 08:09, 20 May 2008 (UTC)

[edit] i18n suggestion

      $content_actions["watching"] = array(
        "class" => ($action == "watching") ? "selected" : false,
        "text" => "who is watching this? (".$watcherCount.")",      //This message should use i18n file
        "href" => $skin->mTitle->getLocalURL("action=watching")
      );

[edit] Chinese message in WhoIsWatchingTabbed.i18n.php

$wgWatchingMessages['zh-tw'] = array(
    'pages_watched_by_user'  => "受".$user_name."監視的頁面",
    'users_watching_page'    => "「".$page_title ."」頁面監視者",
    'special_page_link'    => "監視頁面統計",
    'user_name'              => '用戶名稱',
    'user_real_name'         => '真實名稱',
    'page_title'             => '頁面標題',
    'page_namespace'             => '頁面名字空間',
    'wl_namespace'             => '頁面名字空間',
    'wl_title'             => '頁面標題',
    'watcher'             => '監視者',
);

Any idea? --Roc michael 21:00, 23 May 2008 (UTC)

Personal tools