PDA

View Full Version : BT - Quote Functionality in Social Discussions



admin
06-01-2011, 06:37 AM
IMPORTANT NOTICE: A big thanks goes out to MrEyes, whose original hack (http://www.vbulletin.org/forum/showthread.php?t=204052) and permission to re-use his code enabled me to release this hack. Thanks also go out to MrEyes who gave me permission to use some of his install code. If you using vBulletin 3.8.X then here you go; http://www.vbulletin.org/forum/showthread.php?t=204052 (MrEyes originally hack for 3.8.x) Thanks again.

As the title suggests this modification allows you to add message quote functionality to vBulletins Social Group discussions. The installation of this product is made up of the following and does not require any file changes:

-One product import.
-One manual template modification.
-One configuration change.

Once installed an additional SQL query is made, however this only occurs when somebody clicks the quote button.

Installation : Product Import
The installation of this modification is fairly simple, for those that do not have experience of doing this here are the full steps:
1. Download the attached zip file and extract to folder on your computer.
2. Goto your Admin CP page (ACP).
3. Open the "Plugins & Products" section.
4. Click "Manage Products".
5. On the page that opens scroll to the bottom and click "Add/Import Product".
6. In the "EITHER upload the XML file from your computer" browse to the product XML file that you extracted in the first step (product-socialgroup_message_quote.xml)
7. Click "Import"
8. Sit back and watch vBulletin do its magic.

Installation : Template Modification
1. Goto your Admin CP page (ACP).
2. Open the "Styles & Templates" section.
3. Click "Style Manager".
4. In the page that opens find the style(s) you want to edit and select "Edit Templates" from the drop down.
5. In the "Social Groups Templates" section find the "socialgroups_message" template and open it.
6. Find the following line in the template:

<span class="postcontrols">

7. And now add below this codes:

<a href="group.php?do=message&amp;discussionid={vb:raw message.discussionid}&amp;gmq={vb:raw message.gmid}">{vb:rawphrase quote}</a>

8. You should end up with something that looks like this:

<span class="postcontrols">
<a href="group.php?do=message&amp;discussionid={vb:raw message.discussionid}&amp;gmq={vb:raw message.gmid}">{vb:rawphrase quote}</a>
<vb:if condition="$message['edit']">
<a href="group.php?{vb:raw session.sessionurl}do=message&amp;gmid={vb:raw message.gmid}{vb:if $perpage, "&amp;pp=$perpage", ''}{vb:if $pagenumber, "&amp;page=$pagenumber", ''}" id="gmessage_edit_{vb:raw message.gmid}">{vb:rawphrase edit}</a>
</vb:if>

9. Save the template changes.


Installation : Configuration Change
This modification has no custom configuration options. However it will only be functional if you have enabled quote bbcode for social groups. To do this follow the steps below:


Goto your Admin CP page (ACP).
Open the "vBulletin Options" section.
Click "vBulletin Options".
In the page that opens find the "Social Group Options" section and click "Edit Settings".
Scroll down to the "Allowed BB Code Tags in Social Group Messages" section
Enable "Allow Quote BB Code" by checking the box
Scroll to the bottom and click "Save"

Screenshots:
http://img.photo.zing.vn/file_uploads/gallery/1024x768/2011/01/06/06/32381294270601.PNG

http://img.photo.zing.vn/file_uploads/gallery/1024x768/2011/01/06/06/74981294270616.PNG