Spidean  

The home of the AutoTheme HTML Theme System: PHP-Nuke Themes, phpNuke Themes, PostNuke Themes, Zikula Themes, Platinum Nuke Themes, Nuke Evolution Themes, Smeego Themes

 
 
Pinnacle of Excellence  

FAQ

SUPPORT

THEMES

TEMPLATES

   
   

   
Main Menu

 
Welcome Guest   Register | Log in



Spidean Forums
You are not logged in

 < Last Thread   Next Thread >Ascending sortDescending sorting  New Topic  Post Reply
Author: Subject: Two Center Blocks in PHP-Nuke

Administrator





Posts: 4538
Registered: 10/7/2002
Status: Online

  posted on 5/8/2006 at 02:12 PM
PHP-Nuke 7.9 (and possibly 8.x) has hardcoded the message and center block display so there is no way for AutoTheme to turn them off.

There are two choices:
1. Turn off the center blocks in AutoTheme (the disadvantage is that you can't control/theme them as you can the other blocks).
2. Edit header.php, line 59, and comment out:

message_box();
blocks("Center");

So it looks like this:

//message_box();
//blocks("Center");


-Shawn

[Edited on 4/18/2007 by Shawn]

 
Reply With Quote Visit User's Homepage

Newbie




Posts: 1
Registered: 3/8/2007
Status: Offline

  posted on 3/8/2007 at 01:27 AM
I'm curious to know... I have two versions of my site... o­ne of them is my main and another I use as a "beta" testing area for new modules and the such. I didn't have a problem in my master (or public) site... but when installing o­nto the beta, I got the duplicates.Any idea why it was different?

[Edited on 8/3/2007 by ElijahMrE]

 
Reply With Quote

Newbie




Posts: 1
Registered: 4/18/2007
Status: Offline

  posted on 4/18/2007 at 01:41 PM
I am having this exact same problem with my site:<DIV><BR class="khtml-block-placeholder"></DIV><DIV>www.heroesofthefa ithful.net</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I attempted to comment out the above mentioned lines, but in doing so it breaks my site turning it into a large white page.  Any thoughts / suggestions?  I&#39;m using AT.87 with PhP4.0 and SQL5.0 behind it.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>*******</DIV&g t;<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Please disregard... I need to remember that comments are with * and # symbol like in unix.  Working great now!</DIV>

[Edited on 18/4/2007 by awentwor]

 
Reply With Quote

Administrator




Posts: 4538
Registered: 10/7/2002
Status: Online

  posted on 4/18/2007 at 02:01 PM
I cleaned up this thread to remove the bad code. Please follow my instructions in the top post.

Thanks!
-Shawn

 
Reply With Quote

Newbie




Posts: 1
Registered: 5/27/2007
Status: Offline

  posted on 5/27/2007 at 11:44 AM
hey, not sure if this is related but i have two CMS installed on one server one running as a sub domain. basically on a post nuke site the theme (halo) show's centre blocks fine with the image border thing etc. however on a php-nuke (7.9) site only the text show's up ... no images simply the text on the background.

any idea's?

 
Reply With Quote

Administrator




Posts: 4538
Registered: 10/7/2002
Status: Online

  posted on 5/27/2007 at 12:46 PM
That's because PHP-Nuke hard codes the center block, so if you turn it off in AutoTheme it won't use the AutoTheme template.

So, turn it on in AutoTheme under *HomePage and make sure you have assigned the correct template. Then you'll have 2 cenetr blocks, one with the images and one without. You then need to follow the instructions in the top post to disable the hard coded nuke center block.

-Shawn

[Edited on 5/27/2007 by Shawn]

 
Reply With Quote

Junior Member




Posts: 16
Registered: 5/20/2005
Status: Offline

  posted on 9/1/2007 at 05:09 AM
I'm using PHP-Nuke v8.0, with AT-Lite v.87.

Your solution for the Admin Messages doubling works for any page loaded off of index.php
However another side effect of AT-Lite that isn't solved by that is that by logging into the administration section via <sitename>/admin.php now shows the messages in the center block where they weren't showing before AT-Lite v.87 was installed.

Any ideas on a fix for this? or a more global solution for the hard-coded messages vs AutoTheme issue?

 
Reply With Quote

Newbie




Posts: 3
Registered: 11/6/2007
Status: Offline

  posted on 11/6/2007 at 10:12 PM
This is my header.php

Can anyone help me with the coding..? I dont see where the place is to add the // tags

<?php
/*======================================================================= Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
=======================================================================*/< br />
/************************************************************************/< br /> /* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/< br />
/*****[CHANGES]********************************************************** -=[Base]=-
NukeSentinel v2.5.00 07/11/2006
Nuke Patched v3.1.0 06/26/2005
Advanced Security Extension v1.0.0 12/22/2005
-=[Other]=-
Dynamic Titles v1.0.0 06/11/2005
-=[Mod]=-
Collapsing Blocks v1.0.0 08/16/2005
************************************************************************/< br />
if(!defined('HEADER')) {
define('HEADER', true);
} else {
return;
}

if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
exit('Access Denied');
}

