Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
More than 1 cutenews on 1 page

 
Reply to topic    Forum Index » Help View previous topic
View next topic
More than 1 cutenews on 1 page
Author Message
Yoshiii



Joined: 29 Feb 2008
Posts: 58

Post More than 1 cutenews on 1 page Reply with quote
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 View user's profile Send private message
Guest








Please login to hide the ads.

SolidSnake2003



Joined: 31 Jul 2007
Posts: 54

Post Reply with quote
Yes you can, just place them where you want it
Sat Jun 14, 2008 5:55 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
lol yeah

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Sat Jun 14, 2008 11:08 am View user's profile Send private message Visit poster's website AIM Address
Yoshiii



Joined: 29 Feb 2008
Posts: 58

Post Reply with quote
If that would work then i wouldn't have asked Wink

If i add more than one, then only the first shows.
Thu Jun 19, 2008 4:01 pm View user's profile Send private message
Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
You need to use the static command:

Quote:
<?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 View user's profile Send private message
Yoshiii



Joined: 29 Feb 2008
Posts: 58

Post Reply with quote
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 View user's profile Send private message
Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
Odd... could you post the full source-code of that site in here? (Don't forget to remove security-related stuff. Wink)

_________________
Mini-me
Fri Jun 20, 2008 2:25 am View user's profile Send private message
Prof



Joined: 08 Nov 2007
Posts: 14

Post Reply with quote
I use this code for various CNR in the same page:
Code:
<?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! Wink

_________________
www.emorbita.net
Thu Jun 26, 2008 12:12 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
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:
Code:
<?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:
Code:
<?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 Smile
last update: 07-22-08: 8:30 pm
Tue Jul 08, 2008 8:36 pm View user's profile Send private message Visit poster's website AIM Address
piotreq



Joined: 19 Jul 2008
Posts: 2

Post Reply with quote
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 View user's profile Send private message
Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
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 View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
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 Smile
last update: 07-22-08: 8:30 pm
Wed Jul 30, 2008 5:08 pm View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
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 cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.