| Author |
Message |
lunchbox
Corporal


Joined: Oct 28, 2003
Posts: 56
|
Posted:
Sat Aug 20, 2005 5:22 am |
  |
i have no right side blocks after i uploaded the php 7.7 fix/patch
this is what i am reading in the "read me" but i cant seem to find what this is reffering to...could someone translate this into idiot for me please
| Code: |
Important notes relating to Nuke Patched 3.1:
1- If you want right side blocks to appear in third party add-ons change:
In Modules:
index = 1;
to:
define('INDEX_FILE', true);
In Themes:
if ($index == 1) {
to:
if (defined('INDEX_FILE')) { |
|
|
|
   |
 |
shrek_rock
Captain


Joined: Nov 24, 2003
Posts: 709
|
Posted:
Sat Aug 20, 2005 8:00 am |
  |
hi, open the theme.php for the theme you are using. Look through the codes for any reference to if($index ==1){ change that entire line to if (defined('INDEX_FILE')) { . You should find it inside the function themeheader(). The next part
In Modules:
index = 1;
to:
define('INDEX_FILE', true);
is as it says. In the index.php for any extra module(those that did not come with the default nuke install). You will usually find index = 1; close to the top of the page, just change it to define('INDEX_FILE', true); |
_________________
 |
|
     |
 |
lunchbox
Corporal


Joined: Oct 28, 2003
Posts: 56
|
Posted:
Sat Aug 20, 2005 9:08 am |
  |
thank you so much for the help i was not looking in the "theme" folder...I was looking in root...
once again thanks for translating that into "idiot" for me. Sometime english just doesnt do it for me ...lol  |
|
|
   |
 |
Putra_Aslim
Nuke Soldier


Joined: Sep 30, 2003
Posts: 14
|
Posted:
Sat Sep 10, 2005 9:27 am |
  |
what if we use fisubsilverish theme?
there is no index = 1;
where to put define('INDEX_FILE', true);
here is some code in theme.php for fisubsilverish theme.
| Code: |
function themeheader() {
global $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous, $name;
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];
/* 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>";
}
}
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body leftmargin=\"1\" topmargin=\"1\" marginwidth=\"1\" marginheight=\"1\">";
if ($username == "Anonymous") {
$theuser = " <a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
} else {
$theuser = " Welcome $username!";
}
$public_msg = public_message();
$tmpl_file = "themes/fisubsilversh/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
if ($name=='Forums') {
// no left block for forum
}
else {
blocks(left);
}
$tmpl_file = "themes/fisubsilversh/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
|
[/code] |
|
|
   |
 |
Xyberian
Colonel


Joined: Mar 14, 2004
Posts: 1921
Location: Behind you
|
Posted:
Sat Sep 10, 2005 2:23 pm |
  |
|
    |
 |
Putra_Aslim
Nuke Soldier


Joined: Sep 30, 2003
Posts: 14
|
Posted:
Sat Sep 10, 2005 5:20 pm |
  |
| Xyberian wrote: |
find $index variable file-bursted in .html files.
open all .html file (e.g., left_center.html) and find $index variables. Your theme is a slightly old style. |
i already open my .html files... there is no such $index variable in it. pls help |
|
|
   |
 |
Xyberian
Colonel


Joined: Mar 14, 2004
Posts: 1921
Location: Behind you
|
Posted:
Sat Sep 10, 2005 5:34 pm |
  |
|
    |
 |
Putra_Aslim
Nuke Soldier


Joined: Sep 30, 2003
Posts: 14
|
Posted:
Sat Sep 10, 2005 8:19 pm |
  |
| Xyberian wrote: |
| You theme-pack is fisubsilversh, isn't it? |
yes my theme-pack is fisubsilversh. but there is no $index variable in any of .html files. pls assist. |
|
|
   |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12389
|
Posted:
Mon Sep 12, 2005 12:37 pm |
  |
|
     |
 |
shrek_rock
Captain


Joined: Nov 24, 2003
Posts: 709
|
Posted:
Tue Sep 13, 2005 6:19 am |
  |
| Putra_Aslim wrote: |
what if we use fisubsilverish theme?
there is no index = 1;
where to put define('INDEX_FILE', true);
here is some code in theme.php for fisubsilverish theme.
|
It seems that you have a modified version that has the right blocks already removed from the entire theme. In this case you do not need to add define('INDEX_FILE', true); |
_________________
 |
|
     |
 |
ishtar
Sergeant


Joined: Jun 19, 2005
Posts: 96
Location: Suriname
|
Posted:
Thu Sep 29, 2005 12:18 pm |
  |
ok i have the same problem, my site is working just fine. only the right side blocks dissapeared. they just dont wanna show up. anyway, ive read what has been posted before, im using phpnuke 7.5 +patched. im using subblack.
ive searched the the theme.php and i found the code in:
| Quote: |
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
if ($index == 1) {
$tmpl_file = "themes/subBlack/center_right.html";
|
so i changed:
| Quote: |
if ($index == 1) {
|
into:
| Quote: |
if (defined('INDEX_FILE')) {
|
i dont know if its good, but the right side blocks never showed up, are there any suggestions what to do....... [ i changed it back since the right side blocks didnt show...] |
_________________ www.metalsuriname.com |
|
    |
 |
ishtar
Sergeant


Joined: Jun 19, 2005
Posts: 96
Location: Suriname
|
Posted:
Thu Sep 29, 2005 12:28 pm |
  |
another miracle with my site, just after posting i went to admin the forums after doing that i saw the right blocks appeared.........i dont understand, but its good  |
_________________ www.metalsuriname.com |
|
    |
 |
Greefer
Nuke Soldier


Joined: Jan 14, 2006
Posts: 22
|
Posted:
Sat Jan 14, 2006 7:23 am |
  |
Anyone know if there are other files we need to edit because I changed theme.php and I still have NO BLOCKS AT ALL.
Boohoo im pulling my hair out here.
Thanks |
|
|
   |
 |
testtest
Nuke Cadet


Joined: Feb 01, 2006
Posts: 2
|
Posted:
Wed Feb 01, 2006 12:45 pm |
  |
YAY thanks guys I was pulling my hair out for 2 hours.
I installed the 3.1 patch for Nuke 7.9 and lost all my right blocks, then i applied the if (defined('INDEX_FILE')) { to my theme.php instead of the "index ==1" rubbish... works great now.  |
|
|
   |
 |
GeoffM
Nuke Cadet


Joined: Aug 21, 2003
Posts: 4
|
Posted:
Thu Jun 15, 2006 12:09 am |
  |
| testtest wrote: |
YAY thanks guys I was pulling my hair out for 2 hours.
I installed the 3.1 patch for Nuke 7.9 and lost all my right blocks, then i applied the if (defined('INDEX_FILE')) { to my theme.php instead of the "index ==1" rubbish... works great now.  |
not for me  |
|
|
   |
 |
|
|