vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - NoMoreGifs (https://vborg.vbsupport.ru/showthread.php?t=141493)

Zachery 07-08-2008 12:32 PM

You shouldn't though.

drapton 07-17-2008 02:50 AM

thanks for this, it would be real helpful, but it's not working for me. instead of the png image i get a text, i right click the text, and click view image, it then gives me the 404.php page all blank. so basically i understand that it's not poiting to the gif anymore, but i dunno why it is not showing the png file then? any idea?

Zachery 07-18-2008 11:58 AM

A link to your site would be useful :)

pranaysanghavi 07-19-2008 07:51 PM

Edit htaccess file to give a full/proper url to your new 404.php

kindly explain proper steps in layman's terms...

u mean we shud create new htaccess and new 404.php, both of which we shud load in image dir of every style that our forum has?

Zachery 07-20-2008 01:45 PM

Its explained as simply as possible.

pranaysanghavi 07-22-2008 10:33 AM

Quote:

Originally Posted by Zachery (Post 1579820)
Its explained as simply as possible.

hmm didnt work as expected. please open in IE-> http://www.officechai.com/testvbforum/index.php
see the empty image placeholders (scroll down) in main forum categories (not the header) on that very page..

I put the 404.php and .htaccess in here:
/public_html/testvbforum/images

i had some images in png, and not gif, same file name.. however, it still doesn't auto replace it. [i even changed the template to refer to .png] it still looks for testvbforum/images/styles/smartblue/statusicon/forum_old.gif but i do have testvbforum/images/styles/smartblue/statusicon/forum_old.png there.

i checked with my hostmonster guy, they do support this. any help appreciated.

StGaensler 07-22-2008 11:23 AM

Quote:

Not Found

The requested URL /testvbforum/images/styles/smartblue/statusicon/forum_old.gif was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.officechai.com Port 80
The server can't find the ErrorDocument - the 404.php
Give him the correct path to this file, and he will find it.

pranaysanghavi 07-25-2008 05:16 PM

Quote:

Originally Posted by StGaensler (Post 1581309)
The server can't find the ErrorDocument - the 404.php
Give him the correct path to this file, and he will find it.

How to give the correct path? sorry to trouble with silly questions, but i still can't get it working. this is the final mod that I need to configure, apart from one unrelated, before i could go live.

I've put .htaccess at 3, 4 places in the dir structure. where all shud i put 404 and where all shud i put .htaccess?

I'm new to .htaccess and php, as per the instruction I've added the files. still i dont see any result. can u please guide me little easy? :erm:

gezuvor 08-21-2008 05:55 PM

My server can find the 404 file, but it's just showing a blank page... ?

dannykilla 09-02-2008 10:49 PM

Hi Zachery,

I have now uploaded the .htaccess & 404.php file to the /images/ directory and give the full path to the 404.php file on the .htaccess and also uploaded a newthread.png and removed the newthread.gif img.

but I dont get the png image I just get text, I sent you a PM with my URL.

Thanks m8
Dan

Konstantinos 09-03-2008 02:57 PM

why using this while we can use replacement variables if we want to have both png and gif
/buttons/newreply.gif -> /buttons/newreply.png

apart from having to add each replacement variable for every png we intend to use, is there any other benefit ?

Zachery 09-03-2008 04:54 PM

Quote:

Originally Posted by Konstantinos (Post 1613661)
why using this while we can use replacement variables if we want to have both png and gif
/buttons/newreply.gif -> /buttons/newreply.png

apart from having to add each replacement variable for every png we intend to use, is there any other benefit ?

It'd be _alot_ of replacements, i'd rather not write that much code tbh.

Zachery 09-03-2008 04:56 PM

http://www.tf2-forums.co.uk/forums/i.../newthread.png redirects to >
http://www.tf2-forums.co.uk/forums/images/404.php But doesn't redirect.

Make sure your php error reporting is on.

dannykilla 09-03-2008 06:16 PM

I have spoken to my host and they say that error reporting is ON by default.
But said that this on the support ticket:

"Dan,

Error reporting is enabled for the server by default. This would only change if you created a php.ini file that disabled it or the script itself disabled it. Have you checked the directory where the script resides to see if an error_log file is being created?"


So what I think he is referring to vBulletin, does vB do this ?

Dan

dannykilla 09-04-2008 07:34 AM

Now my server is using PHP 5, I have error reporting switched ON. Is there any thing you can think of that may be causing me to have trouble with this hack?

Thanks
Danny

dannykilla 09-04-2008 04:12 PM

I have figured this out now, thanks to StGaensler!

