>>  Site Map >>  Forums >>  General 7x

Forum module - topics in forum:



General 7x - Discussions reagarding any other PHP-Nuke Problems. 7x



Blocks on right side

Hello

I have a PHPnuke page as follows: http://www.test.osonder.no

On this page a have som blocks on right side. This blocks only appears on the main page. I have read a lot of post and searched the forums for solutions. I have checked that index=1 is in all module index.php files. Please let me know if you have any clues for me Smile






If you have the latest patches installed, you'll need to do this.

http://phpnuke-uk.net/modules.php?name=Forums&file=viewtopic&t=5495






Okay! Thanx. I'm not shure if I have all the latest patches. I'm running version 7.7. How can I find out witch patches I have installed?






You'll need to read the big text with exclamation marks on the homepage, which links to here:

http://phpnuke-uk.net/modules.php?name=Forums&file=viewtopic&p=26050






Hmmm.... Maybee it's 7.6 I'm running. How can I found out this?






Save the following, and call it <b>info.php</b> and FTP it to your site root.

Code: :
<?php
require_once("mainfile.php");
if (!isset($Version_Num))
{
  if ($result = $db->sql_query("SELECT Version_Num FROM ".$prefix."_config"))
  {
    list($Version_Num) = $db->sql_fetchrow($result);
    $db->sql_freeresult($result);
  }
  else
  {
    $Version_Num = "Unknown";
  }
}
echo "Your PHP-Nuke version is $Version_Num";
die();
?>


Then just open it up at www.yoursite.com/info.php

Once you've viewed it, remove it from your server.






When I tried, I get following error:
Code: :
Parse error: parse error, unexpected ')' in /usr/home/web/wno79784/test/info.php on line 2







I've edited the code slightly, try again copying the code from above again.






Ok. That worked. The output I get is as follows: Your PHP-Nuke version is 7.6

So, next step. Is it possible to find out if I have the latest patches?






Just for the record. I have read this post http://phpnuke-uk.net/modules.php?name=Forums&file=viewtopic&t=5495
And checked my theme.php file. It is correct.






On the default nuke modules blocks are showing up correctly

http://www.test.osonder.no/modules.php?name=Web_Links

http://www.test.osonder.no/modules.php?name=Feedback

It's on all the custom modules where the blocks arent displaying.

Make sure you add

Code: :
define('INDEX_FILE', true);


to the top of each modules index.php file.

Sortof like


Code: :
if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}

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

define('INDEX_FILE', true);







Ok. One of my modules index.php file looks like this:
Code: :
if (!eregi("modules.php", $PHP_SELF)) {
  die ("You can't access this file directly...");
}
$index = 1;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();
include("modules/Bilder/bilder.htm");
CloseTable();
include("footer.php");
?>


Can you please help me how this index.php should look?






I can nothing about PHP (only some HTML), but I changed one of my modules index.php files to this:

Code: :
<?php

if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
define('INDEX_FILE', true);
include("header.php");
OpenTable();
include("modules/Bilder/bilder.htm");
CloseTable();
include("footer.php");
?>


Then I got blocks on right side also Smile
Thanx !!!




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS