The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Setting prefix on newthread_post_start
Hey,
Im trying to build a new product where you can set default prefixes to threads. Im a abit puzzled how to set the prefixid when a user posts. So far I have this: PHP Code:
PHP Code:
PHP Code:
I must say that Im fairly new to php and vbulletin. I only wrote programs with C# and C++ yet so Im still learning the syntax and whatnot. Thanks for the help ahead. |
#2
|
||||
|
||||
Why are you creating a new field for the database when vbulletin has thread prefixes for you to use - it's a default feature under Thread Prefixes in the Admin CP.
|
#3
|
|||
|
|||
Quote:
The thing I want is like this, just that I want to create a product so everyone can use it: https://vborg.vbsupport.ru/showthread.php?t=224211 |
#4
|
||||
|
||||
So why not use what is in that thread to do what you want?
|
#5
|
|||
|
|||
Since I cant get it to work the way you guys described, thats why Im seeking help...
Thanks for the help so far Lynne |
#6
|
||||
|
||||
To be honest, I really think you are better off using the default prefixes in vb. I think you should try to get it to work like in the other thread rather than trying to redo the whole system. You will end up with a lot of plugins if you go about it by using a whole new field.
What is it in the other thread that you are stuck on? |
#7
|
|||
|
|||
AdminCP -> Thread Prefixes
I did create a plugin to auto-assign a prefix to a thread, it was 2 lines of code. Let me know if you want it. |
#8
|
||||
|
||||
Did you create the prefix first? And did you modify the code in the other thread to use the prefixid that you assigned to the prefix? And did you assign the prefixgroup to that particular forum?
|
#9
|
|||
|
|||
Quote:
@Lynne: In the other thread he posted about 3 lines of code which dont really help me alot, Im not sure how he deals with it but I dont want to edit the core files if I can do something like this with a simple plugin. The only part Im missing is the part where the prefix is applied to the thread when a user is posting. So basically I need to check if the admin made an entry in the that admin field, then apply the prefix to the thread when the user is posting. This is my complete product: PHP Code:
PHP Code:
|
#10
|
|||
|
|||
The way I did it was to just assign both prefix values to the prefix ID:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|