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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 572
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 146
  • Total: 146

Change to Recent Articles Snippet

Started by Maddog452, November 01, 2007, 07:16:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jacortina

Try this. On that very first line:
$board = 6;

Change it to:
$boards = array(6, 7, 8); // All the boards you want to include

Then find this line:
WHERE ID_BOARD = $board

And change it to:
WHERE ID_BOARD IN (" . implode(', ', $boards . ")

Change the value for $limit to change how many recent topics are shown.

This wil get the most recent topics from ANY of those boards. This does NOT get 5 or 6 (or however many) from EACH of those boards (you will get a TOTAL of $limit topics, but they will be the most recent when look at all of the boards given).


Maddog452

#12
Lebisol

Quotetry this snip: http://www.tinyportalmedia.com/main/index.php/topic,1246.new.html
Will have a go with the stuff JAC has done for me.  It has some Membergroup issues attached to it but I do like the simplicity of it.
Thanks

J.A.C

Once again, increadible response time.  You rock!!.
QuoteThis wil get the most recent topics from ANY of those boards. This does NOT get 5 or 6 (or however many) from EACH of those boards (you will get a TOTAL of $limit topics, but they will be the most recent when look at all of the boards given).

That is exactly what I was after - Thanks again.  My site is nearing completion - I am now ready to rule the world  :uglystupid2: (Sorry - Did I type that out load)!

Cheers

DM

[EDIT]

I get an error -
QuoteParse error: syntax error, unexpected ';' in /home/the15537/public_html/forum/Sources/Load.php(1752) : eval()'d code(35) : eval()'d code on line 72

Dragooon

Quote from: Maddog452 on December 16, 2007, 07:24:20 AM
Lebisol

Quotetry this snip: http://www.tinyportalmedia.com/main/index.php/topic,1246.new.html
Will have a go with the stuff JAC has done for me.  It has some Membergroup issues attached to it but I do like the simplicity of it.
Thanks
Since i created it, what do you mean by some "MemberGroup issues"?

And about your error,
Replace the second part with WHERE ID_BOARD IN (" . implode(', ', $boards) . ")

Maddog452

#14
I meant that my site has membergroup issues!!.  I only want certain membergroups to see stuff.  I havent' tried your mod yet.  Sorry for the confusion

Dog

[EDIT]  Your correction did the trick - Its amazing how something so small will kill the entire lot!!

Thanks
JAC and Dragooon

Dragooon


lebisol

There you Maddog452 and again mainly postoing back to give Dragoon credit for his support of scripts, nice work as always!

This website is proudly hosted on Crocweb Cloud Website Hosting.