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.
  #16  
Old 27 Aug 2006, 16:04
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by ChurchMedia
These are multiple images that would need to be cached. I'm not ready to upgrade to 3.6 until more hacks have been ported.

I'm willing to pay for the plug-in.
I've added IMG caching of signatures.

Although this product/plugin is free, a voluntary payment (donation) for new feature requests would greatly help to add them in a reasonable time. For this reason we have added a donation button inside readme.htm for a symbolic contribution of EUR 5.00.
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #17  
Old 27 Aug 2006, 17:21
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Real name: Tim Eason
Thanks! I really appreciate it. Great hack!

Donation sent
Reply With Quote
  #18  
Old 27 Aug 2006, 18:46
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by ChurchMedia
Thanks! I really appreciate it. Great hack!

Donation sent
Thank you, you're welcome!
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #19  
Old 12 Sep 2006, 14:04
grazianno grazianno is offline
 
Join Date: May 2006
thx y2ksw for this mod,
can you tell me plz where images are hosted ? because i dont see any images in imgcache
Reply With Quote
  #20  
Old 12 Sep 2006, 14:40
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
If the images cannot be stored in the imgcache folder, the links to the original source remain intact, thus are hosted as if the plugin wasn't installed.

Please make sure to give at least the read/write rights to the imgcache folder, or storage will fail.
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #21  
Old 23 Sep 2006, 20:29
adwade adwade is offline
 
Join Date: Aug 2006
Real name: A.D.
Question

Test the product: New thread, reply, edit. If errors occur (or white pages), make sure your imgcache/ folder has the required access rights.
Installed and everything seemed to go just fine. Did the above test and all seems well.

QUESTION: Should my imgcache directory I created begin to contain copies of images now? So far, I've not seen anything in there except the empty index.html file I created per the instructions.
Reply With Quote
  #22  
Old 23 Sep 2006, 20:33
adwade adwade is offline
 
Join Date: Aug 2006
Real name: A.D.
One other question, I run vBadvanced's CMPS. Is there a way to get this to cache what pics show up on that page as well?
Reply With Quote
  #23  
Old 23 Sep 2006, 22:56
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by adwade
Installed and everything seemed to go just fine. Did the above test and all seems well.

QUESTION: Should my imgcache directory I created begin to contain copies of images now? So far, I've not seen anything in there except the empty index.html file I created per the instructions.
The folder should hold images if you have pasted images from other sites in your messages. For example copy this forum logo into your edit box and save. It should cache the smilie. If it doesnt, it may be your imgcache folder has not the rights to write.
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #24  
Old 23 Sep 2006, 22:57
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by adwade
One other question, I run vBadvanced's CMPS. Is there a way to get this to cache what pics show up on that page as well?
I don't know, but I suppose it is. However I have no time to look into that too
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #25  
Old 23 Sep 2006, 23:04
adwade adwade is offline
 
Join Date: Aug 2006
Real name: A.D.
Originally Posted by y2ksw
The folder should hold images if you have pasted images from other sites in your messages. For example copy this forum logo's location into your edit box and save. It should cache the smilie. If it doesnt, it may be your imgcache folder has not the rights to write.
Now I understand what you're saying. Yes, I copied the location and posted it in a test msg and, wha-la instantly a 1.imgcache file was created in the imgcache directory. Thanxx!
Reply With Quote
  #26  
Old 24 Oct 2006, 14:20
adwade adwade is offline
 
Join Date: Aug 2006
Real name: A.D.
Question

Out of curiosity, is there any way to view the image cache file to see what all it contains?
Reply With Quote
  #27  
Old 24 Oct 2006, 22:14
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Maybe not online, but by downloading and using an image (pre)viewer I'm pretty sure you may see the file contents.
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #28  
Old 25 Oct 2006, 05:18
adwade adwade is offline
 
Join Date: Aug 2006
Real name: A.D.
Yep, you are exactly right.:classic: I D/L'd the 1.imgcache, 2.imgcache, etc files to my desktop and used Quick View Plus to peek at 'em. Neat, Thanxx!
Reply With Quote
  #29  
Old 27 Oct 2006, 22:20
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Strange phenomenon here.

When users add inline images the cache works however when they click on the image they cannot view the full size image instead they are offered to download a .cache file..

Any ideas how to fx this, its a little confusing?
Reply With Quote
  #30  
Old 27 Oct 2006, 23:12
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Basically it is possible to change the script to save the cached images with another name. Still there is a basic problem I didn't solve: The cache takes any image format and saves it as-is from the source site.
__________________
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 17:54.

Layout Options | Width: Wide Color: