The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to have this option?
I have a the function hook into newpost_process, now I want to turn it post processing sent first (newthread), and if its off, it will handle all of the reply of the topic (thread) is always. Thank
|
#2
|
|||
|
|||
Sorry, I don't quite understand that. Can you try to explain it again?
|
#3
|
|||
|
|||
I wrote a function to check the posts and add it into hook newpost_process, it worked. I set admincp with check fistpost option only.
Now, I want if is check firstpost only option = on, this function only checks the first post. And this option = off, check all messages in thread. |
#4
|
|||
|
|||
I'd have to see exactly how the option is defined, but I think you want something like this:
Code:
if ($vbulletin->options['firstpost_only']) { // existing code here } Of course 'firstpost_only' would be replaced with the actual Varname for your option. |
#5
|
|||
|
|||
Quote:
Now in code, how do i do when set to YES, it will only check the first post. ==> OK But if select NO, it will check all the replies.<== how to do this |
#6
|
|||
|
|||
Do you have "Option Code" set to yesno? Then I think what I posted above should work.
|
#7
|
|||
|
|||
Quote:
Code:
if ($vbulletin->options['firstpost_only']) { // existing code here } I want to select NO, it will check and check all the reply. |
#8
|
|||
|
|||
Oh, OK, I see what you mean now. Try this:
Code:
if ($type == 'thread' OR !$vbulletin->options['firstpost_only']) { // existing code here } |
Благодарность от: | ||
Easy5s.net |
#9
|
|||
|
|||
Oh, working
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|