Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.220
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Trilllyrics problem
Trilllyrics problem

4 Replies / 614 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Modules

View previous topic :: View next topic


cupoftea
Reputation: 21.7 Add RepSubtract Rep
Local time: 5:10 PM
Location: Behind My Computer
belgium.gif

Spammer
Spammer

0.08 posts per day
Medals: 0

Joined: Apr 30, 2008
Last Visit: 14 Mar 2009
Posts: 113
Points: 2379 

Post Trilllyrics problem Posted: Tue Jan 20, 2009 7:00 pm

Hey guys,

It took me a while, but I've found a lyrics module (on an Italian site, couldn't understand a word of it but I have it anyway). The problem is, after the installation and activation of the module I always get an error 500 if I try to access the module

this is the module's index.php file
Code:
<?php

if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
  die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._LYRICS."";

include("header.php");
require_once("modules/$module_name/includes/functions.php");


// Grab config values.
$config = get_lyrics_config();

OpenTable();

echo "<table align='center' width='100%' border='0' cellspacing='1'>";
echo "<tr>";
echo "<td align='center' style='border=1px solid #000000; background-color:$bgcolor2;'><font class='title'><b>"._LYRICS."</b></font></td>";
echo "</tr>";
echo "</table>";

origAnchors();

echo "<table width='100%' border='0' cellspacing='2'>";
if ($sort && $sort == "num") {
   echo "<tr><td colspan='4' style='background: $bgcolor2'><font class='title'><b>#</b></font></td></tr>";
   $numsql = $db->sql_query("SELECT DISTINCT(artist) AS d_artist, img_artist, thumb_artist, id FROM ".$prefix."_lyrics WHERE left(artist, 1) < 'a' AND check_submit = 0 GROUP BY artist ORDER BY artist");
   if (!$row = $db->sql_numrows($sql)) {
      echo "<tr><td><font class='title'><b>"._NOARTISTS."</b></font></td></tr>";
   } else {
      while($row = $db->sql_fetchrow($numsql)) {
         extract($row);
         $artist = stripslashes($d_artist);
         // Only Admins can edit the artist.
         if (is_admin($admin)) {
            $se_artist = "[<a href='modules.php?name=$module_name&amp;file=artist_edit&amp;c_id=$id'>"._EDIT."</a>]";
         }
         $res = $db->sql_query("SELECT COUNT(DISTINCT(song)) AS count FROM ".$prefix."_lyrics WHERE artist = \"$artist\"");
         $rowcount = $db->sql_fetchrow($res);
         extract($rowcount);
         
         $res2 = $db->sql_query("SELECT song,viewed,id AS popid FROM ".$prefix."_lyrics WHERE artist = \"$artist\" ORDER BY viewed DESC");
         $popres = $db->sql_fetchrow($res2);
         extract($popres);
         
         // Show artist image if its turned on.
         if($config['show_artist_image'] == '1') {
            if ($thumb_artist <> "none") {
               $imgcode = "<a href='$img_artist'><img src='$thumb_artist'></a>";
            } else {
               $imgcode = "<a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\"><img src='$img_artist' border='0' align='middle'></a>";
            }
            echo "<tr><td width='25%'>$imgcode</td>";
            echo "<td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
         } else {
             echo "<tr><td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
         }
      }
   }
}

if ($sort && $sort != "num") {
   echo "<tr><td colspan='4' style='background: $bgcolor2'><font class='title'><b>".$sort."</b></font></td></tr>";
    $sql = $db->sql_query("SELECT DISTINCT(artist) as d_artist, img_artist, thumb_artist, id FROM ".$prefix."_lyrics WHERE ucase(left(artist, 1)) = '$sort' AND check_submit = 0 GROUP BY artist ORDER BY artist");
   if (!$row = $db->sql_numrows($sql)) {
      echo "<tr><td><font class='title'><b>"._NOARTISTS."</b></font></td></tr>";
   } else {
         while($row = $db->sql_fetchrow($sql)) {
            extract($row);
         $artist = stripslashes($d_artist);

             if(is_admin($admin)) {
                $se_artist = "[<a href='modules.php?name=$module_name&amp;file=artist_edit&amp;c_id=$id'>Edit</a>]";
             }
         $res = $db->sql_query("SELECT COUNT(DISTINCT(song)) AS count FROM ".$prefix."_lyrics WHERE artist = \"$artist\"");
         $rowcount = $db->sql_fetchrow($res);
         extract($rowcount);
         
         $res2 = $db->sql_query("SELECT song,viewed,id AS popid FROM ".$prefix."_lyrics WHERE artist = \"$artist\" ORDER BY viewed DESC");
         $popres = $db->sql_fetchrow($res2);
         extract($popres);
         
           if($config['show_artist_image'] == '1') {
            if ($thumb_artist <> "none") {
               $imgcode = "<a href='$img_artist'><img src='$thumb_artist'></a>";
            } else {
               $imgcode = "<a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\"><img src='$img_artist' border='0' align='middle'></a>";
            }
            echo "<tr><td width='25%'>$imgcode</td>";
            echo "<td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
           } else {
             echo "<tr><td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
           }
       }
     }
}


if(!$sort || $sort == "") {
  echo"<tr><td colspan='2' align='center'><font class='title'><b>"._SELECTLETTER."</b></font></td></tr>";
}

echo "</td></tr></table>";

CloseTable();

MainMenu();

CloseTable();

if ($act && $act == "admin_settings") {
   OpenTable();
   if (!is_admin($admin)) {
      echo "<p align='center'><font class='title'>"._ADMINONLY."</font></p>";
   } else {
      include("admin_settings.php");
   }
   CloseTable();
}

include("footer.php");

?>


You can check it out here: http://cup-of-tea.leadhoster.com/modules.php?name=Lyrics

I wanted to add the module in attachment, but I get an error page:
Quote:
Access Denied

94.110.38.163 (cust-163-38-110-94.dyn.versateladsl.be)
Forbidden Script Code Detected

For security reason, your last request has been blocked.
However, the requested action already logged for further analysis.

[ Back to Previous Page ]



Protected by Admin Secure


[edit]
Seems to work fine in another post... Odd
[/edit]

Last edited by cupoftea on Tue Jan 20, 2009 7:05 pm; edited 1 time in total
 

Grtz, CupOfTea --- My Nuke Version: 8.0 Patched 3.5 ---  
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

cupoftea
Reputation: 21.7 Add RepSubtract Rep
Local time: 5:10 PM
Location: Behind My Computer
belgium.gif

Spammer
Spammer

0.08 posts per day
Medals: 0

Joined: Apr 30, 2008
Last Visit: 14 Mar 2009
Posts: 113
Points: 2379 

Post Trilllyrics problem Posted: Tue Jan 20, 2009 7:03 pm

Module attached here...

TrillLyrics2.0.zip
 Description:
TrillLyrics - Lyrics Module

Download
 Filename:  TrillLyrics2.0.zip
 Filesize:  55.47 KB
 Downloaded:  9 Time(s)

 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

Noto
Reputation: 1072.7 Add RepSubtract Rep
votes: 13
Local time: 5:10 PM
Location: Sunny UK !
uk.gif

Site Admin
Site Admin

0.60 posts per day
Medals: 3 (View more...)
Super Dedicated User (Amount: 1)
Theme Guru
Theme Guru
Joined: May 03, 2007
Last Visit: 25 May 2012
Posts: 1118
Points: 73943 

Post Trilllyrics problem Posted: Tue Jan 20, 2009 11:57 pm

Works on Raven nuke.

HOWEVER !!!!!!
WOW OMG this Cannes the shit out of your CPU and RAM some thinks not right with the way its handling the database, on every page load of this script it batters and i mean batters your CPU.

This is probably 100% why your host don't like it. and gives u the 500.

Im not the best person to help u when it comes to databases not even going to try, Floppys your man offer him a few quid he might take a look.
 

 
View user's profileSend private messageVisit poster's website Reply with quote


cupoftea
Reputation: 21.7 Add RepSubtract Rep
Local time: 5:10 PM
Location: Behind My Computer
belgium.gif

Spammer
Spammer

0.08 posts per day
Medals: 0

Joined: Apr 30, 2008
Last Visit: 14 Mar 2009
Posts: 113
Points: 2379 

Post Trilllyrics problem Posted: Sun Jan 25, 2009 1:16 pm

I have the same problem with my mTutorials module, which worked fine last time I've installed it. (On another site, same server)
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

davidpenny
Reputation: 478 Add RepSubtract Rep
Local time: 11:10 AM


Rocket Noob
Rocket Noob

0.01 posts per day
Medals: 0

Joined: Aug 02, 2007
Last Visit: 26 Jan 2009
Posts: 24
Points: 15 

Post Re: Trilllyrics problem Posted: Sun Jan 25, 2009 6:30 pm

cupoftea wrote:
Hey guys,

It took me a while, but I've found a lyrics module (on an Italian site, couldn't understand a word of it but I have it anyway). The problem is, after the installation and activation of the module I always get an error 500 if I try to access the module

this is the module's index.php file
Code:
<?php

if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
  die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._LYRICS."";

include("header.php");
require_once("modules/$module_name/includes/functions.php");


// Grab config values.
$config = get_lyrics_config();

OpenTable();

echo "<table align='center' width='100%' border='0' cellspacing='1'>";
echo "<tr>";
echo "<td align='center' style='border=1px solid #000000; background-color:$bgcolor2;'><font class='title'><b>"._LYRICS."</b></font></td>";
echo "</tr>";
echo "</table>";

origAnchors();

