How can one link to a [[:Category:With members, but no text]] but with no action=edit produced?
Use {{fullurl}}.
Yes, but the <a>...</a> produced is many times larger than that of an internal link, a few of these and the bloat adds up.
Use {{localurl}}.
Yes, but that does not create a link.
Hack up includes/*.php.
Yes, but let's assume we are just a lowly user.
On Fri, Feb 13, 2009 at 3:16 PM, jidanni@jidanni.org wrote:
How can one link to a [[:Category:With members, but no text]] but with no action=edit produced?
You add some text to the category page.
"AG" == Aryeh Gregor Simetrical+wikilist@gmail.com writes:
AG> On Fri, Feb 13, 2009 at 3:16 PM, jidanni@jidanni.org wrote:
How can one link to a [[:Category:With members, but no text]] but with no action=edit produced?
AG> You add some text to the category page.
Thank you but there are thousands of such pages, not just one http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan...
On Sat, Feb 14, 2009 at 7:27 PM, jidanni@jidanni.org wrote:
Thank you but there are thousands of such pages, not just one http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan...
Then add text to all of them. If you don't do that, you're not using category pages as they're intended to be used, and things will not work right unless you modify the code or use other hacks. Categories that have members are not meant to have nonexistent category pages. If you really want, you could just go ahead and run a bot to make all the pages existent but empty.
On Sat, Feb 14, 2009 at 07:30:22PM -0500, Aryeh Gregor wrote:
On Sat, Feb 14, 2009 at 7:27 PM, jidanni@jidanni.org wrote:
Thank you but there are thousands of such pages, not just one http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan...
Then add text to all of them. If you don't do that, you're not using category pages as they're intended to be used, and things will not work right unless you modify the code or use other hacks. Categories that have members are not meant to have nonexistent category pages. If you really want, you could just go ahead and run a bot to make all the pages existent but empty.
I don't believe it is possible to create an empty page in a single edit. The API gives an 'emptypage' error and the web interface silently discards the edit if there is no content in the first revision. It is possible to blank an already existing page, of course.
- Carl
On Sat, Feb 14, 2009 at 11:29 PM, Carl Beckhorn cbeckhorn@fastmail.fm wrote:
I don't believe it is possible to create an empty page in a single edit. The API gives an 'emptypage' error and the web interface silently discards the edit if there is no content in the first revision. It is possible to blank an already existing page, of course.
The API should probably permit the creation of empty pages. Is there any reason it doesn't? The only reason the web UI doesn't is because it would be too confusing, AFAIK.
On Sat, Feb 14, 2009 at 11:29:48PM -0500, Carl Beckhorn wrote:
I don't believe it is possible to create an empty page in a single edit. The API gives an 'emptypage' error and the web interface silently discards the edit if there is no content in the first revision. It is possible to blank an already existing page, of course.
You can always subst the transclusion of an empty page (or a page with everything <noinclude>d).
jidanni@jidanni.org wrote:
"AG" == Aryeh Gregor Simetrical+wikilist@gmail.com writes:
AG> On Fri, Feb 13, 2009 at 3:16 PM, jidanni@jidanni.org wrote:
How can one link to a [[:Category:With members, but no text]] but with no action=edit produced?
AG> You add some text to the category page.
Thank you but there are thousands of such pages, not just one http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan...
It would be trivial to introduce a feature which makes all such links go to the non-edit page. If you hold a vote and it's in favour, I'll write the feature and deploy it.
If the community is not in favour, then I wouldn't recommend changing them with a bot.
-- Tim Starling
On Sat, Feb 14, 2009 at 7:36 PM, Tim Starling tstarling@wikimedia.org wrote:
jidanni@jidanni.org wrote:
Thank you but there are thousands of such pages, not just one http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan...
It would be trivial to introduce a feature which makes all such links go to the non-edit page. If you hold a vote and it's in favour, I'll write the feature and deploy it.
If the community is not in favour, then I wouldn't recommend changing them with a bot.
Um, you realize he's talking about his own, non-Wikimedia wiki, right? What's this about deploying it?
Aryeh Gregor wrote:
On Sat, Feb 14, 2009 at 7:36 PM, Tim Starling tstarling@wikimedia.org wrote:
jidanni@jidanni.org wrote:
Thank you but there are thousands of such pages, not just one http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan...
It would be trivial to introduce a feature which makes all such links go to the non-edit page. If you hold a vote and it's in favour, I'll write the feature and deploy it.
If the community is not in favour, then I wouldn't recommend changing them with a bot.
Um, you realize he's talking about his own, non-Wikimedia wiki, right? What's this about deploying it?
No I did not realise that.
Thank you for a glimmer of hope on this issue.
http://radioscanningtw.jidanni.org/index.php?title=Special:Categories&us... and http://taizhongbus.jidanni.org/index.php?title=Special:Categories&uselan... are perfect for thousands of radio frequencies and bus stops respectively.
Currently I must use in LocalSettings.php: function fnmybla1($text,$title){global $wgSitename; switch($title->mNamespace){case NS_CATEGORY:case NS_CATEGORY_TALK: $text=" Hi. This is the site manager. Even though you are looking at this big edit window, could you please enter the radio frequency you wish to contribute, directly on that page. E.g., On the [[Nurdsome Hills Fire Department]] page, just write {{c|422.8375}} and the template ( http://radioscanningtw.jidanni.org/index.php?title=Template:C&uselang=en ) will take care of the rest, adding that frequency to its category automatically! Sorry that you see this message sitting inside of an edit box, but the software is like that. ";}return true;}#also tried $wgNamespaceProtection but it is yucky
OK, so my wikis are special, and I don't want to modify MediaWiki or even my personal copy of it (beyond LocalSettings.php and templates) just for me. Nor does even adding one character to thousands of non existent database records make any sense.
OK, I'll just keep on making external links (with fullurl) to what are really internal links, because there is no way to even add an &action=view and get an internal link.
On Fri, Feb 13, 2009 at 9:16 PM, jidanni@jidanni.org wrote:
How can one link to a [[:Category:With members, but no text]] but with no action=edit produced?
You could create a hook to LinkBegin that sets $options[] = 'known' if it is a category page:
function blueLinkCategoryPages( $linker, $target, &$text, &$customAttribs, &$query, &$options, &$ret ) { if ( $target->getNamespace() == NS_CATEGORY ) $options[] = 'known'; return true; } $wgHooks['LinkBegin'][] = 'blueLinkCategoryPages';
Bryan
"BTM" == Bryan Tong Minh bryan.tongminh@gmail.com writes:
BTM> On Fri, Feb 13, 2009 at 9:16 PM, jidanni@jidanni.org wrote:
How can one link to a [[:Category:With members, but no text]] but with no action=edit produced?
BTM> You could create a hook to LinkBegin that sets $options[] = 'known' if BTM> it is a category page:... OK, thanks. The following seems to work. In Template:C, put: [[:Category:{{{1}}}|{{{1}}}]][[Category:{{{1}}}]]<noinclude> ==Explanation== The categories on our wikis are very special. There are thousands of them, one for each bus stop, or police radio frequency. However, we don't want users editing them. They should edit pages, not categories. They should place the bus stop or police frequency onto the page for that bus route, or police station, using this template. This template will #Add the category to [[Special:Categories]] #Make a link to that category ==Usage example== <nowiki> *{{c|Nurdsburg Junction}} </nowiki> ==Hooks== [[Special:Version#Hooks|Hooks]] are employed to avoid "redlinks", without resorting to <nowiki>{{fullurl}}</nowiki>. </noinclude>
And here are the hooks. Requires MediaWiki 1.14. In LocalSettings.php use: function JidanniBlueLinkCategoryPages($linker,$target,&$text,&$customAttribs,&$query,&$options,&$ret){ switch($target->mNamespace){case NS_CATEGORY:case NS_CATEGORY_TALK:$options[0]='known';}return true;} $wgHooks['LinkBegin'][]='JidanniBlueLinkCategoryPages'; function JidanniDontInviteEdit(&$this,&$outputDone,&$pcache){$z=$this;if($z->getID()===0){ switch($z->mTitle->getNamespace()){case NS_CATEGORY:case NS_CATEGORY_TALK:$outputDone=true;}}return true;} $wgHooks['ArticleViewHeader'][]='JidanniDontInviteEdit';# https://bugzilla.wikimedia.org/show_bug.cgi?id=17630 $wgNamespaceProtection[NS_CATEGORY]=$wgNamespaceProtection[NS_CATEGORY_TALK]=array('editinterface'); $wgSpecialVersionShowHooks=true;
wikitech-l@lists.wikimedia.org