vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   postprocess the HTML output when pressing "preview" in editpost.php (https://vborg.vbsupport.ru/showthread.php?t=223289)

BRotondi 09-15-2009 08:50 PM

postprocess the HTML output when pressing "preview" in editpost.php
 
Hello

I want to postprocess the HTML output when pressing "preview" in editpost.php.

Now I'm trying this for about thre hours... and really dont get through...

Can someone please help me? The solution for Replace Word in Post - only HTML! was to change $this->post['message'] in postbit_display_complet.

Thanks!

Bruno

Lynne 09-15-2009 09:35 PM

First thing to do is to find the hook in the code and see what is going on around it. If you find that one, you'll see the next line is to output the template. It looks like the toolbar for the post, which is fed the message, is done before that hook (line 1071), so I'd guess you are trying to modify it too late.

BRotondi 09-15-2009 09:41 PM

Hy Lynne

Thanks! I just realized it and changed my first post.

This thing is really getting me crazy: I can see, that editpost.php creates $vbulletin->GPC['message'] on Line 182 ($vbulletin->input->clean_array_gpc('p', array(...). But when I insert $vbulletin->GPC['message'] = 'test'; after this Line, not only the HTML will change, but also the Original (with the BBs) ...

Any Idea?

Bruno

Lynne 09-15-2009 09:55 PM

Are you not trying to modify the original also? If you modify what goes into the post preview, then it is going to modify the post upon save.

BRotondi 09-16-2009 06:22 AM

Phu... found it: $previewmessage in newpost_preview.

I only want to change the Preview, not the WYSIWYG (because of what you said) or the original (BB). bbcode_parse_complete is an interesting hook, but called for very different things...

This took some hours of debugging and understanding how vB works, but I hope not to forget what I learned :).

Thanks for your help!
Bruno


All times are GMT. The time now is 09:52 PM.

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.01444 seconds
  • Memory Usage 1,713KB
  • 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
  • (5)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