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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 447
  • Total: 447

[Block] SMF Gallery Random Picture

Started by Thurnok, December 01, 2006, 09:32:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vanguard

Just installed it and it works great!!!


Thank you!!!

Thurnok

Quote from: Mannie on March 11, 2007, 06:30:26 PM
Can you also do a latest images block for smf gallery pro ?
I've already been thinking about modifying this block to allow the admin to select options for:
- latest x number of pix
- most viewed x number of pix
- most commented x number of pix
- top pic poster's x number of pix

also thinking about adding a slideshow option for the future...

Mannie

 :up:
That would be great, specially for my site



Thurnok

Quickie update by request at my TPBlocks site:

Update 1.3
  • added ability to display pics only from categories you specify (example: $allowCats = "1,3,9")
  • disallowed categories override allowed categories (example: $disallowCats = "3" -- prevents category 3 pics from being displayed even tho above example has it in $allowCats)
see code for info

Updated code in first post

Thurnok

This update will be good for you if you have many categories and only want random pics from 1 or a few categories.  Easier than putting alot of categories in the $disallowCats variable. Also prevents you from having to add more categories to the $disallowCats every time you create more SMF Gallery categories that you do not want random pics displayed from.

Thurnok

Update 1.4
  • added ability to choose between recent pics and random
  • added sort option so can display (x) most recent or oldest pics
see code for info

Updated code in first post

Thurnok

Update 1.5
  • added ability to choose between random or most/least recent/viewed/commented  pictures
  • added sort option to display (x) most/least of above options
see code for info

Updated code in first post

Thurnok

Here's a screenshot of some sample uses...

This website is proudly hosted on Crocweb Cloud Website Hosting.