News:

Wondering if this will always be free?  See why free is better.

Main Menu

Signature Image Rotator

Started by SoLoGHoST, June 11, 2009, 05:51:40 AM

Previous topic - Next topic

Robin1989

hey i think there may be a problem with uploading gif's as when any of our members upload an animated gif sig to it it seems to break the animation. is this a known issue and is there a fix for it

SoLoGHoST

#21
Thanks, yeah, this is a known issue.  Since we are sizing images down to the dimensions you specify(Recreating the images), this would be very difficult to extract each frame from an animated gif, resizing each frame accordingly, than rebuilding the animated gif file from the resized images (making sure we get all frame images in the animated gif, how many loops, time delay between each frame, rgb values, and plot it all back into the new resized image all while keeping the transparency the same.  Since shrinking images down will have an effect on the transparent color that is set and could look very ugly).  And then we face the main problem: The gd2 library does not support animated gifs.  To get around this, we could either use ImageMagick, or (what I prefer, since it captures all users) a class could be used to extract each framed image, and info based on the hex values and bytes in the animated gif, starting the extraction from the header of each frame.  Ofcourse, this is extremely involved as you can see!  Otherwise, could just resize the image according to <img> width and height attributes, though may not look good, in some browsers, if the animated gif is extremely large.

However, the use of animated gif displaying is supported.  You can do this yourself, manually, by just grabbing the animated gifs and inputting them into the correct folder within the sigs folder (located in your SMF Root Folder).  In order to know which folder belongs to which user, TIP:  The user's id is the first number(s) before the first _ in the name of the folder.  So if you are the Administrator (Site Creator/Owner), this folder name would begin with 1_ or 01_.  You can place any named file in this folder (yep, shouldn't matter on the name of the file, should still display, just make sure you get the right folder).  So just grab your animated gif or someone else's and just get the users id value (will be the u=#, where # = users id value, when hovering your mouse over a username on your forum), look for the folder in the sigs folder that matches ##_ and upload the animated gif to this folder, and there ya go.  Should work fine.  Plan on fixing this in the future, but for now, this is how you can do it.

EDIT:  Please download version 1.5 if you want Animated GIF Support.  However if the animated gif exceeds the max width and/or max height dimensions that you have set within the Admin Settings for the Signature Image Rotator, it will resize the animated gif down, only keeping the 1st frame and discarding all others.

SoLoGHoST

Now Available Signature Image Rotator v1.5 which supports the use of animated gifs.  If the animated gif being uploaded is bigger than the allowed (Admin Set) dimensions than it will only retain the first frame of the animated gif file.

Thanks and ENJOY! :)

cieplutki

hi all
polish translation it's on attachment
great job wit this mod




.

SoLoGHoST

Thanks cieplutki, will add it to the package soon :)

SoLoGHoST

For Those of you who are interested in an SMF 1.1.x compatible version of this MOD (as I know some of you have replied to this MOD support thread asking for this):

I have decided not to do this, unless there are atleast 10 people willing to pay for this.  Price set at 20 US Dollars.  If still interested, you may reply to this message, letting me know if you are willing to pay for this MOD if made compatible with SMF 1.1.x versions.  Please note, you are not doing me any favors by either saying yes or no in your reply to this.  As I have no desire to wanna code this MOD for SMF 1.1.x versions anyways.  Well, just wanted to throw this out there so you know where I stand with this!

SoLoGHoST

Quote from: cieplutki on August 14, 2009, 04:09:08 PM
hi all
polish translation it's on attachment
great job wit this mod
Hello, just getting around to adding this and is added within the new download, however, if you would be willing to translate the following into polish as well that would be great...

Modifications.english.php

// Begin Signature Image Rotator strings
$txt['sig_rotator_title'] = 'Signature Image Rotator';
$txt['sig_rotator_curr_images'] = 'Current Images: ';
$txt['sig_rotator_url'] = '<b>Code to use for your Signatures</b><div class="smalltext">You\'ll need to insert this into the Signature box manually. You may also use this url on any other site.</div>';
$txt['sig_rotator_add_image'] = 'Add Image: ';
$txt['sig_rotator_upload'] = 'Upload';
$txt['sig_rotator_delete'] = 'Delete';
$txt['sig_rotator_deleteall'] = 'Delete All Images';
$txt['sig_rotator_max_images'] = 'Max images: ';
$txt['sig_rotator_images_remaining'] = '; images remaining: ';
$txt['sig_rotator_if_exceeds'] = 'If image dimensions exceed ';
$txt['sig_rotator_max_width'] = 'a Width of ';
$txt['sig_rotator_max_height'] = 'a Height of ';
$txt['sig_rotator_supported_images'] = 'Supported Formats: (png, gif, jpg, jpeg, bmp, wbmp)';
$txt['sig_rotator_max_resize'] = ', it will be resized.<br/>';

