1 (edited by 2012-05-06 01:24:11)

Topic: Different Directories Effecting the Headlines Template

I read the stickied topic and noticed people don't actually go to this website anymore? That's a shame because I really need some help.

I am currently using the Cutenews Headlines template (that is, just showing news titles) in my Footer php file, so it shows up on every page. Some of my pages, however, are located in different directories - and while the Headlines still show up, the links to the news pages don't work.

For example. On my main page, the links work as they should. "index.php?subaction=..." etc.

But the rest of my pages are in different directories, such as "mysite.com/about/faq/". When viewing that page, the Headlines will still be there in the footer, but when I click on them, they don't take me to the actual news page. They don't take me anywhere. It becomes "mysite.com/about/faq/index.php?subaction=..." which doesn't exist =/

I tried doing a search using terms such as "directory issue" but couldn't find anything. If this answer has already been discussed, I apologize. Some help would be GREATLY appreciated! <3

Edit: I managed to figure it out ^__^ I scanned the FAQ and while I didn't understand what " $PHP_SELF" meant at the beginning, (I'm a n00b), I played around with it for a while until it did what I wanted. I guess I posted this too soon =P

Re: Different Directories Effecting the Headlines Template

Dear User!

Thank you for contacting us and reporting on this issue. You should try using the several types of scripts. In the block where you want to see the full news in a file "index.php" mysite.com/about/faq/index.php please use the following code:

 <?php if (!empty($_GET['subaction']) && $_GET['subaction'] == 'showfull') { $template = "Default"; include ('.....path/to/show_news.php'); } ?>

This block must be on the every page with the news got from id of the Headlines pattern.
The meaning of the problem is that the pattern Headlines tries to access itself to expand over the news, but it can not because this pattern includes no information on the full page, so you have to use the above mentioned code on any page.
This is due to some incomplete template features in the CuteNews 1.4.7.



Best regards,
CN Support team

Re: Different Directories Effecting the Headlines Template

Dear User!

Thank you for contacting us and reporting on this issue. You should try using the several types of scripts. In the block where you want to see the full news in a file "index.php" mysite.com/about/faq/index.php please use the following code:

 <?php if (!empty($_GET['subaction']) && $_GET['subaction'] == 'showfull') { $template = "Default"; include ('.....path/to/show_news.php'); } ?>

This block must be on the every page with the news got from id of the Headlines pattern.
The meaning of the problem is that the pattern Headlines tries to access itself to expand over the news, but it can not because this pattern includes no information on the full page, so you have to use the above mentioned code on any page.
This is due to some incomplete template features in the CuteNews 1.4.7.

Or he could just use $PHP_SELF, like he said in his post... Also, great job with the solution, I'm sure that will work just as fine as $PHP_SELF...  http://cutephp.com/forum/style_emoticons/default/rolleyes.gif