Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Image Cache Details »
Image Cache
Mod Version: 1.0.3.0, by y2ksw (Coder) y2ksw is offline
Developer Last Online: Oct 2019 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.4 Rating: (11 votes - 4.73 average) Installs: 78
Released: 07 Aug 2006 Last Update: 21 Aug 2007 Downloads: 578
Supported DB Changes Uses Plugins Additional Files  

Y2K Software Image Cache

Compatible at least with vBulletin 3.5.4 and 3.6.4

Please click here for the product Import External Images for vBulletin 4

This product caches images from external sites to a local board folder (including signatures) located at:

http://www.domain.tld/[forum/]imgcache

Installation
  1. Please create at your vBulletin board directory a folder called: imgcache and give it the following access rights: CHMOD 777 (read/write/modify to all users)
  2. Create an empty index.html file in this folder to avoid file exploring and direct download on some systems.
  3. Copy the y2kswimgcache.php file to your vBulletin board (forum home) directory.
  4. Close your forum temporarily to the public.
  5. Install the product product-y2kswimagecache.xml to your board (allow overwrite if already present).
    The installer will add a table called '[prefix]y2ksw_imgcache' with one field (int ID AUTOINCREMENT) to your board database.
    Please note: Although the uninstaller is provided, it is commented out. By removing the table, and reinstalling the plugin later, the cached images would be overwritten, because of the field counter restarting from 1.
    By leaving the table in your database, you may reinstall the plugin later without collision problems.
  6. Test the product: New thread, reply, edit. If errors occur (or white pages), make sure your imgcache/ folder has the required access rights.
  7. Reopen your forum to the public.
  8. DONE!
How it works

When a board user opens a new thread or message, or edits an existing one (all advanced, quick-reply and ajax), and pastes an image from all but the local cache directory (or by copy and paste, or by specifying [IMG] tags), upon submission the image is read from the external url and written to the local (server) image cache folder.
This avoids to show a placeholder image when the source link is dead or temporarily unavailable.

The link to the image is accordingly replaced.

The script scans first all image references and creates a table of unique images in the current message. It creates a new database table entry in y2ksw_imgcache for each image, reads the new ID and creates a sequence of new images for each url it happens to be readable, and creates for each successful read an imgcache/<id>.png file.

After this sequence, the files are cached locally and may disappear from their sources without leaving an unreferenced image pointer at the local board.

Known bugs

When an image link contains dynamic data, vBulletin would show the image in preview, but change also the IMG tags to URL.
This causes to loose the reference and the plugin will not attempt to recover. A possible solution is to allow dynamic contents for IMG tags on your board.

Version history

1.0.3.0 2007-08-19 Repaired browser (IE 7) issue for images of a different file extension than the officially recognized types. For this issue, newly cached files have now the *.png extension.
1.0.2.0 2006-08-27 Image caching of signatures ([IMG] tags for signatures must be enabled); added a donation button inside readme.htm for specific user requests, which will help us to keep this product always up-to-date.
1.0.1.2 2006-08-07 Release changes for vbulletin.org
1.0.1.1 2006-08-06 Image size verification to avoid caching of invalid images
1.0.1.0 2006-07-17 Collision-free unique cache ID's
1.0.0.0 2006-07-17 Product creation

Download Now

Only licensed members can download files, Click Here for more information.

Addons

Supporters / CoAuthors

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #181  
Old 17 Aug 2013, 04:01
dartho dartho is offline
 
Join Date: Sep 2005
I haven,t looked, but if the number of images in a single directory is the concern, you should be able to modify the code to start placing images in a new directory and leave the existing intact. All existing cached images will still be accessible in their original path and all new ones will go to the new directory? Set a reminder to change things again next year ...
Reply With Quote
  #182  
Old 17 Aug 2013, 20:23
adwade adwade is offline
 
Join Date: Aug 2006
Real name: A.D.
Yes, the number of images in a single directory is my concern. I just don't want it to stop working.

Focus2's suggestion in post #150 is for v1.0.3.0 I think, because I saw the 'png' in the code referenced.

I'm not a coder at all, but given direction I can usually find/replace small segments of such and not tear things up.

Thanxx for the answer though, because I was unsure what the MOD would do with old/existing images in the cache. Now at least I sort of know a work-around is possible for v1.0.2.0 if I can find code similar to what Focus2 was referring to. I just don't want to start renaming all my images (from this point forward) to png, if I don't have to.(i.e. the simpler, the better for me)
Reply With Quote
  #183  
Old 18 Aug 2013, 18:24
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by adwade View Post
I understand and can agree with your logic.

I'm running v1.0.2.0 on vB3.8.6 and it's run flawlessly since I installed it w-a-y back when.(i.e. vB 3.6) My only concern is how many images can I hold in just ONE directory, before it blows up on me?

And along those lines, is there any way to patch/modify the version I'm running to keep-it-going?(i.e. as Focus2 suggested in post #150 of this thread)
If your system is Linux, it won't blow quickly

The new version does divide the images.

You may try to change the folder from code and create a new one respectively to this change. But, please test it before
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:06.

Layout Options | Width: Wide Color: