The vB Geek

The vB Geek (
-   Add-ons (
-   -   PhotoPlog Random Thumbs in GARS (

Morgan 06-14-2008 10:10 AM

PhotoPlog Random Thumbs in GARS
1 Attachment(s)
This module will display random images from PhotoPlog in GARS. You must have both GARS Pro and PhotoPlog Pro installed for this modules to work.

Installation Steps:
  1. Please note that this module is beta and not supported.
  2. FTP the various PHP files into their corresponding directories on the server:
    • /geek/gars/mods/display
    • /geek/gars/mods/persist
    • /geek/gars/mods/settings
    • /geek/gars/mods/persistsettings
  3. Go to the ACP -> GARS -> Modules -> Register New Module and set the following options:
    • Title: PhotoPlog Random Thumbs
    • Module File: photoplog_random_thumbs.php
    • Comma seperated list of templates to cache: GARS_mod_container
    • Save
  4. Go to the ACP -> GARS -> Modules -> click a module set where you'd like the new module.
  5. Use the Add Modules box to add the new module to the Showthread page:
    • Left drop down menu: PhotoPlog Random Thumbs
    • Right drop down menu: the location you'd prefer
    • Save
  6. Click the PhotoPlog Random Thumbs link:
    • Cache Method: select either Don't Cache or On Edit/New Thread
    • What is the maximum number of images to show: enter a positive number
    • Set the remaining options as you'd prefer
    • Save
  7. Visit a GARS-based showthread page on your site that uses the module set you selected in step three.
  8. Want random images from only the author of the first post to appear?
    • In the /geek/gars/mods/display/photoplog_random_thumbs.php file find the following:

      WHERE moderate = 0
    • Replace that line with the following:

      WHERE moderate = 0 AND userid = " . intval($post['userid']) . "
    • Go back to step five and select Don't Cache for the Cache Method
  9. Cost of installing this module?
    • One query added to process the first post in a GARS-based showthread page using this module
    • Trade-off with some overhead/processing if you choose to cache rather than not cache the module
    • ORDER BY RAND() queries are notoriously bad in that they scan way too many rows in the table
      • You can limit the number of rows that are scanned by selecting category IDs in step five
      • If your equipment is weak or your gallery is large, test the module for performance

Cocko 11-12-2008 07:35 AM

Sounds interresting, I'll look into this in combination with release add-on.

All times are GMT. The time now is 05:42 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

Release powered by GARS 2.1.9 ©2005-2006