PDA

View Full Version : Social Group and Album Enhancements - Quote Functionality in Social Discussions


MrEyes
02-02-2009, 10:00 PM
Quote Functionality in Social Discussions v1.0


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:

Download the attached zip file and extract to folder on your computer.
Goto your Admin CP page (ACP).
Open the "Plugins & Products" section.
Click "Manage Products".
On the page that opens scroll to the bottom and click "Add/Import Product".
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)
Click "Import"
Sit back and watch vBulletin do its magic.
Installation : Template Modification

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

<ul class="list_no_decoration controls">
Immediately after this paste the following:

<li class="smallfont"><a href="group.php?do=message&amp;discussionid=$message[discussionid]&amp;gmq=$message[gmid]">$vbphrase[quote]</a></li>
You should end up with something that looks like this:

<ul class="list_no_decoration controls">
<li class="smallfont"><a href="group.php?do=message&amp;discussionid=$message[discussionid]&amp;gmq=$message[gmid]">$vbphrase[quote]</a></li>
<if condition="$message['edit']">
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"
If you do not follow these steps when a user attempts to quote a message they will be shown an error stating that quote BBCode is not allowed

Other Information

In this version only simple quoting is supported, therefore it is not currently possible to multiquote.

This is one of the mods in my "Why isn't this stuff in the default social group system" series, for the others see these mods:

Social Group Statistics in Whats Going On (https://vborg.vbsupport.ru/showthread.php?t=204085)
Social Group Discussions Like Postbit Legacy (https://vborg.vbsupport.ru/showthread.php?t=204056)
And finally...

You know the deal if you install and use the mod please mark it as installed, if you really like it nominate it for mod of the month.

MrEyes
02-03-2009, 10:22 AM
Reserved

redlabour
02-03-2009, 02:02 PM
I hope there will be a possibility to turn this into "Without any Templateedits" in future Releases - anyway - nice Idea.

MrEyes
02-03-2009, 03:12 PM
I hope there will be a possibility to turn this into "Without any Templateedits" in future Releases - anyway - nice Idea.

Unfortunately not possible as the vBulletin default code does not have any template hooks where this needs to go.

Coders Shack
02-03-2009, 03:21 PM
Unfortunately not possible as the vBulletin default code does not have any template hooks where this needs to go.
anything is possible :)

I usually do text replacements on the actual template, and always provide the ability for the admin to put in a hook (in case their template has been drastically changed)

pein87
02-03-2009, 04:38 PM
I`ll test it for ya on a live site and provide feed back soon.

farplane dragon
02-03-2009, 05:27 PM
Works perfectly! Thanks for adding what should have been a standard feature

Keesa
02-03-2009, 06:47 PM
PERFECT. You have made our forum extremely happy.

Mark.B
02-03-2009, 08:27 PM
As has been said, I'm amazed this wasn't a standard feature. great addon, well written, works perfectly.

TandyServices
02-03-2009, 09:38 PM
Works great thanks alot..

drsli
02-04-2009, 03:47 PM
Many thanks, works like a charm! :)

pein87
02-04-2009, 05:21 PM
works like a charm withou errors so far good job and yes vbulletin devs are slacking and if they got off there high horse and pleased the customers then people wouldnt be leaving fo IP 3. Your a good coder and a smart mod maker.

KURTZ
03-09-2009, 02:01 PM
interesting job ... but i saw that there are some uncached templates ... it's possible to fix this trouble?

Reeve of shinra
03-10-2009, 04:43 AM
This should be a default feature. Thank you for releasing

MrEyes
03-10-2009, 09:38 AM
interesting job ... but i saw that there are some uncached templates ... it's possible to fix this trouble?

Not in this mod, it doesn't use any templates

KURTZ
03-10-2009, 12:38 PM
Not in this mod, it doesn't use any templates

check the pic .... :)

Lynne
03-10-2009, 02:10 PM
And I explained about the uncached template in your thread about it:
You will get that uncached template if you just use the quote function at all in discussions... or use php or code or html tags. Use any bbcode in there and that template will not be cached. If it bothers you, then cache them.

KURTZ
03-11-2009, 09:39 AM
OK Lynne but how i can cache them? so it's a Jelsoft trouble ... correct?

Lynne
03-11-2009, 02:20 PM
Yes, it is a Jelsoft issue. You can always cache them using a plugin at the cache_templates hook location:
if(THIS_SCRIPT == 'whatever')
{
$globaltemplates = array_merge($globaltemplates, array(
'this_template',
'that_template'));
}

KURTZ
03-11-2009, 02:44 PM
it's too advanced for me Lynne :) anyway thanks for all ;)

Lynne
03-11-2009, 02:55 PM
No it isn't!!!! Seriously, you can do it, I know you can! You know the uncached template names, right? And, you know the name of the page (whatever.php) that they aren't cached on. So, look at the top of the whatever.php page and find out what THIS_SCRIPT is and put that in where it says 'whatever'. Then add the template names in where it says 'this_template' and 'that_template'.

KURTZ
03-11-2009, 03:01 PM
No it isn't!!!! Seriously, you can do it, I know you can! You know the uncached template names, right? And, you know the name of the page (whatever.php) that they aren't cached on. So, look at the top of the whatever.php page and find out what THIS_SCRIPT is and put that in where it says 'whatever'. Then add the template names in where it says 'this_template' and 'that_template'.

:D OK!!!!!

but i don't understand 2 things ...

1) how i can find out what this_script is ...
2) what plugin i must use?

this is the page:
http://www.fniv.it/board/groups/testing-social-groups-35-test-quote-firefox.html

Lynne
03-11-2009, 03:04 PM
1. THIS_SCRIPT is defined at the top of the php page. Look for a line like this (this is from a page I am working on, not the page you need to look at):
define('THIS_SCRIPT', 'messagelist');2. There is a location called "cache_templates" that you would use.

KURTZ
03-12-2009, 10:07 AM
1) OK, but i don't know what page i'm working on ...
2) i've tried to find out this location in the 'plug-in manager' ... correct?

edit: i've tried to put this code into the cache_templates plug-in (mass pm users for social groups, where there are many uncached templates)

if(THIS_SCRIPT == 'mass_pm_social_group_members')
{
$globaltemplates = array_merge($globaltemplates, array(
'editor_clientscript',
'editor_css', 'editor_jsoptions_font', 'editor_jsoptions_size', 'editor_toolbar_on', 'socialgroups_masspm'));
}

and the top and at the end of the plug-in but nothing changes ...

ps this is the hook (cache_templates) at 'mass pm plug-in' ...

if ($vbulletin->options['mass_pm_social_group_members'])
{
$globaltemplates[] = 'socialgroups_group';
}

Lynne
03-12-2009, 02:15 PM
1) The page you are 'working on' is the one in the browser url. For this modification and the uncached template "bbcode_quote" which shows up when viewing the Discussion, the url is www.yoursite.com/group.php?etc.... So, I look at the top of group.php and see this line:
define('THIS_SCRIPT', 'group');

So, if I were to write a plugin to cache the "bbcode_quote" template on the group.php page, I would write:
if(THIS_SCRIPT == 'group')
{
$globaltemplates = array_merge($globaltemplates, array(
'bbcode_quote'));
}

KURTZ
03-13-2009, 10:42 AM
OK, last question Lynne, i've SEO installed so i don't know what page i'm browsering ... any tip to recognize the page?

thx :)

Lynne
03-13-2009, 02:04 PM
OK, last question Lynne, i've SEO installed so i don't know what page i'm browsering ... any tip to recognize the page?

thx :)
Ummmmmm, I don't really know. If you know the main template (if you have template names turned on, it should be at the top of the page in the page souce), then you can probably guess the name. There are only so many pages in vB. I guess you could take a guess at the page and enter THIS_SCRIPT from your guess and see if it works.

wtb
03-15-2009, 10:08 PM
Installed! If also using "Social Group Discussions Like Postbit" I notice that the code you reference above for pasting doesn't exist. Is it still going to work before we activate it. :)

MrEyes
03-15-2009, 11:19 PM
Installed! If also using "Social Group Discussions Like Postbit" I notice that the code you reference above for pasting doesn't exist. Is it still going to work before we activate it. :)

If you have a look at the postbit template page:

https://vborg.vbsupport.ru/showthread.php?t=204056

There is a bit in there about what you need to edit if you use this mod as well.

wtb
03-16-2009, 12:13 AM
Yes, I did that change. I just wanted to make sure that I didn't also have to do the one listed above. Kind of a "what comes first" kind of thing. Thank you!

john102774
06-21-2009, 09:32 AM
Thank you!

*Installed

glorify
07-26-2009, 12:58 AM
To cache, click Manage Products, Add New Plugin, then make the plugin look exactly like this. Save. Done.

Simple. Template cached.

Bergler
01-03-2010, 08:45 PM
Are there any plans to update this for vB 4.0.0? I would sure like to ad this back in my Social Groups!! :)

Bergler
02-03-2010, 02:41 PM
Are there any plans to update this for vB 4.0.0? I would sure like to ad this back in my Social Groups!! :)

Anyone?

Mukashi
04-30-2010, 11:20 PM
I'd like to second this call for this modification to be updated for vB4. I'm trying to migrate my users "club threads" over to social groups when we make the vB4 upgrade, and this is the #1 functionality that they're complaining over not having.

MagicThemeParks
05-15-2011, 10:27 PM
Another successful install of a MrEyes mod/add-on. I have to tell you, the level of detail in the install instructions are definitely appreciated. Others that may be new to installing mods/add-ons would benefit greatly! Thank you for being so thorough and complete :up:

This one is another simple and effective addition to help increase the participation within Social Groups :D

Ramsesx
12-15-2013, 04:37 PM
Great stuff, thanks.