![]() |
NoMoreGifs
I had been working on a style for my now defunt site, while developing it, since IE7 was final and PNG's are just too cool to pass up anymore. I found it a pain to re-write all of the vBulletin templates to use the .png extension on the images. Not to mention this would make upgrading a pain in the butt.
I had Matthew make me this snipet of code. I told him I would release it and he said its fine. So to you I now give you the ability to not have to use gif's but png's in your image folders. You're webserver must support custom error documents via htaccess. Installation, Edit htaccess file to give a full/proper url to your new 404.php document Put both the htaccess file and the 404.php file in the base of you images folder. I only offer support when I have time. This modification is otherwise unsupported, but working. For style developers, if you wish to use this, please give credit where credit is due :), a link back to this mod would be great. |
Tks Zachery!
All the best Beduino |
I don't understand very well, sorry... but, is this hack something like this?
http://homepage.ntlworld.com/bobosola/ |
Awesome idea Zak :D pngs ftw
|
No, this allows you to use all png images without having to re-write vBulletin templates to do so.
Your browser will first look for a .gif file, if its not found, it sends a 404 error and thus a broken image. We use a custom 404 file to redirect to the same named image but .png and forward it to your browser. So for example https://vborg.vbsupport.ru/images/cs...ser_online.gif https://vborg.vbsupport.ru/external/2010/01/8.gif Normal image, you remove https://vborg.vbsupport.ru/images/cs...ser_online.gif and add https://vborg.vbsupport.ru/images/cs...ser_online.png the 404 file will redirect to this instead. |
No vB version?
|
It'd work for every version of vBulletin from vB Lite to vB 2020, this could even be used on other software, websites, etc.
|
awesome work, thanks!
|
How can I do that to not select vb version
|
I'm just good.
|
:up: Great share my friend.
|
Good job but my server does not support custom error documents via htaccess :(
|
Sadly thats not something i can fix :(
|
Thanks........
|
thanks but wont this affect the time loading images?
|
Quote:
|
It shouldn't.
|
Of course it will effect the loading times, maybe not by much but it all adds up.
It will be delayed the same as any typical redirection. |
Saves me a ton of time! Thanks!
|
Quote:
Could anybody explain to me how to put a full/proper url to my new 404.php? dose this mean the new url after moving the file to the Images folder??? :confused: Also I want to mention that I use PHP5, in this case should I move the file named 500.php instead? |
Zachery, can I release this at MyBBoard.net? A link back to you and this thread as well as full credit to you, I just want to share it with them, this is fantastic!
|
I'll go release it over there at some point in the future.
|
Quote:
http://www.mywebsite.com/forums/images/404.php |
Quote:
|
Will this work for all images of the entire forum?
Like lets say the reputation images? |
ALL images.
|
Thanks Z, I will check it out then.
Peace |
Do you have a demo site with this installed so I can preview it before using?
I'm guessing there is no way to restrict it to certain parts or certain images, rather than ALL of them is there? |
If you dont want to use a png, dont delete the original gif.
|
What this thread needs is all the vBulletin graphics re-saved as transparent PNG. :)
|
I'm not that motovated feldon ;p
|
I have two things to remark:
As you send a Location: header the Content-type: header doesn't matter as the browser makes a second request for the png file. This second request takes some time so I suggest doing the "decision" directly on the server without the need of a second request. This only needs the Apache module mod_rewrite: Code:
RewriteCond %{REQUEST_FILENAME} !-f Stefan |
Thanks Stefan,
it feels "faster". Regards, Chris |
Quote:
|
Your version replaces all non existant gif files with png files - am I correct? Exactly the same does my code but without causing the second (unnecessary) request.
|
Both versions doing the _same_ thing - but in different ways.
If you have mod_rewrite on your Apache, I think the solution by Stefan is better.. else Zacherys |
will this work on 3.7.0?
|
Don't know why it shouldn't?
|
I am trying to get this to work on my board which is 3.7.2 and I have followed the instructions correctly and created a image called newthread.png and then uploaded it to the correct directory and then deleted the newthread.gif but when I refresh the page I just get text saying "post new thread" and no image?
I am running vB 3.7.2, PHP 5 and I have asked my host if I have the necessary setting that this hack/mod requires and then said YES? Anyone help me out please? Thanks Danny |
You can easily rename a .png to a .gif and have the .png display normally in all major browsers.
No need for this hack. |
All times are GMT. The time now is 06:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|