Support Spidean

Do you like our FREE downloads? How about the FREE support for the FREE downloads? Please help us out and donate any amount! It's fast and easy through PayPal.

Spidean Forums

Board Index > Support (.87) > Two Center Blocks in PHP-Nuke > Post Reply


Post Reply
Icon:
Message:



[More smilies...]
Bold   Italic   Underline   Code   Email   Quote   Url   Image   
Rights

HTML is Off
Smilies are On
BB Code is On
[img] Code is On

Disable smileys?
Use signature?
Turn BBCode off?
Receive email notification of new replies?

Topic Review


posted on 3/27/2008 at 12:07 AM

Thank you, I have found it here. footer.php

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

Thank you

[Edited on 27/3/2008 by drsalhen]




posted on 3/26/2008 at 07: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]




posted on 3/26/2008 at 06: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]




posted on 11/13/2007 at 09:39 PM

Correction, It is INterent Explorer and Firefox that I know of.

Any other thoughts?

Thanks




posted on 11/11/2007 at 01:37 PM

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




posted on 11/7/2007 at 10: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]




posted on 11/7/2007 at 03:12 AM

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]




posted on 9/1/2007 at 10: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?




posted on 5/27/2007 at 05: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]




posted on 5/27/2007 at 04:44 PM

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?




posted on 4/18/2007 at 07:01 PM

I cleaned up this thread to remove the bad code. Please follow my instructions in the top post.

Thanks!
-Shawn




posted on 4/18/2007 at 06: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]




posted on 3/8/2007 at 06: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]




Icon depicting mood of post posted on 5/8/2006 at 07:12 PM

PHP-Nuke and some of the forks 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, look for:

if (defined('HOME_FILE')) {
message_box();
blocks("Center");
}

And replace with:

if (defined('HOME_FILE')) {
message_box();
if (!defined('AUTOTHEME_THEME_INITIALIZED')) {
blocks('Center');
}
}

-Shawn


[Edited on 3/18/2009 by Shawn]



Main Menu

Get AutoTheme

Featured Item

Poll

How do you like the new look?

[ Results | Polls ]

Votes: 165

Powered by the AutoTheme HTML Theme System
Page created in 0.102912 Seconds