Auto Email Original

From TNG_Wiki
Jump to: navigation, search
Auto Email Original
Summary Adds a link for users to request high resolution image originals to be emailed
Validation This mod is XHTML compliant.Valid-xhtml10.png
Mod Updated 31 Oct 2018
Download link For
TNG 12.0
Auto_Email_Original_v12.0.2.4.zip
For
TNG 10.0
Auto_Email_Original_v10.0.0.1.zip
For
TNG 8.1.3
Auto_Email_Original_v8.1.1.zip
For
TNG 8.1
Auto_Email_Original_v8.1.0.zip
For
TNG 7.0
Auto_Email_Original_v2.2e.zip
Download stats {{{download_stats}}}
Author(s) Harold Roberts v7,v8,v12;
Brian McFadyen v10
Homepage Auto Email Original (this page)
Mod Support TNG Community Forums
Contact Developer Mod Support
Latest Mod 12.0.2.4 for TNG V12
10.0.0.1 for TNG V10
8.1.0 for TNG V8
2.2e for TNG V7
Min TNG V 7.0.3
Max TNG V 12.0.2
Files modified
showmedia.php
showmedialib.php
Related Mods
Notes
The email fields must be customized after installation using the EDIT button in the Mod Manager


Purpose of the mod

This mod allows an owner to create a link within pictures that allows an authorized user to request a high quality copy of the picture without bugging the owner. It requires creating an original folder on the server and placing high quality copies of the pictures within this directory. The end user then clicks the link and a copy of the image is emailed to them at the email address they registered with.

This mod applies to TNG 7.0.3 and up

Developer

This mod was developed by Harold Roberts

Requirements

  • A working TNG installation. The automated installation release was initially tested at TNG Version 7.1.0. Manual installation previously used on TNG 7
  • A backup of the following TNG files:
    • showmedia.php
    • showmedialib.php

Automated Installation v.7.1.0 or higher

  1. An installed current version of the Mod Manager.
  2. This requires the latest version of Mod Manager.
  3. Download the appropriate .zip from the above status box
  4. After downloading the config file, unzip it into the ./admin/mod_folder for V7 or ./mods for V8 and up, and then follow the normal automated installation for Mod Manager mods.
  5. You MUST use the Mod Manager EDIT button to customize the email fields to enable this mod to function

Manual Installation

1. Copy the following files to your extensions folder beneath your TNG folder (i.e. genealogy/extensions)

a. auto_mail.php

b. send_attachment.php

2. Copy the following file to your TNG Root Directory (i.e. genealogy)

a. emailpopup.js

3. Make a copy of the following files.

a. showmedialib.php

b. showmedia.php

4. Make the following changes to showmedialib.php (inside the Function showTable)

a. Line 384 after the existing global line, add the following:

     global $mediaID;
     $high .= "<a href='extensions/auto_mail.php?mediaID=$mediaID' onclick='openwindow(this.href); return false'><strong>$text[emailclickmessage]</strong></a>" ;

b. Line 403 add the following:

    $tabletext .= showEvent( array( "text"=>$text[emaildisplaymessage], "fact"=>$high ) );

5. Add the following line to showmedia.php

a. Line 150 after: $flags[scripting] .= "<script type=\"text/javascript\" src=\"$cms[tngpath]" . "slideshow.js\"></script>\n";

    $flags[scripting] .= "<script type=\"text/javascript\" src=\"$cms[tngpath]" . "emailpopup.js\"></script>\n";

The whole section should now look like this:

    if(!$tngprint) {
        $flags[scripting] .= "<script type=\"text/javascript\" src=\"$cms[tngpath]" . "slideshow.js\"></script>\n";
        $flags[scripting] .= "<script type=\"text/javascript\" src=\"$cms[tngpath]" . "emailpopup.js\"></script>\n";
        $flags[scripting] .= "<script type=\"text/javascript\">var showmediaxmlfile = '" . getURL("showmediaxml",1) . "';</script>\n";
    }

6. Copy the following into English/cust_text.php (before the ending ?>)

   // Text for auto image reply mod
   $text['emailfrom'] = "hroberts@robertsfamilytree.org";
   $text['emailsubject'] = "";
   $text['emailmessage'] = "Here is the image you requested. In order to continue to offer this service, please give credit to $text[sitename]";
   $text['emaildisplaymessage'] = "High Quality Image" ;
   $text['emailclickmessage'] = "Click Here" ;
   $text['emailsuccess'] = "The Item has been emailed to you as an attachment to: " ;
   $text['emailfailure'] = "This option is only available to registered users.<br /> Please Login, or Register for an account." ;
   $text['nonexistant'] = "Currently the original of this image is not uploaded to the server.<br /> We are working on re-scanning and uploading originals on a daily basis.<br /> Please <a href='http://www.robertsfamilytree.org/genealogy/suggest.php' target='_blank' javascript:'window.close()'>contact me</a>, and I will email you a copy of the original, as soon as it is available";
   $text['originalpath'] = "/original/";
   $text['sitename'] = "www.robertsfamilytree.org";
   // end of auto reply mod

The above $text[originalpath'] is the location of where you will store the original files.

Visual of mod

In the event of a problem with your TNG site

  1. Try using the Mod Manager Remove capability
  2. Or copy your backup showmedia.php, and showmedialib.php files to your TNG directory
    • all should be well now


TNG User sites using this mod

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

Site List

  • Roberts Family Tree I use this TNG mod to provide a link to allow my relatives to get a high quality copy of a picture, without having to wait for me to find the time to send it to them. (Harold Roberts)

Related Links