PDA

View Full Version : Changing Icons from .gif to .png


nul7
09-27-2008, 05:59 AM
I have created a new set of Icons for my site, but they are all .png now and not .gif...what specifics are needed to change in the code of the templates for the .png icons to start showing up. I am no seasoned coder at this and just wanted some straight forward pointers before I start changing things around on my own.

Thanks much for any help someone can provide me.

gfxhelp.com
09-27-2008, 08:27 PM
you need to find where ever the gif images are defined and then change the code. It will probably look something like...

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a>

the "newthread.gif" would need to be changed to newthread.png for each icon. I would probably do "Search in Templates" from the admin cp and put in "imagename.gif" so you can see all the templates that need to be changed, and then edit each template.

Marco van Herwaarden
09-28-2008, 08:46 AM
Renaming your .png files to .gif might also work.

SEOvB
09-28-2008, 01:28 PM
an even easier way if renaming to png doesnt work is use the replacement variable system. Enter the normal icon name ie: newreply.gif and use newreply.png as the replacement.

nul7
09-28-2008, 04:37 PM
you need to find where ever the gif images are defined and then change the code. It will probably look something like...

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a>

the "newthread.gif" would need to be changed to newthread.png for each icon. I would probably do "Search in Templates" from the admin cp and put in "imagename.gif" so you can see all the templates that need to be changed, and then edit each template.

Thank you very much for that

Renaming your .png files to .gif might also work.

Holy crap...lolz, who would have thought it was that dang easy...much appreciated...

an even easier way if renaming to png doesnt work is use the replacement variable system. Enter the normal icon name ie: newreply.gif and use newreply.png as the replacement.

What codes are needed to make that work? Only thing I see in that system is "Default Style [Add New Replacement Variable]"

notrious
09-29-2008, 09:34 AM
easiest way .. just upload them to your ftp and rename it any extension you want ..

GIF, PNG, JPEG

Shelley_c
09-29-2008, 03:17 PM
I agree replacement variables will work nicely, although ,this isn't the more efficient way. Replacement variables work well if you wish to have different smilies/post icons for different styles but i would personally edit the extension and modify the appropriate template. Infact, modifying .gifs with colours less than 256 colours will not increase the quality when changing the extension unless you actually design the icons yourself and that icon is more than 256 colours. Then again, it depends on what .png formatted icon your uploading.

The best way is that you design the icons yourself and save the source file to .png and then to modify the extensions within the appropriate template. All the other suggestions are just make do and even then (pending on the quality of the file) you could be changing the extension with no noticeable differences. The .gif file will remain 256 colours or less no matter what extension you change it to.

Anyway, I'll stop rambling and and stop pretending that I know what I'm on about. :rolleyes:

nul7
10-07-2008, 04:34 PM
Well...yes I designed some of the icons...but it was more of a search for high quality jpegs...modified them to have a transparent background and then saved them as a high end png...here are some examples.

Instead of the low end gif of AIM...I reconfigured it to be a high end png file so the edges were smoother and looked much cleaner.

https://vborg.vbsupport.ru/attachment.php?attachmentid=87832&stc=1&d=1223400710

Here is msn
https://vborg.vbsupport.ru/attachment.php?attachmentid=87833&stc=1&d=1223400695

Yahoo
https://vborg.vbsupport.ru/attachment.php?attachmentid=87834&stc=1&d=1223400695

Offline icon
https://vborg.vbsupport.ru/attachment.php?attachmentid=87835&stc=1&d=1223400695

online icon
https://vborg.vbsupport.ru/attachment.php?attachmentid=87836&stc=1&d=1223400695

Changing the extension to .gif from .png worked fine and in fact was the easiest way to go...everything transitioned over and the icons look great.

So, thanks for everyone's help with this matter.

Millen
04-23-2009, 05:14 AM
you need to find where ever the gif images are defined and then change the code. It will probably look something like...

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a>

the "newthread.gif" would need to be changed to newthread.png for each icon. I would probably do "Search in Templates" from the admin cp and put in "imagename.gif" so you can see all the templates that need to be changed, and then edit each template.

I can not find all the specific images when i search... especially the forum status icons forum_old_locked.gif etc.

Renaming your .png files to .gif might also work.

Yes this might work for some people...
But what would the people who do care about bandwidth usage and transparent issues do?
My files need to be .png and i can not locate the templates where the forum status icons are.

Pandadisossato
02-22-2010, 10:50 AM
I tried to rename images but the result was ok for ffox and opera only.
IE8 do not render the pgn renamed, this due differently from ff and opera don't check the real head of the imagefile. IE render depend upon image extension declared in the source page.

Might be a lot useful add an option to automatically convert the vb standard images referements from gif to png due the only alternative way, mainly if you want perform a radical image site replacement is rename all ".gif" in ".png" directly in the database.
An hard work if done manually...

I think this will help, users that will follow my path