Firefox PHP

Chat sidebar (get me out of frames!!)

Posted by b00radley 
All files from this thread

File Name File Size   Posted by Date  
page.JPG 44.3 KB open | download b00radley 10/05/2009 Read message
Chat sidebar (get me out of frames!!)
October 05, 2009 12:29AM
Currently I have the forum and a chat window in separate vertical frames (see attached picture). Although I dont enjoy using frames, it allows a user to browse the forums while chatting in the same window quite easily. However, the URL never changes due to the frameset. With a forum having the current page link at hand is a requirement.

My question is, is there a way to integrate the chat into the page so that the URL in the top bar is always correct? would it make the applet reload each page load? I suppose I could even settle for a text box with the current forum URL in it or a 'breakout' link in my template that would remove the chat frame. Currently the "I dont like chatz' link above the chat box accomplishes this, but it only redirects to the root folder of the forum.

Any idea's that would make this page run smoother would be greatly appreciated!



Edited 1 time(s). Last edit at 10/05/2009 12:31AM by b00radley.


Re: Chat sidebar (get me out of frames!!)
October 05, 2009 03:24AM
Putting the chat inside a Phorum template would of course make it reload the chat on every click, so that is not what you want.

What I probably would do, is add some javascript code to footer.tpl, which updates the document.location of the top frame to <original document.location>#<encoded document.location of the frame>. So on each click, the frame location is also visible in the browser's location bar. Now if the user bookmarks the page, he will come back with the #url part in the location. That's where the outer frame has to do its work. On loading, the outer frame has to pickup the url (either from onload javascript code or from a php script that generates the frame page) and redirect the forum frame to that URL.

For frame break out, there are plenty of examples on the net. I don't think however, that this would make things really better for the user.

When hiding the chat, you might consider not loading the forum in the top frame, but instead resizing the frame sets where the chat gets a size of 0. That way, you could even have a link that would bring back the chat by resizing the frames back to their original sizes.

The implementation of all this is up to you, but I hope my ideas can give you a push in the right direction.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Chat sidebar (get me out of frames!!)
October 05, 2009 03:24AM
you could load the applet directly in the template but that would close/open the applet with every page change.
but the phorum won't be able to change the url of the frameset without being loaded directly.
so if you want that chat in there you'll have to live with it - or open the chat in a separate window or popup.

Edit: or use maurice's ideas to implement a solution - obviously ;-).


Thomas Seifert



Edited 1 time(s). Last edit at 10/05/2009 03:25AM by Thomas Seifert.
Re: Chat sidebar (get me out of frames!!)
October 05, 2009 04:14PM
Thank you for the replies!

Quote

What I probably would do, is add some javascript code to footer.tpl, which updates the document.location of the top frame to <original document.location>#<encoded document.location of the frame>. So on each click, the frame location is also visible in the browser's location bar. Now if the user bookmarks the page, he will come back with the #url part in the location. That's where the outer frame has to do its work. On loading, the outer frame has to pickup the url (either from onload javascript code or from a php script that generates the frame page) and redirect the forum frame to that URL.

I get what you are saying Maurice, but am having a hard time looking up how to do this. i have a feeling im searching for the wrong thing on google. Do you know of an example of this somewhere? Just a small push in the right direction is all im looking for. Thanks!
Re: Chat sidebar (get me out of frames!!)
October 05, 2009 05:47PM
No idea how useful these are exactly, but maybe it can get you started:

[codingforums.com]
[www.irt.org]
[programming.top54u.com]


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login