XenForo Modifications

Convert Image All 5.0

Submitted by nulledatbirth, , Thread ID: 28967

Thread Closed
nulledatbirth
Novice
Prime
Level:
0
Reputation:
0
Posts:
32
Likes:
1
Credits:
22
03-02-2017, 04:56 PM
#1
Compatible XF Versions:
  • 1.2
  • 1.3
  • 1.4
  • 1.5
Description:

The Convert Image All add-on will convert hot linked images to attachments.

The hot linked image will be replaced by a full size inline attachment.

(hot linked image)

[Image: pic001-jpg.60809]

(attachment)

[Image: pic002-jpg.60810]

This add-on is designed to convert all existing hot linked images contained in all posts. It should also be used every few months to verify there are no hot linked images on your forum.

Quote:Note: In addition to this add-on, please be sure to install the Convert Image add-on located here:

http://xenforo.com/community/resources/c...mage.2521/

The Convert Image add-on will convert hot linked images immediately after a message is saved.

Key Features:
  • Images resized using ImageMagick for highest quality
  • Images resized to maximum width and height settings in Admin Control Panel (Options -> Attachments)
  • Setting for temporary image directory
Requirements:
  • Requires ImageMagick to be installed on your server
XenForo Control Panel Requirements:

This add-on requires a restricted Maximum Attachment Image Dimensions setting. You cannot use 0 or blank as an option. I use the 1600 x 1600 on my forum.

[Image: pic003-jpg.71591]

Admin CP -> Home -> Options -> Attachments

Installation:
  1. Download convertimageall_v5.0.zip and unzip it.
  2. Upload the Andy folder to your server. The correct location will be library/Andy.
  3. From your Admin Control Panel, go to the "Install Add-on" page.
  4. Upload the addon-ConvertImage_v5.0.xml file.
  5. Click the Install Add-on button.
Options:

[Image: pic004-jpg.146703]

Cron Entry:

This optional feature is used on forums with many posts, it automates the Convert Image All process. Once all posts have been converted please uncheck this Cron Entry option.

[Image: pic005-jpg.142383]

User Group Permissions:

Set the Administrative User Group Permissions to "Allow".

[Image: pic006-jpg.142384]

Operation Step 1:

Add "convertimageall" to the end of the URL in your browser.

Examples:
Code:
Full Friendly URLs
http://www.domain.com/convertimageall
http://www.domain.com/forums/convertimageall

non-Full Friendly URLs
http://www.domain.com/index.php?convertimageall
http://www.domain.com/forums/index.php?convertimageall

At this point you will see the following:

[Image: pic007-jpg.142614]

Operation Step 2:

To convert hot links images, click the "Update 1 posts" link.

At this point you will receive a confirmation "Update successful" message.

Press the back button. At this point it will appear as nothing has happened because you are looking at a cached page, if you reload the page you will see the next post number to convert.

Once you have verified the add-on is working correctly, you can increase the Limit in the Options, then reload the page. For example you can set the Limit switch to 1000, however note setting the Limit switch to a very high number will result in timeout errors. Click the "Update posts" link and 1000 posts will have hot linked images converted to attachments.

Operation Step 3 (Optional):

To run this add-on automatically every 10 minutes, go to the Cron Entry in your Admin Control Panel and enable the Convert Image All entry. There is a table called xf_convert_image_all which stores the last post ID the add-on has processed. The Cron Entry will start with the first post and continue until the last post has been processed. Be sure to set the Limit in the Options page to a higher number like 1000 so each 10 minutes 1000 posts will be processed.

Add 'convertimageall' to your URL to check the progress of the Cron Entry:

[Image: pic008-jpg.146704]

The Cron Entry will be completed when the Cron Entry Post ID is close to the last post ID in your forum, note you do need to reload the page to get the latest post ID that was processed. Use phpMyAdmin to determine what is the last post_id of your forum, look at the xf_post table.

Question and Answers:

Q: Some hot linked image are not converted, why is this?
A: If a hot linked image URL does not have a proper extension (ie: .jpg .png or .png) it will not convert, these need manual fixing.

Q: Why isn't GD supported?
A: GD does a terrible job of creating large images.

Q: Can files in the /tmp/ directory be deleted?
A: Yes, all the files can be deleted at any time.



Content locked
This content has been locked. Please login or register in order to unlock it.

RE: Convert Image All 5.0

Tkyudha
Lurker
Level:
0
Reputation:
0
Posts:
9
Likes:
1
Credits:
10
05-04-2020, 08:24 AM
#2
Yah mimgkin inilah takdir ku sampai kita jumpa lagi di lain wakti

Users browsing this thread: 1 Guest(s)