Project:Support desk/Archive 11

From mediawiki.org

2007

Trackback spam

I got hit by trackback spam of a huge proportion. I turned off trackbacks but they won't go away. How do I get them off my site? Can I clear the table to make all the spam like trackbacks go away? The trackbacks table is empty. They seem to autoregenerate when I delete them. --PurplePopple 12:36, 30 August 2007 (UTC)[reply]

MediaWiki doesn't have tracebacks. Disable whichever extension you have that adds them. Emufarmers 03:18, 2 September 2007 (UTC)[reply]
Um, yes it does: $wgUseTrackbacks. PurplePeople, most like it is just stuck in your cache, that is why it wasn't going away. Try clearing your objectcache table and clearing your browser cache. --12.219.103.195 22:21, 3 September 2007 (UTC)[reply]

editing Pages

how can i add new articles using just MySQL... i mean without using my web site.. please answer me at : makievski@gmail.com

Makievskij Anton

77.122.191.47 10:06, 28 August 2007 (UTC)[reply]

See the information about Exporting and Importing articles. --Dr DBW 23:03, 29 August 2007 (UTC)[reply]
I would very strongly advise attempting manual database manipulation, due to the plethora of changes actually involved in creating a new page or updating an existing one, including altering the page record, creating a new revision, creating an appropriate text record and setting text flags, updating the link tables, recent changes table, etc. - and that's before you run into any of the classic gotchas such as character sets.
Your best bet might be to adapt a maintenance script such as maintenance/importTextFile.php, using MediaWiki as a library to a PHP script which does the job. robchurch | talk 01:37, 30 August 2007 (UTC)[reply]

PCRE missing UTF-8 Support?

I am trying to install MediaWiki 1.10.1 on a Debian Etch box, with PHP 5.2.0. I'm using the standard Debian Etch package for PHP and for PCRE (libpcre3).

I got the wiki installed, and it comes up, but on every page, toward the top and overwriting the header, are PHP errors:

Warning: preg_replace_callback() [function.preg-replace-callback]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /home/ss1/www/multi/dev/includes/MagicWord.php on line 284

Warning: preg_replace_callback() [function.preg-replace-callback]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /home/ss1/www/multi/dev/includes/MagicWord.php on line 284

Warning: preg_match() [function.preg-match]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /home/ss1/www/multi/dev/includes/MagicWord.php on line 236

Warning: preg_replace_callback() [function.preg-replace-callback]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /home/ss1/www/multi/dev/includes/MagicWord.php on line 284

...etc. Some pages have more than others. I tried fixing this by compiling my own version of libpcre configured with the --enable-utf8 flag, but I couldn't seem to get PHP to actually *use* it. (I don't know if that was because pcre was linked into PHP statically, or if it was because the Debian package pcre was libpcre.so.3, and my compiled version was libpcre.so.0.) Anybody know how I can fix these errors?

Part of the headache is that a TON of Debian packages depend upon libpcre3, so I'd feel really nervous about replacing it with a different version.

198.51.119.157 15:14, 28 August 2007 (UTC)[reply]

http://uk2.php.net/manual/en/ref.pcre.php suggests using --with-pcre-regex=<path> to direct the PHP configuration script towards the right libraries. You might also be able to convince it to use a shared module. robchurch | talk 01:35, 30 August 2007 (UTC)[reply]

Admin's confirmation for new accounts

How should I set up MediaWiki, if I want every new user account to be not activated before administrator's confirmation's? —83.237.226.11 21:01, 28 August 2007 (UTC)[reply]

Explain activated. If you mean that you want to make it so that only "activated" users can edit or read pages, see extension:Require Editor Privilege. If you just mean just "edit", that may require a bit more instruction, post here if that's what you mean. :-) Cbrown1023 talk 01:43, 29 August 2007 (UTC)[reply]

MediaWiki does not have a concept of account "in limbo". Thre are basically two solutions:

  1. prohibit account creation by anons and users. So people have to ask you to create an account for them
  2. allow account creation to all (default), but take away the right to edit from normale users (and the "autoconfirmed" and "emailconfirmed" groups). Users would only be able to edit if they are assigend to a group which has the edit privilege.

HTH -- Duesentrieb 22:14, 29 August 2007 (UTC)[reply]

You might also take a look at the ConfirmAccount extension, which is under development. It's marked as stable, although it is quite new, so take that with a pinch of salt... robchurch | talk 01:33, 30 August 2007 (UTC)[reply]

Using MediaWiki for online encyclopedias with NON-user-created content?

If one wanted to create a for-profit online encyclopedia (in no way related to Wikipedia) where content was NOT user-created but rather supplied to the user, would MediaWiki still be the choice software? —75.51.70.95 23:01, 28 August 2007 (UTC)[reply]

If it is a large site yes. But be sure to restrict account creation properly. Aaron 00:57, 29 August 2007 (UTC)[reply]
Wait... you're asking for a non-wiki? or are you asking about something like Citizendium (which uses MediaWiki)? Cbrown1023 talk 20:37, 29 August 2007 (UTC)[reply]

It depends on what exactly you want. But http://lexikon.meyers.de/ (online version of one of the best known german encyclopedias) is based on MediaWiki. -- Duesentrieb 22:11, 29 August 2007 (UTC)[reply]

MediaWiki is a wiki engine. Everybody's got a slightly different idea of what a wiki is, but the basic definition that's agreed upon is a web site which is open for contribution by a wide number of users, and usually, public contribution. If your needs are radically different, then MediaWiki may not be the ideal solution for you.
It's worth noting that many companies, including Novell, and several high-profile organisations, such as the Mozilla Foundation, make regular use of MediaWiki for slightly different purposes, and many other organisations, educational institutions, etc. often deploy it as a convenient base for a collaborative knowledge base. robchurch | talk 01:32, 30 August 2007 (UTC)[reply]

Using MSSQL instead of MySQL

Hi there,

Can anyone tell me if it is possible to use mediawiki using MSSQL instead of MySQL? —81.175.86.30 07:31, 29 August 2007 (UTC)[reply]

No, it's not possible. Implementing support for MSSQL would be doable, but quite some work. Postgres is supported though, and I think partial/experimental support for Oracle also exists. -- Duesentrieb 22:08, 29 August 2007 (UTC)[reply]
Note that there was some recent work in this area (see bugzilla:9767), but I'm not quite sure what the status of that is at the moment. There's no official roadmap for inclusion of support for other DBMS; support for, e.g. PostgreSQL has become available thanks to a dedicated maintainer with a strong interest in making this happen. From our point of view, there's no benefit in supporting DBMS which we don't use in production.
The Oracle support was, at one point, removed from the software, and was re-added, but has once again slipped into an unmaintained state. robchurch | talk 01:30, 30 August 2007 (UTC)[reply]

Help! Need to secure the MediaWiki.

Hello, I need some help in securing a MediaWiki. I want to make it impossible to view anything until a user logs in, and the creation of new user accounts to be allowed only from a couple of IP addresses. Can this be done? How? Any useful links? Thank you very much

85.186.56.13 07:55, 29 August 2007 (UTC)[reply]

Please read Rob's disclaimer first. Then, you could do Manual:Preventing access (there should be everything you need in there about only allowing read/edit for people with accounts and for disabling account creation unless you are a user). Not sure how to allow it only from a few IP addresses. Cbrown1023 talk 14:35, 29 August 2007 (UTC)[reply]

Edit links for sections sometimes disappear

Edit section link are invisible for the same authorized accounts at different PC. Is this a bug or a known issue?

  • MediaWiki 1.10.1 with security settings in LocalSettings.php
    • $wgDefaultUserOptions ['editsection'] = false;
    • $wgGroupPermissions['*']['read'] = false;
    • $wgGroupPermissions['*']['edit'] = false;
    • $wgGroupPermissions['*']['createaccount'] = false;
  • Browsers: IE6 sp2, Maxthon 1.5.9.(b80)
  • OS
    • Works correct at MS Windows 2003 Server
    • Sometimes disappears at MS Windows XP Pro SP2

Salmira 12:45, 29 August 2007 (UTC)[reply]

Upload File from URL

I'm been searching all over for an extension that will allow you to upload a file from a URL instead of from a resource on your local machine. Does anyone know if something like this exists? Thanks much.

Blckdmnd99 17:13, 29 August 2007 (UTC)[reply]

I know of one that has to do with uploading from Flickr that is used widely on Wikia, but there may be some others listed in Category:Media handling extensions. Cbrown1023 talk 20:32, 29 August 2007 (UTC)[reply]

It's built in. From DefaultSettings.php:

/** Allow for upload to be copied from an URL. Requires Special:Upload?source=web */
$wgAllowCopyUploads = false;

-- Duesentrieb 22:05, 29 August 2007 (UTC)[reply]

I wanted to use language links, how can I enable it?

I wanted to have the language links like this page :

Template:Languages

I copy and paste 2 templates related to this template (Template:Languages and Template:Languages/Lang ) but when I browse Template:Languages page I saw the functions like "ifexist" hasn't been executed. how can I solve the problem? —80.191.15.10 17:26, 29 August 2007 (UTC)[reply]

You need Extension:ParserFunctions -- Duesentrieb 22:03, 29 August 2007 (UTC)[reply]

login and password maintenance under https?

Is there a setting, extension, or code example that allows someone to place just the login page and preferences pag under https protocol while the rest of the site runs under http? I've searched, but haven't found one. Thanks. --Vjg 18:36, 29 August 2007 (UTC)[reply]

All you need is to have the whole site accessible via either, but force any access to the login special page to return a redirect to the https if access is attempted from just normal http. This could be added in to LocalSettings.php such as in this (untested, off the top of my head) example: --Nad 02:54, 11 September 2007 (UTC)[reply]
$url = $_SERVER['SCRIPT_URL'];
if (ereg('Special:Userlogin',$url) && $_SERVER['SERVER_PORT'] != 443) header("Location: https://$wgServer$url") && die;

Hide from Certain User

Is there a way to hide a certain part of a page from a specific user or admin? How would I do this? Thanks. Smaug 22:36, 29 August 2007 (UTC)[reply]

no. you can hide entire pages from users not belonging to a special group (using an appropriate extension), but you cannot hide parts of pages. This would mess with caching, among other things. Note that hiding things in mediawiki isn't 100% air-tight anyway, mediawiki is not designed for this. -- Duesentrieb 10:13, 30 August 2007 (UTC)[reply]
Thanks for answering. Smaug 13:36, 30 August 2007 (UTC)[reply]

Wiki onto Google

How can I get my wiki onto Google? The URL is http://www.iaskmd.com. —24.7.119.253 01:44, 30 August 2007 (UTC)[reply]

be patient. -- Duesentrieb 10:11, 30 August 2007 (UTC)[reply]
Nice answer. You can submit your site to google, http://www.google.com/addurl/ and wait to be crawled --Zven 02:52, 4 September 2007 (UTC)[reply]

pgsql.so

Where do i get pgsql.so? I have php_pdo_pgsql.dll but MediaWiki refuses to take it. —83.86.35.112 17:12, 30 August 2007 (UTC)[reply]

Sounds like you are using Windows. Try uncommenting this line in your php.ini file (by removing the semicolon)
;extension=php_pgsql.dll
Turnstep 18:52, 3 September 2007 (UTC)[reply]

Sidebar Help

I need some help please. I cannot seem to edit/customize the sidebar. Here is my setup.

  • Windows Server 2003
  • PHP 5.2.3
  • MediaWiki 1.10.0
  • Mysql 5.2.3790
  • Monobook skin.
  • IIS 6
  • Running on an intranet, so no domain in url. just one word Take2Wiki.

I'm logged in as admin

After reading the helps and various tutorials, I'm pretty sure I just need to be editing my MediaWiki:Sidebar by going to this url.

http://Take2Wiki/MediaWiki:Sidebar

where http://Take2Wiki is the root of my Wiki site. However, it's returning an HTTP 404 error (Cannot find). I've also tried

http://Take2Wiki/index.php/MediaWiki:Sidebar

but to no avail. Am I missing something? Or could it possibly be my setup, or maybe the fact that I don't have a fully qualified domain name??

Any help is most appreciated.

bill —64.182.114.1 18:44, 30 August 2007 (UTC)[reply]

Go to your wiki main page, then replace Main_Page in the URL with MediaWiki:Sidebar. --Dr DBW 00:09, 31 August 2007 (UTC)[reply]

SQL Server 2005 Express

Can I install MediaWiki to work with "SQLServer 2005 Express" or "SQLServer 2000" --203.24.1.57 23:14, 30 August 2007 (UTC)[reply]

No. robchurch | talk 15:37, 3 September 2007 (UTC)[reply]

Short Name issue

I am hosting on hostgator and having problems getting mod_rewrite to work properly.

http://www.thevbcoders.com/codi/index.php/Main_Page

I have tried all rewrite rules from the article on this site but still nothing. I don't have root access which I can't use the root portion. Any ideas on the problem?

Thanks Steve —76.4.188.64 01:28, 31 August 2007 (UTC)[reply]

That wiki looks very nice ;-) Short urls can have problems if you don't have access to the Apache config, but have you checked Manual:Short URL? --Nad 21:25, 11 September 2007 (UTC)[reply]

locking pages for users and groups

How can I lock pages for other users or how can I say that "page xyz" is just readable for "group abc"? —213.214.18.64 07:23, 31 August 2007 (UTC)[reply]

See a couple of questions on this page, Project:Support_desk#Hide_from_Certain_User, Project:Support_desk#Creating_Non-Public.2C_but_Private_Section_of_the_Wiki.3F --Dr DBW 07:25, 31 August 2007 (UTC)[reply]

Undefined offset: 0 in Namespace.php on line 96

Recently upgraded to Mediawiki 1.10.1 from 1.9.3 and now the above error has appeared. Did the normal upgrading process, back up of files and database, copied new version over the top of the old, ran the updating script, then that was it. Any ideas on the cause of it? I didn't change anything to do with the LocalSettings.php file either. The contents of line 96 in Namespace.php is below --Dr DBW 07:24, 31 August 2007 (UTC)[reply]

return $wgCanonicalNamespaceNames[$index];
Any suggestions? Something wrong in the LocalSettings.php? I also updated two other wikis, on the same server, using the same procedure, and this error did not appear. --Dr DBW 21:53, 5 September 2007 (UTC)[reply]
Something in your LocalSettings must be clearing that array because its content (including offset 0) are all defined in namespace.php. Maybe try commenting out extensions to see if any are causing the problem. And check if any localsettings are related to namespaces too --Nad 22:27, 5 September 2007 (UTC)[reply]
Thank you for the suggestion. Have worked out that it is due to the Extension:SidebarEx. Off to the developer to see if they know why etc .... --Dr DBW 04:11, 10 September 2007 (UTC)[reply]
Issue has been resolved. Was a bug in the extension code. --Dr DBW | talk 23:15, 12 September 2007 (UTC)[reply]

Another Question

I want to link words within a page to a master definitions list. How do I create a Master page that different words in different pages can link to. —67.161.224.23 14:54, 31 August 2007 (UTC)[reply]

slow

I'm trying to work on my site this morning, and it is responding VEERRRYY slowly. I was only able to bring up the main index page I created, but can't bring up any of the other pages or use any of the links. Every other website I bring up works just fine (and quickly). Any ideas? —69.146.160.203 15:27, 31 August 2007 (UTC)[reply]

Creating links from words to a master definitions or references page

I am creating a procedures wiki and I need to link individual words or phrases to master pages that will contain multiple definitions, references etc. I wish to create these master lists so that in the future, updating references, definitions are done on one page and not multiple procedures

trhixon —Trhixon 15:45, 31 August 2007 (UTC)[reply]

The Glossary extension might do what you are looking for. --Dr DBW 00:16, 1 September 2007 (UTC)[reply]

Adding Content in Sidebar

Hey,

I'm working with an organization at ASU that is using this Wiki software. I'm not familiar with it, so I am having difficulty getting some things accomplished...

Particularly, where (line #s, files, etc) do I go so that I can add content into the sidebar? We are wanting to add some images/logos at the end of the sidebar (underneath the toolbox). I'd like to just be able to go into a file and add the simple HTML code; but I haven't found the appropriate files/etc.

Any help would be greatly appreciated!!

Andrew —149.169.101.176 18:21, 31 August 2007 (UTC)[reply]

You may not need to touch the filesystem file structure of MediaWiki, try altering the article MediaWiki:Sidebar on your wiki (have to be a Sysop), however this adds content above the toolbox. See Manual:Interface/Sidebar for documentation details --Zven 20:09, 31 August 2007 (UTC)[reply]
Images cannot be added into MediaWiki:Sidebar so it looks like you are going to have to find and alter the code. Have you already altered the logo? --Zven 20:36, 31 August 2007 (UTC)[reply]

Blocking anonymous users from certain namespaces

I would like to block users that are not logged in (or not of a certain permission atleast) from viewing various namespaces. In other words, I don't want them to even be able to view the source.

In particular:

  • Mediawiki:*
  • Template:*

How can I do this?

71.146.38.183 21:40, 31 August 2007 (UTC)[reply]

See Manual:Preventing_access --Dr DBW 23:33, 31 August 2007 (UTC)[reply]

Special Statistics error and problems creating subdirectories

Hi, my [[Special:Statistics|{{NUMBEROFARTICLES}}]] returns a figure of 18,446,744,073,709,551,615 articles. It would have been good if it were really true but the fact is that I have just started. Also, what is the command for counting the number of articles in a subdirectory.

I don't seem to be able to add any directory after 103.

$wgExtraNamespaces = array(100 => "Portal", 101 => "Perbincangan_Portal");
$wgExtraNamespaces = array(102 => "Istilah", 103 => "Perbincangan_Istilah");

I have tried other numbers such as 110 and 201 but it doesn't seem to work either. Also, 100 and 101 does not work either. Only 102 and 103. Is there a conflict somewhere?

(P/S: My version is 1.10.1. I just downloaded the patch, mediawiki-1.10.1.patch(3).sig. Which directory should I download it to?) -- PM Poon 05:13, 1 September 2007 (UTC)[reply]

About the statistics: There was a problem with the counting, and it went to the largest possible value.
About the counting of the pages in namespace (not "subdirectory"): Add the following code to LocalSettings.php (after the place you added the extra namespaces):
$wgAllowSlowParserFunctions = true;
Then use the magic word "PAGESINNS", e.g. {{PAGESINNS:102}}. You can remove the line in LocalSettings.php if you don't want to use this magic word any more.
About the extra namespaces: You use wrong PHP commands. The later command overrides the earlier one. You should use only one command, for example:
$wgExtraNamespaces = array(100 => "Portal", 101 => "Perbincangan_Portal", 102 => "Istilah", 103 => "Perbincangan_Istilah", 104 => "...", 105 => "...");
Alternatively, you can use:
$wgExtraNamespaces[100] = "Portal";
$wgExtraNamespaces[101] = "Perbincangan_Portal";
$wgExtraNamespaces[102] = "Istilah";
$wgExtraNamespaces[103] = "Perbincangan_Istilah";
$wgExtraNamespaces[104] = "...";
$wgExtraNamespaces[105] = "...";
rotemlissTalk 15:51, 1 September 2007 (UTC)[reply]

Thank you very much, Rotemliss. The solutions given by you were very, very helpful. I had been searching high and low in Google Search but did not manage to find any answer. PM Poon 22:40, 2 September 2007 (UTC)[reply]

Centering a table VERTICALLY on the page

Hi guys Is there a way to center a table VERTICALLY on a page? I can center horizontally no problems, but vertically, with the valign tag, it doesnt want to play ball. —58.175.34.241 05:56, 1 September 2007 (UTC)[reply]

http://www.w3schools.com/css/pr_pos_vertical-align.aspEep² 08:31, 1 September 2007 (UTC)[reply]

php error

I'm trying to install MediaWiki 1.11.0 on php 4.4.7. In the main page you have this

   * Download MediaWiki (current stable version is 1.10.1)
   * Web Server such as Apache or IIS
   * PHP version 5.0 or later (5.1.x recommended)
   * Database Server
         o MySQL 4.0 or later
         o or PostgreSQL 8.1 or later (also requires plpgsql and tsearch2)
         o or Ingres 2006 or later (SVN-Download)

when i install, appear this error: "PHP 5.0.0 or higher is required. ABORTING." what can i do to solve this? thanks, and sorry for my bad english :|

You said you have PHP 4.4.7. It requires at least PHP 5.0 (5.1 recommended).

Coding Error from server not meeting all requirements?

What I mean is, the PHP Version, for example is actually 4.4.6 (I have a 1.9 in use for the wiki software). Could this be an interfearence in some codes not working right? (Example would be the hidden varible one, I CANNOT seem to get it to work)--TheSisko

Upgrade PHP to version 5, or use MediaWiki version 1.6.10. Emufarmers 03:18, 2 September 2007 (UTC)[reply]

How to Remove Top Links on the right - MyTalk, Preferences, MyWatchlist, My Contributions, but no Log in

Hi Guys, ive been struggling with this. I want to remove the:
Top Links - MyTalk, Preferences, MyWatchlist, My Contributions, but KEEP the Log in/Log out link.
Ive tried to do the following in Monobook.php, but it removes also the Login/Log out link.

<div class="portlet" id="p-personal">
    <h5>$wikidata[personaltools_header]</h5>
    <div class="pBody">
        $wikidata[personaltools_content]

Any help appreciated. --203.5.136.234

Installation: Requested to Choose Application

I have uploaded MediaWiki (1.6.10) to my web host and MySql database is up, but when I direct browser to directory, the browser tells me I have chosen to open a file, and asks me to chose an application:

This happens in Mozilla Firefox, Netscape Navigator, and MS Internet Explorer. What I am doing wrong? —James R MacLean 09:40, 2 September 2007 (UTC)[reply]

As said on Bugzilla (bugzilla:11153), it's not our problem, it's a problem with your host's PHP. --Sayuri 12:38, 2 September 2007 (UTC)[reply]
The problem is now solved. What happened was that, initially, I had installed release MW 1.10.1, but my web host only supported PHP4.4, not PHP5 (which is a requirement of release 1.10.1). So I used the SSH client to delete the /wiki directory and replaced it with a new one containing release 1.6.10. This time, I got the same error. That's when I posted here the first time.
A tech guy at my webhost kindly noticed that it worked for him, so perhaps it was necessary for me to flush my DNS resolver cache. It worked, and I'm in business. Thanks to everyone for listening and diagnosing.

Optional linking

I have a question. That's why I'm here, you see. My question is this: I'm creating a bunch of templates on a Wiki of mine, and I was wondering if there was a line of code I could use that would link to a certain article if that article existed, but if it didn't, would link to another, default one.

Thanks. (And sorry if this is the wrong place to ask...) ~ ТģØ {ŧª∫Қ ↑¤ Мә} 14:01, 2 September 2007 (UTC)[reply]

If you install Extension:ParserFunctions, you get an ifexists directive: meta:ParserFunctions#.23ifexist: -- Duesentrieb 22:18, 2 September 2007 (UTC)[reply]

You are a very helpful person. Thanks! ~ ТģØ {ŧª∫Қ ↑¤ Мә} 04:24, 3 September 2007 (UTC)[reply]

Faulty system clock has lead to strange wiki behaviour

My company's wiki server has recently had trouble maintaining the correct time (which was an OS/hardware problem, nothing to do with the wiki software). It's been fixed now, but as a result of the problem we have a wiki in which some articles have been time-stamped with a date in the future. This leads to problems displaying the most recently-edited version of an article.

Is there any 'official' way to correct this? I've considered possibilities such as hacking the database to set all versions to an arbitrary date (say 01-01-2007) but I suspect that such ignorant tinkering could well lead to further problems. Any advice will be much appreciated - thanks in advance. —WombatDeath 15:23, 2 September 2007 (UTC)[reply]

Manually settings times in the revision table (most essential - bad timestamps in recentchanges ad logging are probably not so critical) is the only way i know to fix something like that. But what to set the time to is another problem. If the info is gone, it's gone... -- Duesentrieb 22:20, 2 September 2007 (UTC)[reply]
Thank you very much for your response! We'll look into that - no data appears to have been lost, so the situation should be recoverable.
WombatDeath 10:15, 3 September 2007 (UTC)[reply]

CategoryTree in SideBar Problem

Hi guys hope you can help. Ive got the CategoryTree working in the SideBar but there is a problem. It works fine when expanding out the tree on the Main Page. I can click on a child on the Main page and it goes to the right location. However, when Im at the new location other than the Main Page, I get a similar problem to what has already been discussed under "Clicking the [+] has no effect / gives JavaScript error".

The thing is:
1) On the new page, I can click on the root of the category tree, and it takes me to the right location.
2) On the new page, I can click on the root and goes to that root fine, but I cannot expand that roots children out. I CAN expand the CategoryTree out successfully on the Main Page only, but no other page.

