MyBB Community Forums

Full Version: Change gif to png without changing javascript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Have a look at 1point6 theme.

It has png icons but there is no JScript to upload. How could I do this for my theme?
Save your images in PNG format, then adjust your theme accordingly.
(2013-02-11, 05:28 PM)StingReay Wrote: [ -> ]Save your images in PNG format, then adjust your theme accordingly.

http://adminspot.net/topic/4521-mybb-how...if-to-png/

as you can see there,

you need to change the JS is there any way to do that without changing JS?>

on the 1point6 theme there are only 2 files.]

The image file and XML yet they haave PNG on off iconsl
(2013-02-11, 05:32 PM)therussiangamer Wrote: [ -> ]
(2013-02-11, 05:28 PM)StingReay Wrote: [ -> ]Save your images in PNG format, then adjust your theme accordingly.

http://adminspot.net/topic/4521-mybb-how...if-to-png/

as you can see there,

you need to change the JS is there any way to do that without changing JS?>

You can just change gif extension to png with Filezilla or cpanel's filemanager directly or rename file extension and upload them
(2013-02-11, 05:37 PM)Alone warrior Wrote: [ -> ]
(2013-02-11, 05:32 PM)therussiangamer Wrote: [ -> ]
(2013-02-11, 05:28 PM)StingReay Wrote: [ -> ]Save your images in PNG format, then adjust your theme accordingly.

http://adminspot.net/topic/4521-mybb-how...if-to-png/

as you can see there,

you need to change the JS is there any way to do that without changing JS?>

You can just change gif extension to png with Filezilla or cpanel's filemanager directly or rename file extension and upload them

Changing the extension doesn't change the format of the file, a gif is a gif.
What you are saying is put a Rolls Royce badge on a Ford, and the Ford will become a Rolls Royce... it wont !
(2013-02-11, 06:20 PM)Spangle Wrote: [ -> ]
(2013-02-11, 05:37 PM)Alone warrior Wrote: [ -> ]
(2013-02-11, 05:32 PM)therussiangamer Wrote: [ -> ]
(2013-02-11, 05:28 PM)StingReay Wrote: [ -> ]Save your images in PNG format, then adjust your theme accordingly.

http://adminspot.net/topic/4521-mybb-how...if-to-png/

as you can see there,

you need to change the JS is there any way to do that without changing JS?>

You can just change gif extension to png with Filezilla or cpanel's filemanager directly or rename file extension and upload them

Changing the extension doesn't change the format of the file, a gif is a gif.
What you are saying is put a Rolls Royce badge on a Ford, and the Ford will become a Rolls Royce... it wont !

What is this code for?

$('mark_read_'+fid).src = $('mark_read_'+fid).src.replace("on.gif", "off.gif");
(2013-02-11, 06:43 PM)therussiangamer Wrote: [ -> ]
(2013-02-11, 06:20 PM)Spangle Wrote: [ -> ]
(2013-02-11, 05:37 PM)Alone warrior Wrote: [ -> ]
(2013-02-11, 05:32 PM)therussiangamer Wrote: [ -> ]
(2013-02-11, 05:28 PM)StingReay Wrote: [ -> ]Save your images in PNG format, then adjust your theme accordingly.

http://adminspot.net/topic/4521-mybb-how...if-to-png/

as you can see there,

you need to change the JS is there any way to do that without changing JS?>

You can just change gif extension to png with Filezilla or cpanel's filemanager directly or rename file extension and upload them

Changing the extension doesn't change the format of the file, a gif is a gif.
What you are saying is put a Rolls Royce badge on a Ford, and the Ford will become a Rolls Royce... it wont !

What is this code for?

$('mark_read_'+fid).src = $('mark_read_'+fid).src.replace("on.gif", "off.gif");

When I want a question like that answered I comment out the line of code and watch what happens !!
(2013-02-11, 06:46 PM)Spangle Wrote: [ -> ]
(2013-02-11, 06:43 PM)therussiangamer Wrote: [ -> ]
(2013-02-11, 06:20 PM)Spangle Wrote: [ -> ]
(2013-02-11, 05:37 PM)Alone warrior Wrote: [ -> ]
(2013-02-11, 05:32 PM)therussiangamer Wrote: [ -> ]http://adminspot.net/topic/4521-mybb-how...if-to-png/

as you can see there,

you need to change the JS is there any way to do that without changing JS?>

You can just change gif extension to png with Filezilla or cpanel's filemanager directly or rename file extension and upload them

Changing the extension doesn't change the format of the file, a gif is a gif.
What you are saying is put a Rolls Royce badge on a Ford, and the Ford will become a Rolls Royce... it wont !

What is this code for?

$('mark_read_'+fid).src = $('mark_read_'+fid).src.replace("on.gif", "off.gif");

When I want a question like that answered I comment out the line of code and watch what happens !!


ehh.. What?
On the first question: if you upload the png icons and then in filezilla or filemanager rename the extension to GIF then the images will show - but will be gifs. It does work.

The code you shared is from the js file?

What is does is it looks for an id of mark_read which has an image called on.gif and replaces that image with off.gif.
(2013-02-11, 06:20 PM)Spangle Wrote: [ -> ]Changing the extension doesn't change the format of the file, a gif is a gif.
What you are saying is put a Rolls Royce badge on a Ford, and the Ford will become a Rolls Royce... it wont !

A gif won't remain gif if you change extension but image will remain same.

Anyways i don't know what are you trying to do.. I thought you just want to use some gif image icon on your theme where current files are in png format.
Pages: 1 2