require_once(dirname(__FILE__).'/mainfile.php');

function head() {
global $sitename, $ab_config, $modheader, $cache;
$ThemeSel = get_theme();
include_once(NUKE_THEMES_DIR.$ThemeSel.'/theme.php');
echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">n";
echo "<html lang=""._LANGCODE."" dir=""._LANG_DIRECTION."">n";
echo "<head>n";
/*****[BEGIN]******************************************
[ Base: Dynamic Titles v1.0.0 ]
******************************************************/
include_once(NUKE_INCLUDE_DIR.'dynamic_titles.php');
/*****[END]********************************************
[ Base: Dynamic Titles v1.0.0 ]
******************************************************/
include_once(NUKE_INCLUDE_DIR.'meta.php');
include_once(NUKE_INCLUDE_DIR.'javascript.php');

if ((($favicon = $cache->load('favicon', 'config')) === false) || empty($favicon)) {
if (file_exists(NUKE_BASE_DIR.'favicon.ico')) {
$favicon = "themes/$ThemeSel/images/favicon.ico";
} else if (file_exists(NUKE_IMAGES_DIR.'favicon.ico')) {
$favicon = "images/favicon.ico";
} else if (file_exists(NUKE_THEMES_DIR.$ThemeSel.'/images/favicon.ico')) {
$favicon = "favicon.ico";
} else {
$favicon = 'none';
}
if ($favicon != 'none') {
echo "<link rel="shortcut icon" href="$favicon" type="image/x-icon">n";
}
$cache->save('favicon', 'config', $favicon);
} else {
if ($favicon != 'none') {
echo "<link rel="shortcut icon" href="$favicon" type="image/x-icon">n";
}
}

// If you use ForumNews Advance, you may want to replace the RSS News with the RSS ForumNews. Just remove the comments below and comment out the RSS News.
//echo "<link rel="alternate" type="application/rss+xml" title="RSS $sitename &raquo; ForumNews" href="rss.php?feed=forumnews">n";
echo "<link rel="alternate" type="application/rss+xml" title="RSS $sitename &raquo; News" href="rss.php?feed=news">n";
echo "<link rel="alternate" type="application/rss+xml" title="RSS $sitename &raquo; Forums" href="rss.php?feed=forums">n";
echo "<link rel="alternate" type="application/rss+xml" title="RSS $sitename &raquo; Downloads" href="rss.php?feed=downloads">n";
echo "<link rel="alternate" type="application/rss+xml" title="RSS $sitename &raquo; Web Links" href="rss.php?feed=weblinks">n";

global $browser;
$stylesheet" href="themes/$ThemeSel/style/style.css" type="text/css">n";
if ($browser == 'ie' || $browser == 'konqueror' || $browser == 'MSIE') {
if (file_exists('themes/'.$ThemeSel.'/style/style_ie.css')) {
$stylesheet" href="themes/$ThemeSel/style/style_ie.css" type="text/css">n";
}
} else if ($browser == 'Mozilla' || $browser == 'Firefox' || $browser == 'Gecko' || $browser == 'Netscape') {
if (file_exists('themes/'.$ThemeSel.'/style/style_moazilla.css')) {
$stylesheet" href="themes/$ThemeSel/style/style_mozilla.css" type="text/css">n";
}
} else if ($browser == 'Opera') {
if (file_exists('themes/'.$ThemeSel.'/style/style_opera.css')) {
$stylesheet" href="themes/$ThemeSel/style/style_opera.css" type="text/css">n";
}
}

echo $style;

if(isset($modheader)) {
echo $modheader;
}
if ((($custom_head = $cache->load('custom_head', 'config')) === false) || empty($custom_head)) {
$custom_head = array();
if (file_exists(NUKE_INCLUDE_DIR.'custom_files/custom_head.php')) {
$custom_head[] = 'custom_head';
}
if (file_exists(NUKE_INCLUDE_DIR.'custom_files/custom_header.php')) {
$custom_head[] = 'custom_header';
}
if (!empty($custom_head)) {
foreach ($custom_head as $file) {
include_once(NUKE_INCLUDE_DIR.'custom_files/'.$file.'.php');
}
}
$cache->save('custom_head', 'config', $custom_head);
} else {
if (!empty($custom_head)) {
foreach ($custom_head as $file) {
include_once(NUKE_INCLUDE_DIR.'custom_files/'.$file.'.php');
}
}
}
echo "</head>n";
/*****[BEGIN]******************************************
[ Base: NukeSentinel v2.5.00 ]
******************************************************/
if($ab_config['site_switch'] == 1) {
echo '<center><img src="images/nukesentinel/disabled.png" alt="'._AB_SITEDISABLED.'" title="'._AB_SITEDISABLED.'" border="0" /></center><br />';
}
/*****[END]********************************************
[ Base: NukeSentinel v2.5.00 ]
******************************************************/
themeheader();
}

function online() {
global $prefix, $db, $name, $board_config, $userinfo;
$ip = identify::get_ip();
$url = (defined('ADMIN_FILE')) ? 'index.php' : Fix_Quotes($_SERVER['REQUEST_URI']);
$uname = $ip;
$guest = 1;
$user_agent = identify::identify_agent();
if (is_user()) {
$uname = $userinfo['username'];
$guest = 0;
/*****[BEGIN]******************************************
[ Base: Advanced Security Extension v1.0.0 ]
******************************************************/
} elseif($user_agent['engine'] == 'bot') {
$uname = $user_agent['bot'];
$guest = 3;
}
/*****[END]********************************************
[ Base: Advanced Security Extension v1.0.0 ]
******************************************************/
$custom_title = $name;
$url = str_replace("&amp;", "&", $url);
$past = time()-$board_config['online_time'];
$db->sql_query('DELETE FROM '.$prefix.'_session WHERE time < "'.$past.'"');
$ctime = time();
list($count) = $db->sql_ufetchrow("SELECT COUNT(*) FROM ".$prefix."_session WHERE uname='$uname'");
if ($count >= 1) {
$result = $db->sql_query('UPDATE '.$prefix.'_session SET uname="'.$uname.'", time="'.$ctime.'", host_addr="'.$ip.'", guest="'.$guest.'", module="'.$custom_title.'", url="'.$url.'" WHERE uname="'.$uname.'"');
$db->sql_freeresult($result);
} else {
$db->sql_query('INSERT INTO '.$prefix.'_session (uname, time, starttime, host_addr, guest, module, url) VALUES ("'.$uname.'", "'.$ctime.'", "'.$ctime.'", "'.$ip.'", "'.$guest.'","'.$custom_title.'", "'.$url.'")');
}
}

online();
head();

if(!defined('ADMIN_FILE')) {
include_once(NUKE_INCLUDE_DIR.'counter.php');
if(defined('HOME_FILE')) {
include_once(NUKE_INCLUDE_DIR.'messagebox.php');
blocks('Center');

}
}

?>

[Edited on 7/11/2007 by Horvath]

 
Reply With Quote

Administrator




Posts: 4538
Registered: 10/7/2002
Status: Online

  posted on 11/7/2007 at 05:34 PM
At the end, the last two lines before the:

}
}

They are:

include_once(NUKE_INCLUDE_DIR.'messagebox.php');
blocks('Center');

So make them look like:

//include_once(NUKE_INCLUDE_DIR.'messagebox.php');
//blocks('Center');