The error code Im getting on pages other than the Main Page when using the CategoryTree from the sidebar is:
Line 671
Char33
Error:Object Expected
Code:0
URL: <the url of the new page Im currently on>
I have checked all is correct with the notes on "Clicking the [+] has no effect / gives JavaScript error".

SUMMARY:

On the Main Page:

I can expand the category tree successfully, and click on children successfully.

On Pages other than the Main:

# I can click on the root of each category and go to that page:
[+]Category (If I click this, it goes to this page)
[+]Category (If I click this, it goes to this page)
[+]Category (If I click this, it goes to this page)
eg. [+]VBScript  (If I click on VBSScript, it goes to http://localhost/mediawiki/index.php/Category:VBScript
# If I try and click on the [+] sign next to the Category Name, eg. the [+] next to VBScript, I get the error message.
When I hover over the [+] next to VBScript, the path is looking at http://localhost/mediawiki/index.php/Category:VBScript#

Questions. This error Im getting. What file is the error coming from, and how to correct? Thank you. —58.175.32.33 19:49, 2 September 2007 (UTC)[reply]

as stated on Extension:CategoryTree, it does not work right in system messages. This is a known issue, and there's no simple and good solution (or at least, i don't know any). Basically, CategoryTree registers JavaScript code in the ParserOutput object if it gets used on a page. But system messages used as interface components (like the sidebar) are parsed differently, so the needed JavaSCript does not end up in the HTML head. So CategoryTree doesn't work.
A possible hack to work around this issue (untested!): in CategoryTree.php, find the function efCategoryTreeParserOutput. Remove the condition, so it always calls CategoryTree::setHeaders( $outputPage ); This causes the css/js for categorytree to be included on every page (which is not very smart generally, but what you want in your case).
Put a note on Extension talk:CategoryTree if this works :) -- Duesentrieb 22:33, 2 September 2007 (UTC)[reply]

Purging database

I made a mistake in my LocalSettings.php regarding namespaces and all my articles that should have gone into the Istilah namespace went into the main namespace instead. When I corrected my mistake in my Localsettings, all my Istilah:xxxxx articles disappeared. Now I rewrite all those missing articles and my Special Statistics hit 18,446,744,073,709,551,615. I added 2 articles in the main namespace and now the number of articles read 18,446,744,073,709,551,613.

I wonder whether there has been a conflict between the two Istilah type articles. How do I purge my database of those articles in the main namespace that is "missing"? Hopefully, this may solve the Special Statistics error. And also, I would like to purge all deleted data from time to time as the website that I rented is quite budget. PM Poon 22:52, 2 September 2007 (UTC)[reply]

Here's some special-page extensions that may help with that: --Nad 03:57, 3 September 2007 (UTC)[reply]

Thank you Nad, for your recommendations. I have tried the first two but not the third one as I do not use DPL. The second one works but is not useful for me as my ISP assigns a different IP address each time I log in. I think the first one is what I need but unfortunately it returns the following error (I am using MediaWiki version 1.10.1):

Warning: Cannot modify header information - headers already sent by (output started at /home/ekomrinf/public_html/ekompute/LocalSettings.php:147) in /home/ekomrinf/public_html/ekompute/includes/WebResponse.php on line 10.

The pertinent line 10 in /home/ekomrinf/public_html/ekompute/includes/WebResponse.php is:

/** Output a HTTP header */
function header($string, $replace=true) {
header($string,$replace);
}

while /home/ekomrinf/public_html/ekompute/LocalSettings.php:147 is:

include_once("$IP/extensions/SpecialDeleteOldRevisions.php"); — PM Poon 17:45, 3 September 2007 (UTC)

Displying article and discusssion board on the single page

Please see the followin image . I want to display article and discusssion board on a single page. Is it possible to customize in media wiki. Please response quick
Thanks in advance
File:Artivle.jpeg

Bpishere 16:18, 3 September 2007 (UTC)[reply]

Have a look at Extension:TalkHere -- Duesentrieb 20:12, 3 September 2007 (UTC)[reply]

install-utils.inc

hi i have wiki 1.10.1 and php 5.2.1 and mysql 4.1.22-standard

everytime i go to install i get this message

Warning: require_once(includes/Defines.php) [function.require-once]: failed to open stream: No such file or directory in /home/zendurl/public_html/s/stozy/config/index.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'includes/Defines.php' (include_path='.:/home/zendurl/public_html/s/stozy:/home/zendurl/public_html/s/stozy/includes:/home/zendurl/public_html/s/stozy/languages') in /home/zendurl/public_html/s/stozy/config/index.php on line 46

what is going wrong ? nothing i do works. :(

83.104.231.36 20:58, 3 September 2007 (UTC)[reply]

Pretty URLs and namespaces with subpages

I'm running the latest version of MediaWiki, and have configured pretty URLs. They work fine, unless it relates to a subpage. For example: www.domain.com/wiki/article/article subpage. If you type in a pretty URL direct to a subpage it won't work and gives a 404 not found error. If you type in an unpretty URL - www.domain.com/wiki/index.php?title=article/article subpage - then it works fine. Any ideas on how to fix this? —Coldmachine 21:32, 3 September 2007 (UTC)[reply]

It depends on what method you've used to set up the pretty urls --Nad 22:01, 3 September 2007 (UTC)[reply]

Installing scripts to apply to all users: MediaWiki:Common.js

I have tried copying and pasting the js from a number of scripts (e.g. the Force Edit Summary script, and the Force Preview before save script) into MediaWiki:Common.js but none of them seem to work. I've tried with and without the initial pre and nowiki tags (and closing them at the end). If I omit both of those then the page looks pretty weird - some of the code is highlighted in a boxed area for example. If I include them both then still no luck. Is there an extension which needs to be installed prior to amending Common.js with scripts? Oh, I also tried importing via the importscript command both to external URLs and to an internal userspace-based article containing the code, and no luck there either. —Coldmachine 21:33, 3 September 2007 (UTC)[reply]

You need to set $wgUseSiteJs to true for the MediaWiki:Common.js file to be included. --Nad 21:56, 3 September 2007 (UTC)[reply]

Database corruption

Hi, I may be experiencing database corruption. My webhost has proposed that I delete the database and create a new one. If so, all my work goes down the drain. Fortunately the site is very new and has no other user contribution. How do I safeguard my contents in the future?

If you have access to the command line you could try running the php script in the maintenance directory php rebuildall.php. The corruption may be more severe, in that case you would need to use mysql tools to establish whether your database is recoverable. The mysql command;
mysqldump -u root -p --single-transaction -B wikidb > wikidb.sql
will back up your database at any time. --Zven

Also the use of ImageMagick requires exec() to be enabled. I understand this is a very big security risk. — PM Poon 02:38, 4 September 2007 (UTC)

Edit summary formatting (resolved)

Where is the edit summary formatted? Specifically, I want to get rid of the parentheses () around it. I've already hacked Special:Recentchanges to be a sortable table but would like to fix the edit summary to not have parentheses (and "New page:" in it since the "N" symbol already represents that--I thought it would be editable via MediaWiki:Autosumm-new but removing "New page:" from that had no effect on the recent changes list). —Eep² 12:00, 4 September 2007 (UTC)[reply]

OK, seems the "New page:" and other "autosumm-"* system messages are hard-coded into the recentchanges database table so existing edit summaries won't be affected (which is why, after editing MediaWiki:Autosumm-new, I didn't see any change). And I found where the parentheses are added: in ..includes/Linker.php (line 964) of all places. —Eep² 14:33, 4 September 2007 (UTC)[reply]

After setup of 1.6.10 since I am using PHP4, I get the following errors:

Warning: Cannot modify header information - headers already sent by (output started at\wiki\LocalSettings.php:1) in \wiki\includes\OutputPage.php on line 496

Which repeats for 421,449,450,452, 503 and 510. How do I resolve this? —71.41.51.2 16:23, 4 September 2007 (UTC)[reply]

Access resources outside MediaWiki

Greetings all,

My problem is as follows:

I have a MediaWiki (1.10) site up and working well. The versions of Apache & MySQL are at or within one minor release of current. On the whole, all is working as expected. My issue is that I have an internal client who wants to "advertise" their work on the Wiki without having to upload it. Rather, they want to have some screen on the Wiki look like a standard "Directory/File" display they can "walk down" to the file they want and let the user copy the file from wherever it is stored to the users local disk. These files are on a standard SMB capable Linux box.

The primary directory (containing all the other directories & files) can be mapped in Windows (or NFS) and, of course, there is an Apache Web server that could also be used for access (a new virtual host likely but that's fine).

I have searched EVERYWHERE I can think of, looking for an extension or other mechanism to do this but, no luck. I tried to make the FileProtocolLinks and FileLinkExtensions work but again, no luck (can someone provide a step-by-step to make EITHER of these work?).

I am assuming this can be done but maybe not...In any event, I would GREATLY appreciate ANY help anyone could offer.

Thanks,

Pete

216.68.13.36 16:59, 4 September 2007 (UTC)[reply]

You'd need to explain more clearly what items are being copied from where to where and what information the tree structure is reflecting, but it sounds like you'd need an extension made specifically for that. --Nad 22:05, 4 September 2007 (UTC)[reply]


--216.68.13.36 19:54, 5 September 2007 (UTC) Essentially, I need to be able to "approximate" the function of a file manager (like Windows Explorer or one of the Linux GUI FM's). The resources are different files (all Acrobat, WORD, Excel or PowerPoint). They all sit on an SMB accessible file server. I also have Apache running on the server so some kind of extension able to display something like a file system as seen by http or ftp (the GUI interfaces that is)would work. I WON'T have control of the directories and files inside the root directory but I DO have control of the parent (root) directory containing the folders & files. I hope this makes things clearer. I hate to have to do it this way but short of importing all the files in some kind of an "Internal Link" construction (which is way too much work and I KNOW the person in charge of these files won't do all the uploading), I'm not sure how to "encourage" MediaWiki handle this requirement.[reply]

Many Thanks, Pete

Upload Error (resolved)

When I try to upload a file I'm getting a rather long error. As far as I can tell I've got everything set up as it should be according to the FAQ and all other documentation that I can find. This is the error message I'm getting:

Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid/gid is 7926/0 is not allowed to access /mounted-storage/home70b/sub001/sc16966-QTFK/www/wiki/images/archive owned by uid/gid 99/99 in /mounted-storage/home70b/sub001/sc16966-QTFK/www/wiki/includes/GlobalFunctions.php on line 1695

Could not copy file "/upload_tmp/phpNcZbbN" to "/mounted-storage/home70b/sub001/sc16966-QTFK/www/wiki/images/9/93/V1p4f.jpg". —68.148.110.107 19:09, 4 September 2007 (UTC)[reply]

Any idea?

Thanks, Tyler

From what those errors are saying it looks like you need to change the permissions on your images directory as the script is not allowed to create files in there. --Nad 21:58, 4 September 2007 (UTC)[reply]

Permissions are all set to write. That's why this is confusing me so much.

Tyler

I think that "SAFE MODE Restriction in effect" is bad and means that your ISP has disabled PHP's ability to create directories. If the ISP doesn't want to turn that off, then you may be able to still upload images by setting $wgHashedUploadDirectory to false which would mean all uploaded files would go directly into your images directory without needing to create new sub directories to put them in. --Nad 22:52, 4 September 2007 (UTC)[reply]

Works perfectly now, thank you. I guess it would have help to have read through the LocalSettings.php file a bit more closely.

Sidebar - Nqvigationsleiste

I have installed MediaWiki (german language). This is the URL of my Startpage: htttp://10.1.1.47/index.php?title=Hauptseite How can I edit the navigation Bar on the left side? htttp://10.1.1.47/index.php?title=Sidebar and htttp://10.1.1.47/index.php?title=Navigation are empty pages?? Can you please help me?

213.70.219.139 08:23, 5 September 2007 (UTC)[reply]

The sidebar article is MediaWiki:Sidebar --Nad 09:07, 5 September 2007 (UTC)[reply]
Ok, but what URL must I enter to edit the Sidebar?--213.70.219.139 09:16, 5 September 2007 (UTC)[reply]
You should just be able to edit it like any normal article. If it's showing up as empty when you click edit, then maybe you need to set $wgUseDatabaseMessages to true in your LocalSettings.php file, but normally you shouldn't need to do that for the sidebar article... --Nad 09:31, 5 September 2007 (UTC)[reply]
I think I do not have the right link. This is the link for my mainpage: http://10.1.1.47/index.php?title=Hauptseite now I edited it manually to htttp://10.1.1.47/index.php?title=Sidebar and it shows an empty page (even after adding your parameter). But it also shows an empty page when I enter a nonexistant URL like /index.php?title=DoesNotExist
--213.70.219.137 09:48, 5 September 2007 (UTC)[reply]
The links your showing me here are intranet addresses and not accessible from outside your LAN. Also the link to the sidebar you've shown has the title "Sidebar", not "MediaWiki:Sidebar" which is the name of the article containing the sidebar links. --Nad 10:18, 5 September 2007 (UTC)[reply]
/index.php?title=MediaWiki:Sidebar works. Thank you!--213.70.219.137 11:20, 5 September 2007 (UTC)[reply]

Thumbnails aren't being set with the correct permissions when created

When creating thumbnails either in gallery or just by using the thumb command, the actual thumbnails themselves aren't being set with the correct permissions. Any idea what could be causing this? —81.150.229.177 13:43, 5 September 2007 (UTC)[reply]

Images won't resize

I seem to have a problem resizing images of whatever type while editing. We have wikimedia 1.9.2 installed on a Linux server. At first I thought it had to do with the fact that there might be a problem with the MIME type being read incorrectly but when I check the uploaded files, the MIME type is correct. Is there something I need to change in the LocalSettings to enable resizing all together? I've found quite a few entries in the support pages related to ImageMagick but we don't have that installed and I don't think it is needed for basic image resizing.

Any suggestions? -212.113.85.1 14:28, 5 September 2007 (UTC)[reply]

Hi, I am no expert and I had a similar problem before. You need to use either ImageMagick or GD. My webhost gave me GD because you need to enable exec() to run ImageMagick (something that is not wise because it presents a big security risk).

The relevant part of LocalSettings.php reads:

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = false;
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'svg', 'ogg' );

As you can see, you need to disable ImageMagick. However, you will need to enable GD in one of the files to get GD to work. I can't remember which file it is. Can anyone else help? — PM Poon 16:48, 6 September 2007 (UTC)

How to tell MediaWiki to use different php version

How do you tell MediaWiki to use a different version of php? On one server that are trying to install on, default is some 4 version, but 5 is installed and available. Where can you tell it to find php in a different to the standard location. --Dr DBW 00:39, 6 September 2007 (UTC)[reply]

Just found out that if use .php5 then it will use version 5. But that means have to rename all the .php files, though suppose that isn't that much of a problem ... --Dr DBW 00:54, 6 September 2007 (UTC)[reply]
If want to rename files, can use rename .php .php5 *.php, however, penny just dropped that that solution wont help, as there are lots of includes inside the MW code, which are directed at .php files, not .php5, so this idea doesn't get anywhere --Dr DBW 04:40, 6 September 2007 (UTC)[reply]
Another reason this wont work, is .php5 files on the server are still handled using cgi, so the #!php5 line still has to go inside all the .php files --Dr DBW 05:16, 6 September 2007 (UTC)[reply]
To avoid changing all the scripts to php5 (if using Apache) you can use mod-rewrite to append the "5" to all php scripts within a particular virtual-host. --Nad 02:24, 6 September 2007 (UTC)[reply]
Would that mean that the .php file is then executed as a .php5 file though, or simply displayed back to the browser as having that extension? This is the response I got from my host when asked them about mod-rewrite: --Dr DBW 04:10, 6 September 2007 (UTC)[reply]
Mod_rewrite will simply rewrite the URL of the file, not the files itself. I'm afraid the only option at this stage, apart from an upgrade to a PHP5 native server as you're already doing, is to manually add the shebang to each file.
Yeah that's true actually - you'd have to change the .php handler just for that virtual host... --Nad 05:15, 6 September 2007 (UTC)[reply]
Seems you can use a .htaccess file setting to do that. Haven't worked it out yet how it is done yet though .... --Dr DBW 01:21, 6 September 2007 (UTC)[reply]
On the particular server I am running things on, you add AddHandler cgi-script .php and Options +ExecCGI, because they run php5 for some reason as a cgi module. Plus, within the .php files you need to have #!/usr/bin/php5/php at the top of the .php files. --Dr DBW 01:31, 6 September 2007 (UTC)[reply]
So this idea doesn't work either, since the #! line has to be added to the all the .php files. Only way out now is the above one using mod-rewrite --Dr DBW 04:40, 6 September 2007 (UTC)[reply]
Since mod-rewrite is not an option, you could do a perl one-liner to add the she-bangs, such as this (make a copy of the dir structure first though incase it stuffs up):
perl -p -i -e "$/='%%%%%';s/^/#\!\/bin\/php5\n/" `find mw/ -name "*.php"`

Those %'s set the record separator to something non-existent because otherwise the regexp applies to every line. Change "mw" to the mediawiki install basedir, and set the php5 path to suit. --Nad 05:51, 6 September 2007 (UTC)[reply]

OK, here is what I have come up with (but have not as of yet tried it out), first run this script that will put the #!php5 code on the start of all .php files and save them as .php5

for i in *.php ; do { cat <(echo '#!/path/to/php5') $i > ${i}5 ; } ; done

Then run this script that will rename all of the .php5 files back to .php

for i in *.php5; do mv $i `basename $i .php5`.php; done

--Dr DBW 05:27, 6 September 2007 (UTC)[reply]

And further refinement of the script, going to try this out (have to get my providers to run the script). If anyone has suggestions on how to get the script to do it on sub-directories as well, that will make life easier, as there are 17 directories with MediaWiki that contain .php scripts that will need to run it in. --Dr DBW 06:39, 6 September 2007 (UTC)[reply]

foreach file (*.php)
cat php5.line $file > `basename $file .php`.php5
end
foreach file (*.php5)
mv $file `basename $file .php5`.php
end

And now made this into a bash script to run. Anyone here got an idea how to get it to go into sub-directories to do the same process? --Dr DBW 00:39, 7 September 2007 (UTC)[reply]

The perl line above will match all .php's recursively and prepend a shebang to each, you could add a rename to it too --Nad 01:20, 7 September 2007 (UTC)[reply]
Thanks for the suggestion. Not needed now anyway ;-( --Dr DBW 02:51, 7 September 2007 (UTC)[reply]
#!/bin/bash

# get list of all *.php files in directory
files_php="$(ls *.php )"

# go through all files in the directory
# with the extension *.php and insert
# the text from php5.line at the start
# and save as .php5
for i in $files_php;
do
        cat php5.line $i > $(basename $i .php).php5
done

# get list of all *.php5 files in directory
files_php5="$(ls *.php5 )"

# go through all files in the directory
# with the extension *.php5 and rename
# back to .php
for j in $files_php5;
do
        mv $j $(basename $j .php5).php
done

Well, not surprisingly, not as easy as I thought. .php files that are included into the original, called .php file, well you should have the #!php5 line in that, d'oh. Should have realised that. Damn, I wish they would just upgrade all to php 5, but they aren't doing that until Jan next year ..... --Dr DBW 02:26, 7 September 2007 (UTC)[reply]

Adesense Advertisement Not Displaying

The Google tower-format advertisement in the right column could not display until I added the following line to my LocalSettings.php:

require_once("$IP/adsense.php");

Unfortunately, I got the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/ekomrinf/public_html/ekompute/adsense.php:4) in /home/ekomrinf/public_html/ekompute/includes/WebResponse.php on line 10

What could be causing the problem? — PM Poon 04:07, 6 September 2007 (UTC)

Automatic replacement of string from more than one page

Hey, i've a problem.

How can i replace (automatic) a string from more then one pages.

In an older Mediawiki version i used html image links (<img src=".."/>). now, in mediawiki i use the mediawiki image links (File:...), because the html links are wrong.

So i need a methode, to replace from all pages the old links.

Please help!

62.8.155.19 10:02, 6 September 2007 (UTC)[reply]

You'll need to use an external script to loop through the pages and adjust them, here's a few approaches you could use:
  • Create a simple match & replace http robot based on existing mediawiki-client code like libwww-mediawiki-client-perl or OrganicDesign:wiki.pl.
  • Create a script which loops through and modifies the article by accessing the database, such as OrganicDesign:caretaker.pl which is desgined to loop through all articles daily and apply a set of match & replace rules on each.
  • Bot can can be simplified by installing Extension:Simple Forms which adds extra query-string options which can be used for matching and replacing content. OrganicDesign:Yi-bot is an example script which uses this method of mass replacement.
--Nad 10:29, 6 September 2007 (UTC)[reply]

wikidb.text table not found

I am upgrading our wiki from 1.4 to 1.10.1... I have copied over all files as shown, i have tried the php update.php and re installing it from the config.. I get an error saying wikidb.text is not found. I am logged in to phpMyAdmin and there is not text table. There are alot of tables so i'm sure everything is here as was before. The wiki worked well before trying to update is there something I should be renaming or otherwise?

Thank you Jasin —138.162.128.52 15:46, 6 September 2007 (UTC)[reply]

Main Page Design

Dear friends of MediaWiki, we want to use Mediawiki in our club for our own Intranet. We welcome all the useful tools of Mediawiki. Please take a look on our Main page. We would be very happy if someone could help us with the formatting. How could we better arrange the little pictures? We protected our intranet by password. Should anyone anyway could open it, so tell me please. I would give a password to trustable Users. --Ulli1105 11:57, 11 September 2007 (UTC)[reply]

MySQL 1062 Error

I'm using a web-hosting(I don't have server.) and I setup the latest Wiki(Korean). and everything was OK in setup process. but when I try to make another account or try to write a post, then they print "MySQL 1062 Error"(i'm not sure that was whether 1062/1026). the servers told me to delete all tables, and I did, and I setup again, and still I have that ploblum. —121.147.10.228 16:02, 6 September 2007 (UTC) ll[reply]

Sysop?

I've uploaded a photo. Now I wanna delete it but the wiki says that I have to have administrative privileges. what should i do? —128.95.94.46 17:51, 6 September 2007 (UTC)[reply]

Log in as a sysop; such an account was created for you during installation. robchurch | talk 15:05, 7 September 2007 (UTC)[reply]

Extra tabs

How do I add an extra tab (in an extension e.g.) only for one user group? Thanks, SPQRobin 18:45, 6 September 2007 (UTC)[reply]

Here's a snippet to be added into LocalSettings.php for adding an extra tab conditional upon users group --Nad 20:35, 6 September 2007 (UTC)[reply]
$wgHooks['SkinTemplateTabs'][] = 'wfAddTab';
function wfAddTab(&$skin,&$actions) {
	global $wgUser;
	if (in_array('sysop',$wgUser->getGroups()) {
		$actions['newtab'] = array('text' => 'tab-title', 'class' => false, 'href' => '/tab/url');
		}
	return true;
	}

Adding a Category Tree [+] Tab next to Edit, History, Protect, Delete

Hi guys,
Just wondering how you would go about adding:
1) An extra tab next to Edit, History, Protect, Delete, for every page.
2) A Category Tree [+] tab next to Edit, History, Protect, Delete, for every page.
Thank you. —58.175.32.33 22:41, 6 September 2007 (UTC)[reply]

Totally removing the Sidebar, toolbox etc column so the page extends full width

Hi guys!
Probably not explaining myself very well, but what Im trying to do is to totally remove the column that contains the logo, navigation (sidebar), toolbox, so that each wiki page extends the entire width of the screen, similar to when you click on "Printable Version" in the toolbox.
Any help greatly appreciated. —203.5.155.234 01:27, 7 September 2007 (UTC)[reply]

Try some of the other skins available, one may be like that? --Dr DBW 02:27, 7 September 2007 (UTC)[reply]
You could change your CSS to remove the sidebar and reposition the main content. --Nad 02:44, 7 September 2007 (UTC)[reply]

Putting a "back to top" link underneath each Section [Edit] link on the page.

Hi guys
Just wondering if it is possible to add another link underneatch each Section [Edit] link that when clicked on, takes you to the top of the page you are on..similar to an anchor, but so that this functionality would appear on every wiki page.
Any help on this appreciated. —203.5.155.234 01:32, 7 September 2007 (UTC)[reply]

Project:Support_desk/Archive_10#The_.5Bedit.5D_links_on_each_page. - that one sort of asks, why do you actually need this function? Personally, I don't understand why people want / need top / end links). Anyway, I suspect if you look through the archives here, search them may be? you should be able to pull up some options. I seem to recall this has come up a few times, and there is likely to be a solution available in there somewhere. --Dr DBW 02:54, 7 September 2007 (UTC)[reply]
[Home] key? robchurch | talk 14:57, 7 September 2007 (UTC)[reply]

automatic numbering like the 'table of contents'

Hey,

I've a question.

Is there a posibility of an automatic numbering of the subcategories?

e.g.

HeadlineSize1
  1. HeadlineSize2
       1.1 HeadlineSize3
  2. HeadlineSize2
       2.1 HeadlineSize3
       2.2 HeadlineSize3 and so on, like in the 'table of contents'

In Mediawiki, subcategories get no number(in the text)

Please Help.

Thanks!

62.8.155.19 08:20, 7 September 2007 (UTC)[reply]

Extension:DynamicPageList together with Extension:Tree view can make category trees. Using CSS these trees could be made to render in a similar style to the table of contents. I made an example here --Nad 10:44, 7 September 2007 (UTC)[reply]

Email Authentication

I was just wondering if someone might be able to help me with an problem I'm having with email authentication in MediaWiki. $wgEmailAuthentication is set to true in my LocalSettings.php file but when I send a request for an email authentication message to be sent to confirm my email address is correct I never receive the authentication email. I've tried a different email address too and its the same for that one. I've double checked that the address being sent to is correct so I'm stumped as to what the problem is. Do I need to change a setting somewhere else? I'm also using Apache on my iMac. Do I need to change how Apache is configured? Any help would be really appreciated. Thanks very much.—62.8.155.19 08:20, 7 September 2007 (UTC)]] 10:44, 7 September 2007 (UTC)

I'd look at it from the point of view that the email isn't being sent, unless you can confirm it is (MTA log), and work from there. robchurch | talk 14:56, 7 September 2007 (UTC)[reply]

Quick Log In

Is there a way to embed a login form/ username:password fields onto either the front page/ sidebar or top menu bar? That way people can log in right from the start Bouncingmolar 13:33, 7 September 2007 (UTC)[reply]

You could inject a form into a page using a parser hook extension, and into the skin using a skin hack. The login form isn't an includable special page, though. robchurch | talk 14:55, 7 September 2007 (UTC)[reply]
I added a login form example to Extension:Simple Forms#SimpleForms Usage Examples. --Nad 05:40, 13 September 2007 (UTC)[reply]
cool i'll check it outBouncingmolar 08:11, 13 September 2007 (UTC)[reply]

Spam Attacks

A wiki I implemented at the university of Oldenburg is constantly attacked by a spamer working under ever changing IPs.[1] I never saw such stuff on the English WP. Does anyone have experience with such attacks? (I know, I could of course block all IP-Users - yet I wanted to have the thing as open as the original WP so that my students got some insight into the thing.) regards, --Olaf Simons 14:21, 7 September 2007 (UTC)[reply]

Is the advice at Manual:Combating spam useful at all? robchurch | talk 14:54, 7 September 2007 (UTC)[reply]

some more buttons for "admins" would be nice

It would probably be helpful if only I were the "real" (instead of formal) admin of the wiki our university implemented on my request. The source texts remain hidden, I do not see where I could include the given code fragments. It seems I'll have to protect our child [2] through an exclusion of all IP-edits. Here again I miss the button I have to press as the "admin" or "bureaucrat". The decision how open the structure was to be, seems to have been made with our wiki's implementation, which I did not influence...
PS. A special problem is the lack of experience-based information. It would be good to have some kind of guess on the effect of decisions - I had (as a German Wikipedia admin) some clues about what personal vandalism can mean in this medium, I had, however, no idea that I would spend much more time on blind attacks bots seem to produce. I never saw such attacks on the recent-changes at either the German or the English Wikipedia. If we decide to allow logged-in users only - is there any experience whether this will end the automatic attacks? --Olaf Simons 18:46, 12 September 2007 (UTC)[reply]
Requiring login to edit will not stop spambots if the create-account form is still publically accessible. I use Extension:ConfirmEdit which prevents spambots from using forms. Just using it on the account-creation form is enough to stop them if you have to log in to edit. --Nad 21:55, 12 September 2007 (UTC)[reply]

How to change URL format

I have installed mediawiki for http://www.rrules.com/ .
URL of home page or any page appears as http://www.rrules.com/index.php?title=Main_Page but i want this url as http://www.rrules.com/index.php/Main_page .
Please help to fulfill this requirement . Thanks in advance

That's covered in Manual:Short URL and Manual:Very short URL --Nad 21:05, 7 September 2007 (UTC)[reply]

CAN MEDIAWIKI RUN WITH A 12MB MEMORY LIMIT?

Dear Support,

  1. 12MB OF MEMORY IS THE LIMIT AT OUR SERVER ENVIRONS. CAN MEDIAWIKI RUN WITH 12MB?
  2. Can the new version run on PHP4 by renaming files as they generate?

66.214.124.4 19:16, 7 September 2007 (UTC)[reply]

As long as MySQL is running ok, then MediaWiki should be able to work, but you'd be likely to have out of memory errors if there were too many concurrent users or any advanced queries. MediaWiki has not been able to run on PHP4 though since about version 1.6. --Nad 21:12, 7 September 2007 (UTC)[reply]

Special Pages have disappeared?

I'm running Mediawiki version 1.8.2 on a Linux machine with PHP 5.1.6 and MySQL 5.0.42.

I haven't had any problems with Mediawiki until about 2 weeks ago when all of my Special Pages stopped working. All of the code is still on the server, it's like it's just not recognizing that they are special pages anymore. All of my content is still there and I can still edit files, but I can't login, upload, go to a random page, etc, etc. Instead of loading the .php files that contain this code it tries to get me to add them in as regular wiki pages that haven't been given content yet.

I've searched but can't find any references to this problem anymore. Please let me know how I can fix this.

205.155.65.226 20:13, 7 September 2007 (UTC)[reply]

It sounds like the namespaces array has been modified so the the "special" namespace is being treated as a normal one. Do you have any extensions or localsettings which might have affected that? --Nad 21:15, 7 September 2007 (UTC)[reply]
No extensions running and afaik the localsettings haven't been changed since the install. Is there anything specific I should look for? —205.155.65.226 21:42, 7 September 2007 (UTC)
One thing I'm noticing, I'm not seeing my links show up as (http://blah/mediawiki/index.php/Special:Random), instead it's removing the 'Special' so it's just (http://blah/mediawiki/index.php/:Random). Typing it out by hand doesn't work though, but this seems like it's doing something wrong. —205.155.65.226 21:55, 7 September 2007 (UTC)

I want to change status of multiple page at once

I want to change a page content and automatically the status of another page that I defined will change. example in practice : It is useful when I want to edit "use case" of one feature of software and automatically wiki change the status of "test case" of that feature (for example add a flag of "use case changed" above the test case page). is there any extension? —213.233.160.30 01:38, 8 September 2007 (UTC)[reply]

How to run Maintenance scripts from my server! :(

This is a really stupid question but I can't figure out how to run maintenance scripts from my server. Do I use PHPMyAdmin to do this. I'm on siteforge and I'm not (obviously) a coder. Also what would be the particular name of a maintenance script code that I run through my database? Thanks in advance. —Zezek

The maintenance scripts are designed to run from the command line. See m:Help:Maintenance scripts overview --Nad 03:33, 8 September 2007 (UTC)[reply]

I just don't understand where the command line is? I'm not a programmer at all. Can you describe where that is if I'm being hosted on Siteforge?

You need what's called "shell access" to your host. Your ISP may not supply that level of access, you'll have to ask them about it. But their may still be some options for you even if they don't give you shell, such as PHP-Shell which emulates shell access specifically for PHP scripts. You may be best not to be dealing with the maintenance scripts unless something's actually not working though, and make sure you back up your database before you begin (you can do that with your PHPMyAdmin). --Nad 04:19, 8 September 2007 (UTC)[reply]

Thank you very much. I appreciate this level of input on such a, as I imagine, simple question.--Zezek 05:00, 8 September 2007 (UTC)[reply]

External images in articles

Is it possible to use external images in articles from e.g. imageshack.us? This will save a lot of space on my server. —81.69.162.167 14:44, 8 September 2007 (UTC)[reply]

Manual:$wgAllowExternalImages should help. --Flominator 15:26, 8 September 2007 (UTC)[reply]

No sysop account present

During my installation no sysop account was generated. It is also not possible to add sysop rights to an existing user, as sysop is not in the list of available groups (only administrator, bot and buerocrat are there). As a consequence I cannot edit the navigation bar. I already tried to add all the $wgGroupPermissions['sysop']... parameters from defaultSettings.php to localSettings.php, but this had no effect at all, the group sysop is still unknown to the wiki. Any help would be gratefully appreciated! Thanks Jo Fagor —194.24.158.17 11:30, 9 September 2007 (UTC)[reply]

Add the line $wgGroupPermissions['user']['userrights'] = true, then promote (via Special:Userrights) yourself to 'Bureaucrat, Sysop', then immediately remove the line. Alternately, you can use a direct DB query to insert a row with the 'Bureaucrat' right for user id #1 in the usergroups table. Aaron 12:17, 9 September 2007 (UTC)[reply]

Thanks - I tried it, but this does not change anything. The problem seems to be that the group sysop does not exist at all - therefore it is not in the list of available groups and therefore I cannot promote myself to sysop. Another strange thing: I cannot see the page MediaWiki:sidebar in the list of special pages, in fact I was not able to find it anywhere! Jo Fagor

Warning: Cannot modify header information

I am trying to use the SpecialDeleteOldRevisions function but encountered the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/ekomrinf/public_html/ekompute/LocalSettings.php:149) in /home/ekomrinf/public_html/ekompute/includes/WebResponse.php on line 10

When I tried to install Adsense in my LocalSettings.php, I too encounter a similar error.

Warning: Cannot modify header information - headers already sent by (output started at /home/ekomrinf/public_html/ekompute/adsense.php:4) in /home/ekomrinf/public_html/ekompute/includes/WebResponse.php on line 10

What could be the possible cause or causes? — PM Poon 17:41, 9 September 2007 (UTC)[reply]

Data base

Hello,

After having installed a mediawiki 1.10.1, 110 Articles later I noticed that the database was already 26MB. Is there a possibility not to write Article Revisions in the text table, but to write those revisions directly on the hard disk.

If not, which functions or classes I should modify to get this feature.

How can wikipedia run an encyclopedia of 2 000 000 articles with many revisions, using only database memory ? —Pppswing 18:45, 9 September 2007 (UTC)[reply]

Database information is stored on the hard disk, the RAM is used as a local cache of current queries and information. --Nad 22:00, 9 September 2007 (UTC)[reply]
What about the text table ? I can't see any wikitext on the hard disk only image. Pppswing 03:34, 10 September 2007 (UTC)[reply]
It's up to your database server where on the disk the data is stored (MySQL usually stores your data somewhere like /var/lib/mysql), but you should not access these files directly, use the a proper database backup utility such as the mysqldump command or the PhpMyAdmin web application. The images you can see are part of your wiki file structure and are not part of the database storage. i.e. when you back up your wiki, you must do a database backup and also separately back up all the images files too if you want a complete backup of all information in the wiki. --Nad 02:39, 11 September 2007 (UTC)[reply]

apache2 postfix email wasnt delivering

Put your question here—BEFORE the signature! And, again, DELETE THIS COMMENT! --> —84.56.194.202 19:10, 9 September 2007 (UTC) hi @ll,[reply]

is used the apache2, postfix. emails cannot be send to me. why?

here is the log-file:

Sep  9 20:34:27 localhost postfix/pickup[5808]: AF25A2E2FCD: uid=33 from=<www-data>

Sep  9 20:34:27 localhost postfix/cleanup[5848]: AF25A2E2FCD: message-id=<20070909183427.AF25A2E2FCD@lserver>

Sep  9 20:34:27 localhost postfix/qmgr[5809]: AF25A2E2FCD: from=<info@agentur-net.de>, size=1280, nrcpt=1 (queue active)

Sep  9 20:34:28 localhost postfix/local[5850]: AF25A2E2FCD: to=<admin@agentur-net.de>, relay=local, delay=1, status=bounced (unknown user: "admin")

Sep  9 20:34:28 localhost postfix/cleanup[5848]: 10A142E370C: message-id=<20070909183428.10A142E370C@lserver>

Sep  9 20:34:28 localhost postfix/qmgr[5809]: 10A142E370C: from=<>, size=2907, nrcpt=1 (queue active)

Sep  9 20:34:28 localhost postfix/qmgr[5809]: AF25A2E2FCD: removed

Sep  9 20:34:28 localhost postfix/local[5850]: 10A142E370C: to=<info@agentur-net.de>, relay=local, delay=0, status=bounced (unknown user: "info")

Sep  9 20:34:28 localhost postfix/qmgr[5809]: 10A142E370C: removed
That's a problem with your postfix configuration (done in a file called main.cf probably in /etc/postfix). It's thinking that the destination is local instead of forwarding it to another mail server. --Nad 21:57, 9 September 2007 (UTC)[reply]

Distinguishing preloads from abandonned new articles

Recently I accidentally marked (and unmarked) something (Template Extension Sample!) for speedy deletion because it was an empty template and no links showed up when I checked "what links here". Fortunately someone caught the fact that it was being used as a preload. So now I'm wondering...

A page whose sole use is as a preload will have no links and no content and is indistinguishable from a page that was created with that preload and then abandoned. The former we definitely don't want deleted and the later we do. Relying on someone to remember that page X is used as a preload is seems bit high risk.

a) is there any facility for finding links used by preloads/<inputbox> tags? Since the content is generated on the fly, I suspect not but I'm still hoping...

b) if not, is there/should there be a convention for marking pages that a used in this manner? Some possibilities:

  • a {{This is a sample}} template. Note: this is a problem because the template would show up on the page created by the preload as well as in the page used to generate the preload.
  • a conventional location, e.g. boilerplates used for preloads should be defined as subpages of the page that loads them.

Egfrank 04:43, 10 September 2007 (UTC)[reply]

Hi. There is a problem with $1 in the special message MediaWiki:Addedwatchtext. For all I know, it returns [[{{NAMESPACE}}:{{BASEPAGENAME}}]]. The problem is, that when the NAMESPACE is {{ns:6}} (Image) it returns the entire Image, and when that image is large, it can be very disruptive. I'll suggest that we add a collon (":") into $1 like this: [[:{{NAMESPACE}}:{{BASEPAGENAME}}]]. —Steinninn 14:07, 10 September 2007 (UTC)[reply]

Resurrecting https question

Resurrecting the question at Login and password maintenance under https?Vjg 17:58, 10 September 2007 (UTC)[reply]

Mediawiki Customers

Is there a list of current Mediawiki customers? —65.87.20.138 18:44, 10 September 2007 (UTC)[reply]

Sites using MediaWiki --Dr DBW 22:19, 10 September 2007 (UTC)[reply]

MediaWiki Wikitext MIME type

Is there such a thing as a MediaWiki's Wikitext MIME type?

Jean-Lou Dupont 19:40, 10 September 2007 (UTC)[reply]

When a raw page is requested, the returned content has the MIME type of text/x-wiki. --Nad 22:41, 10 September 2007 (UTC)[reply]
Thanks Nad. Jean-Lou Dupont 22:45, 10 September 2007 (UTC)[reply]

RSS 2.0

Have any plan to implement RSS 2.0 to "Watchlist" like contributions and recent changes? —Hsilamot 20:57, 10 September 2007 (UTC)[reply]

Still having difficulties with thumbnails

I have checked, re-checked, and triple-checked, and our Wiki does indeed have ALL of the files included with the install, including the image resize engine. Any other reason this error would show up?

Error creating thumbnail: /var/www/vhosts/shortscale.org/httpdocs/wiki/bin/ulimit.sh: line 6: /usr/bin/convert: No such file or directory

I don't know where it is getting this "/usr/bin/convert" folder from, as there is no "usr" folder in my web structure. I've also not been able to ascertain where the Wiki is getting this information from.

Here are the contents of the ulimit.sh file:

#!/bin/bash

ulimit -t $1

ulimit -v $2

shift 2

"$@"

Please, any help would be appreciated, as this is making Wiki pages very difficult to properly create and maintain. —71.80.132.242 22:38, 10 September 2007 (UTC)[reply]

By default, thumbnail generation is done with ImageMagick's "convert" utility. The path to that utility is set in the $wgImageMagickConvertCommand variable in your LocalSettings, and defaults to /usr/bin/convert. --Nad 22:47, 10 September 2007 (UTC)[reply]

---

Thank you for the fast response! So is this running under the assumption that the host has ImageMagick installed on the server? I am using a virtual private server, and I do not believe that is part of the installation.

-71.80.132.242 23:01, 10 September 2007 (UTC)[reply]

Resizing can be done with either ImageMagick or PHP's GD library, but you probably have neither installed because it should have worked otherwise. You could try setting $wgUseImageMagick to false just in case though. ImageMagick is the recommended image resizing tool as it is better quality. See Manual:Image Administration for more details. --Nad 03:01, 11 September 2007 (UTC)[reply]

--- If you are really sure that you have the convert program in the right path, comment out the following config lines:

$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

Refresh the page. The error should disappear. Remove the comments from the lines previously mentioned. You should now see the program convert work.

How do I put certain text in all of my wiki articles?

How do I put certain text in all of my wiki articles? And is there a way to then stop this text from appearing in some articles? Thanks in advance. —Zezek 06:08, 11 September 2007 (UTC)[reply]

You need to explain what you want more precisely Do you mean you want the text to actually exist in the article content itself, or just above/below the content when you view the page? and is the text static or do you need to be able to edit it from an article? --Nad 21:13, 11 September 2007 (UTC)[reply]
You could use a maybe use a template on each page in which you want to see the text - see Help:Templates Jonathan3 22:25, 13 September 2007 (UTC)[reply]

Warning: Cannot modify header information - headers already sent by.....

Hi guys! Im trying to insert a dhtml menu builder menu (javascript) into index.php. The code inserted is placed right at the very top of index.php, but Im getting errors. Should I be inserting this code into index.php or some other file in order for the dhtml menus to appear on the main page?

=========================================================== INDEX.PHP
<!-- DHTML Menu Builder Loader Code START -->
<div id="dmbri" style="position:absolute;">
<img src="dhtml_images/dmb_i.gif" name="dmbif" width="1" height="1" alt="">
<img src="dhtml_compile/dmb_m.gif" name="dmbjs" width="1" height="1" alt="">
</div>
<script language="javascript" type="text/javascript">
var rimPath=null;var rjsPath=null;var rPath2Root=null;function InitRelCode(){var iImg;var jImg;var tObj;if(!document.layers){iImg=document.images['dmbif'];jImg=document.images['dmbjs'];tObj=jImg;}else{tObj=document.layers['dmbri'];if(tObj){iImg=tObj.document.images['dmbif'];jImg=tObj.document.images['dmbjs'];}}if(!tObj){window.setTimeout("InitRelCode()",700);return false;}rimPath=_gp(iImg.src);rjsPath=_gp(jImg.src);rPath2Root=rjsPath+"../";return true;}function _purl(u){return xrep(xrep(u,"%%REP%%",rPath2Root),"\\","/");}function _fip(img){if(img.src.indexOf("%%REL%%")!=-1) img.src=rimPath+img.src.split("%%REL%%")[1];return img.src;}function _gp(p){return p.substr(0,p.lastIndexOf("/")+1);}function xrep(s,f,n){if(s) s=s.split(f).join(n);return s;}InitRelCode();
</script>
<script language="javascript" type="text/javascript">
function LoadMenus() {if(!rjsPath){window.setTimeout("LoadMenus()", 10);return false;}var navVer = navigator.appVersion;
if(navVer.substr(0,3) >= 4)
if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4)) {
document.write('<' + 'script language="javascript" type="text/javascript" src="' + rjsPath + 'nsmenu.js"><\/script\>');
} else {
document.write('<' + 'script language="javascript" type="text/javascript" src="' + rjsPath + 'iemenu.js"><\/script\>');
}return true;}LoadMenus();</script><!-- DHTML Menu Builder Loader Code END --><?php

If I take out the above code, my wiki runs fine.
============================================================ 
When I load my page:
http://localhost/mediawiki/index.php
I get the  error.

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\mediawiki\index.php:6) in C:\wamp\www\mediawiki\includes\WebResponse.php on line 10

So i looked at in C:\wamp\www\mediawiki\includes\WebResponse.php on line 10

====================================================== WEBRESPONSE.PHP

<?php
/**
 * Allow programs to request this object from WebRequest::response()
 * and handle all outputting (or lack of outputting) via it.
 */
class WebResponse {

      /** Output a HTTP header */
      function header($string, $replace=true) {
            header($string,$replace);
      }

      /** Set the browser cookie */
      function setcookie($name, $value, $expire) {
            global $wgCookiePath, $wgCookieDomain, $wgCookieSecure;
            setcookie($name,$value,$expire, $wgCookiePath, $wgCookieDomain, $wgCookieSecure);
      }
}

?>

-------------- In the above, the problem line 10 is:
            header($string,$replace);

Any help at all on how to do this would be appreciated. —203.5.155.234 06:12, 11 September 2007 (UTC)[reply]

Suspect you should be doing it via the skin files, not the main driving file for MediaWiki --Dr DBW | talk 07:15, 11 September 2007 (UTC)[reply]
Yes, you should never hack the MediaWiki code scripts and try to make changes only to LocalSettings.php if possible. For adding the tree above, you can add all the javascript to your MediaWiki:Common.js (and set $wgUseSiteJs) and to add the html, you probably need to edit the skin file in /skins/MonoBook.php so you can position it where you want it. --Nad 21:06, 11 September 2007 (UTC)[reply]
See Manual:Skins --Dr DBW | talk 04:21, 12 September 2007 (UTC)[reply]

Links to not supported protocols

I'm trying to insert a link to a teamspeak server

teamspeak://ts.mydomain.de

What shall I do?

The $wgUrlProtocols variable contains a list of the known protocols, so you can add a line to your LocalSettings.php to add your new one, eg:
$wgUrlProtocols[] = 'teamspeak://';
--Nad 21:09, 11 September 2007 (UTC)[reply]

ReInstall to Change Settings?

Question: do I need to reinstall the wiki to change the settings? I need to enable file uploading which I seemed to miss during the install process. Can someone help? - 71.165.236.27

You simply add the required settings to your LocalSettings.php file. List of options available here Manual:Configuration_settings --Dr DBW | talk 00:53, 12 September 2007 (UTC)[reply]

Different logo ($wgLogo) for each namespace, and (possibly) for each custom Category?

Hi guys! I have created a few different namespaces and different categories, and just wondered if it is possible when you go to each new namespace and or category, that you can have a different logo for it, instead of using the same logo for every namespace? Thanks guys. —58.175.32.33 03:01, 12 September 2007 (UTC)[reply]

By "going to a namespace or category" do you mean "going to any article" but setting the logo based on what categories or namespaces the article may be in? if so, you add something along these lines to your LocalSettings.php file: --Nad 09:44, 12 September 2007 (UTC)[reply]
# First, add your logo-setting function to the setup functions list
$wgExtensionFunctions[] = 'wfSetLogo';

# Define your logo-setting function
function wfSetLogo() {
	global $wgLogo,$wgTitle;

	# Test if article is in a particular namespace (eg image namespace) and set logo if so
	$ns = $wgTitle->getNamespace();
	if ($ns == NS_IMAGE) $wgLogo = "/path/to/my/image/logo.jpg";

	# Test if article is in a particular category (eg. Category:Foo) and set logo if so
	If (wfIsInCat($wgTitle,"Foo")) $wgLogo = "/path/to/my/foo-cat/logo.jpg";
	}

# This function is needed to test whether an article is in a particular category or not
function wfIsInCat($title,$cat) {
	if (!is_object($title)) $title = Title::newFromText($title));
	$id      = $title->getArticleID()
	$db      = &wfGetDB(DB_SLAVE);
	$cl      = $db->tableName('categorylinks');
	$result  = $db->query("SELECT 0 FROM $cl WHERE cl_from = $id AND cl_to = '$cat'");
	if ($result instanceof ResultWrapper) $result = $result->result;
	return is_array(mysql_fetch_row($result));
	}
...or then do it with CSS. If you would have a custom namespace numbered 100 (and its talk counterpart, namespace number 101), you could add this to your wiki's MediaWiki:Monobook.css or MediaWiki:Common.css:
body.ns-100 #p-logo a { background-image: url(/path/to/logo/image.png) !important; }
body.ns-101 #p-logo a { background-image: url(/path/to/another/logo.png) !important; }
--Sayuri 09:53, 12 September 2007 (UTC)[reply]

Edit Verification

Would there be any way to have a verification process for edits?

I have created a wiki for my high school (900 students), disabled registration, integrated it with our other account systems, and restricted edits to only local machines.

However, this is still not secure enough, in the opinion of the Superintendant, as well as his superiors.

Would there be any way to allow edits, but put them 'on hold' to be later verified and applied by an administrator?

Thanks for your time. —137.164.95.15 16:10, 12 September 2007 (UTC)[reply]

I've thought about that before but never implemented it, the way I would go about it would be to allow the edits to go through, but make articles default view stay at the older revision until authorised to move to the current state. --Nad 22:07, 12 September 2007 (UTC)[reply]
How would I go about doing that? I'm not very experienced with PHP, SQL, or WIkis, but I follow directions very well. ;) 137.164.95.15 16:04, 20 September 2007 (UTC)[reply]
You'd really need a reasonable amount of mediawiki programming experience to do it, but it's an extension which is on my todo list so I'll leave a comment here when I get round to making some progress on it. --Nad 21:01, 20 September 2007 (UTC)[reply]

I think the subject would be templates

I want to have a "default" article displayed whenever users and editors create a new page. In other words a pre-populated document with a certain format of categories and headings. How should I go about accomplishing this? —68.35.119.165 16:55, 12 September 2007 (UTC) Nate[reply]

All the text of the MediaWiki interface can be adjusted from the system-message articles which are listed in Special:Allmessages. You need to set $wgUseDatabaseMessages in your LocalSettings.php file for the edits to take effect first. The message which corresponds to the text above the edit box when creating a new page is the MediaWiki:Newarticletext article. (Note that these articles are empty unless they're changed from the default message) --Nad 22:02, 12 September 2007 (UTC)[reply]

True delete of old revisions

Hello, I would like to truly delete some revisions in order to save space in the data base. I know that the wikitext are hold on the text table. How can I truly deleted some old revisions ?

Pppswing 19:40, 12 September 2007 (UTC)[reply]

Here's some special-page extensions that may help with that: --Nad 21:56, 12 September 2007 (UTC)[reply]
Hi Nad, I tried Extension:SpecialDeleteOldRevisions but had this Warning: Cannot modify header information for my Wikimedia Version 10.0.1. However, things seem so easy with Version 10.0.0 which I had installed in both in my personal computer and in another webhost. I have been told that it is due to some blank spaces or bytecodes before the php tag in LocalSettings.php but I couldn't find any. Till date, it cannot be resolved. — PM Poon 22:56, 12 September 2007 (UTC)[reply]
Make sure there's non after the final php delimeter either --Nad 23:01, 12 September 2007 (UTC)[reply]

Main Page blank after installation

After I succesffully installed MediaWiki, the main page, "wiki/index.php?title=Main_Page" is not rendering - i.e. there is simply a white background present. LocalSettings.php is in the parent directory.

Any help would be greatly appreciated.

71.235.91.201 03:16, 13 September 2007 (UTC)[reply]

Does the empty page have any html source? also try ensuring your php is able to output errors, and if not find where it logs them to see if maybe an error's happening but not being reported to output. --Nad 04:54, 13 September 2007 (UTC)[reply]

Splash page

How can I have a splash page with a login prompt for my Wiki? —Zezek 04:36, 13 September 2007 (UTC)[reply]

You could apply a different css to the login page which removes all the wiki components and applies some bg images etc --Nad 04:56, 13 September 2007 (UTC)[reply]
did zezek mean making the initial page load with login fields? Bouncingmolar 08:09, 13 September 2007 (UTC)[reply]

Software doesn't open images with a "+" in the name

Hello, I'm an administrator of an Italian wiki (part of the Wikia project). We have a problem in opening images that have a "+" character in the name. In particular:

  1. I go on the "Not Categorized Images" page ("Immagini prive di categorie", in Italian),
  2. I click on the image named "6+1498.jpg" (in order to categorize it),
  3. The software tells me that "Un file con questo nome non esiste; caricarlo ora?" ("A file with this name doesn't exists, do you want to upload it now?") and the URL isn't
"http://nonciclopedia.wikia.com/wiki/Immagine:6+1498.jpg"
but
"http://nonciclopedia.wikia.com/wiki/Immagine:6_1498.jpg"

If I try to change manually the URL, placing a "+" where is a "_", then the software replace the "+" with the "_" and tells me the message again.

What shall I do?

PS. I use Firefox 2.0.0.6

Heavymachinegun 12:03, 13 September 2007 (UTC)[reply]

The "+" character is not allowed directly in a URL because it has special meaning (it's used as a space character, which mediawiki then changes to underscore), so you'd need to replace your plus's with "%2B"'s (percent-encoded). --Nad 20:57, 13 September 2007 (UTC)[reply]
If I replace the "+" with "%2B" in the address-bar the software replace again with "_" :-(. I have to rename these images but they are completely unreachable for displaying, deleting and renaming. Is there a workaround? --Heavymachinegun 21:59, 13 September 2007 (UTC)[reply]
I guess you should also encode the percent, then. Try the link http://nonciclopedia.wikia.com/wiki/Immagine:6%252B1498.jpg -Color probe 15:59, 14 September 2007 (UTC)[reply]
It worked! Thank you veeery much! --Heavymachinegun 18:40, 14 September 2007 (UTC)[reply]

Looking for Calendar/Holidaylist Extension for Mediawiki

Hello,

I´m looking for an extension like the holidaylist plugin for Twiki. link HolidaylistPlugin

Does Someone know, if there exist such an plugin?

Thanks for answering.

Best Regards. —204.104.55.244 12:05, 13 September 2007 (UTC)[reply]

Have a look at the calendar extensions, some of them may do what you're looking for --Nad 21:13, 13 September 2007 (UTC)[reply]

Javascript problem

I have a problem with the MediaWiki installation. I have tried everything to make the javascript work, but failed. I have set the parameter in the Localsettings.php, I have checked the configuration in different browsers (all set to allow Java(script)), I have checked if the installation of the server and network might prevent Javascript from running. CSS in common.css and Monobook.css works fine.

Does anyone have any idea what would cause it, what should I check or enable? Info: we are working with MediaWiki 1.7.1 and I intend to upgrade to 1.11, if I figure out how. We run Windows 2003. I gave it away already: I am not an IT-specialist. Londenp 12:38, 13 September 2007 (UTC)[reply]

Please define problem more clearly - what parameter did you set in LocalSettings? $wgUseSiteJs? and what javascript are you having trouble running? is it absolutely all of it that's not working such as enhanced-recentchanges, edit-toolbar-buttons etc, or just additional extension scripts? --Nad 21:03, 13 September 2007 (UTC)[reply]
These are the parameters:
## Css und JavaScript zugelassen?
$wgAllowUserCss 	= true;
$wgAllowUserJs 		= true;
$wgUseSiteJs 		= true;
$wgUseSiteCss 		= true;
enhanced-recentchanges works.
I have also tried Extraeditbuttons, moveEditsection, InsertButtonsToToolBar, Main Page tabber (from wikiality.com). Tooltips only without any other javascript works though. On the Dutch Wikibooks I have editted several times the Common.js and Monobook.js files and that worked well. I don't rule out programming mistakes, but copy/paste is not that difficult. Maybe you can suggest a simple code to test if the javascript for MediaWiki:Monobook.js works or not? Londenp 07:32, 14 September 2007 (UTC)[reply]

Format Standardization of Pages throughout Wiki

I'm in a corporate environment and using MediaWiki for supplementing our documentation needs. What is the best way to standardize the pages so they are consistent across pages/users. I have tried using full page templates but the Table of Contents don't render them properly. What is the best way to enforce a standard look and feel throughout the wiki? I am looking for a way to have two different documented projects by two different people have the same Wiki formatting. —65.124.141.254 17:05, 13 September 2007 (UTC)[reply]

If the content is just straight forward headings, bullet/number lists etc then everything should already be consistent, so is the problem with more advanced content such as tables and images? templates are probably the solution (and probably a "best practices" page to specify some documentation conventions), but I'd need to know what exactly the nature of the inconsistency is. --Nad 21:09, 13 September 2007 (UTC)[reply]

I created a template that has standard headings like say heading1, heading2.. Then under each heading I have a variable container to put the next for each project. The issue that I am having is I also want to have a Table of Contents but I have tried adding a tags to the template with no luck. The TOC doesn't render. Below is an example of my template. When I use my template I only get =heading= and not an actual rendered page. What do I need to do to have a full page template that also support a TOC?
__TOC__
=heading1=
{{{var1}}}
=heading2=
{{{var2}}}
65.124.141.254 22:46, 13 September 2007 (UTC)[reply]

There must be a problem somewhere with your install or with the template syntax as the toc should render fine. Are all braces closed? --Nad 04:30, 14 September 2007 (UTC)[reply]

How to remove %28 %29 etc escape chars from URL?

Although in the status bar the page name appears normal e.g. .co.uk/A_(B) once you click on it it appears in the browser URL bar as .co.uk/A_%28B%29

Is there any way to change this to make it prettier? (presumably some server setting). Thanks in advance. —Jonathan3 22:21, 13 September 2007 (UTC)[reply]

Unfortunately, I don't think that's possible. They are escape chars, after all. However, there may be some addons for addons which will tidy up the URL bar, for example Locationbar². Of course, that's specific to only those who install it, but that's the best that can be done. -Color probe 15:53, 14 September 2007 (UTC)[reply]

User Toolbar alignment issue

I've set up a new Wiki, but at some point the user toolbar (Login, my talk, preferences etc) shifted across to the left, rather than aligning to the right. I'm unsure how this has happened, and it's showing as this on multiple PC's and different (IE and Firefox) browsers.

Help?

enigmablue@gmail.com

61.29.55.106 00:49, 14 September 2007 (UTC)[reply]

Biggest Problem with MediaWiki (Only my opinion)

Hi guys

Firstly I just want to say I love MediaWiki and use it. I know there are other options available for Document Management Systems, but Im trying my hardest to implement this as viable working document management solution. The biggest problem by far Im finding is:

EASE OF UPDATING DOCUMENTS AND ADDING NEW DOCUMENTS


For mediawiki to be adopted especially by management, it has to be simpler to update documents. Currently, I see that it is not management-user friendly. They just dont have the time to click on Edit, and understand the wiki/html syntax. If only a genius out there has come up with a form based submission to editing documents, this would solve my problem. I also would find it hard to believe that no-one has contemplated this, because in my opinion, this is the number 1 reason management would not adopt it. Im not talking about TinyMCE and those other editors, but rather a form-based editing submission system. I havent explored all options yet to make it easier yet, and would love some advice here. For a savvy mediawiki user, this is not a problem. But when you want management to start using it, it is laborious for them to click on [Edit], and understand how to insert modifications with wiki and html syntax. To the point, that it becomes so time-consuming in terms of getting it done correctly for them, that they dont want to use it.
Scenario:
Management need to update a Progress Wiki Document, that has a custom tag

Management go to the wiki page and click on [Edit].
What they are confronted with is a series of lines like the following.......
<NewTaskTag>
Task = 
Time = 
Priority = 
Updated by = 
</NewTaskTag>
<NewTaskTag>
Task = 
Time = 
Priority = 
Updated by = 
</NewTaskTag>

In the above, management need documentation on how to insert data, and how to use the new tag.
What would be great:

  • Lower the learning curve for management. When they click on Edit, a form is presented to them in the following format:
----------------------Form
Task: <Task Text Box where Management simply enter the task without having to write "Task = ">
Time: <Time Text Box where Management simply enter the time without having to write 'Time = ">
etc 
etc
Submit: <A submit button which submits their changes>

Guys! If you know of any extensions or something that would throw up a form so the users have an easier way of editing pages, that would be FANTASTIC!!!!! I think at the moment this is the NUMBER 1 reason why mediawiki is second to other document management systems, but please correct me if there is already available something to this, because I love mediawiki. Thanks. —203.5.136.234 01:23, 14 September 2007 (UTC)[reply]

MediaWiki has lots of ways to do this, but no easy way to find them (not yet). Also some of them require a bit of coding. Here's a few techniques:

Over the next week, I'll be working on an article covering some of these techniques in more depth, please check Manual:Forms and the various articles it links to for periodic updates.

Note: each of these techniques require Extensions - use with care, extension status is currently self-assigned and represents only the opinion of the extension maintainer, not the MediaWiki development team. Egfrank 05:10, 14 September 2007 (UTC)[reply]

Hi Egfrank! And thank you SO MUCH for that information (champion). I followed your advice and looked at SemanticForms, which I have posted a question, that if this gets solved, then we will be REALLY HAPPY, as it will totally change the way our users use mediawiki. If your kind enough, or one of you gurus are kind enough to have a look at this post below (Article: "Creating a SemanticForm and using tags"), Id be really greatful. Thank you again. :>)

Infobox Template Questions

My questions are on the examples found here ----> http://www.vendpedia.com/infoboxhelp.gif

My questions are:

1. In "Template:Infobox Favorite", what code should I have? Just the code for the layout as shown in the first box above? Should the code from both of the exampled be inserted into this template file?

2. Does the list in box 2 example above need to be copied and pasted on each existing page I want the infobox to appear on? Is there any other way to pull this information from the template and have only what comes after the "=" signs be editable?

3. What if I down the road, I wanted the "color =" changed to "design =", would this have to be done on each page individually or can the "color =" be controlled via a template?

Thanks so much for any help and especially for your time. I have been stumped on trying to figure this out for 3 straight nights and just want to be sure I have as much control as possible over the infobox template before I move full steam ahead.

97.100.47.148 04:34, 14 September 2007 (UTC)[reply]

First of all, there's a nifty parser extension called Parserfunctions, which you could install on your wiki. The most known function is #if:, which will do an if-then-else operation on the given parameters. An operation like {{#if:{{{food|}}}|Text shown if food is declared|Text shown if food is not declared}} will conditionally show text or not, depending in the parameter "food". However, the function doesn't work great with tables. You should add Template:! to your wiki, with the only content a vertical line | . So, a piece of code could be:
{|
|-
{{#if:{{{color|}}}|
{{!}} Favorite Color: {{!}}{{!}} {{{color}}}
|}}
|-
{{#if:{{{food|}}}|
{{!}} Favorite Food: {{!}}{{!}} {{{food}}}
|}}
This will do what you expect. Now, on question 1, of course you can add more lines of these if you need. You could also see what Wikipedia does with infoboxes. And yes, you can add a description/example/whatever of the template between <noinclude> tags.
On number 3, there is a way around for that. In the above snippet, you would change it into
{|
|-
{{#if:{{{design|{{{color|}}}}}}|
{{!}} Favorite Design: {{!}}{{!}} {{{design|{{{color}}}}}}
|}}
|-
{{#if:{{{food|}}}|
{{!}} Favorite Food: {{!}}{{!}} {{{food}}}
|}}
That way, it will try both parameters, and thus it wouldn't break on all pages. Hope this helps! Color probe 15:46, 14 September 2007 (UTC)[reply]

Color probe,

Thanks so much for the informative answer and the advice you provided. The only thing I'm still unsure of is what my options are for calling the vertical parameter list that appears on each page where the infobox is placed? I am going to be using the infobox with all parameters listed, in some cases their value will be N/A, but they will each have a row in the infobox table. (this will minimize confusion due to what the infobox will be used for). Is my best bet to call the vertical parameter list from a template between "includeonly" tags? Are there any other options? I am assuming it would take something complex to keep the parameter names uneditable while allowing their values to be edited. Any suggestions would be greatly appreciated and I thank you again for your very helpful answer. I previously did not understand how rows could be left out entirely when the parameter was not defined and that is something I will need to know on other infoboxes I plan to use. Thanks again!

KP

more HTML tags

See Help talk:Formatting#some, but not all HTML tags. —Eek 05:29, 14 September 2007 (UTC)[reply]

OK, maybe no one wants to visit the page and read it so here it is: I want to enable tags like <abbr>, <acronym>, and <fieldset> HTML tags but not all HTML tags. How can I do this? —Eek 05:10, 15 September 2007 (UTC)[reply]

Creating a SemanticForm and using tags

Hi guys hope you can help. If I can get this working, this will be a MAJOR thing for us :>)

Example:

Lets say I have an extension called NewTaskTag, which lets you insert a <NewTaskTag> 
into a wiki page, then you manually insert parameters as follows..

<NewTaskTag>
Task = This task completed at..
Time = 6pm
Priority = Severe
Updated by = 
</NewTaskTag>
<NewTaskTag>
Task = 
Time = 
Priority = 
Updated by = 
</NewTaskTag>

The extension then renders the html into a table like format.

Because this is a manual job, I wanted to make it easier to do this.

So, Ive installed Semantic Mediawiki along with SemanticForms.

These are great, but I wanted to know if you could use a form to do the above 
instead of using the normal edit option with Mediawiki.

The problem I see is how will the form know how to interpret and pass the entered bits/eg. 
the fields to the extension, and how would you say, in a form, place a filed to say to use <NewTaskTag>?

To further clarify what Im trying to say is the following.

If I want to use the <NewTaskTag> in a wiki page, I just go to a new page, click on Edit, and enter the following:

<NewTaskTag>
Task = 
Time = 
Priority = 
Updated by = 
</NewTaskTag>
<NewTaskTag>
Task = 
Time = 
Priority = 
Updated by = 
</NewTaskTag>

I then complete each line, eg.Task = This new task, Time = 6pm, etc etc.

What Id like to do is the following:

Create a new form that has this format:

Task: [___ Text Box for Task entry___]
Time: [___ Text Box for Time entry___]
Priority: [___ Text Box for Priority entry___]
Updated By: [___ Text Box for Updated By entry___]

All the user would have to do is then input in the text boxes the required data, 
then the <NewTaskTag> would do the rest.

The questions I have though are:

1)How would the form know that each text box is actually in the format:
Task = <data from text box for Task>
Time = <data from text box for Time>
etc
etc

And that all these text boxes are enclosed in the <NewTaskTag> tag?

2) How could you create a form that automatically enters a <NewTaskTag> tag, 
then the required text boxes, with each one corresponding to a parameter required for 
the newtasktag, then a closing </NewTaskTag>?

If I can get this working by you wonderful gurus, this would totally change for the better the way we use Mediawiki!

Thanks guys in advance. —203.5.136.234 06:11, 14 September 2007 (UTC)[reply]

I'm not sure exactly what you're meaning, is the problem with the semantic forms way that after you fill in the form it takes you to an edit form rather than just updating the article directly? OrganicDesign:Updating template articles with an Ajax form is a basic example of using Extension:Simple Forms to populate templates in articles using Ajax forms. --Nad 09:05, 14 September 2007 (UTC)[reply]

Hi Nad. Thank you for your reply. Im just about to post a new question called "Calling an extension from a wiki form eg.SemanticForm" Thank you for your reply :>)

Adding a "+" tab or "Click here to post new comment/question"

Hi Guys hope you can help.

On the mediawiki page "Project:Support desk".
The tabs at the top say:
project page    discussion    edit   +   history
Click here to post a new question.
Now when you click on "Click here to post a new question, you post it, and it displays it in a new section.
Id like to know how to add this facility to our site, whereby on a page, you either or both have:
1) A "+" tab wher the project page, discussion, edit tabs are, so that when you click on the "+" tab, it allows you to create a new section in the page
2) A link on a page, such as "Click here to post a new question", so that when you click on it, it does the same as a "+" tab.
Any help greatly appreciated.

203.5.136.234 06:26, 14 September 2007 (UTC)[reply]

  1. The [+]-Tab is there on all talk pages automatically. Not sure how it gets added to this here page though. Perhaps some JavaScript hack.
  2. You can use external link syntax for that: [http://www.mediawiki.org/w/index.php?title=Project:Support_desk&action=edit&section=new new section] gives you new section
The tab gets added by a magic word called __NEWSECTIONLINK__ which adds the link to non-talk pages. Color probe 15:23, 14 September 2007 (UTC)[reply]

Thanks Color probe...Champion. Exactly what i was after. Thanks mate!!!

Adding a "Back to Top" link on every page.

Hi guys hope you can help.

Im using mediawiki and (it doesnt matter if youre not familiar with it, but 
would be nice if you were :>)), and what Id like to be able to do is the following on 
every page of my wiki. Because my pages are really long, id like to be able to add a 
[Top] link next to each [Edit] link for each section. 

Example:

Currently:

----------------------------------------------------------------- Wiki Page

Section                                                              [Edit]

Section                                                              [Edit]

Section                                                              [Edit]

Section                                                              [Edit]

etc etc

-----------------------------
So basically, every wiki page has sections, and next to each section, on the right, 
there is an [Edit] button that when you click on, you can edit just that section.

What Id like to be able to do is the following:

----------------------------------------------------------------- Wiki Page

Section                                                              [Edit] [Top]

Section                                                              [Edit] [Top]

Section                                                              [Edit] [Top]

Section                                                              [Edit] [Top]

etc etc

------------------------------------- 
So, basically in the above,
To add a [Top] link next to each [Edit] link, which takes you to the top of the 
page you are currently on.
Id like this functionality for every page of the wiki.
The thing is, is that the new [Top] link has to be generated/created upon the creation of a 
New Section, just like the [Edit] link is for that new section.

Any help greatly appreciated. —58.175.32.115 07:49, 14 September 2007 (UTC)[reply]

WE had that once, it got removed as useless clutter. There's a magic key called "home" on your keyboard.... -- Duesentrieb 08:41, 14 September 2007 (UTC)[reply]

Hi Duesentrieb... I know theres a home on my keyboard. I dont think its useless clutter, especially if your page is especially long, you have your hand on your mouse, and theres a handy top link close by. There was obviously a good reason to add this functionality in the first place. Just because it got removed by people who thought it was "useless clutter" doesnt mean that those that like it think the same :>)

Whether or not it's useful, it does raise a slightly interesting question of how exactly would one go about changing those links purely from LocalSettings or CSS? --Nad 09:07, 14 September 2007 (UTC)[reply]
According to the MW1.11 release notes, there are now two new hooks for manipulating section edit links, EditSectionLink and EditSectionLinkForOther

Calling an extension from a wiki form eg.SemanticForm

Hi everyone!
What Im trying to do, but dont know how or if its possible, is to call an extension from a form eg.Semantic form, so that for example, lets say you created an extension called Roadmap, that allowed you to insert a tag in a wiki page, called <Roadmap>, with parameters,wondering if there was any way to build a form, where each field you created was a parameter of the <Roadmap> tag. This way, users wouldnt have to "guess" so to speak with what options were available, and it would eliminate the need to write up doco on how to use the extension, as the fields would be right there in the users' face.

So basically, instead of doing the conventional thing as follows......

<Roadmap>
*Item1 = sjdlfjsd
*Item2 = sjdlkfjsjfl
etc etc
</Roadmap>

You could call the Roadmap extension (somehow) from a form, that has the following structure:

RoadMap form......................

Item1:   <_______user inserts data for Item1 here___>
Item2:   <_______user inserts data for Item2 here___>
etc etc

In the above form, the labels Item1: and Item2: etc, are on the form itself, so the user doesnt have to type in Item1=, Item2= etc. All they have to do is enter what data they want in the text box next to that Item label. By doing this, they dont have to remember how the structure of the extension tag is constructed or what options to use. It is right there. Somehow the Item labels would have to map to each extension's parameter/option. When the user clicks on save or submit, the extension is called, and translates each field or maps each field entered on the form to the appropriate extension parameter. If you could do this, it would save a lot of time :>)

Thank you. —58.175.32.115 09:27, 14 September 2007 (UTC)[reply]

problem with loging in as sysop

I want to login as sysop to alter the sidebar for example. But the top-right login-opportunity doesn't work. Where do I login as sysop? Or how can I create a new sysop account?

213.39.220.112 18:53, 14 September 2007 (UTC)[reply]

copy a page failed

I am new to mediawiki 1.10.1 that is installed with php-5.2.4 and MySQL 4.1.20. I got the wiki up and running successfully. However, I need to copy (not able to link) a page from another site within my company that my site can not reach because of the firewall configuration. The site admin told me simply just copied the page over. But the tables and forms in the page are all converted to paragraphs when I copied the page.

I looked through all help information. It seems that mediawiki provides page move, merge, rename, and wikitext copy features but not tables and user inputboxes and submit buttons.

Can someone confirm my doubts or explain to me how to duplicate a page? Thank you.

Nelson —20.4.11.44 21:06, 14 September 2007 (UTC)[reply]

As long as the page you're wanting to copy doesn't depend on any other templates etc you should be able to copy the wikitext from one wiki to another (you did copy the wikitext and not the rendered content?) --Nad 22:31, 14 September 2007 (UTC)[reply]

Error Creating Thumbnails

I have been running a single Mediawiki site with no problems but recently created a commons so I could share images between projects. The images from commons load on the language projects but the problem is those images can not be resized. If you try this error message comes up: "Error creating thumbnail: Unable to create destination directory".

They run on different MySQL databases. Here is a bit from the localsettings.php of commons:

$wgEnableUploads       = true;
$wgUseImageResize      = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

Also the project is hosted at bluehost.com and they have Imagemagick installed, a support article from bluehost.com

Also, image thumbnails work fine in the commons project

Any help would be greatly appreciated. David —60.52.107.235 02:52, 15 September 2007 (UTC)[reply]

The thumbnails for shared images I think are created in sub-directories of that same location (defined in $wgSharedUploadDirectory) same scheme as with local thumbnails. So you need to have create-directory privilege for that shared location. If you can't set that permission for that location, then you can set $wgHashedSharedUploadDirectory to false so extra sub-directories need not be created there for new thumbnails. --Nad 03:34, 15 September 2007 (UTC)[reply]
Hi Nad, and thank you for the reply. Here is what is in the localsettings of my language projects:
$wgUseSharedUploads = true;
$wgSharedUploadPath = 'http://commons.mysite.org/images';
$wgHashedSharedUploadDirectory = true;
$wgSharedUploadDirectory = '/(LOCALPATH)/commons/images/';
I have tried everything, all the folders are read/write/execute but still it does not work. And setting wgHashed... to false fails to load the images in the language wiki, it just links to them. Do you have any more thoughts? Thanks again David 60.52.107.235 04:14, 15 September 2007 (UTC)[reply]
Try running a test line in you localsettings which writes a file to the shared upload location as follows:
file_put_contents("$wgSharedUploadDirectory/test.txt","test file");

If that also gives an error, then either the path is not correct, or it is outside where php is allowed to access in which case you need to adjust your php.ini to allow access, move the shared location, or create a symlink to it in an accessible location such as "$IP/wiki/shared-images". --Nad 04:30, 15 September 2007 (UTC)[reply]

Thank you, the solution was in changing localsettings to this: $wgSharedUploadDirectory = "$IP/commons/images 60.52.107.235 04:59, 15 September 2007 (UTC)[reply]

Using extension tags in templates

Hi guys! Just wanted to know if you can use an extension as a template?

What im trying to do is the following....

We have an extension that we can use as follows:

<Issue>

  • Number:
  • Accountable:
  • Impact:

</Issue>

So an example in a wiki page is:

<Issue>

  • Number:1
  • Accountable:Simon
  • Impact:HIGH

</Issue>

The reason I want to place the extension stuff in a Template is to try and use a form (SemanticForm) where the parameters of the extension are on the form itself, and the user simply has to enter values for each one, instead of typing "*Number:1" for example. Instead, a field on the form would be called "Number" with a textbox where they would type the number in. I cant for the life of me get this to work.

Any help greatly appreciated.

58.175.32.115 03:37, 15 September 2007 (UTC)[reply]

This is the same question you asked above - Semantic forms already maps the form input values to the parameters in the template syntax (except that you're using tag syntax instead of template syntax, but your template can generate tags if you really need to use tags). Is the problem here that it takes you to the preloaded edit form rather than also submitting the changes? --Nad 04:18, 15 September 2007 (UTC)[reply]

Nad Im sorry for asking again. I just cant get my head around this. I dont know how to get the variables in the template that are between the extension tags expanded out.

So for example, in my template page:

--------------------------- Template:Issues
<Issue>
*Number:{{{Number}}}
*Accountable:{{{Accountable}}}
*Impact:{{{Impact}}}
</Issue>

When I save this template, the extension is rendered on the page like the following....

A table which the extension builds.....Column 1 comes straight from the extension code.

Column 1           Column 2
Issue Number       {{{Number}}}
Accountable        {{{Accountable}}}
Impact             {{{Impact}}}

Now, if I go to a page and insert the template as below:

{{Issues|
|Number=1
|Accountable=Simon
|Impact=High
}}

When I view this page, I get:

Column 1           Column 2
Issue Number       {{{Number}}}
Accountable        {{{Accountable}}}
Impact             {{{Impact}}}

Instead of what i want which is:

Column 1           Column 2
Issue Number       1
Accountable        Simon
Impact             An image for High (from the extension)

Im not getting the variables expanded out that are enclosed in 
the extension tags in the template.

Im so sorry for asking again. I really really want to get this working 
though. Ive spent so long on this and wont give up.

Is this because the extension is escaped or something, and is called as is 
without the variables in the extension tags, in the template being expanded 
out before the extension is rendered? Is there any way around this eg.a parser thing etc?
There doesn't seem to be any use in using both tag and template syntax, why not just use templates and forget the tags? --Nad 05:48, 15 September 2007 (UTC)[reply]

Nad, are you saying to forget using the extension? I would gladly forget the tag if I could call the extension from a template. The reason is because if I want to use a SemanticForm from my understandg, I have to use a template, and thus, have to somehow put the extension in a template, and expand its variables once the user submits in the form.

What is "the extension"? is it a third-party extension which you just have to accept uses tags, or is it a part of what you're working on. If the tag extension is your own code, then it would seem from your usage examples above that it would be more useful writing it as a parser-function rather than a tag-hook. --Nad 07:30, 15 September 2007 (UTC)[reply]

Hi Nad, it is our own code.

In that case you might want to think carefully about whether its the template phase or the tag/link phase of parsing that's most suited to your application. The first phase of parsing expands the braces syntax (parser-functions, variables and templates) and that content can be thought of as more content oriented, the final result of this phase is still raw wiki-text, but with all the braces syntax processed. The second phase is the conversion of tag and link syntax such as categorisation links and semantic annotations. The second phase is design and presentation oriented.
Either kind of hook (parser-function or tag) are very similar to implement, they both just build and return an output string based on the parameters and text content passed in. The only difference between them is that the parser-function returns wikitext --Nad 10:16, 15 September 2007 (UTC)[reply]
If your extension requires its output to be html and you don't want the wiki-parser's second phase to mess it up, then you can set the noparse option and return it along with the output text. I've included a small snippet here showing the steps involved in setting up a parser function and how to return the result as html. --Nad 10:16, 15 September 2007 (UTC)[reply]
# Reserve a magic word called "foo"
$wgHooks['LanguageGetMagic'][] = 'wfFooMagic';
function wfFooMagic(&$magicWords,$langCode = 0) {
        $magicWords['foo'] = array(0,'foo');
        return true;
        }

# Use the "foo" magic word as a parser-function and assign the "wfFooPF" function to it
$wgExtensionFunctions[] = 'wfFooSetup';
function wfFooSetup() {
        global $wgParser;
        $wgParser->setFunctionHook('foo','wfFooPF');
        }

# Define a function to expand {{#foo: param1 | param2... }} to some html
function wfFooPF(&$parser) {

        # Construct the html that your parser-function will expand out to
        $html = "put your html output in here";

        # instead of returning only the html text, we return it in an array along with the 'noparse' option
        return array($html, 'noparse' => true);
        }

Nad you have been so helpful. I really do appreciate it. Here is the extension.

<?php
//
// An extension displaying Issues in a html table.
//
// <Issue>
// </Issue>
//    require_once("extensions/Issue.php");
//
if (!defined('MEDIAWIKI')) {
   die( 'This file is a MediaWiki extension, it is not a valid entry point.');
}

$wgExtensionFunctions[] = "wfIssueExtension";
 
function wfIssueExtension() {
   global $wgParser;
   //
   //
   $wgParser->setFunctionHook("Issue","renderIssue");  
}

function EncodeTitle($title) {
   return str_replace(array("<",">","\\","/","\"",","," ","'"),array(".3C",".3E",".5C",".2F",".22",".2C","_",".27"),$title);
}
 
function renderIssue(&$parser) {
 
   # Read passed arguments into $argv array and non-named parameter into $input to match how it was as a tag hook
   $argv = array();
   foreach (func_get_args() as $arg) if (!is_object($arg))
      preg_match('/^(.+?)\\s*=\\s*(.+)$/',$arg,$match) ? $argv[$match[1]] = $match[2] : $input = $arg;

   global $wgScriptPath;

   $parser->disableCache(); 

   $columncolor1 = "#FFF1A9";
   $columncolor2 = "#FFFFCC";
 
   $output = "";

   if ($argv["type"] == "Summary") {

      $HeadingStyle = "border: solid 1px black; background-color: #CCCCCC; padding-left: 5px; padding-right: 5px;"; 
      $TextStyle    = "border: solid 1px black; padding-left: 5px; padding-right: 5px;";

      $output .= "<table border=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; margin-right: 20px; page-break-after: always;\">";
      $output .= "<tr>";
      $output .= "<th style=\"$HeadingStyle\">Issue</th>";
      $output .= "<th style=\"$HeadingStyle\">Impact</th>";
      $output .= "<th style=\"$HeadingStyle\">Title</th>";
      $output .= "<th style=\"$HeadingStyle\">Accountable</th>";
      $output .= "<th style=\"$HeadingStyle\">Raised</th>";
      $output .= "<th style=\"$HeadingStyle\">Last Update</th>";
      $output .= "</tr>";
      
      global $wgTitle;
      $myArticle = new Article($wgTitle);
      $content = $myArticle->getContent();
      $Title = "";
      $PRETagActive = 0;
      foreach (explode("\n",$content) as $line) {

         if (strlen($line) < 1) { continue; }

         if (preg_match("/^<pre>/i",$line)) {
            $PRETagActive = 1;
            continue;
         }
         elseif (preg_match("/^<\/pre>/i",$line)) {
            $PRETagActive = 0;
            continue;
         }
         if ($PRETagActive) { continue; }

         if (preg_match("/^==/",$line)) {  // Find the sections that hold our issues. Any lines that start with a ==

            if (preg_match("/^== Summary/",$line)) { continue; } 

            if ($Title != "") {        
               $output .= "<tr>";
               $output .= "<td style=\"$TextStyle text-align: right; background-color: $columncolor2;\">$Number</td>";
               $output .= "<td style=\"$TextStyle; color: $ImpactColor; background-color: $ImpactBackgroundColor; font-weight: bold;\">$Impact</td>";
               $output .= "<td style=\"$TextStyle background-color: $columncolor2;\"><a href=\"#".EncodeTitle($Title)."\">$Title</a></td>";
               $output .= "<td style=\"$TextStyle background-color: $columncolor1;\">$Accountable</td>";
               $output .= "<td style=\"$TextStyle background-color: $columncolor2;\">$Raised</td>";
               $output .= "<td style=\"$TextStyle background-color: $columncolor1;\">$Update</td>";
               $output .= "</tr>";
            }
................. keeps building the table here...
         $output .= "</tr>";
      }

      $output .= "</table>";
      $output .= "<br>";

   }
 
   return array($output,'noparse'=>true);

}
?>

62.13.172.78 11:58, 15 September 2007 (UTC)[reply]

I've adjusted the above code to work as a parser function instead of a tag hook, which means it's easy to compose the content from other templates etc. So now the old and new syntax look like this:
<Issue type="foo">
*Number:{{{Number}}}
*Accountable:{{{Accountable}}}
*Impact:{{{Impact}}}
</Issue>

{{#Issue:type=foo|
*Number:{{{Number}}}
*Accountable:{{{Accountable}}}
*Impact:{{{Impact}}}
}}

Hi! I would so much be grateful to see how you adjusted this code. :>)

I edited the changes into the code shown above, see the diff of my edit. --Nad 22:38, 15 September 2007 (UTC)[reply]

Thanks Nad!...Youre the best!!!!

Admin panel

Excuse me, I have installed a new wiki but I don't find my admin panel. Thanks for help

Actually, there is no admin panel. To change settings, go to LocalSettings.php and edit the code. The only advantage of administraters as far as I see is that they are able to lock and delete pages, ban users and a few other tasks. --NorthStar
There are many special-pages which are sysop-only, and also the articles in the MediaWiki namespace such as JS and CSS articles and the user-interface messages are sysop-only. --Nad 22:41, 15 September 2007 (UTC)[reply]

Uploaded images won't show up

I've uploaded a few images and all looks well. It has been uploaded to the site, I ftped in and checked, they are there. When they goto display, initially it shows as a missing X graphic then dispappears and won't show at all. Here is an example: http://filessite.com/Image:SSS-0802.jpg#file Anyone have any ideas what I am doing wrong?

Thanks! Eroc —72.148.19.16 16:49, 15 September 2007 (UTC)[reply]

You are mapping the wiki pages into your domain's document root. How do you expect the server to load actual files, then? See, it's trying to load http://filessite.com/Images/thumb/4/4b/SSS-0802.jpg/725px-SSS-0802.jpg - which should be a file, but you are rewriting it to be a wiki page. YOu probably already have exceptions from your rewrite rule in place for the skin files - you need the same for uploaded files. And possibly for the extension dir. And all those exceptions mean you can't have wiki pages with those names. So basically: DONT DO THAT! Read Manual:Short URLs, including all the fat warning boxes about not putting stuff into the root dir. -- Duesentrieb 22:12, 15 September 2007 (UTC)[reply]
If you keep all the wiki's additional files such as skin, extensions, math, images etc in their default locations which is in the wiki's main directory containing index.php and LocalSettings.php then you can have a single rewrite rule such as the following which maps any requests outside /wiki/.... to index.php:
RewriteCond %{REQUEST_URI} !^/wiki/
RewriteRule ^/(.*) /wiki/index.php/$1 [L]
--Nad 22:48, 15 September 2007 (UTC)[reply]
I guess I don't quite understand, I'm not that familiar with the rewrite rules, I copied what I could from the examples page and tried to make modifications. Are you saying I cannot use my root directory such as http://filessite.com that I have to put mediawiki in a sub directory for it to work? From what the examples were saying was I can do it, but I'm new at this... this is what I have in my .htaccess file:
RewriteRule ^index\.php5$ index.php5 [L,QSA]
 
#added this line to make the site look right (otherwise it was Times New Roman and no style...)
RewriteRule ^skins/(.*)$ skins/$1 [L]
#can't remember if this line is needed but it can't do any harm...
RewriteRule ^extensions/(.*)$ extensions/$1 [L]
 
#This works perfectly... except for when there's an ampersand & in the article title
RewriteRule ^index.php5/?(.*)$ /index.php5?title=$1 [L,QSA]
 
#Adding this to get rid of the "index.php/" as well, which looks much nicer
#Not replacing the line above as I want the links Google has (index.php5/...) still to work.
RewriteRule ^/?(.*)$ /index.php5?title=$1 [L,QSA]

DirectoryIndex index.php5 index.php index.html index.htm

Should I just drop what Nad said to instead of what I have?

Thanks, Eric -70.158.65.34 16:27, 17 September 2007 (UTC)[reply]

Also, when I try to use what Nad suggested I am getting an error 400, I tried modifying it to allow for the php5, which I'm not sure why I have to use that either. -Eroc 20:19, 17 September 2007 (UTC)[reply]

Bots?

I was wondering how you can create a bot. I've searched through the site and can't find the instructions. Please either link that page for me or just tell me how to do it here please --NorthStar

Bots are not part of MediaWiki. They are just programs that know how to edit on a MediaWiki. The most popular one seems to be PyWikiBot, see meta:Using_the_python_wikipediabot -- Duesentrieb 22:14, 15 September 2007 (UTC)[reply]
Another good one is libwww-mediawiki-client-perl --Nad 22:52, 15 September 2007 (UTC)[reply]

Edit the "edit comments"

Is there any way to edit my "edit comments" shown in the history of the articles?

Sorry if this is the wrong place! —151.63.88.17 18:55, 15 September 2007 (UTC)[reply]

Nope, as far as I know, it is impossible unless you somehow hack the MySQL tables (not reccomended) --NorthStar
I don't think it is a bad idea to be able to edit these commets..for example, you might want to edit them because you mistyped or missed something! —151.63.88.17
Yes but one missed typed character isn't really going to matter much though.--NorthStar
Edit comments are log entries. you can't edit log entries. -- Duesentrieb 22:15, 15 September 2007 (UTC)[reply]

Protect wildcard page?

I want to protect the page: Sbi/wiki/index.php*

So it protects any page named Sbi/wiki/index.php, Sbi/wiki/index.php/sbi/wiki/sbi/wiki/index.php, Sbi/wiki/index.php/sbi/wiki/sbi/wiki/index.php/Sbi/wiki/index.php/sbi/wiki/sbi/wiki/index.php and so on. How can I do this? —Zeno McDohl 04:05, 16 September 2007 (UTC)[reply]

What do you mean by "protect"? if you just want to stop requests to any pages matching that pattern you could use apache's mod-rewrite, or add a line into LocalSettings which test $_SERVER['SCRIPT_URL']. --Nad 05:07, 16 September 2007 (UTC)[reply]
Huh? I mean Protect. As in Protect. You know the button on a wiki page that says Protect? That is what I mean. --Zeno McDohl 15:45, 16 September 2007 (UTC)[reply]
Well that's what I would have thought, except that the articles you're talking about sound like files having index.php in them etc, you can only protect existing articles. I don't know if the restrictions can be applied dynamically like that, you may have to try some of the security extensions. --Nad 22:20, 16 September 2007 (UTC)[reply]

I am really in it now...

I don't know what to do. I am User:Anonymous Dissident, but I have forgotten my password. However, my user page states that I am Anonymous Dissident on en.wikipedia, and I can vouch for this if necessary. Is there anything that can be done? --59.101.20.99 09:46, 16 September 2007 (UTC)[reply]

Put a note on your page on en.wikipedia stating that your are Anonymous Dissident on mediawiki.org. Then find someone who can directly access the database, perhaps in #wikimedia-tech on IRC.
Generally, remember to supply and confirm a valid email address for your accounts. Then you can reset your password any time. -- Duesentrieb 10:15, 16 September 2007 (UTC)[reply]
It appears that no-one is terribly interested in helping me out. That being the case, I suppose all hope is lost. --59.101.20.99 11:03, 16 September 2007 (UTC)[reply]
Only an admin can help you with this problem --Nad 11:38, 16 September 2007 (UTC)[reply]
That is ok. The problem has been kindly fixed. --AnonDiss 12:22, 16 September 2007 (UTC)[reply]

How do I make specific pages in the wiki read-only?

62.13.172.78 11:05, 16 September 2007 (UTC)[reply]

Click on the "protect" tab. --Nad 11:39, 16 September 2007 (UTC)[reply]

Changing Main Page title

Can anyone tell me how to change main page and home page title? Thanks —62.13.172.78 11:40, 16 September 2007 (UTC)[reply]

You can just move "Main Page" to another title --Nad 22:23, 16 September 2007 (UTC)[reply]
You can specify which page is used as the "home" page by editing MediaWiki:mainpage (on your wiki, of course). -- Duesentrieb 23:51, 16 September 2007 (UTC)[reply]

Error enabling Tex

Hullo,

i want to set up a litle wiki for myself, but i just cant get tex support working, and i need math formulars in my page.

I followd the installation dokumentation and the wiki seems to work fine, i installted texlive, this works too, i converted some local tex files to pdf, installted ghostscript, and all of this utilities seem to work.

When i add an math tag in an article, i get the standart error message "Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): /vec{a}"

Following the m:Troubleshooting math errors guide, i enabled debuing, but in the debug file i only get messages ending "Request ended normall" I even get tex files in ./images/tmp/

and converted them by hand into an png image. Everyting works fine.

I have no idea why i still get this error message, any clu?

62.178.169.122 12:52, 16 September 2007 (UTC)[reply]

You conversion-by-hand may not be the same command that math/render.ml is using, it uses dvipng or convert, if you can't get those working, then you could adjust render.ml to use the successfull by-hand command you used and then run make again. --Nad 22:42, 16 September 2007 (UTC)[reply]

Hell yea, found it. sending output from render.ml dvips and latex command to a logfile i got the error message "kpathsea: Running mktexfmt latex.fmt fmtutil: format directory `/root/.texlive2007/texmf-var/web2c' does not exist."

but after installing the missing format files using, "fmtutil-sys --missing"it worked.

Strange thing that simply doing fmtutil --missing, which installes the format files for the aktiv user (which was root, cause it claim that these were missing) it still could not find them. And by the way, why does the script even tries to acces files in the root homedir?

database error - how to see the query?

I migrated some mediawiki installations to another server. If there wants to use the upload-function this mysql-error appears: „1062: Duplicate entry '0' for key 1 (localhost)“

  1. Is there any tool to rebuild the database?
  2. Or if not, how can i see the sql-query, which made this error?

Thanks a lot.

84.158.165.89 12:59, 16 September 2007 (UTC)[reply]

Try running the maintenance/rebuildall.php script from the command line. Also update AdminSettings.php first. --Nad 22:44, 16 September 2007 (UTC)[reply]
To see the actual query, set $wgShowSQLErrors = true; in your LocalSettings.php
Note that this makes things a bit easier for potential attackers, so turn if off after you are done. -- Duesentrieb 10:20, 17 September 2007 (UTC)[reply]

Adding Login Form to Main Page

I want to add a login form on my main page is this possible if so how?

62.56.69.156 22:26, 16 September 2007 (UTC)[reply]

You can do that with SimpleForms, see Extension:Simple Forms#A user login form --Nad 22:46, 16 September 2007 (UTC)[reply]

Floating tables

Arghh, trying to work this out. What we have is two tables, one is on the right side of the window which is of set width. Then on the left there is another table, which contains text and it's maximum width is set by that text length. Both of them should appear at the same height. If you reduce the width of the browser window, I would like it to have the table on the left butt up against the one in the right, reduce it's width as the browser window gets smaller, and break the text onto new lines as required. Below is the code I have so far. What I do get though, is that the table on the right drops under the one on the left. And when the left one hits the edge of the browser window, it then breaks the text down to the next line as required. Any suggestions on how to get it to do what I want it to? --Dr DBW | talk 04:02, 17 September 2007 (UTC)[reply]

<div style="float: left">
{| style="background-color: #C6DEFF;"
|-
|See [[{{TALKPAGENAME}}]] for individual experiences with this species, ''[[{{PAGENAME}}]]''.  Feel free to [{{fullurl:{{TALKPAGENAME}}|action=edit&section=new&preload=Template:Personal_Experience}} add your own personal experiences].
|}
</div>

<div style="float: right">
{| style="border:2px solid black; background-color:#6688aa;" width="210" cellpadding="5"
|-
|colspan="2" style="border:1px solid black; text-align:left;"|<span style="font-size:larger">'''Common Name'''</span>
|-
|colspan="2" style="border:1px solid black; text-align:center; background-color:#C6DEFF;"|<span style="font-size:larger">Elegance Coral</span>
|-
|colspan="2" style="border:1px solid black; text-align:left;"|<span style="font-size:larger">'''Binomial Name'''</span>
|-
|colspan="2" style="border:1px solid black; text-align:center; background-color:#C6DEFF;"|<span style="font-size:larger">Catalaphyllia jardinei</span>
|-
|colspan="2" style="border:1px solid black; background-color:#FFFFFF; text-align:center;"|[[Image:Catalaphyllia jardinei.jpg|250px]]
|-
|colspan="2" style="border:1px solid black; text-align:center;"|<span style="font-size:larger">'''Scientific Classification'''</span>
|-
|style="border:1px solid black;"|'''Kingdom:'''||style="border:1px solid black; background-color:#C6DEFF;"|Animalia
|-
|style="border:1px solid black;"|'''Phylum''':||style="border:1px solid black; background-color:#C6DEFF;"|Cnidaria
|-
|style="border:1px solid black;"|'''Class''':||style="border:1px solid black; background-color:#C6DEFF;"|Anthozoa
|-
|style="border:1px solid black;"|'''Order''':||style="border:1px solid black; background-color:#C6DEFF;"|Scleractinia
|-
|style="border:1px solid black;"|'''Family''':||style="border:1px solid black; background-color:#C6DEFF;"|Euphyllidae
|-
|style="border:1px solid black;"|'''Genus''':||style="border:1px solid black; background-color:#C6DEFF;"|Catalaphyllia
|-
|style="border:1px solid black;"|'''Species''':||style="border:1px solid black; background-color:#C6DEFF;"|jardinei
|}
</div>

And this then looks like this, so you can try it out yourself.

See Project talk:Support desk/Archive 11 for individual experiences with this species, Support desk/Archive 11. Feel free to add your own personal experiences.
Common Name
Elegance Coral
Binomial Name
Catalaphyllia jardinei
File:Catalaphyllia jardinei.jpg
Scientific Classification
Kingdom: Animalia
Phylum: Cnidaria
Class: Anthozoa
Order: Scleractinia
Family: Euphyllidae
Genus: Catalaphyllia
Species: jardinei

I think this is actually an issue with the way tables are handled with MW, been trying out various combinations and variations, but just can't seem to get it to do what I am looking for. --Dr DBW | talk 02:27, 18 September 2007 (UTC)[reply]

&lt ; &gt ; insertion by the wiki with certain templates rather than < >

I've been trying to use the navbox and infobox templates on my own local copy of the wiki but they dont draw right... its all garbled and I see "<th> <td> text </td> ..." etc.

When I view the source code I see that for some reason the table portion like this &lt ;table&gt ;

Any help understanding why this is the case would be appreciated. —Nick 04:34, 17 September 2007 (UTC)[reply]

What do you mean by the navbox and infobox templates? Are you using an extension? I don't believe there are any such templates built into plain vanilla MediaWiki. Egfrank 06:35, 17 September 2007 (UTC)[reply]
You mean the Wikipedia:Template:Navbox? it relies on many other templates, do you have all of those and their dependencies copied across to your wiki? You can see a list of what templates are used in a page when you edit or view source --Nad 08:23, 17 September 2007 (UTC)[reply]
I used the api to download the navbox template along with all the templates those rely upon, as well as the templates those rely on... etc. This is what it looks like on my wiki (v1.10)
<table class="navbox collapsible uncollapsed nowraplinks" style="margin:auto; background:white;background:white;"><tr><th colspan="2" style="text-align:center;width:100%;border-style:inset; border-width:2px;">
<div style="float:left; width:6em; text-align:left;">
<div class="noprint plainlinksneverexpand" style="background-color:transparent; padding:0; font-weight:normal; font-size:xx-small; color: #000; white-space:nowrap;"></div>
<a href/index.php?title=Template:Navbox/doc" title="Template:Navbox/doc"><span title="View this template">v</span></a>&nbsp;
<span style="font-size:80%;">•</span>&nbsp;<a href="/spontaniobeta/index.php?title=Template_talk:Navbox/doc" class="new" title="Template talk:Navbox/doc">
<span style="color: #002bb8;" title="Discussion about this template">d</span></a>&nbsp;
<span style="font-size:80%;">•</span>&nbsp;<a href="/index.php?title=Template:Navbox/doc&amp;action=edit" class="external text" title="index.php?title=Template:Navbox/doc&amp;action=edit" rel="nofollow">
<span style="color: #002bb8;" title="You can edit this template. Please use the preview button before saving.">e</span>
</a>&lt;/div&gt;&lt;/span&gt;</div><span style="font-size:110%;">{{{title}}}</span>
</th></tr>&lt;tr&gt;&lt;th style="white-space:nowrap;background:#ddddff;text-align:right;border-style:inset; border-width:2px;"&gt;
{{{group1}}}&lt;/th&gt;&lt;td colspan="1" style="text-align:left;width:100%;font-size:95%;border-style:inset; border-width:2px;"&gt;
{{{list1}}}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th style="white-space:nowrap;background:#ddddff;text-align:right;border-style:inset; border-width:2px;"&gt;
{{{group2}}}&lt;/th&gt;&lt;td colspan="1" style="text-align:left;width:100%;font-size:95%;background:#f7f7f7;border-style:inset; border-width:2px;"&gt;
{{{list2}}}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="text-align:center;width:100%;font-size:95%;border-style:inset; border-width:2px;"&gt;
{{{list3}}} <i>without {{{group3}}}</i>&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th style="white-space:nowrap;background:#ddddff;text-align:right;border-style:inset; border-width:2px;"&gt;
{{{group4}}}&lt;/th&gt;&lt;td colspan="1" style="text-align:left;width:100%;font-size:95%;background:#f7f7f7;border-style:inset; border-width:2px;"&gt;
{{{list4}}}&lt;/td&gt;&lt;/tr&gt;</table>

Nick 16:20, 17 September 2007 (UTC)[reply]

You might try looking for an unmatched <nowiki> or <pre> tag somewhere above where you have included the template. Egfrank 16:24, 17 September 2007 (UTC)[reply]
The above output was copied from Template:Navbox itself. Several other "box" style templates also show the same behavior. Nick 16:33, 17 September 2007 (UTC)[reply]
Assuming you've verified that this happens on a blank page with nothing above the template, I'd look for a template that is not resolving properly, perhaps because of missing parameters?. The HTML you've cut and pasted isn't well formed: note the first <a> tag: it reads href/index.php..." when clearly it should read href=".../index.php...". Egfrank 18:35, 17 September 2007 (UTC)[reply]
It is stock output to the browser that was copied and pasted (URL as noticed by frank above was edited prior to posting; dont get hung up on that please). I am guessing that there is some low level wikipedia template not resolving, perhaps within a subst. When I go to edit Navbox, or Navbox/core, for examples all the template links are blue... and I click on each one and they are all blue links. Ive been trying to find a comprehensive list of wikipedia templates to no avail. Nick 20:34, 17 September 2007 (UTC)[reply]
Well, you might have a hint from the content of what is missing. For example, in the syntax error noted above the initial quote and path to the wiki is missing so whatever is missing is some template (or variable) that resolves to server name. What happens when you simply create a page with {{SCRIPTPATH}}? Do you get the right script path? If not, you might want check out the value of $wgScriptPath.
If that doesn't solve the problem, you might want to look for differences in the parser functions installed /variables defined in your installation and Wikipedia (compare Special:Version for each). If you are using different versions or have different wiki markup extensions defined, that might explain why you downloaded all the templates but still have a different result. Egfrank 21:27, 17 September 2007 (UTC)[reply]

Im using the latest ParserFunctions with 1.10.1 Mediawiki installed. I tried teasing apart the different components of Navbox. It seems to be related to the starting and ending /div or /span that defines the whole box. What controls that? Tnavbar which is invoked within Infobox / Navbox works, but there seems to be something wrong with other dependencies?--Nick 23:25, 17 September 2007 (UTC)[reply]

Perhaps the most simple example of what I see is by using Ambox. For example:

Sigh. No Ambox loaded on this wiki...

Instead of a pretty box it comes out like this:

<td class="ambox-image"> </td>  {{{text}}}  

The raw html shows as:

<table style="" class="metadata plainlinks ambox ambox-notice">
<tr>
&lt;td class="ambox-image"&gt; 
<a href="/spontaniobeta/index.php?title=Image:Info_non-talk.png" class="image" title=""><img alt="" longdesc="/spontaniobeta/index.php?title=Image:Info_non-talk.png" src="/spontaniobeta/images/thumb/2/25/Info_non-talk.png/40px-Info_non-talk.png" width="40" height="40" />
</a>&lt;/td&gt;
<td> {{{text}}} </td>
</tr>
</table>

--Nick 23:41, 17 September 2007 (UTC)[reply]

In situations like this the text displayed in the rendered wiki page is generally more informative than the underlying HTML. What you see on the wiki is the best clue of how the wiki parser is seeing things. A lot of information gets lost when things are converted to HTML. Based on what you've shown above, the table is preceded by something that is telling MediaWiki not to render the HTML. Which brings us back to unmatched <pre> and <nowiki> tags and/or a {{#msgnw:...}} somewhere in the template.
The other cause is a syntax error in some parser function. But if that were the case you'd also be seeing a funny {{#if: or other wierd characters in addition to the HTML. All the same, I'd still make sure you support all the Tag extensions, Variables, and Parser functions used by the template. Checking the version number of the mediaWiki core is not really enough. You really do need to go through Special:Version line by line and compare the list of installed extensions.
Another possibility you might want to check is the HTML your site is permitting. I believe that the vanilla mediawiki allows <td> tags etc, but maybe your installation is configured differently.

You might also try taking the template apart and building it back up again until you find the problem. A good extension to install for this is: Extension:ExpandTemplates.

I wish I had a simpler answer for you, but unfortunately I don't. In general, templates are very dependent on their environment and do not transfer easily from wiki to wiki. Look on the bright side: when you are done you will really know the template syntax and its quirks inside and out. :-/ Egfrank 00:15, 18 September 2007 (UTC)[reply]

Different Versions of Pages for users and anonymus

Is it possible to have different versions of pages for logged in users and anonymus ones, either by porptions of a page or two entirely different pages one for each.

The context is that I want some content on the main page only avaliable to anonymus users, some for only logged in users and some for both.

129.12.38.148 08:59, 17 September 2007 (UTC)[reply]

Not normally, no. There may be extensions that try to do this, but MediaWIki is not design to support it, so such solutions tend to be messy. Most of all, this conflicts with the way page content is cached. -- Duesentrieb 09:27, 17 September 2007 (UTC)[reply]
Have a look at Extension:PublicCat, we use this to use a private wiki to manage the content on a public site which doesn't require login but can only see articles in the "Public" category. If this is not quite what you want, try Extension:Simple Security which gives you an #ifgroup parser-function allowing you to generate content based on whether or not the current user is a member of a particular group. --Nad 09:31, 17 September 2007 (UTC)[reply]

I think Extension:ConditionalTemplate, is the another option. Will experiment as to which is best.

I Can't Get Extension:ConditionalTemplate or Extension:Simple Security to work in the context (this could be because I'm doing some thing wrong). I have now found Extension:Runphp page which I hope to write my own if will need to have a look for some sort of logged in flag.
The "flag" you want is $wgUser->isAnon() or $wgUser->isLoggedIn(). The easiest way to make those accessible from wikitext would be to make the flag into a variable, see Extension:Variables for an example of making new variables. --Nad 11:22, 17 September 2007 (UTC)[reply]
I've found an extension to do this for me Extension:UserRightsMagic.

