Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Themes Issues
Author Message
b14ze
New Member
New Member



Joined: Jul 22, 2006
Posts: 18

PostPosted: Wed Oct 03, 2007 9:32 am Reply with quote

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!
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Wed Oct 03, 2007 10:25 am Reply with quote

Please do a search in the forums this has been discussed before. Wink
 
View user's profile Send private message
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Wed Oct 03, 2007 10:26 am Reply with quote

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. 
View user's profile Send private message
jakec







PostPosted: Wed Oct 03, 2007 10:37 am Reply with quote

It is more than likely the theme, especially as you say it happens when your users change the theme.

Have a look at the following fix posted here: http://www.ravenphpscripts.com/posts7200-highlight-right+blocks.html

Hopefully this will fix it for you. Wink
 
b14ze







PostPosted: Wed Oct 03, 2007 9:57 pm Reply with quote

jakec wrote:
It is more than likely the theme, especially as you say it happens when your users change the theme.

Have a look at the following fix posted here: http://www.ravenphpscripts.com/posts7200-highlight-right+blocks.html

Hopefully this will fix it for you. Wink


Thank you from the bottom of my heart jakec. You are a gentleman, and a scholar! Worked like a charm.. Very Happy 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

PostPosted: Fri Jan 18, 2008 5:46 pm Reply with quote

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

Code:
if ($index == 1) {


and change it to

Code:
if (defined('INDEX_FILE')) {
 
View user's profile Send private message
McCain
New Member
New Member



Joined: Sep 21, 2007
Posts: 8

PostPosted: Wed Feb 06, 2008 12:36 pm Reply with quote

Praise be to god for the search engine! I believe these fixes will help me with my problem as well.

Thanks!
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Feb 06, 2008 6:50 pm Reply with quote

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! 
View user's profile Send private message Visit poster's website
McCain







PostPosted: Wed Feb 06, 2008 8:29 pm Reply with quote

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

PostPosted: Thu Feb 07, 2008 8:44 am Reply with quote

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 
View user's profile Send private message
McCain







PostPosted: Thu Feb 07, 2008 10:42 am Reply with quote

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







PostPosted: Thu Feb 07, 2008 12:07 pm Reply with quote

I would put it at file scope (not inside any function). After the opening comment block (if there is one) should work.
 
McCain







PostPosted: Thu Feb 07, 2008 1:31 pm Reply with quote

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. Smile

Thanks again.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Themes Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©