The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add/Change posting data
Hello, everyone!
I am currently working on a similar functionality of anonymous posting, adapted to vBulletin 5. I have added a check box to flag that the user will post anonymously. Now, I need to change the code which gets the data submitted by the form and saves it in the DB. So, how do I change the data submitted by the user when he/she posts in a topic? I don't want to change the code of the vBulletin classes. Maybe there is a way of simply add/change the content of the $data array which saves the data in the node table. I also need to perform a second insertion (this time, to another table, to add the anonymous information). Does anyone have any hint of what to do or know any plugin that does something similar using vB 5? Note: as soon as the plugin is complete, I intend to post it on the forum to get feedback and share it with other people who need the same feature. ------------------- Edit to add code related to the plugin: 1) Download the product_anonymous.xml file attached to this post; 2) Install the product: go to "Products & Hooks" -> "Manage Products" -> "Add/Import Product" and install the .xml file; 3) Create a new template: Go to "Style & Themes" -> "Style Manager" -> pick "Add New Tamplate" for "Default vB5 Style" 3.1) For this new template, set "anonymous_cb" as the title and following code: HTML Code:
<vb:if condition="$page['hasCheckbox'] == true"> <div class="b-content-entry-panel__content b-content-entry-panel__content--smiley h-clearfix"> <label class="js-collapse__link h-align-middle text-bold b-link js-link" for="checkbox_anonymous">Post as anonymous</label> <input type="checkbox" id="checkbox_anonymous" name="anonymous_post" value="1"> </div> </vb:if> As result, a check box to post anonymously will appear (the function must be implemented). |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|