Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
danny234
Worker
Worker



Joined: Feb 14, 2008
Posts: 123

PostPosted: Sat Mar 15, 2008 7:11 am Reply with quote

Ok so here is my problem, I installed nco news centre yesterday so I can display news in my homepage which is in a block, it's something like the forums in the centre page. When I post news it's also bringing the default news block further up the page when I don't need it because the news is already displayed in my nco centre block so it means i've got 2 copies of news on my page. I wanted to know how I can get rid of the news module appearing on my homepage so I can just have my nco news block in place. I've tried setting another module to default but I don't want any module to appear as the default just my nco news centre block.

Thanks
Danny
 
View user's profile Send private message Visit poster's website MSN Messenger
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sat Mar 15, 2008 8:38 am Reply with quote

I'm not familiar with the nco centre block, but I'd suspect there are instructions for handling this either in the download or in the support forums for that addon.

You might try overriding the number of news stories to appear on the front page to zero. This is set in the administration, preferences page, but it probably won't let you set it to zero. Just use phpMyAdmin to change the value of the storyhome field in the nuke_config table.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
danny234







PostPosted: Sat Mar 15, 2008 8:46 am Reply with quote

I checked in the admin panel then prefrences but in the options it only gives you 5,10,15,20,25,30 it doesn't have the option to pick 0 for number of pages to be displayed. Is there anywhere I can set it to 0?

Thanks
Danny
 
montego
Site Admin



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

PostPosted: Sat Mar 15, 2008 11:59 am Reply with quote

Another idea is to pick a different nuke module to be your HOME module. YOu could even create a new module directory with an index.php in it with something like this and then set it as your home module using "Put in Home" link within the modules administration:

Code:


<?php
if ( !defined('MODULE_FILE') ) { die('You can\'t access this file directly...'); }

require_once 'mainfile.php';
$module_name = basename(dirname(__FILE__));
$pagetitle = '- ' . $module_name;
include_once 'header.php';
echo '';
include_once 'footer.php';

?>


I haven't tested this, so not even sure the "echo" line is needed, but essentially this would be a blank module that is simply used to set up the header, the blocks and footer.

_________________
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
danny234







PostPosted: Sat Mar 15, 2008 12:42 pm Reply with quote

Well I don't know how to make a module would it not be easier to change the number of pages for stories/news to appear in the homepage? The lowest it has is 5 there is no option for 0, how could I set this to 0?

Thanks
Danny
 
kguske







PostPosted: Sat Mar 15, 2008 2:10 pm Reply with quote

kguske wrote:
You might try overriding the number of news stories to appear on the front page to zero. This is set in the administration, preferences page, but it probably won't let you set it to zero. Just use phpMyAdmin to change the value of the storyhome field in the nuke_config table.


Did you try this?
 
danny234







PostPosted: Sat Mar 15, 2008 2:54 pm Reply with quote

Kguske, I tried this yeah, I set the value to 0 in the phpmyadmin table for nuke_config and when I went back to my homepage the boxes were still there and a drop down box appeared saying page 1 of 1, in the admin panel it does have 0 now in the make stories in home box but when I post news it's still appearing in my homepage when it is already in my news table box as you can see, here is my link to my site to look at it.

the 2nd box down is the one that keeps appearing.

www.myps3online.co.uk
 
montego







PostPosted: Sun Mar 16, 2008 8:03 am Reply with quote

danny234 wrote:
Well I don't know how to make a module would it not be easier to change the number of pages for stories/news to appear in the homepage? The lowest it has is 5 there is no option for 0, how could I set this to 0?

Thanks
Danny


Danny, I already gave you what you needed. Don't make it more difficult than it needs to be. If you look at your modules directory you see that you just need to create a few sub-directory, give it whatever name you want, but only use characters and no spaces. Then, create a file called index.php in that directory with the code that I already posted above.

The next time you click on the "modules" link within the administration control panel, this module will automatically show up in the list and then you can simply click the link "Put in Home".

You are done....
 
danny234







PostPosted: Sun Mar 16, 2008 9:29 am Reply with quote

Ok so I did what you said Montego, I created a folder in modules, put the code in index.php file then went to modules in admin. I clicked put in home and now when you look at my homepage it pushed the right side blocks off the page for some reason, how do I get the blocks back?

Danny
 
jakec
Site Admin



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

PostPosted: Sun Mar 16, 2008 3:03 pm Reply with quote

Have a read of this post: http://www.ravenphpscripts.com/posts7200-highlight-right+blocks.html
 
View user's profile Send private message
danny234







PostPosted: Sun Mar 16, 2008 5:59 pm Reply with quote

Hi, yeah I looked at thepost and looked in my theme.php but the code it says change to already is what it supposed to be changed to so nothing else in that post that helps. Thanks for the link though.

Danny
 
montego







PostPosted: Mon Mar 17, 2008 5:42 am Reply with quote

danny234, sorry about that. Here is some amended code that should work on far more themes:

Code:


<?php
if ( !defined('MODULE_FILE') ) { die('You can\'t access this file directly...'); }

$index = 1;
define('INDEX_FILE', true);
require_once 'mainfile.php';
$module_name = basename(dirname(__FILE__));
$pagetitle = '- ' . $module_name;
include_once 'header.php';
echo '';
include_once 'footer.php';

?>


You should not have to modify your theme.php file, so make sure and put that back to the way it was.
 
danny234







PostPosted: Mon Mar 17, 2008 7:56 am Reply with quote

Thanks very much Montego, that worked and it's now showing the right blocks. Very Happy

Danny
 
montego







PostPosted: Mon Mar 17, 2008 6:54 pm Reply with quote

Glad that worked.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©