diff --git a/song.php b/song.php
index 96182eba..b92ba09c 100644
--- a/song.php
+++ b/song.php
@@ -21,18 +21,19 @@
require 'lib/init.php';
-show_header();
+show_header();
+
+$show_lyrics = Config::get('show_lyrics');
// Switch on Action
-switch ($_REQUEST['action']) {
- default:
- case 'show_song':
- $song = new Song($_REQUEST['song_id']);
- $song->format();
- $song->fill_ext_info();
- require_once Config::get('prefix') . '/templates/show_song.inc.php';
+switch ($_REQUEST['action']) {
+ default:
+ case 'show_song':
+ $song = new Song($_REQUEST['song_id']);
+ $song->format();
+ $song->fill_ext_info();
+ require_once Config::get('prefix') . '/templates/show_song.inc.php';
// does user want to display lyrics?
- $show_lyrics = Config::get('show_lyrics');
if($show_lyrics == 1) {
$lyric = new Artist();
$return = $lyric->get_song_lyrics($song->id, ucwords($song->f_artist), ucwords($song->title));
@@ -42,9 +43,26 @@ switch ($_REQUEST['action']) {
$link .= "
";
require_once Config::get('prefix') . '/templates/show_lyrics.inc.php';
}
- break;
-} // end data collection
+ break;
+ case 'show_lyrics':
+ if($show_lyrics == 1) {
+ $song = new Song($_REQUEST['song_id']);
+ $song->format();
+ $song->fill_ext_info();
+ require_once Config::get('prefix') . '/templates/show_lyrics_song.inc.php';
-show_footer();
+ // get the lyrics
+ $show_lyrics = Config::get('show_lyrics');
+ $lyric = new Artist();
+ $return = $lyric->get_song_lyrics($song->id, ucwords($song->f_artist), ucwords($song->title));
+ $link = '';
+ /* HINT: Artist, Song Title */
+ $link .= sprintf(_('%1$s - %2$s Lyrics Detail'), ucwords($song->f_artist), ucwords($song->title));
+ $link .= "
";
+ require_once Config::get('prefix') . '/templates/show_lyrics.inc.php';
+ }
+} // end data collection
+
+show_footer();
?>
diff --git a/templates/show_lyrics_song.inc.php b/templates/show_lyrics_song.inc.php
new file mode 100644
index 00000000..4a6fc52a
--- /dev/null
+++ b/templates/show_lyrics_song.inc.php
@@ -0,0 +1,65 @@
+title);
+
+/* Prepare the variables */
+$title = scrub_out(truncate_with_ellipsis($song->title));
+$album = scrub_out(truncate_with_ellipsis($song->f_album_full));
+$artist = scrub_out(truncate_with_ellipsis($song->f_artist_full));
+?>
+