$txt['sigrotator_sigs'] = '<b>Image Signature Settings</b>';
// Used for the Header for the Default Signature Settings...
$txt['sig_norm_settings'] = '<b>Normal Signature Settings</b>';
$txt['signature_rotate_images_enable'] = '<span style="padding-left: 8px;">Enable Signature Image Rotator</span>';
$txt['signature_rotate_max_images'] = '<span style="padding-left: 8px;">Maximum image count</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_rotate_max_image_width'] = '<span style="padding-left: 8px;">Maximum width of images (pixels)</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_rotate_max_image_height'] = '<span style="padding-left: 8px;">Maximum height of images (pixels)</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_rotate_prefix'] = '<span style="padding-left: 8px;">Default Image filename</span><br/><span class="smalltext" style="padding-left: 8px;">Gets changed to letters, numbers, &amp; underscores only</span>';
$txt['signature_rotate_prefix_forumname'] = 'Forum Name';
$txt['signature_rotate_prefix_username'] = 'Username';
$txt['signature_rotate_prefix_userid'] = 'User Id';
$txt['signature_rotate_prefix_untitled'] = 'Untitled';
$txt['permissiongroup_sigrotator'] = 'Signature Image Rotator';
$txt['permissiongroup_simple_sigrotator'] = 'Signature Image Rotator';
$txt['permissionname_sigrotator_images_enabled'] = 'Allow Access';
$txt['permissionhelp_sigrotator_images_enabled'] = 'Makes the Signature Image Rotator in the users Profile->Forum Profile viewable.<br/><br/><b>Important</b>:  This does not disable any already created Signature Images and/or URL\'s.  To do this, just go to the users profile and delete their Signature Images manually.';
$txt['permissionname_sigrotator_images_add'] = 'Can Add own Images';
$txt['permissionhelp_sigrotator_images_add'] = 'Allows the user to Add their own images to the Signature Image Rotator via their profile.';
$txt['permissionname_sigrotator_images_delete'] = 'Can Delete own Images';
$txt['permissionhelp_sigrotator_images_delete'] = 'Allows the user to Delete their own images in the Signature Image Rotator via their profile.';
$txt['permissionname_sigrotator_images_nolimit'] = 'Bypass image count limits';
$txt['permissionhelp_sigrotator_images_nolimit'] = 'Allows users to upload an unlimited amount of signature images regardless of what the maximum image count is set at.';
$txt['permissionname_sigrotator_images_admin'] = 'Administrate Signature Images';
$txt['permissionhelp_sigrotator_images_admin'] = 'Allows the user to only Delete other member Signature images from within their profiles.';
// End Signature Image Rotator strings


ManageSettings.english.php
$txt['signature_settings_warning'] = 'Note that settings are not applied to existing Normal Signature Settings by default. Click <a href="' . $scripturl . '?action=admin;area=featuresettings;sa=sig;apply;sesc=%1$s">here</a> to apply rules to all existing Normal Signature Settings.';
$txt['signature_enable'] = '<span style="padding-left: 8px;">Enable signatures</span>';
$txt['signature_max_length'] = '<span style="padding-left: 8px;">Maximum allowed characters</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_max_lines'] = '<span style="padding-left: 8px;">Maximum amount of lines</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_max_images'] = '<span style="padding-left: 8px;">Maximum [img] tags count</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max - excludes smileys)</span>';
$txt['signature_max_smileys'] = '<span style="padding-left: 8px;">Maximum smiley count</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_max_image_width'] = '<span style="padding-left: 8px;">Maximum width of [img] tags (pixels)</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_max_image_height'] = '<span style="padding-left: 8px;">Maximum height of [img] tags (pixels)</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max)</span>';
$txt['signature_max_font_size'] = '<span style="padding-left: 8px;">Maximum font size allowed in signatures</span><br/><span class="smalltext" style="padding-left: 8px;">(0 for no max, in pixels)</span>';
$txt['signature_bbc'] = '<span style="padding-left: 8px;">Enabled BBC tags</span>';


Thanks and hopefully you see this topic.

Cheers :)

SoLoGHoST

Mod just updated to support SMF 2.0 RC2.

watchhorse

Is the modification in the "$themedir/Profile.template.php" correct?
It screw-up the layout of de profile on my forum ???
Wij zoeken diergerelateerde fora ter overname.
Pb gerust als je geen tijd of zin meer hebt om uw forum te onderhouden.

Robin1989

any news on a version of this for the avatar as well as that would be sick especially if you could link combinations together so that it would show avi1 and sig1 at the same time in a post or if you wanted avi1 and sig2 to load at the same time it would do that

SoLoGHoST

