News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Buddies With Me (formerly Followers)

Started by dougiefresh, July 17, 2014, 04:17:53 PM

Previous topic - Next topic

dougiefresh

Uploaded v1.6 - August 4th, 2014
o Modified SSI function to accept user ID as a parameter # 3....




@samborabora: In Profile-View.php, you need to change this:
Code (Find This) Select
$followers = ssi_getFollowers(false, 'return');
to this:
Code (Replace With) Select
$followers = ssi_getFollowers(false, 'return', $memID);
That should get you what you're asking for....

samborabora

Quote from: dougiefresh on August 04, 2014, 10:44:56 AM
Uploaded v1.6 - August 4th, 2014
o Modified SSI function to accept user ID as a parameter # 3....




@samborabora: In Profile-View.php, you need to change this:
Code (Find This) Select
$followers = ssi_getFollowers(false, 'return');
to this:
Code (Replace With) Select
$followers = ssi_getFollowers(false, 'return', $memID);
That should get you what you're asking for....

At first it seemed to not function, but it's looking fine now! The problem seems to be that the followers table is screwed, even though I resynced it. All the of the previous followers/buddies are still there (since the buddy links on the profiles say stop following instead of add follower) but it says they have no followers. If I click Stop Following (which removes the buddy) and then click Add Follower, it shows under the followers. DId you change anything in the database for this version between this and the last? I have no idea why it's doing this, but since it's still a test environment, I can go through and just un-add and re-add all of the buddies for testing again, but for other users I'm not sure if the new version and the last are compatible? Either way, it's looking good now, thanks so much, Doug! I'll reiterate my thankful sentiments again to you once more!!

samborabora

I can confirm that it works, but after uninstalling 1.6 and reinstalling 1.6, it still doesn't recognize buddies added previous to installation. Which is strange, as I never actually remove the table, and I always resync. There was a 404 error after the redirection notice, but I just manually resynced, maybe that had something to do with the failure to find existing buddies?

dougiefresh

I'll need to look at the code again and see what's up, cause the only thing changed between v1.5 and v1.6 was the SSI.php function....

dougiefresh

Uploaded v1.7 - August 6th, 2014
o Modified resync code to remove buffering of member's buddies list while processing....
o Added some additional input validation code for adding and removing follower functions....

It looks like the resync function wasn't placing all the buddies into the table.  So I removed the part of the resync function that tried to minimize the number of database inserts calls.  This (for some reason) fixed the issue of the followers table not being sync'ed correctly.

As for the 404 issue, I can't reproduce it....

Phil De Quincy

I'm pleased that you decided to adapt the resync rode with buffering removal. This would be a useful feature.
I GET NO DOUBT!!! Freak ya.

samborabora

Quote from: dougiefresh on August 06, 2014, 07:11:05 PM
Uploaded v1.7 - August 6th, 2014
o Modified resync code to remove buffering of member's buddies list while processing....
o Added some additional input validation code for adding and removing follower functions....

It looks like the resync function wasn't placing all the buddies into the table.  So I removed the part of the resync function that tried to minimize the number of database inserts calls.  This (for some reason) fixed the issue of the followers table not being sync'ed correctly.

As for the 404 issue, I can't reproduce it....

The 404 is because it was sending me to http://mysite.com/admin/index.php?action=admin;area=maintain;sa=members instead of http://mysite.com/admin/index.php?area=maintain;sa=members;done=resyncfollowers i think, I need to take that supid pretty urls off, it's been fine up until now, but I think this is one of its boo boos.

I can confirm THIS WORKS!! :D :D :D Thank you, dougie!! Let's hope 1.7 is going gold! ;)

dougiefresh

Quote from: Phil De Quincy on August 06, 2014, 09:21:39 PM
I'm pleased that you decided to adapt the resync rode with buffering removal. This would be a useful feature.
Well, the buffering thingy was an attempt to not call the database function for EVERY member that had buddies.  So if you have 1,000 members with buddies, then the database insert function was called 1,000 times....  With the buffering thingy in there, it was only called 10 times (100 members per insert).  Removing the buffering thingy solves the problem of why it wasn't resyncing properly.....  If I can make it function properly, it's going back in for the reason I specified....

Quote from: samborabora on August 07, 2014, 01:11:26 AM
The 404 is because it was sending me to http://mysite.com/admin/index.php?action=admin;area=maintain;sa=members instead of http://mysite.com/admin/index.php?area=maintain;sa=members;done=resyncfollowers i think, I need to take that supid pretty urls off, it's been fine up until now, but I think this is one of its boo boos.
Interesting.  I betcha that if you look at the Pretty URLs support thread, lots of people have had issues with it.....  It's one of the reasons I don't (and won't) run Pretty URLs....

Quote from: samborabora on August 07, 2014, 01:11:26 AM
I can confirm THIS WORKS!! :D :D :D Thank you, dougie!! Let's hope 1.7 is going gold! ;)
Thank you very much for all your bug reports!

Arantor

Fairly sure you can disable pretty URLs just for action=admin.

DSystem

Small change in Brazil Portuguese translation. Was breaking the files Profile.portuguese_brazilian

dougiefresh

Uploaded v1.8 - November 9th, 2014
o Updated Brazilian Portuguese language by DSystem.

Thanks, DSystem!  I've included the changes in v1.8.  (Actually, it was the only change  :P )

dougiefresh

Uploaded v1.9 - January 16th, 2015
o License change to Simplified BSD.  No functionality change.

Uploaded v1.10 - April 6th, 2015
o Updated for SMF 2.1 Beta 1

Professor Sea

I will keep a close eye on this mod. This seems well suited to my needs...
Visit my forum: http://endo.darkglass.net/

dougiefresh

Uploaded v1.11 - August 29th, 2015
o Removed support for SMF 2.1 Beta 1
o Added support for SMF 2.1 Beta 2
o Fixed template so that MSN field isn't shown if the text string isn't defined.

Stanyy

Hi,
Users get a blank page when they visit the followers area of their profile. I have run the resync function a couple times. SMF 2.0.9

dougiefresh

NOTICE: This mod is going to be renamed to "Buddies With Me" to better reflect what it does (or rather, supposed to do), starting with Version 2.0....

@DSystem: Can you translate the attached file into Brazilian Portuguese for me?  I'd like to attach it to the new version.  Thanks!

@Stanyy:  I can't duplicate this complaint.  It shows up fine on my test forum.  When you say "blank page", I'm assuming you mean a completely white page, correct?  Or does it say "No one is following you"?

Stanyy

Yes, it's a completely white page.

dougiefresh

Huh.... Probably an out-of-memory issue.  Let me see what I can do about rewriting the mod to deal with this issue....

Stanyy

Quote from: dougiefresh on September 05, 2015, 07:18:15 AM
Huh.... Probably an out-of-memory issue.  Let me see what I can do about rewriting the mod to deal with this issue....

Ok thank you.

I just checked my followers table. Some members seem to have two instances. See attachment.

dougiefresh

The table is built so that each line in the table is basically "who is a buddy with who".  In other words, one line might indicate that I'm a buddy with you, and the next line might indicate that I'm a buddy with a different member.....  What I curious to know is how many buddies do people who get the blank screens have?

Advertisement: