Resource icon

MetaMirror 1.6.1

No permission to download
Is there a way to allow members to opt out of this?

Generally speaking, how's everyones experience? Don't they complain about this? It's their images, so they might want to have "full controll". Maybe I am wondering little to much , but I love the idea!
 
Can you assign this to a forum by forum basis?

Or to resources only?

For my site the resource section is very screenshot dependent and members already host the images on an external site so they dont want to download and then reupload as an attachment. The attachments are the only way to trigger the pop up viewer that has the carousel/slider navigation and that is an integral part in keeping all the images nice and organized to help other users discover the resource.

I would like apply this addon to resolve that barrier.
 
Is there a way to allow members to opt out of this?
No.

Generally speaking, how's everyones experience? Don't they complain about this? It's their images, so they might want to have "full controll". Maybe I am wondering little to much , but I love the idea!
I've not heard any complaints, but on my site people are generally just linking to images they have found on the internet, and not their own images (which they tend to upload as attachments).
 
Can you assign this to a forum by forum basis?

You can exclude forums in the options.

Or to resources only?

For my site the resource section is very screenshot dependent and members already host the images on an external site so they dont want to download and then reupload as an attachment. The attachments are the only way to trigger the pop up viewer that has the carousel/slider navigation and that is an integral part in keeping all the images nice and organized to help other users discover the resource.

I would like apply this addon to resolve that barrier.

The current version does not work for resources, as I don't have the resource manager. @Code Monkey has it working for resources with a patch. But I've not rolled it into the main code, as it would need a bit of fiddling around with flags, and I can't really test it. The only modification needed was in CronEntry.php, around line 560 (adding the "NEW CODE..." section only.

PHP:
        // for signatures, we are actually modifying the user profiles.
        if ($options->MetaMirror_CacheSigImages)
        {
            // Can't use attachments for signatures yet
            self::$use_attachments = 0;

            // We would never want to append info to a sig. Messes it up, and multiple changes would accumulate.
            self::$append = 0;

            self::$content_type = 'signature';
            self::$table_name = 'xf_user_profile';        // table that we look for files in
            self::$id_name = 'user_id';          // id field for this table
            self::$column_name = 'signature';      // the name of the column that contains the message text (post body, or sig body)
            self::runForContentType();
        }

// NEW CODE, ASSUMES THE TABLE EXISTS,
            self::$use_attachments = 0;
            self::$append = 0;

            self::$content_type = 'resource_update';
            self::$table_name = 'xf_resource_update';        // table that we look for files in
            self::$id_name = 'resource_update_id';          // id field for this table
            self::$column_name = 'message';      // the name of the column that contains the message text (post body, or sig body)
            self::runForContentType();
 
Can this be modified to also be used as an image SEO tool?

When rehosting the image as an attachment on our server can we set the name of the attachment/image to be /domain-username-thread-attachment#.jpg?
 
Actually, I think I did them all before I turned on the attachment feature of this mod so I don't know if that works or not. It probably does. I'll have to see the next time someone adds something that has images.
 
That piece of code explicitly turns off the attachments for resources. Note that the signature image rehosting also turns it off, both with
PHP:
self::$use_attachments = 0;
 
Can this be modified to also be used as an image SEO tool?

When rehosting the image as an attachment on our server can we set the name of the attachment/image to be /domain-username-thread-attachment#.jpg?

That sounds more like a job for a stand-alone add-on, so it can include existing attachments. You'd also have to beware of exceeding the 100 byte limit on attachment names.
 
I'll add that code and try it with attachments enabled and see how it goes on my test version.
 
Hi @Mick West thanks for this great resource. I have a request regarding image names... Would it be possible to scramble the image names? Currently the hosts names are added to the image.
 
Hi @Mick West thanks for this great resource. I have a request regarding image names... Would it be possible to scramble the image names? Currently the hosts names are added to the image.

Yeah, you could easily do:
PHP:
$new_name = md5($new_name).'.'.$safe_extension;

before the line (currently 703):
PHP:
            // absolute filename of file within that folder
            $filename = "$path/$new_name";

I'll see if I can roll in that as an option in when I have time for an upgrade, along with an option for Resources, and maybe some other requests.
 
Yeah, you could easily do:
PHP:
$new_name = md5($new_name).'.'.$safe_extension;

before the line (currently 703):
PHP:
            // absolute filename of file within that folder
            $filename = "$path/$new_name";

I'll see if I can roll in that as an option in when I have time for an upgrade, along with an option for Resources, and maybe some other requests.

Tested, works like magic! Thanks Mick. By the way, the file name is CronEntry.php in /library/MetaMirror
 
I use Attachments option on my website. Picture are not deleted on the server when i hard delete threads.
I run hourly clean up manualy and only "standard" attached files are deleted.
 
I use Attachments option on my website. Picture are not deleted on the server when i hard delete threads.
I run hourly clean up manualy and only "standard" attached files are deleted.

I just tried experimenting with this - a thread with a "standard" attachement, and a metamirrored attachments, and the "delete permanently", and they seem to be instantly deleted from the attachment browser. Can you give a step-by-step to repeat the problem?
 
Is it possible to limit it to size? People are using smilies from other sites and those are being added.
 
Top Bottom