Author |
Message |
b14ze
New Member


Joined: Jul 22, 2006
Posts: 18
|
Posted:
Wed Oct 03, 2007 9:32 am |
|
When my site's users switch to a different theme (most of them), they loose the blocks on the right hand side. The blocks are a paypal donation block, a shoutbox block, and a whoisonline block. Any help would be appreciated! |
|
|
|
 |
jakec
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Wed Oct 03, 2007 10:25 am |
|
Please do a search in the forums this has been discussed before.  |
|
|
|
 |
PHrEEkie
Subject Matter Expert

Joined: Feb 23, 2004
Posts: 358
|
Posted:
Wed Oct 03, 2007 10:26 am |
|
Right block visibility is controlled by whatever module is loaded. If right blocks are visible on one theme but not others, then we can rule out a problem with the module and the problem then will most likely be in the theme itself.
Most often, some poorly written or modified themes has missing table close tags (</table>). These omissions are usually found in either theme.php, tables.php or footer.html/php depending on the filesystem that theme uses.
Nuke uses an extremely complicated combination of nested tables, which makes finding one missing tag quite daunting. My way of chasing it down is to load the erroneous page and load the source into a text editor. Makes it a little easier to see what the browser is seeing that way.
PHrEEk |
_________________ PHP - Breaking your legacy scripts one build at a time. |
|
|
 |
jakec

|
Posted:
Wed Oct 03, 2007 10:37 am |
|
|
|
 |
b14ze

|
Posted:
Wed Oct 03, 2007 9:57 pm |
|
Thank you from the bottom of my heart jakec. You are a gentleman, and a scholar! Worked like a charm.. Oh and FTR, I did do a search. I was just having no luck.
*UPDATE* ok so I have most of the themese working correctly now, except one pesky theme.php that I couldnt find the values in the file listed in the fix. The theme does have this code in there wich looks as if it is telling nuke NO RIGHT BLOCKS.
Code: if (!defined("NO_RIGHT_BLOCKS") && !defined("ADMIN_FILE")) {
echo"</td>"
. " <td width=\"150\" valign=\"top\">"
."";
|
|
|
|
|
 |
oyjord
Hangin' Around

Joined: Aug 25, 2006
Posts: 44
|
Posted:
Fri Jan 18, 2008 5:46 pm |
|
I found this solution in another thread elsewhere long ago, don't know if it'll help, but here goes:
Quote: | open your theme.php
find
and change it to
Code:if (defined('INDEX_FILE')) {
| |
|
|
|
|
 |
McCain
New Member


Joined: Sep 21, 2007
Posts: 8
|
Posted:
Wed Feb 06, 2008 12:36 pm |
|
Praise be to god for the search engine! I believe these fixes will help me with my problem as well.
Thanks! |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Feb 06, 2008 6:50 pm |
|
McCain, welcome to RavenPHPScripts! |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
McCain

|
Posted:
Wed Feb 06, 2008 8:29 pm |
|
montego wrote: | McCain, welcome to RavenPHPScripts! |
Thanks for the welcome.
Looks like I may have celebrated to early. When I got home I opened my theme.php file, but couldn't find the mentioned codes in the thread, all I can find in my theme.php file is ...
Code:/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
if (defined('INDEX_FILE') || $index == 1) {
$tmpl_file = "themes/AcidTechBlood/center_right.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks(right);
}
$tmpl_file = "themes/AcidTechBlood/footer.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
echo "<center>\n";
$footer_message = footmsg();
echo "</center>\n";
// PLEASE DO NOT TOUCH THE NEXT LINE.
// YOU CAN ONLY ADD TO IT IF YOU MODIFY THIS THEME :-)
echo "<center><br><font class=\"small\">:: AcidTechBlood phpbb2 style by <a href=\"http://www.freestylexl.com/\">Freestyle XL</a> / PHP-Nuke theme by <a href=\"http://www.cmsrevolution.com\">www.cmsrevolution.com</a> ::</font></center>";
echo "<br>\n";
}
|
Not sure what to change here to keep the right hand blocks from vanishing when someone clicks the forum link, or the custom content links I have up.
Any ideas?
Thanks. |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Thu Feb 07, 2008 8:44 am |
|
Oh, you want right blocks? Even in forums? You'll have to modify the modules by adding a
define('INDEX_FILE', true);
to their files (usually modules/xxx/index.php). |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
McCain

|
Posted:
Thu Feb 07, 2008 10:42 am |
|
Gremmie wrote: | Oh, you want right blocks? Even in forums? You'll have to modify the modules by adding a
define('INDEX_FILE', true);
to their files (usually modules/xxx/index.php). |
Do I put that line of code anywhere in the index.php file? |
|
|
|
 |
Gremmie

|
Posted:
Thu Feb 07, 2008 12:07 pm |
|
I would put it at file scope (not inside any function). After the opening comment block (if there is one) should work. |
|
|
|
 |
McCain

|
Posted:
Thu Feb 07, 2008 1:31 pm |
|
Gremmie wrote: | I would put it at file scope (not inside any function). After the opening comment block (if there is one) should work. |
Ok I'll try that. Should work? Hehe, I'm still learning so we shall see.
Thanks again. |
|
|
|
 |
|