Php Arcade Script Forums
May 19, 2013, 02:37:26 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Recover your password to gain access to the forum. If you own a phpAS license you don't have to register a new account.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: News Page ?  (Read 2058 times)
Searchtheweb
Newbie
*
Posts: 35


View Profile Email
« on: April 26, 2011, 08:56:20 AM »

Hi,

JanArve, as you already know, i posted before about the need of news area improvement. My website runs on PhpAS 3.0 and I would like to build a page where all my news item would be.

Any idea on how may i achieve that ?

baseurl/stiri/newsid/news.html

stiri means news in Romanian

I would need something in the form of the memberlist, i guess...

Thank you in advance

Best regards,

Searchtheweb
« Last Edit: November 28, 2012, 03:41:00 AM by Searchtheweb » Logged
JanArve
*
Posts: 135


View Profile Email
« Reply #1 on: April 26, 2011, 09:25:44 AM »

Hey,

The news items are stored in the "news" table in the database so you could do a query similar to how the games are listed and list the last 10 news items:

Code:
SELECT * FROM news WHERE status = 1 ORDER BY id DESC LIMIT 10

And then display the news in some fashion. The above will display based on news item id, replace "id" with "date" to sort by the date instead.

"title" and "text" and "date" are the other fields in this table.
Logged
Searchtheweb
Newbie
*
Posts: 35


View Profile Email
« Reply #2 on: April 27, 2011, 07:11:10 AM »

I solved it. I used your query and the memberlist.php file, a little bit modified and it works.

Thank you very much.
« Last Edit: November 28, 2012, 03:40:34 AM by Searchtheweb » Logged
JanArve
*
Posts: 135


View Profile Email
« Reply #3 on: April 27, 2011, 08:42:48 AM »

Looks good, nice work Smiley
Logged
Searchtheweb
Newbie
*
Posts: 35


View Profile Email
« Reply #4 on: April 29, 2011, 06:16:39 AM »

Thank you very much. I'm trying to do my best.

It would be useful, for future phpAS versions, to have a tiny text editor at the game description textarea to help us insert faster a link on a given word.

Best regards,

Searchtheweb
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!