Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Import External Images Details »»
Import External Images
Version: 1.0.5, by y2ksw y2ksw is offline
Developer Last Online: Feb 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 11-06-2010 Last Update: 02-13-2011 Installs: 300
DB Changes Uses Plugins
Additional Files Translations  
No support by the author.

This vBulletin 4 product imports external images in your posts from external servers or paths into a specific path, normally your forum's image folder.

Differently than the previous product Image Cache for vBulletin 3.x., it parses the posts at regular intervals for new images and replaces the external references in the background. Also, instead of using only a single folder, it creates folders for years and months, making it much easier to handle large quantities of images. The source and destination image URL's are stored into database, too, avoiding unnecessary duplicates.

It moves and optionally converts images from one place to another. It is a handy tool in order to keep your images local to your forums.

Version 1.0.4 is temporarily in BETA stage until the users have confirmed the newly requested features.
Version 1.0.5 is still in BETA stage. It adds a new bunch of additional features, one of which allows you to test your mathematical understanding ... and a few other to fine-tune CURL and socket timeouts, and resizing on the fly of too large images. If you don't know what these options do, please leave them at their default values.

Download Now

File Type: zip 1.0.2.iei4.zip (80.0 KB, 477 views)
File Type: zip 1.0.4.iei4.zip (84.5 KB, 185 views)
File Type: zip 1.0.5.iei4.zip (87.5 KB, 2158 views)

Screenshots

File Type: jpg 08-11-2010-11.32.53.jpg (112.4 KB, 0 views)
File Type: jpg 02-02-2011-22.06.39.jpg (126.0 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 01-15-2011, 08:18 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

y2ksw,

This is indeed a most awesome mod- my request for the images to retain their original names wasn't to get Google image credit since I don't allow hot-linking of my images anyway I just assume Google didn't index my images. I was asking because I can see inevitably people link to inappropriate images that I won't want on my server- indeed am not allowed to even have on my server according to my hosting account rules- and I just believed finding a real name rather than a number might make my life easier later on when I'm having to manually delete files via FTP.

There is just 1 thing preventing me from using this and it is by no means the "fault" of this mod- i just want to ask here in case anyone might have had the same issue

I have multiple domains pointing to my site. By default this mod uses my "bburl" to hard code the image URL. However a number of my users browse via alternate domains because my primary (and sometimes secondary) domains end up getting blocked by web access filters at people's jobs. SO i have gone through great pain to make sure there are no hard coded links or images on my site at all- everything is relative so if you browse via juot.net, everything is on juot.net. If you browse by juot.co, everything is on juot.co, and so on.

If I use this mod as is it will hard code every image to juot.net and anyone logging in from a place where juot.net is blocked will get broken images.

I tried to put "/forums" in the replacment URL option but the [img] bb code doesn't work with relative paths.

Curious if you or anyone have any ideas about this?

Also, if I were to edit your cron job file to keep the existing file names would you be OK if I attached it in this thread so others who might want that feature could use it?
Reply With Quote
  #93  
Old 01-15-2011, 11:44 PM
newmomsforum newmomsforum is offline
 
Join Date: Mar 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Y2k

Firstly great mod and is just what I needed so thanks for sharing it with us

Quick question though.. The import worked fine at first and I have 4 folders created for 2006, 2007, 2008 and 2009 with sub folders for each month within and the images within those

The strange thing is.. No further folders have been created beyond 2009 and the import appears to have stopped... images from external sites have still been posted since 2009 and continue to be posted on a daily basis.

No memory issue and the forums running fine .. any ideas?

Cheers

Mark
Reply With Quote
  #94  
Old 01-16-2011, 06:46 AM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
y2ksw,

This is indeed a most awesome mod- my request for the images to retain their original names wasn't to get Google image credit since I don't allow hot-linking of my images anyway I just assume Google didn't index my images. I was asking because I can see inevitably people link to inappropriate images that I won't want on my server- indeed am not allowed to even have on my server according to my hosting account rules- and I just believed finding a real name rather than a number might make my life easier later on when I'm having to manually delete files via FTP.

There is just 1 thing preventing me from using this and it is by no means the "fault" of this mod- i just want to ask here in case anyone might have had the same issue

I have multiple domains pointing to my site. By default this mod uses my "bburl" to hard code the image URL. However a number of my users browse via alternate domains because my primary (and sometimes secondary) domains end up getting blocked by web access filters at people's jobs. SO i have gone through great pain to make sure there are no hard coded links or images on my site at all- everything is relative so if you browse via juot.net, everything is on juot.net. If you browse by juot.co, everything is on juot.co, and so on.

If I use this mod as is it will hard code every image to juot.net and anyone logging in from a place where juot.net is blocked will get broken images.

I tried to put "/forums" in the replacment URL option but the [img] bb code doesn't work with relative paths.

Curious if you or anyone have any ideas about this?

Also, if I were to edit your cron job file to keep the existing file names would you be OK if I attached it in this thread so others who might want that feature could use it?
You may find the real name and new association in the iei_img for this scope. Also I may think about a unallowed file names option, which is simple and does not change the behaviour.

As for *juot.*, please add into your exception list the partial URL, which identifies your media server(s). For example,

http://juot.

or

.juot.

could be such a string. In this way, you avoid importing images from different domains, since they are pointing to the same physical installation.

Also, you may need to add a plugin at global_bootstrap_init_start with:
PHP Code:
$vbulletin->options['bburl'] = 'http://' $_SERVER['HTTP_HOST']; 
in order to reflect the correct URL for each domain you are coming from. Please note that this change may affect other functions, depending on how your system is setup. Also, you may set the board title, keywords and description depending on the host. You will have to test this very carefully. It opens you a beautiful new door to solve many problems related to multiple domain redirects and/or thematic separation, but I don't support this feature

You may need to add/remove a rule to your hotlinking in order to ignore your local or remote media servers for your forums, too.
Reply With Quote
  #95  
Old 01-16-2011, 06:59 AM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by newmomsforum View Post
Hi Y2k

Firstly great mod and is just what I needed so thanks for sharing it with us

Quick question though.. The import worked fine at first and I have 4 folders created for 2006, 2007, 2008 and 2009 with sub folders for each month within and the images within those

The strange thing is.. No further folders have been created beyond 2009 and the import appears to have stopped... images from external sites have still been posted since 2009 and continue to be posted on a daily basis.

No memory issue and the forums running fine .. any ideas?

Cheers

Mark
Supposed you have (almost) unlimited disk space, maybe the folder rules have changed? They should have modification rights for the web server, such as chmod 755 or 777, and the image files 644 or 666.

Also, you may have an enormous amount of imported images, and may need to reset your lookup table. In order to see if this is the problem, please run the task manually. If there is a memory error (... could not allocate N Bytes ...), you have 2 options: reset the lookup table:
Code:
TRUNCATE iei_img
or add some memory to your PHP processes. By resetting the lookup table, a few images may get imported twice, but it is much cheaper than adding memory space to all PHP processes
Reply With Quote
  #96  
Old 01-16-2011, 02:31 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for those suggestions... I don't know that the bburl override is needed. The problem is if I do that then someone adding an image (or really, when the cron job runs) will have the alternate bburl encoded in the post- but this is still a problem because it's a hard coded domain, it won't vary based on who's viewing it but on who was viewing it when the task ran.

I seem to have solved the "problem" by making a new bb code also called img, this seems to override the built in [img] bb code and allows me to use relative urls... so by putting "/foums" in your replacment url settings all images are correctly being given a relative url such as "/forums/images/imported/2011/..." and working well.
Reply With Quote
  #97  
Old 01-17-2011, 03:36 PM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn' know it was possible to redefine BB Codes
Reply With Quote
  #98  
Old 01-17-2011, 11:02 PM
vietfancy's Avatar
vietfancy vietfancy is offline
 
Join Date: Feb 2005
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hangs when editting posts
Reply With Quote
  #99  
Old 01-17-2011, 11:06 PM
vortodox vortodox is offline
 
Join Date: Oct 2009
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to enable this hack only on articles and blogs?
Reply With Quote
  #100  
Old 01-18-2011, 07:43 AM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vietfancy View Post
hangs when editting posts
Try to disable the plugins at hook location: editpost_update_process

This may be due to Unicode problems and PHP/MySQL version incompatibilities. When these plugins are disabled, edited posts are not reparsed.
Reply With Quote
  #101  
Old 01-18-2011, 07:43 AM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vortodox View Post
Is it possible to enable this hack only on articles and blogs?
It is only for forum posts yet.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05307 seconds
  • Memory Usage 2,377KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (20)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete