Randomphoto - Configure Source
![]() |
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. |
|
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.![]() | ||
Mod Updated | {{{mod_last_update}}} | ||
Download link | image_source_randomphoto_V8.1.0b.zip
| ||
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 |
- Download the appropriate file for your TNG version from the download links in the mod summary area in the upper right.
- Extract the image_source_randomphoto_V8.1.0b.zip to your admin/mod_folder (V7) or mods (v8).
- 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
- Try using the Mod Manager Remove capability
- Or copy your randomphoto.php file to your TNG directory
- * all should be well now
Sites using this mod
- Please add TNG sites that you have found that utilize this modification