The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Post Mod Question
I have a mod that scans a new thread for something and if it doesn't have that then it will kick back an error
well this is what I used $post['message'] but that is global for new threads and post replies. Is there something like that but only for new threads like $post['newthread]? Thanks to whoever help |
#2
|
||||
|
||||
The message field for any post is $post['message']. It isn't called something different based on which post it is.
|
#3
|
|||
|
|||
So then is there any other way of doing what I want to do?
like in a new thread I want the word "Bla", but in a reply I don't care if "Bla" is in there. Thanks For your help |
#4
|
||||
|
||||
I really don't know exactly what you want to do, so I don't know. You can manipulate the first post of a thread when it is being rendered if you want to use a plugin to do so (probably hook location postbit_display_complete). I think you can even manipulate it when they hit the submit button (take a look at the file class_dm_threadpost.php to find the right hook location).
|
#5
|
|||
|
|||
Ok, this is what I am attempting to do,
Edited: Took out my code I want for a First post in every thread to have either Link A or Link B. That's what I'm trying to acomplish |
#6
|
||||
|
||||
Then you probably need to look into the class_dm_threadpost.php file that I mentioned. That is where the post/thread is created and I think errors are checked in one of the classes there. So, read that page and see what hook location is best for your use (and you may need to change the variable name). You can also probably just add the error to the $errors array too.
|
#7
|
|||
|
|||
Ok, I got the hook I want but now it always gives me the error and I think it's because of this, $post['message']. The message isn't actually "posting" because it spits back an error before it can "post". I just need something for the stripos to compare against.
Again thanks, I'm not an expert at this stuff but I am learning |
#8
|
||||
|
||||
Depending on the hook location you picked, that may not be the exact variable name you use. You need to look at the code around the hook you are trying to use to see what variable names are being used.
|
#9
|
|||
|
|||
OMG!! I got it working, Thanks so much for pointing me in the right direction.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|