The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Select and display elements in postbit
Hello guys,
I'm using Gifts (i also attached this mod below) modification for vb3.8, the original code of this mod doesn't show gifts on postbit, so i would like to do some changes to list gift on postbit. I'm so bad in PHP and MySQL You guys please give me some advices. Thank you very much. Edit: Attachment removed, please note reason below in post #3. - TheLastSuperman |
#2
|
|||
|
|||
You could try this: create a plugin usign hook location showthread_query and this code:
Code:
$hook_query_fields .= ", gifts.*, gift_type.* "; $hook_query_joins .= " LEFT JOIN " . TABLE_PREFIX . "gifts AS gifts ON(user.userid = gifts.recipientid) LEFT JOIN " . TABLE_PREFIX . "gift_type AS gift_type ON(gifts.gifttypeid = gift_type.gifttypeid) "; Then in the postbit template you should be able to use $post['description'] or whatever else you need from the gifts and gitft_type tables. BTW, when you create the plugin, if you leave the product as "vbulletin" then after you uninstall "gifts" you're going to get errors because those tables won't exist any more. But if you select the "gifts" product, the plugin wil be deleted when you uninstall the gifts product and you'll lose it. So I think the thing to do is select "gifts" as the product then export the product (or just the plugin) so you'll have a copy of it saved. --------------- Added [DATE]1311012205[/DATE] at [TIME]1311012205[/TIME] --------------- Thanks for the "like", but I just realized that this probably won't work right when someone has received more than one gift (you may end up with duplicate posts in the thread display). I guess then you'd have to do a separate query of the gift table for each postbit and loop through them. |
Благодарность от: | ||
kevin.kool |
#3
|
||||
|
||||
Hmm, I don't believe you should post an entire modification in this manner, it's from a third party and that in a sense is re-distribution per say as they cannot track nor do they know it's available here as complete download, they may not wish that, basically it's uploading a modification w/o the authors consent.
Please link to the modification on here or via their site for someone to review next time . |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|