News:

Wondering if this will always be free?  See why free is better.

Main Menu

Buddies With Me (formerly Followers)

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

Previous topic - Next topic

Stanyy

Looks like everyone is getting the white screen. I just tested with a new member I created.

By the way, I noticed something stange when I sorted the 'follows' column in ascending order. One particular member seems to have budded me multiple times. I checked his entry in the members table and yup its all there.

Edit: Removed duplicate entries, ran resync function.... White screen remains.

Stanyy

What I reported above looks like an SMF bug. May not be too important but hey.
If you use the "Add to Buddy List" form in index.php?action=profile;area=lists to add someone as buddy, it adds that persons ID to your list in the database regardless of whether that person was already in your list. This is exactly what the user in my example above was doing.

dougiefresh

Let me do some rewriting of the code.  It was next in line for an overhaul, but it just got moved up....

BTW, no, it is not a bug in SMF.  It is definitely a bug in my mod, cause I never thought that someone would repeatedly call the link like that.   ???

Stanyy

Quote from: dougiefresh on September 05, 2015, 11:18:05 AM
Let me do some rewriting of the code.  It was next in line for an overhaul, but it just got moved up....

BTW, no, it is not a bug in SMF.  It is definitely a bug in my mod, cause I never thought that someone would repeatedly call the link like that.   ???

No, I wasn't referring to the white screen. I was referring to the multiple buddy instances in the database. It is definitely an SMF bug. The user in question hasn't logged in since I installed the mod, plus I also confirmed this flaw in my other forums. The url to the buddies area is www.example.com/index.php?action=profile;area=lists;sa=buddies;u=1 I only shortened it in my last post.

I probably shouldn't have brought it up in this post as it has nothing to do with this mod. Please kindly focus on the white screen thing. Thank you.

Stanyy

I just noticed multiple instances of this error in my error log:


[05-Sep-2015 14:05:58] PHP Parse error:  syntax error, unexpected ',' in /home/user/public_html/example.com/Themes/default/Followers.template.php on line 28

dougiefresh

Regarding the multiple template errors, I've fixed them for the next version, as well....  Even though fixing it MAY fix the white screen issue, I'm recoding that function so that memory issues won't be an issue, even if you're buddies with 9,000 people...  ::)

Regarding the duplicate lines in the table, that is a bug I wasn't aware of!  It is a good thing to fix bad bugs, so no worries about reporting it!  When a user is added as a buddy, the line associating the current user and the "user to be buddied" in the table.  Because there is no index, there is no way for MySQL to replace the line because there may be more than one line with the number.  And because multiple lines associated with the same user is permitted, assigned a column to the table to be index is a BAD idea!  The code in the next version checks to make sure that the "current user"/"buddied user" line isn't already there before attempting to insert a new line into the table....

dougiefresh

Uploaded v2.0 September 5th, 2015
o IMPORTANT: Name changed from "Followers" to "Buddies With Me"!
o Fixed issue where mod generated duplicate entries within the table.
o Modified template and source files to use SMF list-building code.
o Removed Brazilian Portugese due to multiple changes within the mod.




@DSystem: I've made several new changes to the English language file since last request.  They are attached to this post.  Can you translate the files into Brazilian Portuguese for me so that I can get them back into the mod?  Thanks!

Stanyy

Aye, this one works. Thank you very much.   :)

Diego Andrés

Hi, I'm getting this issue when adding someone as a buddy

Quote
?action=buddy;u=8;
2: mysql_free_result() expects parameter 1 to be resource, null given
File: */Sources/Subs-BuddiesWithMe.php
Line: 237

Notice the 8, but I'm also getting this error with any other user.

Thanks.

SMF Tricks - Free & Premium Responsive Themes for SMF.

dougiefresh

Uploaded v2.1 - September 21st, 2015
o Fixed issue where variable used was null instead of database handle.

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: