vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Import External Images (https://vborg.vbsupport.ru/showthread.php?t=253309)

y2ksw 11-08-2010 08:29 AM

Quote:

Originally Posted by LuisManson (Post 2119114)
tagged, thanks,
it uses the forum as referer or the image domain?

Internally, it skips all images containing $vbulletin->options['bburl'], and, if specified (options), the bburl replacement. Additionally, you may add (options) more folders and/or domains to skip.
Quote:

Originally Posted by BadgerDog (Post 2119128)
Thanks for coding this as I think it's very useful ... :)

I don't have a development board capability, just a live site with 13,000 members and lots of IMG externally hosted pics, so I'd love to get feedback from folks who install and test this before I try it on our live site ... just in case ... ;)

ps: does it go back and bring in externally hosted pics from OLD existing posts, or just new ones posted from the time forward after the mod is installed?

Regards,
Badger

Quote:

Originally Posted by sticky (Post 2119294)
So will it go through all past posts and replace those images?

Yes, it parses all posts from the beginning.
Quote:

Originally Posted by Wajdan (Post 2119339)
I snap shot would be highly appreciated....!

It has not much to show off - maybe the options window? :)

Veer 11-08-2010 09:50 AM

Quote:

Originally Posted by YankForum (Post 2119361)
check this thread , on his own boards
it seems every single image will be hosted on his own server in /imported folder , nice hack , but i really need to switch to dedicated servers before installing this :)

Why dedicated server? I think it can be run on any normal server.

BadgerDog 11-08-2010 09:56 AM

Quote:

Originally Posted by y2ksw (Post 2119401)
Internally, it skips all images containing $vbulletin->options['bburl'], and, if specified (options), the bburl replacement. Additionally, you may add (options) more folders and/or domains to skip.


Yes, it parses all posts from the beginning.

It has not much to show off - maybe the options window? :)

Thanks ... :)

Two clarifications ...

1. If the image is not longer available on the remote external site, where the poster has moved or deleted it, how does it handle those circumstances?

2. We use a special external reference that ties back to a Highslide display of images we store off-site on a separate special server. The syntax is [HSURL]http://www.pic.jog[/HSURL]. I believe it's BBCode triggered and displays those external pics as pop-ups. We would NOT want those references changes, so does your mod skip those because there are not IMG type tags and it will work fine for us with the HSURL internal code?

Thanks again for your efforts.... :)

Regards,
Badger

y2ksw 11-08-2010 12:28 PM

Quote:

Originally Posted by BadgerDog (Post 2119416)
Thanks ... :)

Two clarifications ...

1. If the image is not longer available on the remote external site, where the poster has moved or deleted it, how does it handle those circumstances?

2. We use a special external reference that ties back to a Highslide display of images we store off-site on a separate special server. The syntax is [HSURL]http://www.pic.jog[/HSURL]. I believe it's BBCode triggered and displays those external pics as pop-ups. We would NOT want those references changes, so does your mod skip those because there are not IMG type tags and it will work fine for us with the HSURL internal code?

Thanks again for your efforts.... :)

Regards,
Badger

1. This depends on your 'Remove Invalid Images' settings (options). Invalid images are also courtesy pages, invalid images (scripts) or anything else which can't be loaded by the image* functions of the GD image library.
2. Please add "www.pic.jog/" to the "Ignore" settings (options) in order to skip all possible image URLs containing this string. If it is BBCode wrapped differently from [IMG] tags, it won't get imported anyway.

BadgerDog 11-08-2010 12:42 PM

Quote:

Originally Posted by y2ksw (Post 2119451)
2. Please add "www.pic.jog/" to the "Ignore" settings (options) in order to skip all possible image URLs containing this string. If it is BBCode wrapped differently from [IMG] tags, it won't get imported anyway.

Thank you Sir .. :)

So, to the "Ignore" settings I would add "http://photos.imageevent.com" to IGNORE this HIGHSLIDE java script BBCode statement below, which appears in a lot of our posts?

[hsurl=http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/DSC01967.JPG][IMG]http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/icons/DSC01967.JPG[/IMG][/hsurl]

Note: there is an IMG reference in that string for the small icon to support the larger pop-up highlside pic, but would it get ignored too, which is important and what we'd need..

Regards,
Badger

y2ksw 11-08-2010 01:23 PM

Quote:

Originally Posted by BadgerDog (Post 2119453)
Thank you Sir .. :)

So, to the "Ignore" settings I would add "http://photos.imageevent.com" to IGNORE this HIGHSLIDE java script BBCode statement below, which appears in a lot of our posts?

[hsurl=http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/DSC01967.JPG][img]https://vborg.vbsupport.ru/external/2010/11/33.jpg[/img][/hsurl]

Note: there is an IMG reference in that string for the small icon to support the larger pop-up highlside pic, but would it get ignored too, which is important and what we'd need..

Regards,
Badger

The [hsurl] tag won't get parsed, thus you don't have to worry about this tag.

However, if your users are copying and pasting the image contained in [hsurl] in some way, vbulletin would wrap it with a standard [img] tag. For this you should add photos.imageevent.com/to the ignore list, just to make sure it never gets imported, no matter which tag is used.

y2ksw 11-08-2010 01:26 PM

PS: In order to scratch off the hsurl tag, you probably will need another filter. An URL around an image remains untouched.

BadgerDog 11-08-2010 02:22 PM

Quote:

Originally Posted by y2ksw (Post 2119464)
The [hsurl] tag won't get parsed, thus you don't have to worry about this tag.

However, if your users are copying and pasting the image contained in [hsurl] in some way, vbulletin would wrap it with a standard [img] tag. For this you should add photos.imageevent.com/to the ignore list, just to make sure it never gets imported, no matter which tag is used.

Sorry for being so dense .... :D

So, this line of code (or any part of it) on the site would NEVER get touched by your mod when it executes .. correct?

[hsurl=http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/DSC01967.JPG][IMG]http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/icons/DSC01967.JPG[/IMG][/hsurl]

Quote:

Originally Posted by y2ksw (Post 2119465)
PS: In order to scratch off the hsurl tag, you probably will need another filter. An URL around an image remains untouched.

Another filter? Such as?

I wish there was some way I could test what this mod does and view it's impact, restricting it's cron execution to just a specific "Test Forum" ID, so it didn't act on any other data in the databse. In that way, we could make sure we didn't mess up 4 years of posts without a test. Is that possible to have a test forum ID mode that one can turn ON and OFF?

Thanks again ... :)

Regards,
Badger

y2ksw 11-08-2010 04:07 PM

Quote:

Originally Posted by BadgerDog (Post 2119483)
Sorry for being so dense .... :D

So, this line of code (or any part of it) on the site would NEVER get touched by your mod when it executes .. correct?

[hsurl=http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/DSC01967.JPG][img]https://vborg.vbsupport.ru/external/2010/11/33.jpg[/img][/hsurl]



Another filter? Such as?

I wish there was some way I could test what this mod does and view it's impact, restricting it's cron execution to just a specific "Test Forum" ID, so it didn't act on any other data in the databse. In that way, we could make sure we didn't mess up 4 years of posts without a test. Is that possible to have a test forum ID mode that one can turn ON and OFF?

Thanks again ... :)

Regards,
Badger

If photos.imageevent.com/ is in the Ignore settings,

[hsurl=http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/DSC01967.JPG][img]https://vborg.vbsupport.ru/external/2010/11/33.jpg[/img][/hsurl]

is not touched at all. If it isn't, it is touched this way:

[hsurl=http://photos.imageevent.com/badgerdog/canadianservicerifles/1915rossmkiiisniper223/DSC01967.JPG][IMG]http://www.forum.tld/images/imported/2010/11/1234.jpg[/IMG][/hsurl]

Assuming you have already 1233 JPEG images in your .../2010/11/ folder and the post comes from today.

For testing, I suggest to use it on a test board first :)

There is no such filter as forum sections, threads and so on, but if you really must filter, then you may change the query in file iei_cron.php on line 229 from:

$SQL = "SELECT postid, dateline, pagetext
FROM " . TABLE_PREFIX . "post
WHERE iei_parsed=0
AND pagetext LIKE '%[/IMG]%'
ORDER BY postid";

to:

$SQL = "SELECT postid, dateline, pagetext
FROM " . TABLE_PREFIX . "post
WHERE iei_parsed=0
AND threadid=XXX
AND pagetext LIKE '%[/IMG]%'
ORDER BY postid";

where XXX is your thread id.

At this point, please enable also the cronjob logging (modify task), in order to see in your logs which posts have been touched.

Last not least, don't forget to undo the changes after testing :D

Dr.osamA 11-09-2010 01:43 AM

thanxx

installed but not working at all

you can try it here alra7ba.info

user:vBulletin
pass:123456

can i translate it to Arabic lang. and add it here plzz ?


All times are GMT. The time now is 06:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01919 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete