| Author |
Message |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
Lots of questions... |
|
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 |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
x-byte
Joined: 14 Nov 2005 Posts: 170
|
|
|
|
Use this in your include-code:
PHP_SELF="news.php";
It should work
|
|
| Wed Dec 21, 2005 1:14 am |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
Thanks. I'll try that and get back to you.
|
|
| Wed Dec 21, 2005 1:40 am |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
I tried that but it still doesn't work. The full news page still uses index.php
 |  | <?php
$number = 7;
$PHP_SELF = 'news/news.php';
//$sort = array('title', 'ASC');
include 'cutenews/show_news.php';
?> |
|
|
| Wed Dec 21, 2005 4:33 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
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 |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
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
 |  | [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 |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
I also need to display some articles from one category with headlines only. Is this the right code to put in?
 |  |
<?php
//$sort = array('title', 'ASC');
if (!$category || !$ucat) { $category = "Interviews"; }
include 'cutenews/show_news.php';
?>
|
I'm not sure about the following part:
 |  | if (!$category || !$ucat) { $category = "Interviews"; } |
|
|
| Wed Dec 21, 2005 7:55 pm |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
 |  | I also need to display some articles from one category with headlines only. Is this the right code to put in?
 |  |
<?php
//$sort = array('title', 'ASC');
if (!$category || !$ucat) { $category = "Interviews"; }
include 'cutenews/show_news.php';
?>
|
I'm not sure about the following part:
 |  | if (!$category || !$ucat) { $category = "Interviews"; } |
|
Or maybe the following would work? But its not working still. lol
 |  | <?php
//$sort = array('title', 'ASC');
$category = "2";
include 'cutenews/show_news.php';
?> |
|
|
| Wed Dec 21, 2005 8:38 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Try this:
 |  | <?php
include 'cutenews/head.php';
$number = 7;
$category = 2;
$template = "Headlines";
include $cutepath.'/show_news.php';
?> |
|
|
| Wed Dec 21, 2005 11:08 pm |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
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 |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
 |  | 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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
| Thu Dec 22, 2005 12:02 am |
|
 |
Faizan

Joined: 11 Dec 2005 Posts: 43
|
|
|
|
Okay I got everything up and running. I wanna thank you all for your help.
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Do you have [full-link] [/full-link] around your read more link?
|
|
| Thu Dec 22, 2005 10:40 am |
|
 |
|