You may not want to comment out the include line though. Try it and see.

-Shawn

[Edited on 11/7/2007 by Shawn]

 
Reply With Quote

Newbie




Posts: 3
Registered: 11/6/2007
Status: Offline

  posted on 11/11/2007 at 08:37 AM
Hmm Well Its a bit deeper then that I guess.
That worked, But I didnt realize its only double center blocks In FireFox, IE seems OK.

So when I did that, Firefox Looks great, But when you look at the site with IE, the center blocks are blank.

Maybe I will debug for IE only..
Any thoughts?

Thanks a bunch

 
Reply With Quote

Newbie




Posts: 3
Registered: 11/6/2007
Status: Offline

  posted on 11/13/2007 at 04:39 PM
Correction, It is INterent Explorer and Firefox that I know of.

Any other thoughts?

Thanks

 
Reply With Quote

Newbie




Posts: 2
Registered: 3/26/2008
Status: Offline

  posted on 3/26/2008 at 01:53 PM
Unfortunately, I have the same problem in version PHP NUKE 8.1 http://montegoscripts.com for TegoNuke(tm) ShortLinks
global $tnsl_bUseShortLinks, $tnsl_bAutoTapBlocks, $tnsl_bAutoTapLinks, $tnsl_bDebugShortLinks, $tnsl_sGTFilePath;
if (defined('TNSL_USE_SHORTLINKS')) {
$GLOBALS['tnsl_asGTFilePath'] = tnsl_fPageTapStart();
}

##################################################
# Include some common header for HTML generation #
##################################################


function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include_once("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">n";
echo "<html dir="rtl">n";
echo "<head>n";
//If Dynamic Titles are turned on, use them, otherwise, use default PHP-Nuke page titles
global $useDynamicTitles;
if (isset($useDynamicTitles) && $useDynamicTitles && file_exists(INCLUDE_PATH.'includes/dynamic_titles.php')) {
include_once(INCLUDE_PATH.'includes/dynamic_titles.php');
} else {
echo '<title>'.$sitename.' '.$pagetitle.'</title>'."n";
}
//End of Dynamic Titles changes
include("includes/meta.php");
include("includes/javascript.php");

if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL="shortcut icon" HREF="themes/$ThemeSel/images/favicon.ico" TYPE="image/x-icon">n";
}
echo "<link rel="alternate" type="application/rss+xml" title="RSS" href="backend.php">n";
echo "<LINK REL="StyleSheet" HREF="themes/$ThemeSel/style/style.css" TYPE="text/css">nnn";
if (file_exists("includes/custom_files/custom_head.php")) {
include_once("includes/custom_files/custom_head.php");
}
echo "nnn</head>nn";
if (file_exists("includes/custom_files/custom_header.php")) {
include_once("includes/custom_files/custom_header.php");
}
themeheader();
}

online();
head();
include("includes/counter.php");
if(defined('HOME_FILE')) {
//message_box();
//blocks("Center");
}

?>


[Edited on 26/3/2008 by drsalhen]

 
Reply With Quote

Administrator




Posts: 4538
Registered: 10/7/2002
Status: Online

  posted on 3/26/2008 at 02:34 PM
I've never heard of TegoNuke. They have hacked something to make it different than PHP-Nuke. Try choice 1.


1. Turn off the center blocks in AutoTheme (the disadvantage is that you can't control/theme them as you can the other blocks).


-Shawn


[Edited on 3/26/2008 by Shawn]

 
Reply With Quote

Newbie




Posts: 2
Registered: 3/26/2008
Status: Offline

  posted on 3/26/2008 at 07:07 PM
Thank you, I have found it here. footer.php

blocks("Down");
to
//blocks("Down");

Thank you

[Edited on 27/3/2008 by drsalhen]

 
Reply With Quote
New Topic    Post Reply



Printer Friendly Page Printer Friendly Page 
         



Copyright © 2002-2008 Shawn McKenzie and Spidean.
Legal | Credits

AutoTheme   Built with AutoTheme   Enhanced by AutoTheme   Powered by AutoTheme

Valid HTML 4.01!   Valid CSS!
Powered by the AutoTheme HTML Theme System
Page created in 0.116596 Seconds