I'm using "PHPNews 1.3.0".
I'm working on a wrestling gaming site and I use the phpnews as my newsboard software script. I have a index.php page with a <include ?> code to the news.php page, which that is located www.mydomain.com/news/(news.php HERE).
Now on the index.php page the title of that page shows up at "Site Name - Slogan" and right now on my news.php page it shows up "Site Name - ".
Now what I want to do is make it to where each time someone clicks on a news post the title then will show up as "Site Name - (Title of Story)".
NOTE: While your on the index.php page (HOMEPAGE) when you click on a news post it will open up in the same window but it jumps to the file news.php within that page.
NOTE: index.php Located: http://www.mysite.com/"index.php"
NOTE: news.php Located: http://www.mysite.com/news/"news.php"
Hope you have all the information, if you need anymore please reply and let me know.
Thanks Guys!
Hope to hear from you soon!
Help making a code to get titles from news postings
Moderator: General Moderators
Re: Help making a code to get titles from news postings
Any ideas? Anybody?
Re: Help making a code to get titles from news postings
It doesn't seem like anyone is familiar enough with PHPNews to help you. You want the browser to stay pointed at index.php but display your new new article and show the new title? Do I understand you correctly?
It sounds like you need to make some code to process the news article based on what the user clicked by passing URL parameters like index.php?article=134305 which would cause you index.php page to load the news article the user clicked on.
It sounds like you need to make some code to process the news article based on what the user clicked by passing URL parameters like index.php?article=134305 which would cause you index.php page to load the news article the user clicked on.
Re: Help making a code to get titles from news postings
umm, i think you might have the first part wrong, lets say your on my site. www.mysite.com ok it loads up my site www.mysite.com/index.php. ok now that your on my site you see my news board with the list of latest news, now you click on a news article. now the browser will take you to "www.mysite.com/news/news.php?action=fullnews&id=10" Now the news article you clicked on was added and labled as the 10th story posted on the site, which was auto gen from the phpnews software script as id=10. You still with me?
So if im correct my news does not open in the index.php file it opens into the news dir with a news.php file.
now the page title when on the news article is "Mysite.com - "
I want it to auto get the title of the news that was posted on the site and put it after the "-" so it should be "Mysite.com - TITLE OF NEWS POST" My site is going to be a wrestling gaming site so here is an example of a news story already on the site.
Story TItle "WWE '12: Updated Roster"
Now i want that news post to display a title of "Mysite.com - WWE '12: Updated Roster"
And change with every story as its entered into our system.
Hope you understand. if you need some more explaining i can call you or you can call me. Thanks Eric
So if im correct my news does not open in the index.php file it opens into the news dir with a news.php file.
now the page title when on the news article is "Mysite.com - "
I want it to auto get the title of the news that was posted on the site and put it after the "-" so it should be "Mysite.com - TITLE OF NEWS POST" My site is going to be a wrestling gaming site so here is an example of a news story already on the site.
Story TItle "WWE '12: Updated Roster"
Now i want that news post to display a title of "Mysite.com - WWE '12: Updated Roster"
And change with every story as its entered into our system.
Hope you understand. if you need some more explaining i can call you or you can call me. Thanks Eric
Re: Help making a code to get titles from news postings
I got to working, thanks for those who tried.