echo "<table width='100%' border='0' cellspacing='2'>";
if ($sort && $sort == "num") {
   echo "<tr><td colspan='4' style='background: $bgcolor2'><font class='title'><b>#</b></font></td></tr>";
   $numsql = $db->sql_query("SELECT DISTINCT(artist) AS d_artist, img_artist, thumb_artist, id FROM ".$prefix."_lyrics WHERE left(artist, 1) < 'a' AND check_submit = 0 GROUP BY artist ORDER BY artist");
   if (!$row = $db->sql_numrows($sql)) {
      echo "<tr><td><font class='title'><b>"._NOARTISTS."</b></font></td></tr>";
   } else {
      while($row = $db->sql_fetchrow($numsql)) {
         extract($row);
         $artist = stripslashes($d_artist);
         // Only Admins can edit the artist.
         if (is_admin($admin)) {
            $se_artist = "[<a href='modules.php?name=$module_name&amp;file=artist_edit&amp;c_id=$id'>"._EDIT."</a>]";
         }
         $res = $db->sql_query("SELECT COUNT(DISTINCT(song)) AS count FROM ".$prefix."_lyrics WHERE artist = \"$artist\"");
         $rowcount = $db->sql_fetchrow($res);
         extract($rowcount);
         
         $res2 = $db->sql_query("SELECT song,viewed,id AS popid FROM ".$prefix."_lyrics WHERE artist = \"$artist\" ORDER BY viewed DESC");
         $popres = $db->sql_fetchrow($res2);
         extract($popres);
         
         // Show artist image if its turned on.
         if($config['show_artist_image'] == '1') {
            if ($thumb_artist <> "none") {
               $imgcode = "<a href='$img_artist'><img src='$thumb_artist'></a>";
            } else {
               $imgcode = "<a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\"><img src='$img_artist' border='0' align='middle'></a>";
            }
            echo "<tr><td width='25%'>$imgcode</td>";
            echo "<td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
         } else {
             echo "<tr><td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
         }
      }
   }
}

if ($sort && $sort != "num") {
   echo "<tr><td colspan='4' style='background: $bgcolor2'><font class='title'><b>".$sort."</b></font></td></tr>";
    $sql = $db->sql_query("SELECT DISTINCT(artist) as d_artist, img_artist, thumb_artist, id FROM ".$prefix."_lyrics WHERE ucase(left(artist, 1)) = '$sort' AND check_submit = 0 GROUP BY artist ORDER BY artist");
   if (!$row = $db->sql_numrows($sql)) {
      echo "<tr><td><font class='title'><b>"._NOARTISTS."</b></font></td></tr>";
   } else {
         while($row = $db->sql_fetchrow($sql)) {
            extract($row);
         $artist = stripslashes($d_artist);

             if(is_admin($admin)) {
                $se_artist = "[<a href='modules.php?name=$module_name&amp;file=artist_edit&amp;c_id=$id'>Edit</a>]";
             }
         $res = $db->sql_query("SELECT COUNT(DISTINCT(song)) AS count FROM ".$prefix."_lyrics WHERE artist = \"$artist\"");
         $rowcount = $db->sql_fetchrow($res);
         extract($rowcount);
         
         $res2 = $db->sql_query("SELECT song,viewed,id AS popid FROM ".$prefix."_lyrics WHERE artist = \"$artist\" ORDER BY viewed DESC");
         $popres = $db->sql_fetchrow($res2);
         extract($popres);
         
           if($config['show_artist_image'] == '1') {
            if ($thumb_artist <> "none") {
               $imgcode = "<a href='$img_artist'><img src='$thumb_artist'></a>";
            } else {
               $imgcode = "<a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\"><img src='$img_artist' border='0' align='middle'></a>";
            }
            echo "<tr><td width='25%'>$imgcode</td>";
            echo "<td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
           } else {
             echo "<tr><td><a href=\"modules.php?name=$module_name&amp;file=artist&amp;c_id=$id\">$artist</a><br>
            "._SONGS.": $count<br>
            "._MOSTVIEWED.": <a href='modules.php?name=$module_name&amp;file=song&amp;c_id=$popid'>$song</a> ($viewed)";
            echo "</td><td align='right'> $se_artist</td></tr>";
           }
       }
     }
}


if(!$sort || $sort == "") {
  echo"<tr><td colspan='2' align='center'><font class='title'><b>"._SELECTLETTER."</b></font></td></tr>";
}

echo "</td></tr></table>";

CloseTable();

MainMenu();

CloseTable();

if ($act && $act == "admin_settings") {
   OpenTable();
   if (!is_admin($admin)) {
      echo "<p align='center'><font class='title'>"._ADMINONLY."</font></p>";
   } else {
      include("admin_settings.php");
   }
   CloseTable();
}

include("footer.php");

?>


You can check it out here: http://cup-of-tea.leadhoster.com/modules.php?name=Lyrics

I wanted to add the module in attachment, but I get an error page:
Quote:
Access Denied

94.110.38.163 (cust-163-38-110-94.dyn.versateladsl.be)
Forbidden Script Code Detected

For security reason, your last request has been blocked.
However, the requested action already logged for further analysis.

[ Back to Previous Page ]



Protected by Admin Secure


[edit]
Seems to work fine in another post... Odd
[/edit]


Make sure the permissions are set correctly - you could use Google translate for a rough translating and touch up the errors yourself.
 

 
View user's profileSend private message Reply with quote
Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Modules


 
4 Replies / 614 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum