blurredreality Posted November 11, 2009 Posted November 11, 2009 Hello all. I've been messing about trying to get moodalbox (a lightbox style viewer which allows you to open html pages) added to the product_info page of my site. For ages it wouldn't work, much to my confusion. I tried it using a blank html file in the same directory (with the same coding added) and it did work. I tracked down the problem to the line of code in product info: <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> When I commented this out, the moodalbox opened no problem - whereas before it wouldn't find the correct page in firefox and would simply direct to the page normally in IE. I figure this is to do with setting the link type using rel="moodalbox" - the rel attribute being confused by the base href? So basically - my dead quick question is: Is commenting out the base href tag going to be a problem? It seems like all links to/from the page work fine without it, and information loads fine on the page. It just seems like a really dirty way round things. So yeah, any comment on the problems this may cause would be much appreciated! (For those interested, this is the link to moodalbox) http://www.e-magine.ro/web-dev-and-design/36/moodalbox/
Ben Nevis Posted November 11, 2009 Posted November 11, 2009 The base href just means that all relative links in the html page start from that specified base location. If in fact none of the other links in the page are given relative to the base, ie they are given as a full url path, the presence or absence of a base href should make no difference. Whether in fact it makes a difference to everything that happens in and from product info is something you should be able to see quite easily, and if it doesn't then it logically it should be fine. www.jyoshna.com. Currently using OsC with STS, Super Download Store, Categories Descriptons, Manufacturers Description, Individual Item Status, Infopages unlimited, Product Sort, Osplayer with flashmp3player, Product Tabs 2.1 with WebFx Tabpane and other bits and pieces including some I made myself. Many thanks to all whose contributions I have used!
germ Posted November 11, 2009 Posted November 11, 2009 When you comment this out does the page still work in Firefox AND IE? :unsure: When this bit of code doesn't do what it's intended to do Firefox will figure it out (usually) and display the page properly. But viewing the same page with IE all your images won't show. To further the last posters explanation of the code just a bit, this is how osC "gets around" image links on SSL/NONSSL pages. In osC all the image links are "relative" (as the last poster mentioned). Then when you switch from a HTTP page to a HTTPS page this bit of code changes so the images links still work and you don't get the "non secure items" popup in IE. HTH :) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
blurredreality Posted November 12, 2009 Author Posted November 12, 2009 Hey guys thanks for the response. The links all seem to be working fine, and the images seem to be loading fine - which I guess is why I was confused. This is the case in both IE and FireFox, Opera and Safari. It seems odd that they should, but I can't complain I guess! Rare that a peculiarity works in your favour though! Anyway I'll leave it for now as it all seems to work fine. Thanks again.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.