I was putting the full URL path on the .htaccess file instead of simply putting this:

ErrorDocument 404 /forums/images/404.php

Thanks Zachery Awesome hack and thanks StGaensler!
Dan

killswitch 10-12-2008 01:14 PM

Terrible... won't work with easyPhP.

Zachery 10-13-2008 06:57 AM

What?

eJM 10-29-2008 05:34 AM

Quote:

Originally Posted by Prezadent (Post 1568669)
You can easily rename a .png to a .gif and have the .png display normally in all major browsers.

No need for this hack.

Quote:

Originally Posted by Zachery (Post 1570037)
You shouldn't though.

Why shouldn't we? I was just having trouble with 7 icons in the statusicon folder. I use Fireworks for my graphics work, so I created the images in PNG8 with drop-shadows. GIF transparencies just weren't making the cut. Anyway, I uploaded the PNG files and then renamed them to GIF files. Works great - a lot better than the transparent GIFs, although file size was increased.

I'm waiting to hear back from some of my older members to see if they think they render different than they should. Some of them might be using older versions of their browsers.

R'gards,

Jim McClain

dannykilla 12-17-2008 09:49 PM

anyone else get this working on 3.8 RC1 ?

Zachery 12-23-2008 07:56 AM

Danny, this in theory works anywhere, it has no real version depedancy. Infact it can work on non vbulletin sites just as well.

tommythejoat 01-22-2009 03:35 PM

In short the feature only requires Apache.

I think the not found option in the alternate form is easy to overlook when reading.

If you use the mod rewrite you save a file fetch and an execution. If you are loading the simley images, the editor, etc. that is a lot of reads. Offhand it looks like it would save about 100 or so file reads per page.

NAZIA 03-19-2009 02:57 PM

I can not understand, why you prefer PNG....

here in IE6 Png are creating problem, in transparency, you can see
screen shot..
Attachment 96722
Attachment 96721

But Gif never shows this dual effect...

Zachery 03-21-2009 06:21 PM

Quote:

Originally Posted by NAZIA (Post 1771882)
I can not understand, why you prefer PNG....

here in IE6 Png are creating problem, in transparency, you can see
screen shot..


But Gif never shows this dual effect...


Because IE6 sucks, its a bad browser with limited support. PNG's have alpha transparency which is better than normal on off transparency. All modern browsers support PNG's.

StGaensler 03-23-2009 01:04 PM

Quote:

Originally Posted by NAZIA (Post 1771882)
I can not understand, why you prefer PNG....

here in IE6 Png are creating problem, in transparency, you can see
screen shot..

I can't understand why you prefer a more than seven-year-old browser over a modern webbrowser :) IE 6 was released in october 2001...

stanleys 04-02-2009 01:07 AM

This mod works by redirecting all forum icon requests to their .png equivalent via mod_rewrite?

daCocio 04-05-2009 04:10 AM

It was working but I made a few icon changes, now it does not work. I redid everything when it first worked. I am just puzzled. Any thoughts? You can see the missing images mostly on the postbit & thread page.

My site: http://tinyurl.com/d4u49l

dannykilla 04-25-2009 03:13 PM

Hi,

I have recently tried to get this to work on my server and for some reason its not having it, so I tried the same process on my friends server and it worked, so what could be stopping it on my end.

When I delete the .gifs all I get is a blacnk space on FF!

Can anyone suggest anything?

thanks
Danny

dannykilla 04-27-2009 10:11 PM

Ok I have spoken to one of the Tech dudes from my hosts and he said this:

"This hack will not work in your configuration as any file that does not exist (which would cause a 404) will be handed to Wordpress and managed by wordpress' 404 handler."

Is there anyway around this?

Dan

dannykilla 04-28-2009 10:54 AM

My hosts re-wrote my Wordpress .htaccess file, and this now works awesome!

If anyone uses Wordpress and wants to know how to solve this, just send me a PM.

Carlos-Sz 06-01-2009 09:42 PM

Quote:

Originally Posted by StGaensler (Post 1506051)
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
RewriteRule (.*)\.gif$ $1.png [NC,L]

Every non-existing gif file so gets redirected to a png file. I don't check if the png file exists but I think this doesn't matter ;)

Stefan

Can you please explain a bit more?

Do I have to add those lines in my ".htaccess" file? Is that all?

In my root folder I can't see any mod_rewrite. I'm sorry but I know nothing about this.

Thank you in advance.


All times are GMT. The time now is 01:04 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
  • Page Generation 0.01804 seconds
  • Memory Usage 1,809KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete