![]() |
Messing with $post[message] in functions_newpost.php-The quest continues! Form vars?
I want to add a snippet of code to each $post[message]. It's for a modification I'm working on. How can I add, say, a conditional clause to it? I tried editing the postbit template and it didn't work...
|
As you mentioned, editing the postbit(_legacy) template should be sufficient. What exactly did you do?
|
What I'm trying to do is, again, set up this automatic BBCode thing that I've been looking for.
I tried setting it up like this: Code:
<if condition="$post[field11] AND $post[field12]">$post[field11]</if> |
You need to convert the BB Code into HTML (called "parsing"). This needs to be done inside a plugin. (There are articles describing how to parse BB code.)
|
https://vborg.vbsupport.ru/showthrea...ghlight=bbcode
I'm not quite sure what I'm doing here. I started out on this code: Code:
<if condition="$post[field11] AND $post[field12]"> --------------- Added [DATE]1235735146[/DATE] at [TIME]1235735146[/TIME] --------------- Is there any way to just modify what goes in to $post[message]? |
You cannot do php in a template. You will have to write a plugin to do that.
|
Can't I just fiddle with the $post[message] instead? Wouldn't that be simpler?
|
If you are going to 'fiddle' with $post[message] before it is spit out in the template, you must do so using a plugin.
|
Oooh... I see. And which plugin hook? I'm guessing Postdata_Start, but I really don't know where all these hooks go to.
|
If you are in debug mode, there is a list of all the plugins called for the page on the bottom. I think I usually use postbit_display_start when I want to change something that is going into the postbit. But, you can certainly try different locations.
|
All times are GMT. The time now is 09:03 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|