Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
sunlax
New Member
New Member



Joined: Jan 14, 2007
Posts: 8
Location: Canada

PostPosted: Mon Jan 15, 2007 1:05 pm Reply with quote

Hello all, (first post here, new RN user...)

Does anyone know of a way to control the visibility of a block based on the users browser?

TIA.
Aaron....


Last edited by sunlax on Mon Jan 15, 2007 1:38 pm; edited 1 time in total 
View user's profile Send private message Visit poster's website
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Mon Jan 15, 2007 1:16 pm Reply with quote

Interesing question, I'm not saying I know the answer, but do you want all blocks to have this functionality, or just one?

Just trying to understand exactly what you are wanting to do?
 
View user's profile Send private message
sunlax







PostPosted: Mon Jan 15, 2007 1:27 pm Reply with quote

Hi,

Well, I'm basicly wondering if I could have two similar blocks with one being shown to IE users and the other to say FF or Opera users. This could also be used, I guess, based on version. eg: one block for versions below v.4 and the other for browsers v4 & above.

Today, I'm just looking for a quick fix for a block I am working on that works great with IE, but is failing in FireFox...

Thanks for the reply,
Aaron.
 
jakec







PostPosted: Mon Jan 15, 2007 4:07 pm Reply with quote

Well it should be possible to use Javascript to detect the browser that the user is using. See this link: http://www.quirksmode.org/js/detect.html

But, it may be easier to try and fix the problem which is causing your code not to work in Firefox.
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Jan 15, 2007 9:14 pm Reply with quote

Sure its certainly possible, reading from the user-agent of the browser people are using.

Look at includes/counter.php and that should give you the necessary code to work

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©