Extension talk:WhoIsWatchingTabbed

From mediawiki.org
Latest comment: 12 years ago by Jberanek in topic More namespace problems

Some issues[edit]

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:

&action=watching[edit]

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

&action=watching&user_name[edit]

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

URL[edit]

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)Reply

The tab[edit]

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)Reply

Issues on different Namespaces[edit]

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)Reply

i18n suggestion[edit]

      $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")
      );

Chinese message in WhoIsWatchingTabbed.i18n.php[edit]

$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)Reply

Problem with Who is Watching Statistics page[edit]

This extension is exactly what we have been looking for, but I have come across a problem. On the Who is Watching Statistics page, when I select any number other than 10 in the drop down box, I'm taken to a page titled Post. Thus, I am unable to view more than the top 10 results in either category. We are running MediaWiki 1.13.3. Any ideas? Molliewog 21:44, 4 March 2009 (UTC)Reply

Problem with Page Titles with Colons and Spaces[edit]

We were getting this error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "Database::select". MySQL returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 (10.107.144.90)"

Discovered it was a problem with page titles that have a colon with a space following. For example, "FSWiki: Languages" causes the problem but "FamilySearch Wiki:Known Issues" didn't. So in the file WhoIsWatchingTabbed.php I changed

$pt = explode(":",$_REQUEST["title"]);

to

$pt = array($_REQUEST["title"]);

which appears two times in the code. It appears to work on all pages but we are unsure of the ramifications of the code change? Stinger 11:06, 30 March 2009 (MST)

Not working with MW 1.16.2[edit]

Not a big surprise but wanted to report. Thought I'd try this out but too many errors for me to deal with. Every page shows:

Strict Standards: Declaration of WhoIsWatchingTabbed::execute() should be compatible with that of SpecialPage::execute() in D:\xampp\htdocs\riftwiki\extensions\WhoIsWatchingTabbed\WhoIsWatchingTabbed.php on line 74

Strict Standards: Only variables should be passed by reference in D:\xampp\htdocs\riftwiki\extensions\WhoIsWatchingTabbed\WhoIsWatchingTabbed.php on line 397

It breaks my left side menu extension. Also prevents access to user pages with a list of errors too long to mention. Unplugged this one right after that so no further error searching was done. MVW 05:15, 19 March 2011 (UTC)

More namespace problems[edit]

If I go to a page on a custom namespace (restricted by Lockdown) let's say 'Private:Main_Page' and show watchers, it shows watchers of Main:Main_Page as well as watchers of 'Private:Main_Page'.

If I click on a name in the watchers list, it shows me pages they're watching, but not the pages in the restricted namespace.

Jberanek (talk) 18:02, 21 March 2012 (UTC)Reply