Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 8 Years, 8 Months, 4 Weeks ago Collapse .gif to .png?
#1
Solved: 8 Years, 8 Months, 4 Weeks ago Question 
Okay, so I searched around and found a solution to do this, which was editing the general.js file.
http://community.mybb.com/thread-123693-page-2.html

I copied over the modified .js file to my theme's directory.
images/mytheme/jscripts/general.js

Removed the old <script> line from the header include and added.
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/impress/jscripts/general.js?ver=1603"></script>

The general.js can load from the browser when visited directly.

Now all my forum shows is [+] and [-], I click view image and it's .gif instead of .png
Any ideas? here is the general.js file.

http://pastie.org/pastes/5796987/text
#2
Solved: 8 Years, 8 Months, 4 Weeks ago
This user has been denied support. This user has been denied support.
Find

if(element.src.match("off.gif") || element.src.match("offlock.gif")

Change it to

if(element.src.match("off.png") || element.src.match("offlock.png")


Find

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

Change it to

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


I'm not 100% sure if this works or not but I can give a better solution and hopefully working one if you can provide me your sites URL in this thread or via PM.
#3
Solved: 8 Years, 8 Months, 4 Weeks ago
(2013-01-21, 10:49 PM)Turbo Wrote: Okay, so I searched around and found a solution to do this, which was editing the general.js file.
http://community.mybb.com/thread-123693-page-2.html

I copied over the modified .js file to my theme's directory.
images/mytheme/jscripts/general.js

Removed the old <script> line from the header include and added.
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/impress/jscripts/general.js?ver=1603"></script>

The general.js can load from the browser when visited directly.

Now all my forum shows is [+] and [-], I click view image and it's .gif instead of .png
Any ideas? here is the general.js file.

http://pastie.org/pastes/5796987/text

I've had the same problems when trying to convert other images from .gif to .png,and can only assume that there are a lot more files than just the general.js file that need editing for the .png's to display.
[Image: userbar_zpsfd84f02d.png]

I'm English, I use an "s" not a "z", the spell checker is wrong not me !!
#4
Solved: 8 Years, 8 Months, 4 Weeks ago
(2013-01-21, 11:02 PM)kamz89 Wrote: Find

if(element.src.match("off.gif") || element.src.match("offlock.gif")

Change it to

if(element.src.match("off.png") || element.src.match("offlock.png")


Find

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

Change it to

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


I'm not 100% sure if this works or not but I can give a better solution and hopefully working one if you can provide me your sites URL in this thread or via PM.

Just looking to do it for the collapse images, not the off and on ones yet.
#5
Solved: 8 Years, 8 Months, 4 Weeks ago
This user has been denied support. This user has been denied support.
My bad. Well can you PM me your site or an easy solution. Rename your collapse images to .png from .gif in your FTP.

Edited

Find

element.src = element.src.replace("collapse_collapsed.png", "collapse.png");				

Change it to
element.src = element.src.replace("collapse_collapsed.EXTENSION", "collapse.EXTENSION");	

Find

element.src = element.src.replace("collapse.png", "collapse_collapsed.png");

Change it to

element.src = element.src.replace("collapse.EXTENSION", "collapse_collapsed.EXTENTSION");

Change EXTENSION to the files extension it should be
#6
Solved: 8 Years, 8 Months, 4 Weeks ago
I modified the .js to .png, originally it said .gif. But it's still pulling .gif.
#7
Solved: 8 Years, 8 Months, 4 Weeks ago
This user has been denied support. This user has been denied support.
(2013-01-21, 11:23 PM)Turbo Wrote: I modified the .js to .png, originally it said .gif. But it's still pulling .gif.

Now, not the jscript file. You should change the extension of the image if you want to rename it which will be in the images directory. I don't know what's wrong with me today for not giving full explanations or reading the whole post lol.
#8
Solved: 8 Years, 8 Months, 4 Weeks ago
I already have the .png images in the directory. On the forum itself, the image appears broken. I click on "View Image" on firefox and it's still pulling collapse.gif instead of .png.
#9
Solved: 8 Years, 8 Months, 4 Weeks ago
This user has been denied support. This user has been denied support.
Try this.

Find

element.src = element.src.replace("collapse_collapsed.png", "collapse.png");				

Change it to
element.src = element.src.replace("collapse_collapsed.gif", "collapse.gif");	

Find

element.src = element.src.replace("collapse.png", "collapse_collapsed.png");

Change it to

element.src = element.src.replace("collapse.gif", "collapse_collapsed.gif");
#10
Solved: 8 Years, 8 Months, 4 Weeks ago
That would restore it back to original, I'm trying for it to display my custom .png collapse image.
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)