User talk:RobertL

From MediaWiki.org

Jump to: navigation, search

Archives
December 2007 - March 2009

Contents

[edit] Extension:MultiBoilerplate Suggestion

Hi there. Just wanted to say great extension that I have found very useful.

I have made a slight change to my install to allow me to add instructions to the MediaWiki:Multiboilerplate page and not have it break the reading of the page for the available templates and thought you might want to add it in. It now ignores all lines not starting with an asterisk.

This is the updates code at around line 80(ish) of MultiBoilerplate.php, with the new if statement wrapped around the existing code...

			if (substr(ltrim($row), 0, 1)=="*") {
				$row = ltrim( $row, '* ' ); // Remove the asterix (and a space if found) from the start of the line.
				$row = explode( '|', $row );
				if( !isset( $row[ 1 ] ) ) return true; // Invalid syntax, abort.
				$selected = false;
				if( $wgRequest->getVal( 'boilerplate' ) == $row[ 1 ] ) $selected = true;
				$options .= Xml::option( $row[ 0 ], $row[ 1 ], $selected );
			}

Thanks again,

Toby —The preceding unsigned comment was added by Tangled Kid (talkcontribs) . Please sign your posts with ~~~~!

Thanks for the patch, I'll have a look at it and integrate it in to the extension during the summer. RobertL 18:33, 11 June 2009 (UTC)
Commited in r54057. Thanks! RobertL 23:04, 30 July 2009 (UTC)

[edit] Mibbit error

Hi Robert! On my wiki, I've installed Mibbit extension and it worked until two week ago... Now, when I try to connect me on a IRC channel, output is "Terminated"... I've not changed noone setting in LocalSetting... What's up? Thanks in advance :) !--Marco 27 16:11, 5 July 2009 (UTC)

Connecting to freenode is no longer possible using Mibbit, this is not my fault and there is nothing I can do about it. Sorry! RobertL 19:25, 5 July 2009 (UTC)
Ok, thanks! Can you suggest me any extension to connect to freenode? Thanks :) !--Marco 27 22:39, 5 July 2009 (UTC)
No, sorry. I can only suggest using a standalone web client such as CGI:IRC or freenode webchat (although I honestly cannot recommend either of these). RobertL 10:12, 6 July 2009 (UTC)
Ok, thanks! Have a nice day :) !--Marco 27 10:19, 6 July 2009 (UTC)
When I use Mibbit extension to connect to a server, extension insert automatically wiki-username in Nick field... There's a way to insert _ instead of + when there are spaces in nickname? Thanks a lot :) !--Marco 27 14:40, 6 July 2009 (UTC)
I've updated the extension so that it now does this. RobertL 14:55, 7 July 2009 (UTC)
Thanks a lot! You are very gentle! Have a nice day :) !--Marco 27 15:44, 7 July 2009 (UTC)

Robert - is there a way to add a timestamp to the mibbit chat output? -- gahoo

Not currently in the latest version of the extension, sorry. It may be possible using the original Mibbit extension, or by making minor changes to the code - but I cannot support this. RobertL 19:31, 17 November 2009 (UTC)

[edit] btestfair

Hi, Can you explain why my page was deleted? Thanks —The preceding unsigned comment was added by Btestfair (talkcontribs) . Please sign your posts with ~~~~!

This wiki is not for testing or content not specifically about or related to the MediaWiki software. Your page is about "Betfair" which certainly does not fit this criteria, and is also a test page. RobertL 13:18, 22 July 2009 (UTC)
- Thanks for the clarification —The preceding unsigned comment was added by Btestfair (talkcontribs) . Please sign your posts with ~~~~!

[edit] I'll ask it from you

What is "wiki root directory"? --62.240.86.78 22:35, 30 July 2009 (UTC)

The base of your MediaWiki installation, that is the directory that your LocalSettings.php, index.php, api.php (and more) files are in. RobertL 22:51, 30 July 2009 (UTC)
Okay. How can it be found? --62.240.86.78 22:53, 30 July 2009 (UTC)
If you installed the wiki yourself you should know where it is, it's the directory where you extracted the files to. I don't think I can help you locate it. RobertL 22:57, 30 July 2009 (UTC)
Thank you for advice. My wiki will change it's residence... --62.240.86.78 23:44, 30 July 2009 (UTC)


[edit] Extension:CategoryOnUpload Suggestion

Hi. Extension:CategoryOnUpload is great. I really like it. I made some changes, so it would fit more to my needs. You implemented the list $wgCategoryOnUploadList to override the categories from the db, but I needed to have a blacklist for categories not to show from the list of categories. I find this quite helpful, so here comes my code. Perhaps you like it and want to implement it as a new feature. You then can give an array like $wgCategoryOnUploadListNot = array( 'Images', 'Featured Images' ); to load all categories from the db, but those in the array.

Line 44:

	$wgCategoryOnUploadListNot = null;

Line 87:

	global $wgCategoryOnUploadDefault, $wgCategoryOnUploadList, $wgCategoryOnUploadListNot;

Line 89:

	if( !is_array( $wgCategoryOnUploadList ) && !is_array( $wgCategoryOnUploadListNot ) ) {

Line 130:

	} else if( is_array( $wgCategoryOnUploadListNot ) ) {

		$dbr = wfGetDB( DB_SLAVE );
		
		$res = $dbr->query( 'SELECT DISTINCT cl_to FROM ' . $wgDBprefix . 'categorylinks' );

		while( $row = $dbr->fetchObject( $res ) ) {

			$a1[] = $row->cl_to;
			/* Add categories to array a1
			 */
		} 
		
		$a2 = array_diff($a1,$wgCategoryOnUploadListNot);
			/* Build an array with differences between array a1 and the user input $wgCategoryOnUploadListNot
			 */
			 
		foreach( $a2 as $category ) {
			$text   = str_replace( '_', ' ', $category );

			$cat .= Xml::option( $text, $category, ( $text == $wgCategoryOnUploadDefault ) );
		}
		
	} else { ... your code continous

Thanks,

pythox 17:21, 7 October 2009 (UTC)