Accidentally delete root user

Hi, I accidentally deleted my only bureaucrat status and now I cannot access some features. How do I create another bureaucrat? PM Poon 11:23, 17 September 2007 (UTC)[reply]

  • Easy ;-)

Just register this one new, remember the ID it get's and insert into the group-table the ID + the groupname you want to have it in (sysop/bureaucrat) --84.58.224.126 14:49, 17 September 2007 (UTC)[reply]

Editing problem after upgrading to 1.11.0

Hi all, after upgrading my wiki to version 1.11.0 I'm not able to login anymore, when I push the login button the wiki answers in this way: Wiki does not recognize the action specified by the URL.

And what's worse is that if I try to edit a page, the wiki always "redirects" me /index.php. For example, I want to edit page "Links", the "edit" link points correctly to:

http://domain.org/wiki/index.php?title=Links&action=edit

But after clicking on it, the wiki open for editing the page: /Wiki/index.php. Everything works fine if I downgrade to 1.10.2.

Could you please tell me what's happening? The upgrade script didn't tell me anything and I even tried to disable all the extensions (and the rewrite engine)... It really seems an issue with the new code .

Thanx a lot in advance!!! —81.208.83.224 12:01, 17 September 2007 (UTC)[reply]

If condition html entities

I'm trying to get a login dialog on my main page which only displays when a user isn't logged in. These bits both work fine indepedantly.

The if condition is triggered when a user isnt logged in. And the login form is produceds when called.

However once I place the login form into the if condition it treats it as wikitext and converts the hmtl tags to entities. ie <form></form> is in the html source as &lt;form&gt;&lt;/form&gt; when i need it to remain as html tags as it does when outside the if condition.

