Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I wanted a pal that showed the latest files added to a specific forum. I'm using one board as a file archive, and I wanted to be able to list the latest files added to that archive.

This pal is quite versatile, you can use it as either one of the customboxpals by just setting the number in the variable at the top of the script. There are also a lot of other variables to edit: select which forums to grab files from, what info to show and in what order, what to sort by (date, downloads, rating etc) and whether to only grab files from main posts or from any posts. Each variable is described in full in the script.

Install instructions:
Save this file over the first empty customboxXpal.php file and set the number you chose in the variable $custombox inside the script. After that you can go to the IIP configuration and select where this box should be shown. If you want you can also customize what info to show inside the script.

The pal is written for IIP 5.3 but works for 5.1 as well.


Updated
Updated to 1.1 which contains some small bugfixes when having several forums.
Attachments
72472-latestfilespal-1_1.txt (0 Bytes, 70 downloads)

Last edited by Gardener; 03/12/2003 7:02 PM.
Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Seems this wasn't very popular at all, not even a comment. Or did it just get lost among everything else?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This looks cool... although I didn't have time to play yet.

I'd like to get this up and running at measurection when I have time.

Will let you know how it goes....

Perhaps we also should try it here for the most recent mods to download.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK -

I tested this here. We had this big empty space on the front page... .thought it might be cool to show latest or most recent downloads.

It's pretty cool.

One problem.... I tried to restrict it to our mods forums, integration and the template and css forums.... but when I listed the keywords with commas, I get an error on the query.

I tried to see what might be wrong, but couldn't figure it out easily. You might be able to tell off the top of your head.

Thanks.
Josh

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Would be nice if I could see the error... =] Also, I'd like to see exactly what you put in the config.

It worked when I tried it out. One thing, you can't have spaces between the keywords and commas, that'll probably send it out of whack.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK -

here's what I put:

$lf_filesforum = "beta,finished,integration,templates,css";


Here's the error:
SQL ERROR: Wed, Mar 12 2003 14:02:02 -0800 Unable to do_query: SELECT B_Number,B_Posted,B_Subject,B_Replies,B_Board,B_File,B_FileCounter,B_Rating,B_Rates,B_Counter,Bo_Title,U_Username,B_PosterId FROM w3t_Posts AS t1, w3t_Boards AS t2, w3t_Users AS t3 WHERE t1.B_Board = t2.Bo_Keyword AND t1.B_PosterId = t3.U_Number AND B_Approved = 'yes' AND B_File != '' AND B_Main = B_Number AND () ORDER BY B_Posted DESC LIMIT 20
You have an error in your SQL syntax near ') ORDER BY B_Posted DESC LIMIT 20 ' at line 11
Warning: Supplied argument is not a valid MySQL result resource in /home/virtual/site2/fst/var/www/html/threads/php/mysql.inc.php on line 157

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Well... I think I know why it happens. The IIP is set to force public, so the pal removes all forums from the list that aren't accessible by all, which leaves no boards left to search in.

Should probably add a check that there are any forums left before doing the query so that it won't just break.

But I don't think it would be a good idea to ignore the force public option...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I checked when I logged out.... it still showed files for forums that they couldn't see. But then when you clicked... it told them they had to login (the access denied message - which I'd tweaked a bit). So I didn't figure that was bad. Let them see what they are missing to encourage registrations. Especially if the file sounds cool.

Daine #239393 03/12/2003 7:01 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Yeah, it seems I've done a logical error in the code, as well as a nasty little bug.

I'll update the first post of this thread with v1.1 which hopefully fixes the bug you encountered and some other small things. I'm still not convinced that I'm using the force_public right but I think it works like you want it to, so I'll leave it at that for now. =]

c0bra #239394 07/15/2003 11:35 PM
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Gardener, this is perfect for my site. Thanks for posting it

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)