PhotoPlog

PhotoPlog (http://www.photoplog.com/forum/index.php)
-   Miscellaneous Foobar (http://www.photoplog.com/forum/forumdisplay.php?f=4)
-   -   BASE HREF (http://www.photoplog.com/forum/showthread.php?t=1255)

cheesegrits 06-11-2007 03:40 PM

BASE HREF
 
This one has nothing to do with PhotoPlog, except that 'plog uses BASE HREF, so I was wondering if anyone had ever come across this issue.

I'm developing a mod which resides 'out of forums', so I use BASE HREF to handle relative links to other parts of vB. Most of the time this works fine.

But ... I have an issue with IE7. When using a vbEditor object, the "More" smilies link does not get BASE-ified. So it tries to call misc.php from my mod dir, instead of the forum root. I'm following the IE7 rules for BASE HREF, so I just have the one, and it's the first thing in headinclude, before any external references.

Googling around, I thought I had the answer. Quite a few people have reported that IE7 doesn't insert the BASE HREF when a link is opened using a JS window.open() call. Which is how the More smilies link gets opened, via an onclick() in the link (although there is an event handler defined for the more_smilies link, it doesn't seem to use it, as there is an embedded onclick() in the 'a href' tag). Oh well, I thought, just chalk another irritation up to IE7.

But then I noticed that in PhotoPlog (for instance when uploading an image), the More link works just fine. And I don't see any 'clever stuff' going on to make it work, it just seems to work. I see how 'plog handles the nasty issue with smilies when switching editor modes, but that's a different issue.

I've banged my head on this one till it hurts, but I just can't see why it works in 'plog, but not in my mod, LOL! We both seem to simply set BASE HREF and hope for the best.

TIA for any ideas or suggestions.

-- hugh

Morgan 06-11-2007 05:01 PM

You can either edit the JavaScript file or create a misc.php file in your mod's directory.

cheesegrits 06-11-2007 06:12 PM

Doh!!! Now I see how it works in 'plog!

Thanks.

-- hugh


All times are GMT. The time now is 03:05 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.