{{#if: {{#userlogged:}}
| [[a]]
|<form method="post" action="/index.php" id="sf-46ee854da6d95">{{#input:type=hidden|name=title|value=Special:Userlogin}}
{{#input:type=hidden|name=action|value=submitlogin}}
{{#input:type=hidden|name=type|value=login}}
{{#input:type=hidden|name=returnto|value={{FULLPAGENAMEE}}}}
{{#input:type=hidden|name=wpLoginattempt|value=Log in}}
{{#input:type=text|name=wpName}}
{{#input:type=password|name=wpPassword}}
{{#input:type=submit|value=Login}}</form>
}}
That's a bug in SimpleForms stopping the form form being incorporated inside another parser-function. I'll try and fix it soon because we're having the same problem trying to put it inside an #ifgroup function. --Nad 21:23, 17 September 2007 (UTC)[reply]

129.12.38.148 12:55, 17 September 2007 (UTC)[reply]

Why does class="prettytable" in my wiki not work ?

As I wrote... prettytable class won't work for me.

84.58.224.126 14:33, 17 September 2007 (UTC)[reply]

Where does the "prettytable" class come from I don't see it in the standard install or the wikipedia css's? --Nad 21:26, 17 September 2007 (UTC)[reply]
Found this while looking for something else Help_talk:Table#Styles_.3Bwikitable.2C_prettytable.2C_infobox_and_other --Dr DBW | talk 03:09, 20 September 2007 (UTC)[reply]

Internal Error with File Upload

Please Help.

Getting the following MediaWiki error after attempting to upload any type of file:

Internal Error

Could not find file "C:\WINDOWS\Temp\php1018.tmp".

The filename changes everytime, php1001.tmp, php[xxxx].tmp as if it's some sort of session variable.

I've enabled file uploading in both the PHP.INI file and the localsettings.php files. Sessions are also enabled in the PHP.INI file.

Write priveleges have been enabled in the /server/images directory

PHP.INI
file_uploads = On


LocalSettings.php
$wgEnableUploads = true;
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ppt', 'pdf', 'doc', 'psd', 'mp3','xls', 'zip','swf');

Using mediawiki-1.11.0 on a windows server 2003 with PHP Ver 5.2.4 Win 32 and the following extensions enabled:

eaccelerator
php_gd2.dll
php_mysql.dll

Thanks, Darsh —66.68.67.196 16:24, 17 September 2007 (UTC)[reply]

It's the normal process for an uploaded file to be given a unique temporary name in the system's temporary folder, but why it's unable to store it there and doesn't raise a "can't write to windows/temp" is strange. Try ensuring that $wgTmpDirectory is set to your images/tmp and that it's writable? --Nad 21:32, 17 September 2007 (UTC)[reply]

I tried specifying the directories to see if it would fix the problem, no luck:

$wgUploadDirectory = "C:\DocmosWiki\images";
$wgTmpDirectory = "C:\DocmosWiki\images\temp";

I re-checked the permissions, IUSR has read and write priveleges for the server/images & server/images/temp directories. Any other ideas on what might be causing the problem?

Thanks again,
Darsh

Figured out what the problem was. The PHP.ini file needed a value specified for the upload_tmp_dir variable.

upload_tmp_dir = "C:\PHP\temp"

and then I made sure that IUSR had read/write permissions for that directory.

PHP was using the system default directory for file uploads, which was c:\windows\tmp for which IUSR did not have read/write priveleges.

Problem with uploads and special characters like Ä or ü

Hi, I have a Problem with the upload function and hope someone could help me please.
When i upload a File with a special character in the Name, the file will be renamed automatically and you will not get access to it.
For example: I have a file which name is aäoü.txt and Wiki makes Aäoü.txt with it and in the Browser he tries to open a file called A%C3%A4o%C3%BC.txt.
Is there a possibility to upload also files with this special characters? I have many files and don'T want to rename them all...
In the Uploadlist is the correct name listed... Aäoü.txt‎ (Dateigröße: 12 B, MIME-Typ: text/plain)

Even though the URL has been changed to a percent-encoded version, it should still be accessible by the original name including the special-characters. --Nad 21:36, 17 September 2007 (UTC)[reply]
Hi Nad, thanks for your answer but the Problem is not solved. I have uploaded a file called aäoü.txt and i can see it in the list of uploaded files with this name but when i try to click on the link of the file, it gives me the
url = http://127.0.0.1/mediawiki-1.11.0/mediawiki-1.11.0/images/5/54/A%C3%A4o%C3%BC.txt
when i try to make http://127.0.0.1/mediawiki-1.11.0/mediawiki-1.11.0/images/5/54/aäoü.txt to it it gives me the same error called object not found. I don't know if it is a database Problem or a PHP Problem. I hope someone can help me....
Does the uploading work with files that do not have special characters? it looks from those file paths like you've set up the $wgUploadDirectory incorrectly because the mediawiki-1.11.0/mediawiki-1.11.0 is probably incorrect, can you access the file if you remove one of the mediawiki-1.11.0's from the path? --Nad 21:14, 18 September 2007 (UTC)[reply]
Hi Nad, Yes the upload with Special Characters works correct.
For example http://127.0.0.1/mediawiki-1.11.0/mediawiki-1.11.0/images/5/54/test.txt is available. WHen i take a look in the Database in the table page there is a Pagetitle called Aäoü.txt.

Fix corrupted MySQL db

Hi all, I want to fix a corrupted wikimedia mysql database, but I haven't any idea how. Wikimedia error is below:

"MediaWikiBagOStuff::_doinsert". MySQL error: "1062: Duplicate entry 'wikiname:messageslock' for key 1 (localhost)"

I found this error after a power lost. —89.149.217.46 18:15, 17 September 2007 (UTC)[reply]

Pfff! It's a InnoDB tables curruption issue. I fix this only with backup.

-89.149.217.46 20:50, 17 September 2007 (UTC)[reply]

What a shame, given that if this was your only error, you could probably have fixed it quite trivially by truncating the objectcache table. In this particular case. 62.31.160.143 01:03, 19 September 2007 (UTC)[reply]

Database error

I originally posted this on mw-users.com, but nobody answered the question.


My wiki has been up for a few months now, and it worked fine. Now it suddenly has this error:

MediaWiki internal error. Original exception: exception 'DBQueryError' with message 'A database error has   occurred Query: SELECT value,exptime FROM `mw_objectcache` WHERE keyname='zendurl_zendurl0zwiki-mw_:messages-hash'  Function: MediaWikiBagOStuff::_doquery Error: 1017 Can't find file: 'mw_objectcache' (errno: 2) (localhost) ' in  /home/zendurl/public_html/z/zwiki/w/includes/Database.php:806 Stack trace: #0  /home/zendurl/public_html/z/zwiki/w/includes/Database.php(761): Database->reportQueryError('Can't find file...', 1017, 'SELECT value,ex...', 'MediaWikiBagOSt...', false) #1 /home/zendurl/public_html/z/zwiki/w/includes/BagOStuff.php(393): Database->query('SELECT value,ex...', 'MediaWikiBagOSt...') #2 /home/zendurl/public_html/z/zwiki/w/includes/BagOStuff.php(294): MediaWikiBagOStuff->_doquery('SELECT value,ex...') #3 /home/zendurl/public_html/z/zwiki/w/includes/BagOStuff.php(234): SqlBagOStuff->_query('SELECT value,ex...', 'zendurl_zendurl...') #4 /home/zendurl/public_html/z/zwiki/w/includes/MessageCache.php(204): SqlBagOStuff->get('zendurl_zendurl...') #5 /home/zendurl/public_html/z/zwiki/w/includes/MessageCache.php(440): MessageCache->load() #6 /home/zendurl/public_html/z/zwiki/w/includes/GlobalFunctions.php(463): MessageCache->get('mainpage', true, true) #7 /home/zendurl/public_html/z/zwiki/w/includes/GlobalFunctions.php(421): wfMsgGetKey('mainpage', true, true, true) #8 /home/zendurl/public_html/z/zwiki/w/includes/GlobalFunctions.php(368): wfMsgReal('mainpage', Array, true, true) #9 /home/zendurl/public_html/z/zwiki/w/includes/Title.php(267): wfMsgForContent('mainpage') #10 /home/zendurl/public_html/z/zwiki/w/includes/Wiki.php(88): Title::newMainPage() #11 /home/zendurl/public_html/z/zwiki/w/index.php(58): MediaWiki->checkInitialQueries(NULL, 'view', Object(StubObject), Object(WebRequest), Object(StubContLang)) #12 {main} Exception caught inside exception handler: exception 'DBUnexpectedError' with message 'Error in fetchObject(): Can't find file: 'mw_page' (errno: 2) (localhost)' in /home/zendurl/public_html/z/zwiki/w/includes/Database.php:929 Stack trace: #0 /home/zendurl/public_html/z/zwiki/w/includes/MessageCache.php(313): Database->fetchObject(false) #1 /home/zendurl/public_html/z/zwiki/w/includes/MessageCache.php(250): MessageCache->loadFromDB() #2 /home/zendurl/public_html/z/zwiki/w/includes/MessageCache.php(440): MessageCache->load() #3 /home/zendurl/public_html/z/zwiki/w/includes/GlobalFunctions.php(463): MessageCache->get('databaseerror', true, false) #4 /home/zendurl/public_html/z/zwiki/w/includes/GlobalFunctions.php(421): wfMsgGetKey('databaseerror',  true, false, true) #5 /home/zendurl/public_html/z/zwiki/w/includes/Exception.php(23): wfMsgReal('databaseerror', Array) #6 /home/zendurl/public_html/z/zwiki/w/includes/Database.php(276): MWException->msg('databaseerror',  'Database error') #7 /home/zendurl/public_html/z/zwiki/w/includes/Exception.php(125): DBQueryError->getPageTitle()  #8 /home/zendurl/public_html/z/zwiki/w/includes/Exception.php(88): MWException->htmlHeader() #9  /home/zendurl/public_html/z/zwiki/w/includes/Exception.php(111): MWException->reportHTML() #10  /home/zendurl/public_html/z/zwiki/w/includes/Exception.php(191): MWException->report() #11  /home/zendurl/public_html/z/zwiki/w/includes/Exception.php(225): wfReportException(Object(DBQueryError)) #12  [internal function]: wfExceptionHandler(Object(DBQueryError)) #13 {main}

Version: 1.10.0
Database: MySQL 4.1.22
PHP: 5.2.3
Server: Apache 1.3.37
Software: Linux

Thanks for any help! --74.232.62.79 20:11, 17 September 2007 (UTC)[reply]

I've driven myself crazy from time to time looking for missing files only to find out it was an obscure permissions problem. Things to check:

  • is the file there?
  • if so, are the permissions right? i.e. can the user apache is running as read the file? can the user your DB is running as read the file? Do they need execute permission/write permission and do they have it? Did someone change the security configuration recently? Did you upgrade OS's recently? Both of these can cause subtle changes in the system's environment. Egfrank 07:52, 18 September 2007 (UTC)[reply]
Thanks for the reply. I am using a free webhost (I'm a mod there, it's the official support wiki) so I will contact the administrator about this, with your reply. --74.232.62.201 23:04, 18 September 2007 (UTC)[reply]

Seeking definition of "Project" and docs therof

Projects abound, but I don't really understand what a project is, how it's created, where it's stored, etc.

Despite my many attempts I have not located any Project documentation per se, save for:

 w:en:Wikipedia:WikiProject_Council/Guide 

Are there more docs that someone can point me to ... and if you have time tell me more about the [alt-shift-a] 'cause I'm not getting it...

Humbly seeking enlightenment, —TheMightyHercules 00:48, 18 September 2007 (UTC)[reply]

Are you referring to the namespace of this article? that's namespace number 4 (i.e. {{ns:4}}) which is set to whatever the site is about, in this case the MediaWiki "project". If you check the value of ns4 on your own wiki it'll be the same as your $wgSitename value. Or are you referring to wikipedia-projects, as in Wikipedia:WikiProject? --Nad 01:02, 18 September 2007 (UTC)[reply]

I am speaking about the concept of Projects, what they are and the purpose(s) for which they are intended. I'm confused as to how and when to use Projects on my own MediaWiki.--TheMightyHercules 16:20, 18 September 2007 (UTC)[reply]

Follow the link by Nad, that explains all. --Dr DBW | talk 22:10, 18 September 2007 (UTC)[reply]

The answer is really quite simple - a project is whatever you want it to be. Wikipedia, for example, often operates little mini-projects such as spelling fixups, or groups of editors who specifically collaborate on articles relating to a particular subject, e.g. music, or exotic food groups.

Stop for a moment, and consider - MediaWiki gives you a very blank canvas upon which to work. It provides the scope to divide content up into logical major segments ("real content"/articles, "meta" content about the site, e.g. style guides, policies, discussions, software support, user profiles, etc.) but really what actually goes on in any of that space is yours to decide.

A wiki is just a website anyone can edit. Due to the nature of wikis, communities of like-minded people will spring up to support those sites - they have to, otherwise the site will usually have no contributors, and will die fairly quickly. Individual sites - Wikipedia, Wikia, WardsWiki, MeatballWiki, etc. all developed different infrastructures for organising and facilitating effective discussion and collaboration between those users, and you get to do the same for your site. robchurch | talk 02:11, 24 September 2007 (UTC)[reply]

Dynamic image resizing via URL

Does anyone know how the wikimedia URL-based image resizing is done, I'd like to implement this feature on our wiki. The following URL is an example, you can change the number of pixels to anything and it will return the image at that size. --Nad 07:52, 18 September 2007 (UTC)[reply]

http://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/FIRE_01.JPG/700px-FIRE_01.JPG
Don't worry, figured it out thanks - it uses the /wiki/thumb.php script which accepts two query-string parameters, f for the name of the image and w for the width of the resized image to be returned. Apche's mod-rewrite can then be used to map requests to resized thumbnails to the script, eg:
RewriteCond %{REQUEST_URI} ^/files/thumb/./../.+?([0-9]+)px-(.+)$
RewriteRule ([0-9]+)px-(.+)$ /wiki/thumb.php?w=$1&f=$2 [L]

How do I enable sub-pages in all namespaces?

Is there an easy way to do this?
Is there a reason I should not do this?

TheMightyHercules 16:22, 18 September 2007 (UTC)[reply]

The following code snippet will do it, assuming you don't have an absurd number of custom namespaces:

for( $i = 0; $i < 200; $i++ ) {
    $wgNamespacesWithSubpages[$i] = true;
}

Place this in LocalSettings.php. robchurch | talk 23:34, 18 September 2007 (UTC)[reply]

Thank-you very much for your speedy solution...but this prompts the following question:
Is this meant to be run once and these deleted, or should this loop become a permanent section of my LocalSettings.php file?
When will this code be executed? Indeed, when is the code contained within LocalSettings.php executed? I doesn't feel likw I am setting flags in my database, rather it feels like I am creating a loop that will iterate 200 time rather frequently when I think that just one pass through this loop should be sufficient, but then it feels like a lot of the settings in LocalSettings.php need be done just once, not continuously. Am I mistaken in thinking that most, of not all, of the settings in LocalSettings whilst needing to be executed once are being issued to what amounts a constant and continuous loop? --TheMightyHercules 06:53, 19 September 2007 (UTC)[reply]
The localsettings are executed on every page request (except if returned by memcache etc), but are an insignificant amount of processing compared to that required to generate and return the page itself. This is an annoying inefficiency which is part of the stateless server paradigm in general. --Nad 07:31, 19 September 2007 (UTC)[reply]
The alternative way of approaching it would be for the wiki to run as a daemon which would execute its configuration on startup and then stay running persistently spawning child processes to deal with each request. This is a more efficient approach but leads to far more complexity in the software design (since it is effectively taking over the job of the web-server). --Nad 07:37, 19 September 2007 (UTC)[reply]

Viewers

Hi! We'd like to upload various file formats to our wiki. One of these is Microsoft Project. Not person who uses the wiki has MS Project, but we need to be able to allow users to view these files, preferably through the wiki. Im wondering if there are any extensions that would allow the opening of MS Project files through the wiki, and open it up in a MS Project Viewer application? Thankyou. —58.175.32.115 16:57, 18 September 2007 (UTC)[reply]

You'd have to see if MS or anyone else have made the ability to view MS-Project files within a browser in general, not specifically as part of mediawiki. If that has been done then it should be reasonably easy to use that functionality from within the mediawiki environment. --Nad 21:18, 18 September 2007 (UTC)[reply]

I am in search of a company that I can hire to creat a wiki based website for me.

I can be reached at keir.tomasso@gmail.com or 609-841-0001 —68.45.86.223 01:10, 19 September 2007 (UTC)[reply]

About and Disclaimer Page

Hi, my About Page and Disclaimer pages went to Special:About and Special:Disclaimer (while my Privacy Policy went to Project:Privacy Disclaimer). As such, I cannot edit these two pages.

How it happened, I really do not know because my other website shows all three pages in the {{SITENAME}} namespace. How do I change all this pages into my {{SITENAME}} namespace? PM Poon 03:35, 19 September 2007 (UTC)[reply]

You may need to check your wiki's MediaWiki:Aboutpage and MediaWiki:Disclaimerpage. —color probeTalkContribs 08:02, 19 September 2007 (UTC)[reply]

Thank you, Color Probe. The information was very helpful.60.53.23.18 22:38, 19 September 2007 (UTC)[reply]

How to use a parser function to display "THIS" when a parameter value is greater than 1?

Here is an example of what I'm working with and what I'm stuck with: On my template page I have the parameter: {{{EXAMPLE|-}}}} This template is called on a page where "|EXAMPLE=4" (everything works fine up to this point) Here is where I'm stumped and it seems like it should be such an easy task. (note: I've installed the parser function files and the parser functions are working on my site as I've tested examples used in the help file.) Here is what I'm trying to do. On the bottom of the page where "EXAMPLE" is defined as "4", I want to use a parser function (if, ifeq, ifexpr, or whatever works) to display specific text when the parameter is greater than 1 (in this case it would be). In short I need a parser function that will yield:

If parameter "EXAMPLE" is a number greater than 1, SAY THIS
If parameter "EXAMPLE" is less than 1 OR blank OR any other text, SAY THAT OR NOTHING

This seems so simple but I have tried and tried and can't get anything to work. Any help, solutions or suggestions would be greatly appreciated. Thanks again!

97.100.47.148 05:27, 19 September 2007 (UTC)[reply]

{{#ifexpr:{{{EXAMPLE|0}}}>1|THIS|NOTHING}} --Nad 06:26, 19 September 2007 (UTC)[reply]

Problems after upgrading PHP from 5.1.6 to 5.2.4

Hi there,

I need some help with a curious problem after Upgrading PHP from Version 5.1.6 to 5.2.4.

Web server is

Windows Server 2003 MediWiki 1.11.0 MySQL 4.1.12

Everything worked fine with PHP 5.1.6. After Upgrading to PHP 5.2.4 the Wiki doesn't start any longer, just error page HTTP 500 appears.

Running phpinfo in same path as WikiMedia succeeded.

All other PHP web sites (incl. MySQL access) residing on this server are runnning without any problem with the new PHP version.

Has anyone any idea? Thanks for every answer!

83.136.72.5 08:17, 19 September 2007 (UTC)[reply]

Most likely this has to do with that the MediaWiki developers are still using PHP 5.1.4 on most servers, although 5.2.1 seems to work too. It might be that the exact combination of your server's versions make something not work. At any case, is the web server configured to output error logs? If so, you could check them for any relevant information. —color probeTalkContribs 18:08, 20 September 2007 (UTC)[reply]
As far as I know, most of the core developers tend to keep considerably up-to-date with PHP releases, in order to test MediaWiki for breakages on the latest release branch. robchurch | talk 02:06, 24 September 2007 (UTC)[reply]

What are the options for calling a vertical parmeter list via a template? THANKS :)

My "Template:Infobox" has a table with parameters. I want to use this infobox on every page within a category, with each of those pages containing a parameter list like the one below (not vertical here but thats how ill refer to it):

{{Infobox | Parameter1 = | Parameter2 = }}

On each page this infobox is used, I want EVERY parameter to appear in the list, regardless if it defined or not. Is there a more effective way of calling this infobox template aside from having the vertical parameter list in a template within "includeonly" tag? To add it to an existing page, is the only option to copy and paste the vertical paramter list? Is there any way to call this list with a shorter tag? Is there any way to have the parameters editable via a template, but when changed, not have the values next to them affected? Sorry for the long winded question and thanks so much for everyones time and help. —97.100.47.148 09:08, 19 September 2007 (UTC)[reply]

  • To have template parameters resort to a default value when the parameter is not supplied, use {{{param|default-value}}}
  • For adding infobox based on category, you'll need to use an extension, or add some custom localsettings code. I use Extension:WikiSkin for doing that kind of thing, but there may be others that can help with that too).
  • I'm not sure what you mean here about the noinclude-tag use or parameters-editable-via-template
--Nad 10:24, 19 September 2007 (UTC)[reply]

Question

I can use mediawiki for documenting changes in a code of the software? —85.28.2.200 12:41, 19 September 2007 (UTC)[reply]

We use our mediawiki for organising and collaborating on software, but you should probably check out some other options first such as Trac which is designed more specifically for that purpose. --Nad 22:25, 19 September 2007 (UTC)[reply]

Edit and view database of a user

How I can provide a facility to administrator to edit and view database of a member? please reply soon.

122.162.72.128 13:56, 19 September 2007 (UTC)[reply]

Users don't have databases. what are you trying to do? -- Duesentrieb 14:46, 19 September 2007 (UTC)[reply]

Fatal error: Class languageutf8:

Please include all of the lines below when reporting installation problems.

     Warning: set_time_limit(): Cannot set time limit in safe mode in /var/kunden/webs/masse/_info/install-utils.inc on line 29
   * PHP 4.3.10-22 installed
   * Warning: PHP's safe mode is active. You may have problems caused by this, particularly if using image uploads.
   * PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
   * Have XML / Latin1-UTF-8 conversion support.
   * PHP's memory_limit is 8M. If this is too low, installation may fail! Attempting to raise limit to 20M... failed.
   * Have zlib support; enabling output compression.
   * Neither Turck MMCache nor eAccelerator are installed, can't use object caching functions
   * GNU diff3 not found.
   * Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads.
   * Installation directory: /var/kunden/webs/masse/_info
   * Script URI path: /_info
   * Environment checked. You can install MediaWiki.
   * Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.
     Generating configuration file...
   * Database type: mysql
     Fatal error: Class languageutf8: Cannot inherit from undefined class language in /var/kunden/webs/masse/_info/languages/LanguageUtf8.php on line 38

so .. this is what i get :) i tryed my very first configuration of a media wiki - but i dont have that much success. and i dont find any help about this "languageutf8"

some support plz !

wiki version = 1.6.10 (because i dont have php5.0)

thanks so far masse —85.181.112.59 15:08, 19 September 2007 (UTC)[reply]

There are a number of problems there - safe mode can cause trouble, there's no "diff" and not enough memory. These are probably limitations imposed by your host. You can probably still get it to install and run, but it's not going to be easy. If you're not too tied to that particular host I'd suggest moving to one offering more resource and less restrictions. --Nad 22:31, 19 September 2007 (UTC)[reply]

MediaWiki trying to contact itself on a faulty IP.

Hi,

MediaWiki: 1.9.3
PHP  : 5.2.1
MySQL  : 5.0.38
Apache2  : 2.2.3
I have configured a MediaWiki installation for use as a knowledgebase at work. Unfortunately I had to change the IP-adress wich I used when I installed. Now MediaWiki try to connect to this IP whenever I try to navigate the site. Because of this the server is very slow. I have double/triple -checked all configuration files on the system. Also tried to upgrade MediaWiki without any luck.

Seems like the server IP is taken from the MySQL database..?

Is there any way of fixing this in an easy manner?

Best regards,
Kjell —213.50.73.14 18:08, 19 September 2007 (UTC)[reply]

MediaWiki is not itself tied to any particular domain or IP, it's all relatively addressed, so the problem could be in your Apache virtual host settings? --Nad 22:34, 19 September 2007 (UTC)[reply]


Hi again,
thanks for your respons.

I have now upgraded again, same problem. When I create a new database everything runs smooth.
It have to be some internal linking in the database, this does not happen with any other web app. running on the same apache server. Apache configurations tripple-checked, again, no errors. Any ideas how to update database to fix the problem?
Best regards,
Kjell

Thumbails not shown

Thumbails in Wiki not shown

http://www.cactus.org.mx

Debug Output ON

As you can see no Thumbails of the Images are displayed

can't find any reason


Problem Solved!
Was an error in /images permissions 
Should report this in bugzilla soon
--Hsilamot 21:48, 19 September 2007 (UTC)[reply]

Change my logo on my wiki

I am unsure of how to change my logo to this "http://img.photobucket.com/albums/v493/Nimrauko/Shrev_banner1.jpg" —74.193.188.218 20:23, 19 September 2007 (UTC)[reply]

You should read your manual, in your LocalSettings.php set $wgLogo = "/route/to/jpg.jpg";
--Hsilamot 22:03, 19 September 2007 (UTC)[reply]

rebuild thumbails

How can i rebuild all the wik's thumbails without re-uploading files?

http://www.cactus.org.mx/w/Especial:Newimages

--Hsilamot 22:02, 19 September 2007 (UTC)[reply]

The thumbnails are built on demand, so to have them rebuilt anew, simply delete everything under images/thumb --Nad 22:35, 19 September 2007 (UTC)[reply]
http://www.cactus.org.mx/w/Especial:Newimages I got that, and the only way to get the images Work is Re-Uploading them, how can i correct the error on All of them in one time?
You don't have to re-upload any images, the thumbs are automatically generated from the uploaded images, so deleting the thumbs just means they'll be rebuilt automatically when required at that size. The thumbs are only generated if the thumb image of that size does not already exist so deleting them will solve the problem (unless there's a problem with your image-resizing setup). --Nad 23:45, 19 September 2007 (UTC)[reply]
The problem is exactly that the thumbs are not being generated, i deleted the directory already and still not generating, onlye the ones i have re-uploaded, but the others still blank, check http://www.cactus.org.mx/w/Especial:Newimages and you'll see
--Hsilamot 00:26, 20 September 2007 (UTC)[reply]
Ok, I see your problem, but I don't know how to fix it. There can't be a problem with the resizing functionality since it can work properly on newly uploaded images, so there must be something different about the current images that's messing up the resizing...? --Nad 00:37, 20 September 2007 (UTC)[reply]
that's the reason i'm asking for help, this wiki has not much trouble, only are about 30, 40 images, but i have another with about 5'000 images, and i don't want to re-upload them all
The images, where shown OK, but when CPanel relased EasyApache for Apache 2.2 the images dissapeared and the errorbegan
--Hsilamot 01:51, 20 September 2007 (UTC)[reply]
Is there any way to contact the development team of mediawiki?
--Hsilamot 14:01, 20 September 2007 (UTC)[reply]

Problem with change to category links index (on upgrade to 1.11)

I posted a message elsewhere (see link). It was partly to help other people, and partly for advice on whether what I did was wise. Will it have any repercussions for the future?

Manual talk:Upgrading to 1.11#Problem with change to categorylinks index

Thanks Jonathan3 22:50, 19 September 2007 (UTC)[reply]

Adding scripts into Content Page

Hi, I would like to view my content pages in HTML so that I can add in some customized scripts, whenever necessary. How do I go about it? As it is, I cannot add in customized scripts directly to the page when I edit it. — PM Poon 22:51, 19 September 2007 (UTC)[reply]

Set $wgRawHtml to true - you should only use this setting if only trusted users can edit because it allows malicious code to be inserted into pages. If you have some specific code you'd like to add to a public site, you'd be best to create a variable or parser function for it. --Nad 23:49, 19 September 2007 (UTC)[reply]

Thank you very much, Nad. Your second option is what I am looking for. — PM Poon 00:48, 20 September 2007 (UTC)[reply]

Oophs. I thought I can add a script file just like a template on a particular page. It doesn't seem to work that way. — PM Poon 01:26, 20 September 2007 (UTC)[reply]

Let me know exactly what kind of thing you're needing to add to the page and I should be able to tell you the best approach to take --Nad 01:53, 20 September 2007 (UTC)[reply]
Thank you Nad, once again. I am trying to add the following scripts:

<script type="text/javascript" src="http://shots.snap.com/snap_shots.js?ap=1&key=94280033ff2e4cf39784bbcaaa26e071&sb=1&th=silver&cl=0&si=0&po=0&df=0&oi=0&link_icon=on&shots_trigger=both&lang=en-us&domain=e-komputer.info"></script>

from Snap Shots to my wiki at http://e-komputer.info. — PM Poon 09:28, 20 September 2007 (UTC)[reply]

That's no problem, just add the following to your localsettings --Nad 21:27, 20 September 2007 (UTC)[reply]
$wgExtensionFunctions[] = 'wfAddSnapshotsScript';
function wfAddSnapshotsScript() {
	global $wgOut;
	$wgOut->addScript('<script ...add you script here.... </script>');
	}
The "syntaxhighlight lang="php"" is not part of the code - copy the code you see in the non-edit view of the page. Also you need to add your script between the quotes containing "...add you script here..." --Nad 03:22, 21 September 2007 (UTC)[reply]

Hi Nad, I added:

<syntaxhighlight lang="php">
$wgExtensionFunctions[] = 'wfAddSnapshotsScript';
function wfAddSnapshotsScript() {
        global $wgOut;
        $wgOut->addScript('<script type="text/javascript" src="http://shots.snap.com/snap_shots.js?ap=1&key=94280033ff2e4cf39784bbcaaa26e071&sb=1&th=silver&cl=0&si=0&po=0&df=0&oi=0&link_icon=on&shots_trigger=both&lang=en-us&domain=e-komputer.info"></script>');
        }
</syntaxhighlight>

and got this error message:

Parse error: syntax error, unexpected '<' in /home/ekomrinf/public_html/ekompute/LocalSettings.php on line 83

Line 83 is <syntaxhighlight lang="php">. Seems like it can't take "<" — PM Poon 22:21, 20 September 2007 (UTC)[reply]

Like Nad said, you should remove the <syntaxhighlight lang="php"> and </syntaxhighlight> tags. —color probeTalkContribs 15:29, 21 September 2007 (UTC)[reply]

Awwww, do I look silly? — PM Poon 10:54, 22 September 2007 (UTC)[reply]

Hi, I removed the <syntaxhighlight lang="php"> and </syntaxhighlight> tags but got this error message:

Parse error: syntax error, unexpected T_STRING in /home/ekomrinf/public_html/ekompute/LocalSettings.php on line 116. Line 116 is where $wgOut-> begins. — PM Poon 11:08, 22 September 2007 (UTC)[reply]
Sorry, my mistake - change the quotes surrounding the script to single-quotes as I've done in the example code above. --Nad 11:59, 22 September 2007 (UTC)[reply]

Scalable Vector Graphics problem

Scalable Vector Graphics images are uploaded correctly but fail to display in mediawiki.

Uploaded image: http://commons.bahaikipedia.org/images/2/2c/Broom_icon.svg How it shows up: http://commons.bahaikipedia.org/Image:Broom_icon.svg

Does anyone know what this could be the result of? Project is hosted at bluehost.com 60.52.18.48 03:28, 19 September 2007 (UTC)[reply]

See m:SVG image support#Current implementation and Manual:$wgSVGConverter --Nad 06:40, 19 September 2007 (UTC)[reply]
I've installed rsvg too because it works a heck of a lot better than ImageMagick and it's the one the wikimedia projects have opted to use. It has installed with no problems and I've tested it from the shell using exactly the same command structure as that used by $wgSVGConverters and it works perfectly. But when mediawiki tries to use it to convert an svg I get the following error and I can't find any information about what the problem may be:
Error creating thumbnail: /var/www/mediawiki-1.10.0/bin/ulimit4.sh: line 1: r: command not found
and exactly the same result for mediawiki-1.11.0
Does anyone know what may be the cause of this? --Nad 00:07, 20 September 2007 (UTC)[reply]
Don't worry, it was just a dumb typo - rsvg works very well! --Nad 08:45, 21 September 2007 (UTC)[reply]

Template Parameters For An Infobox. Can you lock the parameter name and not the defined value??

Here is an example of the template call my questions are based on.

{{Infobox  
|Favorite Color = 
|Favorite Sport =
}}

Question 1: What is the most effective way to include this code on a page? Is calling a template which contains the example above encompassed in "includeonly" tags the most effective method? Are there any other options?

Question 2: Is there any simple way to implement the above example without allowing people to edit the parameter names. For example, have users not be able to delete or edit "Favorite Sport" AND at the same time ALLOW them to add/edit/delete information after the " = " sign? Is there anyway this can be done and have "Favorite Sport" editable only by a template that is applied to the page, without having it affect what comes after the " = " sign? Thanks a lot!!!

97.100.47.148 03:12, 20 September 2007 (UTC)[reply]

Question 1 The best way to add that infobox to a page is to create a template for the infobox, and then add the template. For example, let's say we create this page at Template:Favorites. Then, to add the template to a page, we add the text {{Favorites|Favorite color= insert color here|Favorite sport= insert sport here}}
Question 2 For this, you would need to use a complicated if-then-else function, which in the MediaWiki software, is called a ParserFunction. Now, the text for the infobox would be:
[...formatting for the infobox goes here...]
{{ #if: {{{Favorite Color|}}}|{{{Favorite Color}}}|}}
{{ #if: {{{Favorite Sport|}}}|{{{Favorite Sport}}}|}}
[...more formatting if necessary...]
Basically, you can decide what formatting to use for your infobox, but your variables are set up so that "Favorite Color" can be modified when "Favorite Sport" is left blank, and vice versa. This also works if both parameters are defined or if they are both blank. For more information, see ParserFunction help at the Wikimedia Meta-Wiki. Cheers, Arknascar44 03:35, 20 September 2007 (UTC)[reply]

New protocols included in LocalSettings.php does not parse wiki URL markups correctly

I've added the following into the localsettings file with a new notes:// protocol. URLs with notes:// are not parsed into hyperlinks correctly.

# Add supported protocols
$wgUrlProtocols = array(
	'http://',
	'https://',
	'notes://',
	'ftp://',
	'irc://',
	'gopher://',
	'telnet://', // Well if we're going to support the above.. -ævar
	'nntp://', // @bug 3808 RFC 1738
	'worldwind://',
	'mailto:',
	'news:'
);

However when i use the following wiki text to build the link, it does not parse correctly.

[notes://abc.abc.abc.net.com Descriptor for link]

The URL is parsed, but the brackets and Descriptor are not. Can anyone help? Are there more changes i need to make? Am using 1.10.1 version.

121.217.111.16 04:20, 20 September 2007 (UTC)[reply]

No connection to IRC channel

Hi,

I am trying to connect to the MediaWiki IRC channel, but unfortunately I got no success until know. I have no idea, what kind of problem exists!?!

Are there some special settings?

greets, demagggus —Demagggus 11:43, 20 September 2007 (UTC)[reply]

How exactly are you attempting to connect (IRC Client, Java Applet)? What happens when you try to connect? --Dr DBW | talk 03:27, 21 September 2007 (UTC)[reply]
thx for the fast response...but now it works--Demagggus 12:54, 21 September 2007 (UTC)[reply]

Logged in to read?

Is it possible for my wiki 1.6.10 to have a preference so that you must be logged in to read the articles?

As Manual:Preventing access documents (among other things you might see as useful), you have to set $wgGroupPermissions['*']['read'] = false; and then $wgWhitelistRead to an array of at least the Main page and Special:Userlogin. —color probeTalkContribs 17:39, 20 September 2007 (UTC)[reply]
This is what you'd add to your localsettings to just disable everything except login, home and css --Nad 21:16, 20 September 2007 (UTC)[reply]
$wgGroupPermissions['*']['createaccount']   = false;
$wgGroupPermissions['*']['read']            = false;
$wgGroupPermissions['*']['edit']            = false;
$wgGroupPermissions['*']['createpage']      = false;
$wgGroupPermissions['*']['createtalk']      = false;
$wgWhitelistRead = array('Special:Userlogin','Main Page','-','MediaWiki:Common.css','MediaWiki:Monobook.css');
Thanks! Everything worked! --Fringilla 10:51, 23 September 2007 (UTC)[reply]

New folders with Apache user permissions

I enabled the image upload option, and when I tried it for the first time, Media wiki created the folders called archive, temp, thumbs etc. but with the user permission set to Apache. How can I delete these folders? —78.32.49.89 21:52, 20 September 2007 (UTC)[reply]

If you're on a host where you don't have access to files created by php, then you may have to use php to change their permissions or delete them. You could try installing a php file manager like PHPFileManager or similar. --Nad 20:28, 21 September 2007 (UTC)[reply]

Upload non-image file

I put $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'zip', 'gz' ); in my DefaultSettings.php file to allow zipped files. The upload works fine. How do I link to the image in my Wiki now? Only way I can tell is to use Image:Filename.zip which is misleading considering it's not an image file.

Thanks, Eroc

Eroc 15:36, 21 September 2007 (UTC)[reply]

The link directly to the file is shown on the individual image pages or in the Special:Imagelist page. You can create links directly to those using external link syntax, for example: --Nad 20:37, 21 September 2007 (UTC)[reply]
[{{SERVER}}/images/f/f4/Doc3.gif Download Doc3]

The {{SEREVR}} will resolve to whatever domain the page was requested from which is useful if you use multiple domains, and won't break your links if you change your domain. --Nad 20:39, 21 September 2007 (UTC)[reply]