DHTML popup for Forum List menu link
Posted by sheik
|
DHTML popup for Forum List menu link February 04, 2007 08:22PM |
Registered: 23 years ago Posts: 687 |
I wanted my "Forum List" link when reading messages to open up a popup list allowing quick navigation between forums.
After far too long messing about with an (almost) CSS only solution (Suckerfish menus etc), I gave up and started looking at Javascript (the CSS only solution works great using just <ul> and <li> links, but I couldn't get it to play nicely with Phorum's divs and floating divs for the rest of the navigation options, the float: right "goto" link in particular screwed me).
So, I am currently trialling the OverlibMWS library to generate my popup.
You can see the results here: [www.cantonese.sheik.co.uk]
(just hover over the Forum List navigation link).
The effect seems to degrade fine with older browsers - they will just display the link as normal with no popup.
I'm not sure about the fadein/fadeout effect yet, it adds 15Kb of overhead per visit and I'm not sure it's worth it yet... :-)
Anyway, hopefully this is interesting to template designers. All things being equal, I'd prefer a CSS-only solution, but that would require more time redesigning the Phorum template.
Any feedback or links to alternative solutions would be welcomed.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
After far too long messing about with an (almost) CSS only solution (Suckerfish menus etc), I gave up and started looking at Javascript (the CSS only solution works great using just <ul> and <li> links, but I couldn't get it to play nicely with Phorum's divs and floating divs for the rest of the navigation options, the float: right "goto" link in particular screwed me).
So, I am currently trialling the OverlibMWS library to generate my popup.
You can see the results here: [www.cantonese.sheik.co.uk]
(just hover over the Forum List navigation link).
The effect seems to degrade fine with older browsers - they will just display the link as normal with no popup.
I'm not sure about the fadein/fadeout effect yet, it adds 15Kb of overhead per visit and I'm not sure it's worth it yet... :-)
Anyway, hopefully this is interesting to template designers. All things being equal, I'd prefer a CSS-only solution, but that would require more time redesigning the Phorum template.
Any feedback or links to alternative solutions would be welcomed.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
|
Re: DHTML popup for Forum List menu link February 04, 2007 08:25PM |
Registered: 23 years ago Posts: 687 |
By the way, seeing as I'm loading the Overlib library anyway for my Phorum pages, I plan on looking at incorporating some Ajax too. I'm thinking hovering over the "last post" link in the Phorum message list view could bring up a popup that dynamically shows a preview of that message.
Personally, I think that would rule...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Personally, I think that would rule...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
|
Re: DHTML popup for Forum List menu link February 04, 2007 08:27PM |
Registered: 19 years ago Posts: 1,301 |
|
Re: DHTML popup for Forum List menu link February 04, 2007 09:25PM |
Registered: 23 years ago Posts: 687 |
I have my Ajax call working and have written a little script to get formatted HTML for a Phorum message - BUT... I can't currently figure out how to extract the message-id using Phorum's template markup language :-(
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
|
Re: DHTML popup for Forum List menu link February 04, 2007 09:38PM |
Registered: 23 years ago Posts: 687 |
This is really frustrating, I have access to {ROWS->last_post_url} in the template, but there is sadly no {ROWS->last_post_id} which is what I really need...
I think I'm going to have to break into PHP but I don't understand enough about Phorum's data structures to get the message-id in an efficient way...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
I think I'm going to have to break into PHP but I don't understand enough about Phorum's data structures to get the message-id in an efficient way...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
|
Re: DHTML popup for Forum List menu link February 04, 2007 09:55PM |
Registered: 23 years ago Posts: 687 |
OK, I'm getting the "last post" message ID in the template for list.tpl, within the ROWS loop, like so :
If there is a pure template markup solution, please let me know.
The good news is that my Ajax call is now working as a proof of concept. Now I just need to fix the formatting of the popup...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
$message_id = $PHORUM['TMP']['ROWS']['meta']['recent_post']['message_id'];
If there is a pure template markup solution, please let me know.
The good news is that my Ajax call is now working as a proof of concept. Now I just need to fix the formatting of the popup...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
|
Re: DHTML popup for Forum List menu link February 04, 2007 11:07PM |
Registered: 23 years ago Posts: 687 |
Bah, there is some strange problem whereby the first mouseover always fails to load data via Ajax, and then each subsequent mouseover shows the data that the previous one should have.
You can see the problem here: [www.cantonese.sheik.co.uk]
(the first time you hover over a "last post" link, you won't see a message, and if you then hover over a *different* one you will see the message you should have seen the first time.
Note the caption of the popup box is not using Ajax, and is therefore correct all the time.
Can anyone else verify this behaviour (so I can rule out crap caching by my cable provider)
I've looked at the source code and each link is using the correct message_id for my server side script to process, so I'm not sure what the problem is.
However, I'm going to bed now so it will have to wait a while...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
You can see the problem here: [www.cantonese.sheik.co.uk]
(the first time you hover over a "last post" link, you won't see a message, and if you then hover over a *different* one you will see the message you should have seen the first time.
Note the caption of the popup box is not using Ajax, and is therefore correct all the time.
Can anyone else verify this behaviour (so I can rule out crap caching by my cable provider)
I've looked at the source code and each link is using the correct message_id for my server side script to process, so I'm not sure what the problem is.
However, I'm going to bed now so it will have to wait a while...
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
|
Re: DHTML popup for Forum List menu link February 05, 2007 12:38AM |
Admin Registered: 25 years ago Posts: 4,506 |
Quote
sheik$message_id = $PHORUM['TMP']['ROWS']['meta']['recent_post']['message_id'];
{ROWS->meta->recent_post->message_id} =)Brian - Personal Blog
|
Re: DHTML popup for Forum List menu link February 05, 2007 12:40AM |
Admin Registered: 25 years ago Posts: 4,506 |
Quote
sheik
Can anyone else verify this behaviour (so I can rule out crap caching by my cable provider)
I am seeing the same thing, yes.
Brian - Personal Blog
|
Re: DHTML popup for Forum List menu link February 05, 2007 04:44AM |
Registered: 23 years ago Posts: 687 |
Thanks Brian,Quote
{ROWS->meta->recent_post->message_id}
The Phorum template language is a work of beauty when you know the right syntax and structures, but I honestly couldn't find the above in either the documentation or the forums.
I'll try and update the Wiki when I get a minute (although the template page looks barely touched since I added most of the content a year or so ago - we really need some more pro-active documenters :-) )
I've contacted the support mailing list for OpenlibMWS, so we'll see what they say about the weird Ajax behaviour I'm seeing. Hopefully I've just done something silly.
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Your IP address, domain or ISP has been blocked. Please contact the forum administrators.
Sorry, only registered users may post in this forum.
