Page 1 of 5 1 2 3 4 5 LastLast
Results 1 to 15 of 66
Like Tree4Likes

Automatically Retrieve Image Dimensions

This is a discussion on Automatically Retrieve Image Dimensions within the Template Modifications forums, part of the vBulletin SEO Discussion category; *** NOTICE: This will only work correctly with vBSEO 2.2.0 or higher! *** The "Image Size Attributes" section of the ...

  1. #1
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times

    Thumbs up Automatically Retrieve Image Dimensions

    *** NOTICE: This will only work correctly with vBSEO 2.2.0 or higher! ***

    The "Image Size Attributes" section of the vBSEO Control Panel is a GREAT feature, but can be a lot of trouble to implement if you have added or changed a lot of smilies, post icons, and/or have all new images in your style, because you would have to manually add/update every image size.

    This little PHP script will read them all for you, and produce output that you can just copy/paste into that section of the vBSEO Control Panel.

    Upload this PHP file to the IMAGES directory under your FORUM directory, and open it in your browser.

    Example:
    Code:
    http://www.example.com/forums/images/get_image_sizes.php
    Then simply copy everything on the screen and paste it into the "Define Dimension Attributes" textbox in the vBSEO Control Panel, overwriting anything that is currently in that field.

    Delete the .PHP file when you're done.

    Don't forget to repeat this process whenever you add smiles or change any of your style images.

    12/11/2005: All known issues have been corrected.
    Attached Files
    Last edited by Juan Muriente; 02-20-2009 at 04:48 AM.

  2. #2
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,267
    Liked
    558 times
    Wow! very neat - I did the default images for vB3.x.x manually and haven't had the energy to do it for another site I run. Cool

    Q: How does it handle images with the same name under different folders?
    Juan Muriente / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    It returns the relative path, so it should differentiate. (as noted in your example on the vbSEO CP)

  4. #4
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,847
    Liked
    32 times
    Blog Entries
    9
    @ConqSoft:

    Great tool - thanks.

  5. #5
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times
    Does this actually work?

  6. #6
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,267
    Liked
    558 times
    Quote Originally Posted by ConqSoft
    It returns the relative path, so it should differentiate. (as noted in your example on the vbSEO CP)
    Great!

    I'm moving/sticking this to the 'Template Modifications' forum so that users can use the tool to publish image size attributes for commercial templates like vbstyles, vbdesigns, vbmechanic, vbskinworks, etc.
    Juan Muriente / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  7. #7
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Quote Originally Posted by Michael
    Does this actually work?
    No. It's an early April Fool's joke I posted.

  8. #8
    Member
    Join Date
    Oct 2005
    Posts
    37
    Liked
    0 times
    Thanks for this great tool

  9. #9
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times
    Quote Originally Posted by ConqSoft
    No. It's an early April Fool's joke I posted.
    I've just tried running it now on a www.vbstyles.com Element skin, and it still provides the same errors as i recieve before .. incorrectly sizing my images, scaling them down ... thats why i wondered if this product was still in development or not. I also received a series of access issues saying this:


    Warning: getimagesize(): Read error! in /home/xxx/public_html/images/get_image_sizes.php on line 35

  10. #10
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Not sure... It's just using the standard getimagesize() PHP function, so that function is unable to read one or more of your images for some reason.

    You should be able to still copy the output, remove those error lines, and use the rest in your vbSEO Control Panel though.

    I'll work on adding more error checking to it...

  11. #11
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Ok. I updated the attachment. It shouldn't show you those errors anymore.

  12. #12
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Quote Originally Posted by Michael
    I've just tried running it now on a www.vbstyles.com Element skin, and it still provides the same errors as i recieve before .. incorrectly sizing my images, scaling them down
    Do you have more than one style?

    If you have more than one style, and all your style images are organized under your forum images directory, you should be fine.

    Example:

    /forums/images/style1/buttons/
    /forums/images/style1/misc/
    /forums/images/style2/buttons/
    /forums/images/style2/misc/

    etc.

  13. #13
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times
    Yeah i am running two different styles, Element Blue and Element Purple.
    The only difference being that Element Blue makes use of the /images/element/buttons_blue/ folder as apposed to Element Purple which uses the /images/element/buttons/ folder.

  14. #14
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Hmm. I just noticed that the attachment isn't showing on the first post of this thread anymore? If I edit the post, it's there. Anyone else see it?

    EDIT: Removed/Re-Attached It

  15. #15
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times
    Here is a small example of what i am adding into the Image Attributes textbox:

    'element/statusicon/subforum_link.gif' => '10x11'
    'element/statusicon/post_old.gif' => '10x11'
    'element/statusicon/pm_old.gif' => '16x20'
    'element/statusicon/forum_old.gif' => '45x45'
    'element/statusicon/thread_dot_hot_lock.gif' => '16x20'
    'element/statusicon/announcement_new.gif' => '16x20'
    'element/statusicon/thread_hot_lock_new.gif' => '16x20'
    Is this correct, their reletive URL link would actually be http://www.staff-lounge.com/images/e...cement_new.gif for example. But when i try and load a page with these items on, most are instead deformed to a 20x20 value.

Page 1 of 5 1 2 3 4 5 LastLast

Similar Threads

  1. Image Size Attributes Question
    By Pagan in forum General Discussion
    Replies: 1
    Last Post: 02-16-2006, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •