Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
sylvisj
New Member
New Member


Joined: Nov 05, 2006
Posts: 2

PostPosted: Sun Nov 05, 2006 6:25 pm Reply with quote

Well, the install went well (other than not getting http or cgiauth working with nukesent, but that doesn't worry me), but now I'm having a problem.
On all the default themes, everything is fine. Whenever I switch to a theme from disipal.net, the right blocks disappear entirely. I have to have this fixed. Does anyone have any idea what's up?
In case it helps, this is from theme.php:
Code:
function themefooter() {

    global $index, $user, $banners, $cookie, $prefix, $dbi, $db, $foot1, $foot2, $foot3, $foot4, $admin, $adminmail, $total_time, $start_time, $nukeurl;
    $mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $end_time = $mtime;
    $total_time = ($end_time - $start_time);
    $total_time = ""._PAGEGENERATION." ".substr($total_time,0,5)." "._SECONDS."";
    if ($banners == 1) {
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
   /* Get a random banner if exist any. */
   /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */

    if ($numrows>1) {
   $numrows = $numrows-1;
   mt_srand((double)microtime()*1000000);
   $bannum = mt_rand(0, $numrows);
    } else {
   $bannum = 0;
    }
    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $bid = $row[bid];
    $imageurl = $row[imageurl];
    $clickurl = $row[clickurl];
    $alttext = $row[alttext];
   
    if (!is_admin($admin)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
    }
    if($numrows>0) {
   $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
   $result2 = $db->sql_query($sql2);
   $row2 = $db->sql_fetchrow($result2);
   $cid = $row2[cid];
   $imptotal = $row2[imptotal];
   $impmade = $row2[impmade];
   $clicks = $row2[clicks];
   $date = $row2[date];

   
   if (defined('INDEX_FILE')) {
   $tmpl_file = "themes/CoNCePT/center_right.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "\$r_file=\"".$thefile."\";";
   eval($thefile);
   print $r_file;
   blocks(right);
    }

/* Check if this impression is the last one and print the banner */

   if (($imptotal <= $impmade) AND ($imptotal != 0)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
       $result3 = $db->sql_query($sql3);
       $row3 = $db->sql_fetchrow($result3);
       $c_name = $row3[name];
       $c_contact = $row3[contact];
       $c_email = $row3[email];
       if ($c_email != "") {
      $from = "$sitename <$adminmail>";
      $to = "$c_contact <$c_email>";
      $message = ""._HELLO." $c_contact:\n\n";
      $message .= ""._THISISAUTOMATED."\n\n";
      $message .= ""._THERESULTS."\n\n";
      $message .= ""._TOTALIMPRESSIONS." $imptotal\n";
      $message .= ""._CLICKSRECEIVED." $clicks\n";
      $message .= ""._IMAGEURL." $imageurl\n";
      $message .= ""._CLICKURL." $clickurl\n";
      $message .= ""._ALTERNATETEXT." $alttext\n\n";
      $message .= ""._HOPEYOULIKED."\n\n";
      $message .= ""._THANKSUPPORT."\n\n";
      $message .= "- $sitename "._TEAM."\n";
      $message .= "$nukeurl";
      $subject = "$sitename: "._BANNERSFINNISHED."";
      mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
       }
   }
    $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";
    }
}
    $footer_message = "$total_time";



echo "<td width=\"16\" background=\"themes/CoNCePT/images/footer/CoNCePTfooter1.gif\"><img src=\"themes/CoNCePT/images/spacer.gif\" width=\"16\" height=\"1\"></td>
  </tr>
</table>
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
."<tr>\n"
."<td width=\"15\" background=\"themes/CoNCePT/images/footer/CoNCePTfooter2.gif\"><img src=\"themes/CoNCePT/images/spacer.gif\" width=\"15\" height=\"1\"></td>\n"
."<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" bgcolor=\"#000000\">\n"
."<tr><td>\n";
echo "</td></tr><tr>\n";
echo "<td><center><font class=\"small\">\n";
footmsg();
echo"</font></center></td>\n"
."</tr>\n"
."<tr>\n"
."</tr>\n"

."<tr>\n"
."</tr>\n"       
."</table></td>\n"
."<td width=\"16\" background=\"themes/CoNCePT/images/footer/CoNCePTfooter1.gif\"><img src=\"themes/CoNCePT/images/spacer.gif\" width=\"16\" height=\"1\"></td>\n"
."</tr>\n"
."</table>\n"
."<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
."<tr>\n"
."<td width=\"35\"><IMG SRC=\"themes/CoNCePT/images/footer/CoNCePTfooter3.gif\" WIDTH=\"35\" HEIGHT=\"56\" ALT=\"\"></td>\n"
."<td background=\"themes/CoNCePT/images/footer/CoNCePTfooter4.gif\"><BR><A HREF=\"http://www.disipal.net\" TARGET=\"_blank\"><img src=\"themes/CoNCePT/images/footer/CoNCePT-mes.gif\" WIDTH=182 HEIGHT=14 BORDER=0 ALT=\"Disipal Design\" align=\"right\"></A></td>\n";

echo"<td width=\"35\"><IMG SRC=\"themes/CoNCePT/images/footer/CoNCePTfooter5.gif\" WIDTH=\"35\" HEIGHT=\"56\" ALT=\"\"></td>\n"
."</tr>\n"
."</table>\n"
."</td></tr></table>\n"
."</td></tr></table>\n";
}

If someone could get back to me, it would be greatly appreciated.
 
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Sun Nov 05, 2006 7:26 pm Reply with quote

Search the forums for 'missing right blocks' and you'll see dozens of posts - they all have the same very simple fix
 
View user's profile Send private message Send e-mail
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sun Nov 05, 2006 7:29 pm Reply with quote

if (defined('INDEX_FILE'))

That is the correct fix if your version of nuke is PATCHED. Any nuke that has not been patched should be applied, Now check your other themes, and see if they dont have If($index==1).
If so, change if (defined('INDEX_FILE')) to if(index==1)
Then patch your nuke.
Then change back.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
sylvisj
PostPosted: Sun Nov 05, 2006 8:54 pm Reply with quote

Thank you both, tons.
Came here as a last ditch effort, which is why I hadn't tried search - gave up. Turns out this is the first place I should have come. Thank you Very Happy
 
Guardian2003
PostPosted: Sun Nov 05, 2006 8:56 pm Reply with quote

Not a problem Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

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 ©