Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 08:52:15 PM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 60
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 53
Total: 53

Author Topic: [Discussion] Simple Article Index  (Read 25397 times)

0 Members and 1 Guest are viewing this topic.

Offline Ken.

  • Support Team
  • *
  • Posts: 4362
    • Our FamilyForum
Re: Simple Article Index
« Reply #10 on: September 19, 2010, 08:32:06 AM »
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.

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: Simple Article Index
« Reply #11 on: September 19, 2010, 08:49:23 AM »
@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 :)

Offline lurkalot

  • Administrator
  • *
  • Posts: 7409
    • Camera Craniums
Re: Simple Article Index
« Reply #12 on: September 19, 2010, 08:58:45 AM »
Thanks Freddy, that sorted it.  You're a star m8.  O0

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: Simple Article Index
« Reply #13 on: September 19, 2010, 09:11:10 AM »
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

Offline Ken.

  • Support Team
  • *
  • Posts: 4362
    • Our FamilyForum
Re: Simple Article Index
« Reply #14 on: September 19, 2010, 12:04:10 PM »
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.

Offline Freddy

  • Moderator
  • *
  • Posts: 1615
    • AiDreams
Re: Simple Article Index
« Reply #15 on: September 19, 2010, 02:16:50 PM »
That's why coding is such fun  :o

Offline SN

  • Full Member
  • ***
  • Posts: 137
    • SpursNetwork - Tottenham Hotspur Fansite
Re: Simple Article Index
« Reply #16 on: September 20, 2010, 10:44:43 AM »
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.

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Simple Article Index
« Reply #17 on: September 20, 2010, 03: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

Offline SN

  • Full Member
  • ***
  • Posts: 137
    • SpursNetwork - Tottenham Hotspur Fansite
Re: Simple Article Index
« Reply #18 on: September 21, 2010, 02:56:27 AM »
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

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: Simple Article Index
« Reply #19 on: September 21, 2010, 08:53:41 AM »
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