Randomphoto - Configure Source

From TNG_Wiki
Jump to navigation Jump to search
Ambox notice.png The Randomphoto - Configure Source mod changes to TNG randomphoto.php are now part of TNG 8.1.0 and above, so this mod should only be installed on prior versions.
The instructions for customizing the random photo display in customconfig.php under Custom Text Additions heading still apply.
TNG All


Randomphoto - Configure Source
Summary Provides means to configure an alternative image source (Media Collection) from the system deafault ('photos').
Validation The mod is XHTML compliant.Valid-xhtml10.png
Mod Updated {{{mod_last_update}}}
Download link image_source_randomphoto_V8.1.0b.zip
TNG 7.0
TNG 8.0
Download stats
Author(s) Graham Chamberlain
Homepage Randomphoto - Configure Source (This page)
Mod Support [TNG Forums]
Contact Developer TNG Community Forums
Latest Mod 8.1.0 for TNG V8 and TNG V7
Min TNG V 7.1.3
Max TNG V 8.0.2
Files modified
randomphoto.php
Related Mods
Notes


Introduction

This mod was developed to make it easier to configure an alternative image source (Collection ID) for displaying a random image, to the system default.


Developer

Graham Chamberlain developed this mod.

Advantages

Simple configuration of an alternative image source (Media Collection) to the sytem default ("photos") by adding the appropriate Collection ID value for $rp_mediatypeID in customconfig.php.

Revision History

Version Date Contents
v8.1.0b 12 September 2011 Changed name of variable defining Collection ID to $rp_mediatypeID
v8.1.0 23 November 2010 Changed name of variable defining Collection ID to $rp_mediaID
v8.1.0 22 November 2010

Requirements

  • A working TNG installation. The automated installation release was initially tested at TNG Version 8.0.2. No known differences in database or affected file from v7.1.3.
  • An installed current version of the Mod Manager
  • A backup of your TNG randomphoto.php file.

Automated Installation

TNG version: 8.0.2
  1. Download the appropriate file for your TNG version from the download links in the mod summary area in the upper right.
  2. Extract the image_source_randomphoto_V8.1.0b.zip to your admin/mod_folder (V7) or mods (v8).
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the image_source_randomphoto_V8.1.0b.cfg.

Custom Text Additions

Image Source: Add the following to your customconfig.php: '$rp_mediatypeID = "photos";' (without the single outer quotes);
this is the default setting (already defined in randomphoto.php by this mod) which you should change to the appropriate (Collection ID) value for your alternative choice of images.

Note: The Collection ID can be found if you select/edit the relevant collection in Admin/Media.

Image Size: You may like to display your random image a bit larger than the default. Add your preferred maximum image size to customconfig.php (in the root TNG folder) as in the following example:

      $rp_maxwidth = "250";
      $rp_maxheight = "200";

In the event of a problem with your TNG site

  1. Try using the Mod Manager Remove capability
  2. Or copy your randomphoto.php file to your TNG directory
  3. * all should be well now

Sites using this mod

  • Please add TNG sites that you have found that utilize this modification

Site List