| Author |
Message |
Yoshiii
Joined: 29 Feb 2008 Posts: 58
|
|
More than 1 cutenews on 1 page |
|
How can i add more than 1 cutenews on 1 page?
Example:
<?PHP
include 'head.php';
$category = "2";
$number = 50;
$template = 'Headlines';
include $cutepath.'news/show_news.php';
?>
<?PHP
include 'head.php';
$category = "2";
$number = 50;
$template = 'Headlines';
include $cutepath.'news/show_news.php';
?>
|
|
| Fri Jun 13, 2008 6:48 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
SolidSnake2003

Joined: 31 Jul 2007 Posts: 54
|
|
|
|
Yes you can, just place them where you want it
|
|
| Sat Jun 14, 2008 5:55 am |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
| Sat Jun 14, 2008 11:08 am |
|
 |
Yoshiii
Joined: 29 Feb 2008 Posts: 58
|
|
|
|
If that would work then i wouldn't have asked
If i add more than one, then only the first shows.
|
|
| Thu Jun 19, 2008 4:01 pm |
|
 |
Syrion

Joined: 02 Aug 2006 Posts: 172
|
|
|
|
You need to use the static command:
 |  | <?php $static['template'] = 'templatename';
$static['number'] = 1;
$static['category'] = 6;
include 'path/to/show_news.php' ?> |
Please read the manual for all options.
By the way: only use the head-inclusion once at the start of the page (I suggest just before the </head>-tag).
_________________
Mini-me |
|
| Thu Jun 19, 2008 8:41 pm |
|
 |
Yoshiii
Joined: 29 Feb 2008 Posts: 58
|
|
|
|
Ah yes, i forgot.
So now i have this:
<?PHP
$static['template'] = 'Temp';
$static['number'] = 1000;
$static['category'] = 1;
include $cutepath.'news/show_news.php';
?>
<?PHP
$static['template'] = 'Temp';
$static['number'] = 1000;
$static['category'] = 2;
include $cutepath.'news/show_news.php';
?>
But still only showing the first...
|
|
| Thu Jun 19, 2008 9:46 pm |
|
 |
Syrion

Joined: 02 Aug 2006 Posts: 172
|
|
|
|
Odd... could you post the full source-code of that site in here? (Don't forget to remove security-related stuff. )
_________________
Mini-me |
|
| Fri Jun 20, 2008 2:25 am |
|
 |
Prof
Joined: 08 Nov 2007 Posts: 14
|
|
|
|
I use this code for various CNR in the same page:
 |  | <?PHP
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here we decide what page to include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
$static = TRUE;
$number = "15";
$category = 1';
include("your_path_to/show_news.php");
?> |
I hope this help you! 
_________________ www.emorbita.net |
|
| Thu Jun 26, 2008 12:12 am |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
Scrap all that. I didn't pay attention to the fact you included head.php twice. You do not need to use 'static' stuff. If it works with the 'static' information that's great although I'm sure it isn't really making any difference.
You put:
 |  | <?PHP
include 'head.php';
$category = "2";
$number = 50;
$template = 'Headlines';
include $cutepath.'news/show_news.php';
?>
<?PHP
include 'head.php';
$category = "2";
$number = 50;
$template = 'Headlines';
include $cutepath.'news/show_news.php';
?> |
Try this instead:
 |  | <?php include 'head.php'; ?>
<?PHP
$category = "2";
$number = 50;
$template = 'Headlines';
include $cutepath.'news/show_news.php';
?>
<?PHP
$category = "2";
$number = 50;
$template = 'Headlines';
include $cutepath.'news/show_news.php';
?> |
Although you're using $cutepath in your show_news.php includes and not in your include for head.php so watch out for that. Just make sure you're linking to the write path for both those files, they're in the same directory. Now that head.php is included ONCE you should be able to include show_news.php as much as you like.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue Jul 08, 2008 8:36 pm |
|
 |
piotreq
Joined: 19 Jul 2008 Posts: 2
|
|
|
|
for example: I have 2 program cutenews on 1 page
<?PHP
include $cutepath.'news2/head.php';
$static['template'] = 'Temp';
$static['number'] = 1000;
$static['category'] = 1;
include $cutepath.'news2/show_news.php';
?>
<?PHP
include $cutepath.'news/head.php';
$static['template'] = 'Temp';
$static['number'] = 1000;
$static['category'] = 2;
include $cutepath.'news/show_news.php';
?>
showing posts only first block, is it possible to showing posts from two block? Can I load different head.php more than one?
|
|
| Mon Jul 28, 2008 3:34 pm |
|
 |
Syrion

Joined: 02 Aug 2006 Posts: 172
|
|
|
|
Why would you like to have two installations of CuteNews?
I doubt that will even work because they'll probably conflict each other?
_________________
Mini-me |
|
| Mon Jul 28, 2008 5:51 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
yes they will conflict cause you have head.php included twice now and the whole script/website is going WTF
there is a way around it somewhere on the forum though... i think.. i can't remember exactly where or what it was called.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Wed Jul 30, 2008 5:08 pm |
|
 |
|