TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 03:59:12 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 247
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 265
  • Total: 265

[Discussion] Simple Article Index

Started by freddy888, October 08, 2009, 02:53:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ken.

Quote from: Freddy on September 19, 2010, 01:37:18 PM
HI Ken,

I think you just need to change this part :

$request = db_query etc etc

to

$request = tpdb_query etc etc..



That works, thanks Freddy.  O0
http://www.ourfamilyforum.org/FamilyForum/index.php?page=216
Now I just need to move some of my articles into the proper categories.  ^-^
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Freddy

@Lurkalot, Sorry about that, I took the code from my site, which is slightly different.  I have amended the two lines and they appear to work okay now.  ::)

@Ken, glad to hear it :)

lurkalot

Thanks Freddy, that sorted it.  You're a star m8.  O0

Freddy

Hehe thanks :)

This code now has a home in the new snippets area, where the updated and correct code can be found :

http://www.tinyportal.net/index.php?topic=33208

Ken.

You know how sometimes you get one of those "Doh!" moments? 

If I copy&paste the code directly from Freddy's post it works just fine, but I wanted to do some editing so I placed it in Notepad++, did my edits and then pasted the resulting code to my article which promptly broke and gave me an error page.  :tickedoff:

You likely already know the problem... Notepad++ was set to 'Normal Text', not to 'PHP'.  :-[ 
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Freddy

That's why coding is such fun  :o

SN

Quote from: Freddy on September 19, 2010, 02:04:00 PM
Hi SN, read above...

Oops Sorry Freddy, i don;t know how i missed that  :idiot2:

Its working great now thanks  O0

This is abit of a odd request, but is possible to have this in a PHP block, limited to only 5 articles for the block. without The heading area and excluding the latest 2 ( or what ever number people want to exclude ) articles by date?

The reason i ask for this is because, on my site i display 2 articles on my front page, and i have been looking for a way to list the previous 5 articles under that in a list just how you have listed it in this code.

ZarPrime

Wow, that really is an odd request ~ query for the last 7 but only show the first 5 of those last 7? :D

ZarPrime

SN

Quote from: ZarPrime on September 20, 2010, 10:56:44 PM
Wow, that really is an odd request ~ query for the last 7 but only show the first 5 of those last 7? :D

ZarPrime

;D yeah basically lol.

don;t worry if it to much hassle...it's just something i have wanted to do for some time now. so i thought i would just put it out there :P

ZarPrime

Well, I don't know if I could figure it out but Freddy may be able to.  I was just confirming your observation that it really is an odd request. ;)

ZarPrime