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: Sep 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.
  #31  
Old 27 Oct 2006, 23:18
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Originally Posted by y2ksw
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.
It is a great hack I will give it this.
If you could arrange for it to maintain standard image format filenames it would really help integrate it with other image functions within vBulletin. I will uninstall it for the time being, only because my members are confused about this. But I do hope you can change this because this is a very useful and helpful approach to an age old problem.
Reply With Quote
  #32  
Old 29 Oct 2006, 09:27
maaref maaref is offline
 
Join Date: Jun 2005
Great mod you made y2ksw
I like it.

some admins have a limited space to store images in their site, I have some suggestions for future update (if possible)...

add options in ACP to enable/diable:
- signature storage
- storage based on usergroups, users names... this will be excellent for proffesional forums/images describe process by certain members.
- store images in different server/site...because of space limitation. the new location could be owned by same admin.

genius mod, thanks again.
Reply With Quote
  #33  
Old 29 Oct 2006, 16:53
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by maaref
Great mod you made y2ksw
I like it.

some admins have a limited space to store images in their site, I have some suggestions for future update (if possible)...

add options in ACP to enable/diable:
- signature storage
- storage based on usergroups, users names... this will be excellent for proffesional forums/images describe process by certain members.
- store images in different server/site...because of space limitation. the new location could be owned by same admin.

genius mod, thanks again.
The storage based on forums and/or usergroups has been requested already, but I'm in a sort of stall right now (too many jobs) and cannot concentrate much on adding features.

Storing mages on another server may create many authentication problems, and in the end, if that server is down, the problem of unlinked images reappears again, reason for which this plugin has actually been created
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #34  
Old 30 Oct 2006, 08:32
maaref maaref is offline
 
Join Date: Jun 2005
Thank for the effoer,
Reply With Quote
  #35  
Old 05 Dec 2006, 09:25
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Real name: Z.R.
sounds a nice mod...
caching external image..
vb3.6.4 has been released....
its supported by vb 3.6.4 ?
any new feature is coming or any update ?
Reply With Quote
  #36  
Old 27 Dec 2006, 13:40
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Sure, it's fully compatible with vBulletin 3.6.4
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #37  
Old 31 Jan 2007, 17:53
adhari_com's Avatar
adhari_com adhari_com is offline
 
Join Date: May 2004
Real name: Hassan AlDoy
then shouldn't it be moved into 3.6.4?
Reply With Quote
  #38  
Old 31 Jan 2007, 20:18
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
Originally Posted by adhari_com View Post
then shouldn't it be moved into 3.6.4?
Yeah, maybe

Still, there are many users of v. 3.5 which can't upgrade because of their server/PHP/MySQL limitations, and this forum is much less crowded than anywhere else.

Let's say, when I assume v. 3.5 is definitively dead, I will ask to move the thread to the 3.6 forums
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #39  
Old 19 Feb 2007, 20:58
KingPin6's Avatar
KingPin6 KingPin6 is offline
 
Join Date: Sep 2006
thank you for an awesome mod, is there anywhere I can specify to ignore sig images? or even better, images from the forums domain? we have a default sig for each user that needs to stay updated with stats from game server, stats are based from same domain. being able to turn off cache for same domain would be awesome, thank you.
Reply With Quote
  #40  
Old 19 Feb 2007, 23:16
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni
You may disable the specific plugin for signatures. When diabled, signatures are not considered
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #41  
Old 20 Feb 2007, 01:56
KingPin6's Avatar
KingPin6 KingPin6 is offline
 
Join Date: Sep 2006
thank you.
Reply With Quote
  #42  
Old 28 Mar 2007, 09:15
RealitYYY RealitYYY is offline
 
Join Date: Dec 2006
This is great though is it able to be for specific forums and pm messages and not the entire site...

Last edited by RealitYYY; 28 Mar 2007 at 09:22.
Reply With Quote
  #43  
Old 01 Apr 2007, 21:07
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Real name: Call me X
Originally Posted by RealitYYY View Post
This is great though is it able to be for specific forums and pm messages and not the entire site...
Not tested but try putting
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

as the first line of every plug in for this hack. Then put </if> as the last line if each plug in for this hack.

Replace XYZ with the forums ids of the forums you want it to cache in.
Reply With Quote
  #44  
Old 02 Apr 2007, 11:17
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Real name: Giovanni

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

may work for templates only (n_array does not work for sure )
__________________
Giovanni
Italian support: http://www.vbulletin.it/
Reply With Quote
  #45  
Old 02 Apr 2007, 13:35
maxicep maxicep is offline
 
Join Date: Oct 2006
Originally Posted by y2ksw View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

may work for templates only (n_array does not work for sure )
i do it what you write, bu take an error when posting and editing on forum than i uninstalled .
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 04:53.

Layout Options | Width: Wide Color: