Log in

View Full Version : Miscellaneous Hacks - Who Quoted Me


renlok
12-14-2010, 10:00 PM
In the user control panel, users can now see a list of the last few people who have quoted them.
This is a great way to encourage users to interact with each other as they can easily keep track of conversations within threads.


Based off https://vborg.vbsupport.ru/showthread.php?t=103768

Change log:
15-12-2010: v1.0.0 initial release
16-12-2010: v1.1.0 Added admin settings and notifications about new quotes
27-01-2011: v1.2.0 Added a button in maintenance -> update counters which finds all quotes and adds them to the who quoted me list (So users know who quoted them in all posts not just those made after installing this)

If you use this i would really appreciate any small donation


If you want The who quoted me list to have its own page download wqm_Page.zip upload the wqm.php file, install the plugin and in the plugin manager open up the Add to notifications list plugin find
usercp.php
and replace with
wqm.php

Dr.osamA
12-15-2010, 10:17 PM
thank you

good work

installed + rated 5 stars

edit:not shwoing anything in usercp !!!

Alfa1
12-15-2010, 10:45 PM
Please add notifications for new quotes.

Could you please make a vb 3.8 version?

CRDeveloper
12-15-2010, 11:12 PM
thank you

good work

installed + rated 5 stars

edit:not shwoing anything in usercp !!!

I guess that there is not settings at all, or really not showing??

Installed on 4.1.0

sempoi
12-15-2010, 11:27 PM
thank you

good work

installed + rated 5 stars

edit:not shwoing anything in usercp !!!

yup! same for me... not showing anything..

OldSchoolDSL
12-15-2010, 11:28 PM
Installed

4.1 PL2

Now sure if it's working... Do not see anyone quoted me or not. No errors though.

Dr.osamA
12-15-2010, 11:30 PM
I guess that there is not settings at all, or really not showing??

Installed on 4.1.0

i discovered that not shwing just for me but for users showing normaly

i try to fix it

ther are no options for this MOd sir i know that NO sittings

thank you

OldSchoolDSL
12-15-2010, 11:38 PM
Installed

4.1 PL2

Now sure if it's working... Do not see anyone quoted me or not. No errors though.

Works.

I had to rebuild my themes, which made sense as this does add to the themes...

Admin CP > Maintenance > Update Counters > Rebuild Styles

This caused my "User Control Panel "to look all "funky".

But I had a MOD do this once before (long ago) and it's simple to fix...

Admin CP > vBulletin CMS > Clear CMS Cache > Verify and Repair Node Table

Works.

Hornstar
12-15-2010, 11:57 PM
Please add notifications for new quotes.

Could you please make a vb 3.8 version?

I was just about to ask the same thing :)

Notifications would really be golden in getting more interactivity going with the community.

And a 3.8 version would really be nice ^^

renlok
12-16-2010, 12:14 AM
Yeah ok Ill have a look at it again tomorrow try sort out the errors and add notifications.

Also Ill see how easy it will be to make a version for 3.8

Hornstar
12-16-2010, 03:02 AM
Good luck :) it will be very exciting if you can do it ^^

literatestylish
12-16-2010, 06:14 AM
Isn't working for me...

renlok
12-16-2010, 09:49 AM
updated also now it rebuilds the styles on install so hopefully it should work properly

dartho
12-16-2010, 10:39 AM
very cool ...

toneee
12-16-2010, 10:51 AM
i get this error.

Database error in vBulletin 4.1.0:

Invalid SQL:

ALTER TABLE vb_quotedatanew ADD `hasseen` int(1) NOT NULL default '0';

MySQL Error : Table 'ech22950_vbulletin.vb_quotedatanew' doesn't exist
Error Number : 1146
Request Date : Thursday, December 16th 2010 @ 07:51:01 AM
Error Date : Thursday, December 16th 2010 @ 07:51:01 AM
Script : http://echild.net.au/forum/admincp/plugin.php?do=productimport
Referrer : http://echild.net.au/forum/admincp/plugin.php?do=productadd
IP Address : 110.174.41.244
Username : anfcore
Classname : vB_Database
MySQL Version : 5.0.91-community-log

Juggernaut
12-16-2010, 11:51 AM
It's working good, but I still get no notifications.

renlok
12-16-2010, 12:27 PM
It only shows quotes for new posts it doesn't go and check all the old posts

Leica.Robbiani
12-16-2010, 02:28 PM
i get this error.
Also for me ...

OldSchoolDSL
12-16-2010, 03:18 PM
i get this error.

Seems to be an error if no one quoted you. The update seems to be "open ended" and thus you're forum is expecting to find a quote, but isn't getting one. Quote yourself and see if this corrects this.

I wonder if quotes in this mod go away after "X" amount of time. If so, then I would suspect this error will continue.

(I'm not the developer, but do want to see this Mod be successful. I've always wanted to know who's quoted me on a busy forum & from a staff point of view, that can be very helpful)

Leica.Robbiani
12-16-2010, 04:47 PM
Hi there,

Seems to be an error if no one quoted you.
I get this error during the installation process in the ACP. Maybe the database table should be created at first, then doing the other things with this table while installing.

Best regards

L.R.

OldSchoolDSL
12-16-2010, 05:05 PM
Hi there,


I get this error during the installation process in the ACP. Maybe the database table should be created at first, then doing the other things with this table while installing.

Best regards

L.R.

I hope the developer fixes this. The 1st version was a little hard to get working right away, but I did get it to work. Have not installed the update.

renlok
12-16-2010, 07:04 PM
The new update has fixed the install error with v1.1

Juggernaut
12-16-2010, 10:38 PM
I've tested it with new quotes, and it's not working with them either, will install todays second update to see if it works with this one ;)

Edit: My bad, I didn't see that there was and acp option now, everything is working perfect :D

Dr.osamA
12-16-2010, 10:59 PM
thank you for update

can i add transletion to Arabik here plzzz ?

tafreeh
12-16-2010, 11:52 PM
Suggestion: can you please add an instant notification,whenever someone get quoted.

Juggernaut
12-17-2010, 12:17 AM
Suggestion: can you please add an instant notification,whenever someone get quoted.
It's already there, you just have to enable it in the admin cp :D

Alfa1
12-17-2010, 01:21 AM
Yeah ok Ill have a look at it again tomorrow try sort out the errors and add notifications.

Also Ill see how easy it will be to make a version for 3.8
Great news there!

OldSchoolDSL
12-17-2010, 01:53 AM
Installed the update

4.1 PL2 all is working.

Nice touch on adding the adminpc option

literatestylish
12-17-2010, 02:33 AM
Anyone figure out how to move the "who quoted me" to above where Subscribed threads are?

Hornstar
12-17-2010, 03:57 AM
Wow that was a quick update. Very nice there :)

toneee
12-17-2010, 05:02 AM
Works perfect now so greatful!

Wonksta
12-17-2010, 08:28 AM
Awww bummer any luck of a 3.8.6 version this was exactly what I needed :(

renlok
12-17-2010, 09:42 AM
Anyone figure out how to move the "who quoted me" to above where Subscribed threads are?

sure in the Load Quotes plugin change usercp_main_pos4 to usercp_main_pos2

mohammad6006
12-17-2010, 11:35 AM
dont work in 4.0.6 ?

i install and dont show anything?

mohammad6006
12-17-2010, 11:39 AM
sorry i see usercp and mod work good and not have any problem

tanks for good mod

OldSchoolDSL
12-17-2010, 12:53 PM
Updated and loving the new navtab

Working flawlessly on 4.1 PL2

Nominated Mod of The Month (my community is enjoy this)

Leica.Robbiani
12-17-2010, 01:11 PM
Hi there,

it seems, it works only for posts written after installing the mod (vB 4.0.6). In my opinion this must be fixed.

Best regards

L.R.

War.Frog
12-17-2010, 01:11 PM
Installed and seems to work except on my own account. When I quote myself with another userID, I don't get a notification.

Is there something funny about Superadmins with this?

literatestylish
12-17-2010, 04:14 PM
sure in the Load Quotes plugin change usercp_main_pos4 to usercp_main_pos2

Perfect! Thanks a ton. Good mod.

OldSchoolDSL
12-18-2010, 03:27 PM
Anyone know how to get this to work with vBulletin Blogs?

rajubd
12-18-2010, 03:57 PM
it will add extra query in every thread view?

Hornstar
12-18-2010, 08:30 PM
Finally got to test this on a Test VB4.1 board, and I had two people just quote me, but I got no notification and nothing showed up in my usercp.

I checked the settings and I have it enabled with notifications. I am a super admin if that helps you work out the problem.
Thanks.

robbieswan
12-19-2010, 04:03 AM
Finally got to test this on a Test VB4.1 board, and I had two people just quote me, but I got no notification and nothing showed up in my usercp.

I checked the settings and I have it enabled with notifications. I am a super admin if that helps you work out the problem.
Thanks.
Same here

rajubd
12-19-2010, 05:28 AM
it add query in every thread view?

FreshFroot
12-19-2010, 08:15 AM
Awww bummer any luck of a 3.8.6 version this was exactly what I needed :(
Same here.

If not.. then I'll have to port it myself for 3.8 I suppose...

Though this one should not be hard to convert to vB3.8. Just some minor changes.

Hornstar
12-19-2010, 07:02 PM
Also other people only get a notification once. So if you quote them in one thread they get a notification, but then if you quote them later on in that same thread, they won't get a notification.

FreshFroot
12-22-2010, 01:40 AM
Looks good, but needs some minor fixes and usage for 3.8.

need2fart
12-22-2010, 04:51 AM
Awaiting 3.8.6. version:)

Reason why previous quotes are not showing is because quotes are stored in the post table. It's a bbcode it's not stored anywhere else in the DB. So it's just a bbcode quote of the user. When you install this it manages quotes a step further.

FreshFroot
12-23-2010, 02:10 AM
Awaiting 3.8.6. version:)

Reason why previous quotes are not showing is because quotes are stored in the post table. It's a bbcode it's not stored anywhere else in the DB. So it's just a bbcode quote of the user. When you install this it manages quotes a step further.
Well then you could store that BB code somewhere or the use of it. So that way you know there was a use of quotes somewhere.

I wonder if the creator is going to put up an update. Seems like he's on daily, but no replies so far.

renlok
12-24-2010, 09:14 AM
Yeah ive been sort of watching the thread but not had any time free after christmas i should be able to do the update and release a 3.8 version

FreshFroot
12-24-2010, 10:44 AM
Yeah ive been sort of watching the thread but not had any time free after christmas i should be able to do the update and release a 3.8 version


Sounds great!!

Thanks for updating us.

And best of holidays :)

8thos
12-26-2010, 12:58 AM
Installed. Hope it works.

toneee
01-04-2011, 07:56 AM
Best mod!

FreshFroot
01-05-2011, 12:45 AM
Any new updates yet?

renlok
01-13-2011, 10:04 AM
sorry I didn't get to this earlier, I'm really busy at the moment but will be free to have a look at it again on the 24th

Alfa1
01-18-2011, 10:57 PM
Thanks for letting us know. I'm checking this thread very regularly, as I much need the 3.8 version and quote notifications in navbar notification drop down.

Donation guaranteed.

FreshFroot
01-19-2011, 04:24 AM
Thanks for letting us know. I'm checking this thread very regularly, as I much need the 3.8 version and quote notifications in navbar notification drop down.

Donation guaranteed.
same here.. I think a lot of users are waiting for a 3.8 version.

Bulletnewcomer
01-23-2011, 12:23 PM
Wishlist: User can take on/off this mod.

FreshFroot
01-25-2011, 12:07 AM
Well an update should hopefully be coming this week.

OldSchoolDSL
01-28-2011, 02:54 PM
Updated to v1.2.0

All is working well

4.1.1

FreshFroot
01-29-2011, 04:02 AM
That's odd? It says the mod was updated?

Anyone find any new features or bug fixes? Looks like no 3.8 version either?

renlok
01-29-2011, 08:22 AM
Yeah I added this

27-01-2011: v1.2.0 Added a button in maintenance -> update counters which finds all quotes and adds them to the who quoted me list (So users know who quoted them in all posts not just those made after installing this)

Also Im looking into making a version for vb3 although I've never coded anything for 3 so may take a while

renlok
01-29-2011, 10:17 AM
heres the vb3 version https://vborg.vbsupport.ru/showthread.php?t=258001

TTF
02-10-2011, 01:16 AM
Installed (nice one!) and seems to be working for most users however I have one person who can't see any quotes.

Also where I clicked on "update who quoted me" a few times stupidly, it's created duplicated of the quotes. What's the best way of removing these duplicates? Thanks

inpico
02-11-2011, 01:15 PM
seems that it doesn't work properly when in quoted Text are Linebreaks ?!

will give in 'Find_Quotes' a try ( instead /i use /is in preg_match... )

if (preg_match('/\[quote=(.*?)\](.+?)\[\/quote\]/is', $post['message']))
{
preg_match_all('/\[quote=(.*?)\](.+?)\[\/quote\]/is', $post['message'], $quotematch);

scott_237
04-06-2011, 10:06 PM
Is there any easy way to add this to a custom HTML/PHP block in the sidebar?

bwheelock
04-08-2011, 04:46 AM
I thought I saw this issue mention in this thread before, but can you increase the security to check permissions on the section the quote comes form? It doesn't happen often, but every now and then someone will paste a quote into a different section than the one the quote came from, potentially notifying a user they were quoted in an area off-limits to them.

IE: I quoted a regular user in a public thread and pasted the quote in the staff section, and the regular user was notified and it showed the title of the staff thread. Not too huge a deal, but depending on the content and context it could cause problems for people.

Edit: Two additional comments:

1.) Seems like I have intermittent load time issues since installing this on our forum the other night. Might be unrelated, as we just pushed out a major forum upgrade on Monday, but I thought I would mention it because I didn't notice it until I added this mod.
2.) I'm anticipating requests from users who don't care to be notified about this sort of thing wanting to disable it, so the ability to disable at least notifications from the user CP would be really cool.

Phaedrus
04-12-2011, 04:13 AM
Tagged, awaiting updates for permissions issues...

scott_237
04-28-2011, 02:00 PM
I've installed this on 4.0.6, it seems to be working for all my other users but for some reason it doesn't work on my account - the administrator account.

Any reason why this should be?

henriof9
09-02-2011, 07:46 AM
We have installed vb 4.1.3 but why is it that not all quote appear ?

The Version for vB 3.x.x has worked wonderfully under vb:3.x.x.

Swedie
12-01-2011, 06:13 PM
Yeah, same problem here. It doesn't update... WTF: Must fix!

Swedie
12-01-2011, 07:11 PM
The problem lies in the preg_match function. It's incorrect and fails finding quotes when there are line breaks (what I guess) in the post that is being quoted.

I wish I knew regex code well enough, but I don't, so I can only fix this by making an ugly piece of hack without regex that finds the quotes and puts then in an array. I might post it here, but beware it's fugly code.

Swedie
12-01-2011, 07:58 PM
I figured it out pretty decently what caused it. It was the first preg_match but also for me I needed /is for case incensitive version.

Replace all the code in the plugin for this mod: Find Quotes


if(preg_match("/\[quote=(.*)\](.*)\[\/quote\]/is", $post['message']))
{
preg_match_all("/\[quote=(.*?)\](.*?)\[\/quote\]/is", $post['message'], $quotematch);
$quotecount = count($quotematch[0]);
$tempcount = 0;
$quotearray = array();

while ($tempcount < $quotecount)
{
$username = explode(';', $quotematch[1][$tempcount]);
$quoteduserid = $vbulletin->db->query_first(
"SELECT userid FROM " . TABLE_PREFIX . "user
WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username[0])) . "'"
);

if (!in_array($quoteduserid['userid'], $quotearray))
{
if ($quoteduserid['userid'] > 0)
{
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "quotedatanew (quoted,quoter,postid,dateline)
VALUES ('" . $quoteduserid['userid'] . "','" . $vbulletin->userinfo['userid'] . "','" . $post['postid'] . "','" . time() . "')"
);
$quotearray[] = $quoteduserid['userid'];
}
}
$tempcount++;
}
}


This means this mod works up to version 4.x.x.

henriof9
12-13-2011, 04:45 PM
I figured it out pretty decently what caused it. It was the first preg_match but also for me I needed /is for case incensitive version.

Replace all the code in the plugin for this mod: Find Quotes


if(preg_match("/\[quote=(.*)\](.*)\[\/quote\]/is", $post['message']))
{
preg_match_all("/\[quote=(.*?)\](.*?)\[\/quote\]/is", $post['message'], $quotematch);
$quotecount = count($quotematch[0]);
$tempcount = 0;
$quotearray = array();

while ($tempcount < $quotecount)
{
$username = explode(';', $quotematch[1][$tempcount]);
$quoteduserid = $vbulletin->db->query_first(
"SELECT userid FROM " . TABLE_PREFIX . "user
WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username[0])) . "'"
);

if (!in_array($quoteduserid['userid'], $quotearray))
{
if ($quoteduserid['userid'] > 0)
{
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "quotedatanew (quoted,quoter,postid,dateline)
VALUES ('" . $quoteduserid['userid'] . "','" . $vbulletin->userinfo['userid'] . "','" . $post['postid'] . "','" . time() . "')"
);
$quotearray[] = $quoteduserid['userid'];
}
}
$tempcount++;
}
}


This means this mod works up to version 4.x.x.

Thanks, I have taken the hint from @inpicos post #65 and it works perfectly now. :)

Breakpoint
12-20-2011, 11:29 PM
Let me know when updates, would love to try with out fixing code :D

thenamesgould
01-28-2012, 12:42 AM
I like it, thanks! The only thing is the quotes in the off-limits areas, but we can be careful not to do any for now. Cheers. :D

vauge
08-17-2012, 01:47 PM
Is there a way to easily turn this off per user?

scott_237
09-11-2012, 01:20 PM
I think this works MOST of the time, but I'm admin on my forums and I only get notified for a small percentage of the quotes, no all of them. Why is this?

EliasAlucard
10-02-2012, 07:42 PM
I think this works MOST of the time, but I'm admin on my forums and I only get notified for a small percentage of the quotes, no all of them. Why is this?Yeah, I noticed now that it hasn't been working the past 3-4 days. I'm using vB 4.2.0 and it seems like this plugin could need an update.

farazfaraz
11-02-2012, 10:52 PM
dont show

why?

vauge
11-14-2012, 05:50 PM
I figured it out pretty decently what caused it. It was the first preg_match but also for me I needed /is for case incensitive version.

Replace all the code in the plugin for this mod: Find Quotes


if(preg_match("/\[quote=(.*)\](.*)\[\/quote\]/is", $post['message']))
{
preg_match_all("/\[quote=(.*?)\](.*?)\[\/quote\]/is", $post['message'], $quotematch);
$quotecount = count($quotematch[0]);
$tempcount = 0;
$quotearray = array();

while ($tempcount < $quotecount)
{
$username = explode(';', $quotematch[1][$tempcount]);
$quoteduserid = $vbulletin->db->query_first(
"SELECT userid FROM " . TABLE_PREFIX . "user
WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username[0])) . "'"
);

if (!in_array($quoteduserid['userid'], $quotearray))
{
if ($quoteduserid['userid'] > 0)
{
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "quotedatanew (quoted,quoter,postid,dateline)
VALUES ('" . $quoteduserid['userid'] . "','" . $vbulletin->userinfo['userid'] . "','" . $post['postid'] . "','" . time() . "')"
);
$quotearray[] = $quoteduserid['userid'];
}
}
$tempcount++;
}
}


This means this mod works up to version 4.x.x.
Is there a way to wrap this in a forumid array check to turn off specific forums?

Thanks!

sadiq6210
11-15-2012, 08:05 AM
Is it working with 4.1.12?

letipro
12-14-2012, 08:05 AM
please update to vbb 4.2.0
thank

acast
12-16-2012, 06:32 PM
I am having a problem. With the mobiles, the quotes don't appear.

halocommunity
12-16-2012, 07:23 PM
Works on 4.2.0 PL2 and updated the plugin to allow for quotes with line breaks. Any chance we can get an option in the usercp to turn off notifications?

sadiq6210
01-05-2013, 07:00 PM
The mod is working but there is a user (white❤heart), She doesn't receive notifications
If I remove this symbol (❤) and change her username to (white heart) then it is working perfect !

Any idea?

marccap
02-01-2013, 08:39 AM
installed on 4.2 and working fine :cool:

RFLIndustries
02-18-2013, 03:37 AM
is it possible to make it where it does not open up a new window?

WorldCraft
02-24-2013, 06:28 PM
Works alright. I'd like to request the feature of allowing users to choose if they want notifications on or off.

BGObsession
07-04-2013, 03:11 AM
Working perfectly for me on 4.2.1. You do have to go to your Admin CP Settings section to turn on the 'Notifications' function, just as an fyi...

dutchbb
07-04-2013, 09:41 AM
Does anyone know how to tweak the top quoters query so that it only shows the top quoters of the last year instead of all time? For the 3.8 version if there's a difference...

Bulent Tekcan
12-28-2013, 08:45 AM
Is it work on 4.1.1 ?

asabet
05-17-2014, 01:23 PM
Works on 4.2.2PL1

yjmalmsteen
04-06-2015, 05:56 AM
Works fine with first install but after 7-8 hours, it stopped working. i cant use it now. 4.2.2 PL4

Phaedrus
07-25-2017, 01:30 AM
If posts are quoted in private forums does the user receive a notification? I'd not want users notified that their posts have been reported in our Mod Forum or if we quote a post up there to talk about among the mod teams.

Phaedrus
07-25-2017, 02:00 AM
Yes, in testing I was notified when I quoted my test account in the Mod Forum...

Phaedrus
07-25-2017, 02:37 AM
I figured it out pretty decently what caused it. It was the first preg_match but also for me I needed /is for case incensitive version.

Replace all the code in the plugin for this mod: Find Quotes


if(preg_match("/\[quot=(.*)(.*)\[\/quote\]/is", $post['message']))
{
preg_match_all("/\

Thanks, I have taken the hint from @inpicos post #65 and it works perfectly now. :)

This worked. Thank you... Now I have to make sure the mods edit the name in the quoted by feature... I'll test that. Okay, this worked on that as well, quoting my test account in the Mod Forum didn't notify my test account.

However, I am receiving no notifications on my account of quotes. Which was something I was looking forward to... Any ideas?

In the maintenance area, in General Update tools I found a "Update Who Quoted Me." option... I suddenly have thousands... Hopefully once it runs I'll get notifications of new quotes too. :dunno:

I am getting notifications, however users are notified if they are quoted in the Mod Forum on my site... I'll have to figure out how it would "if allowed" then "notify" at some point if the OP doesn't fix it.