The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
When I try to put something into postbit_display_start, like, say
Code:
echo "this is a test statement"; --------------- Added [DATE]1235820573[/DATE] at [TIME]1235820573[/TIME] --------------- Okay... I wrote this plugin: Postdata_start Code:
if ($post[field11] && $post[field12]) { require_once(DIR . '/includes/class_bbcode.php'); $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); $parsed_text = $parser->do_parse($text, $do_html, $do_smilies, $do_bbcode, $do_imgcode, $do_nl2br, $cachable); $text = $post[field11].$message.$post[field12]; } Code:
<if condition="$post[field11] AND $post[field12]">$parsed_text <else /> $post[message]</if> But when I tried it out, no HTML was outputted. And this is probably a serious security risk, seeing as people can type in PHP code for the fields and have it execute. How can I change that? |
#12
|
||||
|
||||
one way to find out where to execute your code is to look in tje php files themselves. for instance, showthread.php for stuff dealing with posts.
If you look through the code you will see the hook locations. Basically you can find out what hook is being called where. Once you know where it is being called in the code, you can go back to your plugin manager and write your code for the hook that will execute where you want it to. for instance, on line 1078 of showthread.php i see [code] ($hook = vBulletinHook::fetch_hook('showthread_postbit_crea te')) ? eval($hook) : false; [/hide] so if i were to make a plugin inside that hook it know it will be executed when that hook is called in the php file. I dont really know if its the best way to find out which hook is t he right one for your needs, but it works for me quite often |
#13
|
|||
|
|||
Come on... Can't anyone help me out here?
|
#14
|
|||
|
|||
Which file processes the form from replies? Which actual PHP file in vBulletin?
|
#15
|
||||
|
||||
Go to the page and look in the page source. You will find some line like this (this is from somewhere else, it's not it):
HTML Code:
<form action="newthread.php?do=postthread&f=11" method="post" name="vbform" onsubmit="return vB_Editor['vB_Editor_001'].prepare_submit(this.subject.value, 5)">
|
#16
|
|||
|
|||
One final question, and then I think I'll FINALLY have this stupid issue! (Breakthrough was reached by just scanning all the files that seemed relevant for a comment telling me about "this is where we process posts).
What I did was this: In file: functions_newpost.php Find: PHP Code:
PHP Code:
As to my questions... 1. Will a variable that works well in the template (in this case, the aforementioned field variables) work as they are there in the files? Like say I put this string in functions_newpost.php (where I put the last string I mentioned): PHP Code:
|
#17
|
|||
|
|||
Bump?
|
#18
|
||||
|
||||
If you are talking about the build_new_post() function, no, it will not work.
|
#19
|
|||
|
|||
GAAAAAAAAAAAAAAAH
So it's also impossible to get the info to there? How about setting a plugin that way? The guys over at MTGSalvation and MTGNews figured it out somehow! Sorry if I sound a little hysterical; I am. |
#20
|
||||
|
||||
postbit_display_complete
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|