Quote from: Robin1989 on December 08, 2009, 08:54:27 PM
any news on a version of this for the avatar as well as that would be sick especially if you could link combinations together so that it would show avi1 and sig1 at the same time in a post or if you wanted avi1 and sig2 to load at the same time it would do that
Sorry, I have been busy coding for Dream Portal as it's too much fun and a definite challenge (which I love), though thanks for following up on this.  I'll be honest, I haven't actually did any work on the Avatar Image Rotator yet, however, this is so simple, it will probably only take me a day to do.  But, I'm having too much fun with Dream Portal currently.  So will have to wait.

Quote from: watchhorse on November 27, 2009, 02:47:44 PM
Is the modification in the "$themedir/Profile.template.php" correct?
It screw-up the layout of de profile on my forum ???
Do you have a link or an image that I can see??  Also, what version of SMF do you have installed??  Also, strange that I haven't seen this post earlier as it should've come up when I clicked on the Replies link (everyday here at SMF), but didn't :(  So I am so sorry for taking this long to get with you on this.

Reiuji

Quote from: SoLoGHoST on December 09, 2009, 03:25:46 AM
Do you have a link or an image that I can see??  Also, what version of SMF do you have installed??  Also, strange that I haven't seen this post earlier as it should've come up when I clicked on the Replies link (everyday here at SMF), but didn't :(  So I am so sorry for taking this long to get with you on this.
Hey... installed the mod too and it messes up my profile layout also. Used to work wonders on SMF 2.0 RC 1-2 though. I've upgraded to SMF 2.0 RC 2 and I got the newer version of the mod.

Ver: SMF 2.0 RC 2
Theme: Bright Forest Theme v2.1
Browser: Firefox 3.5.5
Mods:

  • SimplePortal
  • Downloads System
  • Simple Award System
  • Aeva ~ Auto-Embed Video & Audio
  • Pm_Informer
  • Profile Comments
  • ROT13 BBcode
  • Countdown_BBCode
  • Dice Roller BBcode
Screenshots of what happens:

hxxp:img264.imageshack.us/img264/8039/sigrotatorlayout.png [nonactive]
hxxp:img130.imageshack.us/img130/5284/sigrotatorlayout2.png [nonactive]

2nd screenshot is me just using the zoom on Firefox so i can show the entire layout...

SoLoGHoST

Ok, am seeing the problem, funny as this didn't happen before.  Will fix and re-up.  Cheers :)

SoLoGHoST

Ok, issue fixed in Signature Image Rotator Version 1.7, just now updated.

Cheers :)

live627

I have some advice for you. The <code> tag is deprecated in the 2.0 branch. The <database> tag is new for the new branch and works better, too. You don't need to change sigrotatorinstall.php at all.

In package-info.xml, find
<code>sigrotatorInstall.php</code>

And replace with
<database>sigrotatorInstall.php</database>

SMF tracks these database changes somehow so it can give the user an option to remove the database changes on uninstall.

Hope this helps.

SoLoGHoST

hmm, thanks live, didn't know about this.  Will update all my mods with it once I double check this.

Cheers :)

SoLoGHoST

Quote from: yadorigi on December 14, 2009, 06:06:55 PM
I have some advice for you. The <code> tag is deprecated in the 2.0 branch. The <database> tag is new for the new branch and works better, too. You don't need to change sigrotatorinstall.php at all.

In package-info.xml, find
<code>sigrotatorInstall.php</code>

And replace with
<database>sigrotatorInstall.php</database>

SMF tracks these database changes somehow so it can give the user an option to remove the database changes on uninstall.

Hope this helps.
Ok, thanks live, though I don't like this tag at all.  Since if I forget to place a checkmark to uninstall database changes when uninstalling the mod, it will keep the tables there.  I can see a need for this type of tag for other mods, but just doesn't work for me.  If they don't uninstall the database changes, or forget to place a checkmark in this field when uninstalling, this will cause problems when and if they try to every install the mod again.  But could be that I'm using the wrong flag when installing the database tables/columns/etc.  Currently using 'ignore', maybe I should be using something else instead.

Well, Thanks anyways :)

Robin1989

i was just thinking about this mod and had a thought of a new feature which is instead of having one overall limit for everyone be able to set the limit for each members group that way people can get more spaces as they contribute more to the forum

SoLoGHoST

Well, there's the Bypass Image Count Limit within the Permissions for each member group.  So this could be used also for this.  Though being a member of this group will allow them to upload an unlimited amount of images.  Would be nice if one could input a number into a textbox for each permission, but they restrict this to just checkboxes only.  I see what you are saying though, will need to change a few things with SMF's show_settings template function in order to get the member groups to show for each limit as theirs currently no support for showing member groups within this template function :(

Robin1989

yeh ive always wondered why smf did that as ive seen a few mods that would probably of benefited from been able to add text fields to the permissions settings

Advertisement: