vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Making vb5 a one page AJAX forum (https://vborg.vbsupport.ru/showthread.php?t=311826)

SlashOwnsU 05-31-2014 07:30 PM

Making vb5 a one page AJAX forum
 
As the title implies, we need to make vb5 a one-page forum driven by ajax.

The reason is that we need to have a persistent audio player (ie keeps playing as we navigate pages) at the bottom of the page.

We worked it out with vb4 by using history.js and handling the <a> click events manually.
The handler would just fetch the page corresponding to the clicked URL and update the page accordingly.

This seems impossible with vb5. I can't seem to verride the vb5 <a> handlers in any way, and whatever I do the pages reload on <a> click.

Does anyone have some kind of solution ? I don't insist on having ajax pages - what's important is to have a persistent audio player.

tbworld 06-01-2014 07:08 AM

On my daughters board, I use a popup window. I do a bit of JavaScript to keep it positioned where I want while other browser pages load. As long as the popup window is derived from the same site it usually will be allowed by modern browsers.

It is not a fancy solution, but it works.

BowlingTracker 06-11-2014 02:26 PM

Why not load the forums in a frame? The player can be in one frame and the forums in the other, completely independent. you can create a hook in vb that checks to see if it's contained in the frame and if it's not redirect to your frameset passing in the current vb5 url so the same page reloads inside your frame. That way, direct links into your forum still work. Can hook in a button on the forum page to copy the page link to clipboard, since you won't see the link in the address bar.


All times are GMT. The time now is 08:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00910 seconds
  • Memory Usage 1,707KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete