Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Fri Dec 02, 2005 10:50 am Reply with quote

I have Nuke 7.6 with 3.1 patches and Sentinel. Just upgraded. In process of trying to fix Gallery problems I put debug on and saw an undeclared variable message in theme.php (line 57 I think) using the Nukenews theme. This is in the themeheader function. So I've been staring at the code for a couple of hours and it's driving me nuts (well nuttier than normal).

Here's the questionable section of code with a line or two before and after for reference: (I almost typed "reverence"):
Code:


 if ($banners == 1) {
   include("banners.php");
    }
    $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = $db->sql_query("select topicid, topictext from ".$prefix."_topics order by topictext");
    while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
   $topicid = intval($topicid);
    if ($topicid==$topic) { $sel = "selected "; }
   $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
   $sel = "";
    }
    if ($username == $anonymous) {


For the life of me I can't see how this can work. For one thing I don't see where any value is ever assigned to $topic befor the comparsion "if ($topicid==$topic) ... " and if $topicid was supposed to equal $topics that would never work cause one is numeric and the other text. I also don't see how the whole $topics_list is ever output to the screen. It looks like it was intended to be a drop down box with a list of topics of in the header of all the screens in the theme. There is a similar function in the topics module which in turn takes you to the search module but I just don't see it working here.

Does anyone have any insight into this? Is this just dead code or am I just missing something? Thanks in advance.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Tue Dec 13, 2005 2:48 pm Reply with quote

Do you still need an answer on this?
 
View user's profile Send private message
fkelly
PostPosted: Tue Dec 13, 2005 3:37 pm Reply with quote

Well I can certainly see this is a burning issue. I'm just running my systems with this section of code commented out and they run fine. I don't think it has any functionality at all except using up a few extra processing cycles.

After a while I'll remove the section entirely from my theme.php and if I encounter any problems I'll report back. If anyone else who is using nukenews stumbles across this and sees that I'm missing something please let me know but I'm pretty sure this is just dead code.

Thanks as always Raven.
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Dec 13, 2005 8:20 pm Reply with quote

It is dead code really. Just delete it

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©