Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Lots of questions...
Goto page 1, 2  Next
 
Reply to topic    Forum Index » Help View previous topic
View next topic
Lots of questions...
Author Message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Lots of questions... Reply with quote
Displaying the news in a specific template



So I'm displaying the news at

http://www.priyankachopra.org/v2/



But when I click on the FULL news link, I get a template that I don't want. It uses v2/index.php to display the news. I want it to use v2/news/news.php instead. Is it possible?



And this is (kind of) how I want the news to look like when it's displayed:

http://www.priyankachopra.org/v2/priyanka/biography.php

(but ignore this page in codes etc, its just to show an example of the layout)


Last edited by Faizan on Wed Dec 21, 2005 11:56 pm; edited 1 time in total
Wed Dec 21, 2005 12:18 am View user's profile Send private message
Guest








Please login to hide the ads.

x-byte



Joined: 14 Nov 2005
Posts: 170

Post Reply with quote
Use this in your include-code:



PHP_SELF="news.php";



It should work
Wed Dec 21, 2005 1:14 am View user's profile Send private message Visit poster's website
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
Thanks. I'll try that and get back to you.
Wed Dec 21, 2005 1:40 am View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
I tried that but it still doesn't work. The full news page still uses index.php



Code:
<?php

   $number = 7;

   $PHP_SELF = 'news/news.php';

   //$sort = array('title', 'ASC');

   include 'cutenews/show_news.php';

?>

Wed Dec 21, 2005 4:33 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
This is another way to direct news to a different file:



Go to Options-> User Friendly Urls and put this in above [rss]:



[test]

post = "{year}/{month}/{day}/{title}.html"



Then edit your template and change {link=home/post} to {link=test/post}



Finally, create a file test.php in your cutenews main directory and put in a normal include code to show the news.



You can change the paths if you want to. For example, [../test] and {link=../test/post} would link to a file one directory below your cutenews directory.
Wed Dec 21, 2005 6:32 pm View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
Thanks a lot. I got it to work different. I created a blank page called full-news.php and used that as the template instead and it was very easy. I just changed the page name in system settings and it did the trick.



Now I'm having a problem with [full-link]. I put the code fine but it doesn't display as a link

Code:
[full-link]<strong>[Read more]</strong>[/full-link]




Nevermind, I did a lil search around here and found an answer. Thanks a lot!!


Last edited by Faizan on Wed Dec 21, 2005 8:22 pm; edited 1 time in total
Wed Dec 21, 2005 7:48 pm View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
I also need to display some articles from one category with headlines only. Is this the right code to put in?



Code:


<?php

//$sort = array('title', 'ASC');

if (!$category || !$ucat) { $category = "Interviews"; }

include 'cutenews/show_news.php';

?>





I'm not sure about the following part:

Code:
if (!$category || !$ucat) { $category = "Interviews"; }

Wed Dec 21, 2005 7:55 pm View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
Faizan wrote:
I also need to display some articles from one category with headlines only. Is this the right code to put in?



Code:


<?php

//$sort = array('title', 'ASC');

if (!$category || !$ucat) { $category = "Interviews"; }

include 'cutenews/show_news.php';

?>





I'm not sure about the following part:

Code:
if (!$category || !$ucat) { $category = "Interviews"; }




Or maybe the following would work? But its not working still. lol



Quote:
<?php

//$sort = array('title', 'ASC');

$category = "2";

include 'cutenews/show_news.php';

?>

Wed Dec 21, 2005 8:38 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Try this:

Code:
<?php

include 'cutenews/head.php';



$number = 7;

$category = 2;

$template = "Headlines";

include $cutepath.'/show_news.php';

?>

Wed Dec 21, 2005 11:08 pm View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
That works well, thank you!!



Last question, hopefully.

I've been trying to add new articles and it hasn't been displaying them on the site although they display fine in the news admin. Any idea why this would be?
Wed Dec 21, 2005 11:52 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
So you can see your imported news on the page but you can't see newly added news?
Thu Dec 22, 2005 12:00 am View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
FI-DD wrote:
So you can see your imported news on the page but you can't see newly added news?




Yeah, thats right. If possible, can I PM you my id and password for the cutenews and you can look at it?
Thu Dec 22, 2005 12:01 am View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Sure. Smile
Thu Dec 22, 2005 12:02 am View user's profile Send private message
Faizan



Joined: 11 Dec 2005
Posts: 43

Post Reply with quote
Okay I got everything up and running. I wanna thank you all for your help. Very Happy















And.. I have ONE final question. It's weird when I don't have anything in my full story box, it still displays a read more link. Is there anything we can do about it?
Thu Dec 22, 2005 2:59 am View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Do you have [full-link] [/full-link] around your read more link?
Thu Dec 22, 2005 10:40 am View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
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.