vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Messing with $post[message] in functions_newpost.php-The quest continues! Form vars? (https://vborg.vbsupport.ru/showthread.php?t=206774)

MTGDarkness 03-05-2009 05:31 PM

Neither adds the info to the post nor parses it. :(

Dismounted 03-06-2009 03:58 AM

Actually, just add it to postbit_display_start instead. The parser is run just after that.

MTGDarkness 03-06-2009 04:03 AM

I tried that, then it just does nothing. It doesn't even add it to the html code.

Dismounted 03-06-2009 06:00 AM

And the code you are using is?

MTGDarkness 03-06-2009 11:27 AM

PHP Code:

    $post['message'] = $post['field11'].$post['message'].$post['field12']; 

Message shows up, the fields don't.

Dismounted 03-07-2009 10:34 AM

PHP Code:

$this->post['pagetext'] = $this->post['field11'] . $this->post['pagetext'] . $this->post['field12']; 

$post['message'] is only created when BB code is parsed.

MTGDarkness 03-07-2009 08:35 PM

That worked! OMG Thanks! :D
One question though-what's $this?

Lynne 03-07-2009 08:46 PM

Object Oriented PHP :)

MTGDarkness 03-07-2009 09:14 PM

I'm just gonna stop asking there, because I'm 99% sure that I'll never get it. Ever. :D

Dismounted 03-08-2009 04:44 AM

Quote:

Originally Posted by MTGDarkness (Post 1762747)
That worked! OMG Thanks! :D
One question though-what's $this?

$this is a variable that only exists in a class/object. It refers to the current object (i.e. the object where you are running the code). In your case, using $this->post and $post would not make a difference, they are the same (assigned by reference):
PHP Code:

$this->post =& $post



All times are GMT. The time now is 06:28 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.01735 seconds
  • Memory Usage 1,735KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete