Difference between revisions of "Lyriki:Community Portal"

From Lyriki
Jump to navigation Jump to search
m
Line 36: Line 36:
  
 
and the breaks would be automatically added. Of course with this technique you couldn't add wikilinks to the middle of songs but I think the trade off is worth it compared to having to sit there and add either a space at the begining or a br tag at the end.
 
and the breaks would be automatically added. Of course with this technique you couldn't add wikilinks to the middle of songs but I think the trade off is worth it compared to having to sit there and add either a space at the begining or a br tag at the end.
 +
 +
==Thanks for the above suggestion==
 +
Just a quick thank you to whoever made that suggestion, I believe it was Bailey :)
 +
[[User:Nanenj|Nanenj]] 15:48, 22 December 2005 (PST)
  
 
==Ban User==
 
==Ban User==
 
An anonymous user with the IP Address 59.20.74.64 added some silent spam to the site. I deleted it, but have a look in the history pages and you'll see it. -268299
 
An anonymous user with the IP Address 59.20.74.64 added some silent spam to the site. I deleted it, but have a look in the history pages and you'll see it. -268299

Revision as of 16:48, 22 December 2005

This is a sugestion to the admins of this site:

I'd like to make a suggestion for a third way to enter music lyrics. You can create a simple extension to mediawiki that will handle all of the line breaks.

For example this is a sample script I wrote. If you to save it as lyrics.php under the Extensions folder


<?php
#
# lyrics extension by bailey
#
$wgExtensionFunctions[] = "lyrics";

function lyrics() {
   global $wgParser;
   $wgParser->setHook( "lyrics", "parse" );
}
 
# The callback function for converting the input text to HTML output
function parse( $input, $argv ) {
   return preg_replace("[\r\n|\n]", "<br />", $input);
}
?>

and then add the following to the end of your LocalSetting.php

include("extensions/lyrics.php");

You would then be able to type in all of your lyrics with just one tag


It's four in the morning, the end of December
I'm writing you now just to see if you're better
New York is cold, but I like where I'm living
There's music on Clinton Street all through the evening.

and the breaks would be automatically added. Of course with this technique you couldn't add wikilinks to the middle of songs but I think the trade off is worth it compared to having to sit there and add either a space at the begining or a br tag at the end.

Thanks for the above suggestion

Just a quick thank you to whoever made that suggestion, I believe it was Bailey :) Nanenj 15:48, 22 December 2005 (PST)

Ban User

An anonymous user with the IP Address 59.20.74.64 added some silent spam to the site. I deleted it, but have a look in the history pages and you'll see it. -268299