vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Changes in the template do not appear in the ajax refresh (https://vborg.vbsupport.ru/showthread.php?t=322200)

ndoktoruser 03-23-2016 04:40 PM

Changes in the template do not appear in the ajax refresh
 
Hello community,

I added a template in the existing template contententry (admincp -> Style Manager -> Default vB5 Style -> Edit Templates -> contententry).
This template I added is shown, when I browse the topic to write a reply. So, success!
However, after I post a reply, vBulletin refreshes only part of the page with a ajax call and, this time, the contententry does not show the template I created.

Anyone has any idea why this happens?
Is there a second contententry loaded for ajax request to which I should add my custom template?

Thanks in advance!

Replicant 03-24-2016 03:11 AM

When you reply to a thread and click post, the ajax calls loadNode which only calls for the content and userinfo for the new post and adds it to the thread so the entire page doesn't reload. This is also why the signature doesn't show on a new reply for the person that posted it, but anyone else loading that page will see the signature. Is there a reason the new template needs to be shown before the next refresh? Without knowing more about the functionality of the custom template, it's kind of difficult to understand why the new template would need to load since the content entry has already been performed.

ndoktoruser 03-24-2016 01:18 PM

I have a new field in the new template. That is why I need it to be displayed to the users every time they might post something in the forum. It doesn't matter if it is the first post or the second post after an ajax refresh.

I didn't find loadNode or the second contententry used by the ajax refresh.

Replicant 03-25-2016 03:26 PM

loadNode is at line 1654 of the createcontent.php file. You may be able to create a php hook there to inject your template, or you can force a page refresh instead of loadNode via javascript.


All times are GMT. The time now is 09:32 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.01646 seconds
  • Memory Usage 1,709KB
  • 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
  • (4)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