PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Mon Jul 06, 2009 3:06 pm Reply with quote Back to top

Okay I have the blocks by module hack - nice hack - ive insisted it be included and blah blah.

Anyways- I went a step further to add center blocks in all modules instead of just the home page.

function foot() {
global $prefix, $user_prefix, $db, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $name, $admin;
if(defined('HOME_FILE')) {
blocks('Down');
}

// adding to show bottom blocks in all mods
else { blocks('Down');
}

The problem is here - as News is my home_file - when someone reads a news article I get all the center blocks I had defined for the home page - or in the case - the news module - on the article page.

Is there a way to say something like if its the home-file but not the home page? Is there an identifier for the home page? like If (defined(home_file)) && Home_page="False" then no blocks down?

Same way in header.php also.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Jul 06, 2009 4:27 pm Reply with quote Back to top

Not that I know of. You could make it work specifically for news by adding if statements for $op.
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Tue Jul 07, 2009 7:55 am Reply with quote Back to top

Interesting. I have been looking at a problem like this too. I'd like to use one of the content pages as my "home page" but RN insists on having a home module and if you make content be the main module you get all the header stuff associated with it and the list of all content pages. And using standard RN (derived from *nuke) you HAVE TO have a home module. The name of that module gets stored in the _main table ... look at modules.php in the admin directory to see how.

Without rewriting the code the only workaround I can see for this is to create a do-nothing module (I think I've posted the code for that here at some time) that doesn't have any output and make that be the main module. Then use whatever blocks you want on your home page using center up and center down. By the way, center blocks are not defined on a per module basis ... they are universal no matter what module you put in home.
View user's profile Send private message Visit poster's website
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 442
Location: Netherlands

PostPosted: Fri Jul 10, 2009 1:42 pm Reply with quote Back to top

normaly this should work:

Code:

if(defined('HOME_FILE')||($name == 'News') AND ($file == 'article')) {
      blocks('Down');
   }


Dont forget to add the globals $name and $title else wont work
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
draxx
Worker
Worker


Joined: Nov 19, 2003
Posts: 186

PostPosted: Fri Jul 10, 2009 11:38 pm Reply with quote Back to top

Thanks wHiTeHaT!

It took this:

//modified to display center blocks everywhere but article pages
if(($name == 'News') AND ($file == 'article')) {

//do nothing because top blocks on article pages is annoying

} else if((defined('HOME_FILE')) AND ($file != 'article')) {

//display the message box only on the home page but not on article pages
//this is done in case the module news is the home module
message_box();
blocks('Center');

} else {

// display center blocks everywhere else

blocks('Center');
}
View user's profile Send private message
nextgen
Worker
Worker


Joined: Sep 28, 2006
Posts: 135
Location: Maryland

PostPosted: Fri Feb 03, 2012 2:19 pm Reply with quote Back to top

Where can i find this modification friend ?
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum