Easiest way to display a list of everyone whos added me as a buddy on my profile

Started by samborabora, July 07, 2014, 06:49:05 PM

Previous topic - Next topic

samborabora

Is there a built in function to recall a basic list of every user who's added me as a buddy, so I can put this on the profile page? There's a few mods, but most of them are old and I don't need avatars or any stats, just a list of consecutive buddies separated by commas.

Arantor

No, there isn't and it depends on whether you're using Ultimate Profile or not.

Just for fun, there's also a privacy angle because not everyone uses buddies for the purpose you might think...

samborabora

Quote from: ‽ on July 07, 2014, 06:51:59 PM
No, there isn't and it depends on whether you're using Ultimate Profile or not.

Just for fun, there's also a privacy angle because not everyone uses buddies for the purpose you might think...

I was using ultimate profile, but I removed it because it had too much stuff I didn't need. I have no idea what others use buddies for, other than, buddies? There's a couple of mods that seem to take care of this in a sense, would you recommend one of them at all?

Arantor

The predominant use of buddies is to filter out PMs. Users can block PMs from everything except from buddies.

samborabora

Quote from: ‽ on July 08, 2014, 02:51:55 PM
The predominant use of buddies is to filter out PMs. Users can block PMs from everything except from buddies.

I understand, but I'd love to be able to just spit out the list on profiles, nothing fancy. Is there nothing that can check a table in the database and just print the names, linked to the profiles, soemwhere in profile.template.php?

If not by default, does anyone have any knowledge of if this: http://custom.simplemachines.org/mods/index.php?mod=3068 is simplifiable? Or http://custom.simplemachines.org/mods/index.php?mod=3681 with text links instead of avatars?

Arantor

There is no magic function for it  because SMF never needs it itself and it's not the easiest (and *certainly* not the fastest) query. To get a list of people who added you, it has to check every single member, and there's no way without rewriting the feature to optimise it.

As for the mods, you'd have to ask the authors.

samborabora

The mods appear to only show my buddys, ie: buddies I have added to my buddies list. Is this a massive piece of scripting or is it something that you could give a bit of a suggestion for? I know it's not a light query for a server, but I'd appreciate it if you had a rough idea as to how I could implement this feature?

Roph

You'd go through every member's row in the table, parse their buddy list, and check if the relevant user ID is in it. Even for a small forum, this is NOT something you want to do. I'm sure I could do it, but I won't on principle.

You might instead do a simple check when viewing someone else's profile to see if they have you on their buddy list.

Why do you want to expose your users' private information, though?

samborabora

Quote from: Roph on July 09, 2014, 10:19:00 AM
You'd go through every member's row in the table, parse their buddy list, and check if the relevant user ID is in it. Even for a small forum, this is NOT something you want to do. I'm sure I could do it, but I won't on principle.

You might instead do a simple check when viewing someone else's profile to see if they have you on their buddy list.

Why do you want to expose your users' private information, though?

I'm using the buddy system and rewording it so it's basically like 'followers' instead of buddys. I mean, on both twitter and facebook, anyone can view anyones list of followers or friends, and it would be established that you could see everybodies buddies/followers before you added anyone, anyways. I appreciate your principle, but if it's well established with a forum users that anyone they follow will be known to another, how could it be an invasion of privacy?

And if it's a server strain you're worried about, well, it's not like everyone views everyones profiles all the time, is it?

Arantor

Example: whose business is it who I follow, except mine?

As for strain, there's consequences. There are consequences on a slow query, especially how it limits access to the members table (which knocks on to everyone else)...

samborabora

Quote from: ‽ on July 09, 2014, 02:22:53 PM
Example: whose business is it who I follow, except mine?

As for strain, there's consequences. There are consequences on a slow query, especially how it limits access to the members table (which knocks on to everyone else)...

Would it help if when a user buddies or unbuddies someone, it was hardwritten to a list that could then be recalled, rather than having to dynamically collect the entries each time?

Arantor

Not for the privacy angle. There are ways to mitigate the performance headaches but they're all fairly terrible.

samborabora

Quote from: ‽ on July 09, 2014, 06:02:29 PM
Not for the privacy angle. There are ways to mitigate the performance headaches but they're all fairly terrible.

Privacy? What if it was very much common knowledge that by clicking 'follow this user' it would be visable on your profile, mainly because you'd be clicking on 'follow this user' and directly under it would be that users followers. There could be a disclaimer or anything that would ensure that this wasn't a privacy issue, since the buddies list is merely being used as a backend for a following system. If every 'follow' were hard added or 'unfollow' was hard removed from a table, surely then all that would be called for on each load of whichever users profile would be the string on 'followers' contained within the table? No performance issues there, I assume?

Arantor

Aside from completely misunderstanding how it works, that is.

Bastardising a system into something other than what it is, is never going to work properly.

samborabora

Quote from: ‽ on July 09, 2014, 07:17:56 PM
Aside from completely misunderstanding how it works, that is.

Bastardising a system into something other than what it is, is never going to work properly.

Okay, I assume there isn't a similar thing to a following system available for SMF, is there? And, I'm not aware that I was trying to "bastardize" the system, in fact, the system would remain untouched, merely being tapped into by external queries.

margarett

@samborabora, what is wrong with the second MOD you pointed out? It seems to do what you want...
If you wish to simplify the layout, just ask in the MOD support topic. It should be pretty easy to change Profile.template.php to show just a list of names instead of avatars (didn't check, just guessing)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

QuoteAnd, I'm not aware that I was trying to "bastardize" the system, in fact, the system would remain untouched, merely being tapped into by external queries.

I thought I had made this fairly clear that you're doing something it simply wasn't designed to be used for. If it was designed for your use, it would be designed with your use in mind.

samborabora

Quote from: margarett on July 10, 2014, 01:18:46 PM
@samborabora, what is wrong with the second MOD you pointed out? It seems to do what you want...
If you wish to simplify the layout, just ask in the MOD support topic. It should be pretty easy to change Profile.template.php to show just a list of names instead of avatars (didn't check, just guessing)

Thanks, I gave it a try, but unfortunately, it only lists my current buddies, ie: buddies I have added, rather than people who have added me. I'd be able to hack a mod a bit to display it correctly, if there were such a mod to display users who have added me.

Quote from: ‽ on July 10, 2014, 01:40:24 PM
QuoteAnd, I'm not aware that I was trying to "bastardize" the system, in fact, the system would remain untouched, merely being tapped into by external queries.

I thought I had made this fairly clear that you're doing something it simply wasn't designed to be used for. If it was designed for your use, it would be designed with your use in mind.

My usage of the system does not drastically differ from it's intended usage, I merely wish to expand the capabilities of the information which it reports. A simple writing of each added buddy to a table and the removal of that buddy with every un-buddy would suffice to record the data. If that differs too greatly from it's fundamental indended purpose, I'd be willing to accept a server call for all users and cross check if they've added me as a buddy.

Since it records, obviously, all the people who you've added as a buddy so it can display these to you, I can't see why it would be difficult to fork those adds into separate tables for recalling for a user to see who have added them.

Quote from: ‽ on July 09, 2014, 06:02:29 PM
Not for the privacy angle.

IF it makes you feel any better, it could be invisible to anyone but yourself. Then I'll just make it visible and treat it re-branded (name change, perception for others, no differ in intended usage) as followers and it'll be hunky dorey.

Arantor

There are precisely 6 places in SMF where it cares if people are buddies, and four of those are 'are they buddies of yours', not 'are you their buddy'.

1. Display (uses different icon next to username if they're a buddy)
2. Profile main display (uses different icon next to username, offers 'add to buddy list')
3. Profile buddies page (for adding/removing)
4. Users online list (shows them in bold)
5. Who's online (uses different icon next to username if they're a buddy)
and
6. To see if they have set their account to 'only admins and buddies can PM me' and in that situation and ONLY that situation does it care if they have set *you* as *their* buddy. In which case you're dealing with a very small number of users and the query isn't insane to run in that situation.

What you're asking for is still nobody's business but their own. Why do you care who follows whom? Why do you care, for example, who is following you on the forum? In any case unless you're building extra functionality around it, this is largely a waste of time.

samborabora

There are precisely 6 places in SMF where it cares if people are buddies, and four of those are 'are they buddies of yours', not 'are you their buddy'.

1. Display (uses different icon next to username if they're a buddy)
2. Profile main display (uses different icon next to username, offers 'add to buddy list')
3. Profile buddies page (for adding/removing)
4. Users online list (shows them in bold)
5. Who's online (uses different icon next to username if they're a buddy)
and
6. To see if they have set their account to 'only admins and buddies can PM me' and in that situation and ONLY that situation does it care if they have set *you* as *their* buddy. In which case you're dealing with a very small number of users and the query isn't insane to run in that situation.

What you're asking for is still nobody's business but their own. Why do you care who follows whom? Why do you care, for example, who is following you on the forum? In any case unless you're building extra functionality around it, this is largely a waste of time.

QuoteWhy do you care, for example, who is following you on the forum?
My ego?

QuoteIn any case unless you're building extra functionality around it, this is largely a waste of time.
Okay, let's say I am building extra functionality around it. Let's say I'm building a forum RPG system, or an awards system or a badges system or whatever.

QuoteThis is largely a waste of time.
Opinion.

Quote4. Users online list (shows them in bold)
5. Who's online (uses different icon next to username if they're a buddy)
So, here are two places that I can see where we would run into a run query set for checking if they are buddies or not. I'm not asking for anything amazing here, just if we can reverse the angle from "oh, I'm YOUR buddy" to "oh, you're MY buddy". The word buddy has lost all meaning anyways.

Arantor

QuoteOkay, let's say I am building extra functionality around it. Let's say I'm building a forum RPG system, or an awards system or a badges system or whatever.

Except I don't think you are, because if you were 1) you would have mentioned it and 2) you'd be able to do this yourself...

QuoteSo, here are two places that I can see where we would run into a run query set for checking if they are buddies or not. I'm not asking for anything amazing here, just if we can reverse the angle from "oh, I'm YOUR buddy" to "oh, you're MY buddy". The word buddy has lost all meaning anyways.

That's just it. Reverse angle is a massively different proposition. It's not in its own table, but in a format great for one way and terrible for the other. If you have a subset of users in the first place by way of online filtering, it's much cheaper. Doing it the way you want is not a cheap process because it has to use every single row of the members table (or hive it off to another table but *that*'s not a simple process either and has consequence either for performance or stability)

dougiefresh

Saw this thread this morning and decided this would be an interesting mod to create.....  Almost done.  :P

Arantor

So, FIND_IN_SET is your friend (and mildly force locking the entire members table)? Or are you querying (and force locking) the entire members table to get the reverse list?

What most people forget is that something which works fine on a small test environment won't scale to something a few orders of magnitude larger.

dougiefresh

I created a seperate table.  My only worry is that during install, when the mod script has to pull all member's buddy lists, that the script will run out of memory.  I've wrote seperate functions to manage the new table and added a page in the profiles to list the results....

Besides, FIND_IN_SET would have to process the entire member's list and I'd rather not have to process that mess every time someone wants to look at the list.....  Once is enough....

Arantor

So, there's the question, are you keeping them in sync with the master ones (so that all the other behaviour is maintained), and what do you have in place to fix out of sync cases?

Or are you reworking all the other places to use this new table (which has its own performance connotations)?

QuoteMy only worry is that during install, when the mod script has to pull all member's buddy lists, that the script will run out of memory.

I'd be more worried about hitting the time limit than I would memory.

QuoteBesides, FIND_IN_SET would have to process the entire member's list and I'd rather not have to process that mess every time someone wants to look at the list.....  Once is enough....

It's almost like I didn't point this fact out throughout this topic. I mean, am I new to SMF or something?

dougiefresh

Quote from: ‽ on July 11, 2014, 06:02:00 PM
So, there's the question, are you keeping them in sync with the master ones (so that all the other behaviour is maintained), and what do you have in place to fix out of sync cases?
Yeah, I'm keeping them in sync so that the other behavious is maintained....  Huh, I didn't think about how to resync them  ???  Back to the drawing board  :P

Quote from: ‽ on July 11, 2014, 06:02:00 PM
Or are you reworking all the other places to use this new table (which has its own performance connotations)?
Just displaying them there in the Profile page.  (So far)

Quote from: ‽ on July 11, 2014, 06:02:00 PM
QuoteMy only worry is that during install, when the mod script has to pull all member's buddy lists, that the script will run out of memory.

I'd be more worried about hitting the time limit than I would memory.
Hmmm....  What to do, what to do.....

Quote from: ‽ on July 11, 2014, 06:02:00 PM
QuoteBesides, FIND_IN_SET would have to process the entire member's list and I'd rather not have to process that mess every time someone wants to look at the list.....  Once is enough....

It's almost like I didn't point this fact out throughout this topic. I mean, am I new to SMF or something?
LOL!  Nah, I never meant to imply that!  I meant that locking the member list only once was enough to build the list.  After the new table is built, then it's easy-peasy to maintain....

Arantor

QuoteHmmm....  What to do, what to do.....
Well, consider it this way: you're doing a query to get the member id and their buddy list and you're iterating over that resultset with a while loop all the time mysql_fetch_assoc returns non-false.

From there you're going to be building an interim array of rows that will go into your new table. You can quite happily fill that array up and periodically push it to the table - you can quite happily have two queries going on, then empty the array to release memory back to the GC (well, maybe, that's another story)

QuoteI meant that locking the member list only once was enough to build the list.  After the new table is built, then it's easy-peasy to maintain....

True enough but on the other hand, you then end up with a table that needs to be kept in sync with other things - and presumably you will want to suitably index that table (fortunately the RDBMS will handle that for you)

It's a complex battle, and even displaying it on profile is not something I'd be huge on even with all the other issues, simply because the profile is already surprisingly expensive.

dougiefresh

Quote from: ‽ on July 11, 2014, 06:42:49 PM
QuoteHmmm....  What to do, what to do.....
Well, consider it this way: you're doing a query to get the member id and their buddy list and you're iterating over that resultset with a while loop all the time mysql_fetch_assoc returns non-false.

From there you're going to be building an interim array of rows that will go into your new table. You can quite happily fill that array up and periodically push it to the table - you can quite happily have two queries going on, then empty the array to release memory back to the GC (well, maybe, that's another story)
The way I've got my script set up, the problem is that even though the members are pulled in sequential order, the result table is built haphazardly according to whom each member is buddies with.  So if member 1 is buddies with 5 people and member 900,000 is buddies with member 1, then it's gonna be a while before member 900,000 is processed, and if I have pushed the array to the table, then I can't very well update member 900,000 as  buddies with member 1's because member 1's element in the array is gone....  (I'm not sure if I'm relaying the problem correctly...  ether that or I don't understand what you said  :P )

Lemme think about how to approach this issue....  It'll probably have something to do with the resync function, as it needs to written anyways and I could solve that problem there.....

Arantor

Oh, I see what you're doing. That's not what I was getting at, nor how I would approach it. Building and maintaining such a flattened relational map is not ideal but it really depends on whether you have any plans for the data.

The way I'd approach this is to build a relational map in the conventional sense - a table showing id_member, follows: e.g. if id_member 1 has a buddy list of 2,3,4, you'd have the following table:

1, 2
1, 3
1, 4

with a combined primary key of id_member, follows and a conventional index of follows.

Having the index on follows means you can query on that without any headache. If we were, for example, to say that the above was the only list of relationships in the system, we could obtain the number of followers of id_member 2 by querying where follows = 2.

Now, you might say that purposefully flattening the list makes it more performant but in practice it usually doesn't, and this gives you other options in terms of what you do with the data; for a very simple list of names you can obtain the names without even doing another query by doing a join.

For example, a list of the names and id_members of all the people that follow user id 3 and as a bonus, sort by user name:

SELECT mem.real_name, mem.id_member
FROM {db_prefix}followers AS f
INNER JOIN {db_prefix}members AS m ON (f.id_member = mem.id_member)
WHERE f.follows = 3
ORDER BY mem.real_name

This means avoiding the loadMemberData monster (bearing in mind that lMD will invoke 1 query in minimal mode, 2+ queries in any other mode, often 3).

Plus you can do any other processing you like here, with little extra effort. Want to exclude banned members? Easy: WHERE f.follows = whatever AND mem.is_activated < 10

dougiefresh

Dang it.... I hate it when someone gives me a better idea how to do something AFTER I've written my code  :P O:)  Back to the proverbial drawing board.... 8)

EDIT: Man, this simplified my code greatly!  Thanks, ‽ !!!

Arantor


dougiefresh

Okay, here's an update: I'm using a script to add table during the install and it redirects to the resync function.  The resync function has been built so that it loads a template every 10 seconds to restart the process at the point it left off at, unless it has completed the task....  then it reports done.  Almost done with resync function....

Arantor


dougiefresh

Yup....  Sure can!  I just hadn't gotten that far yet!  Thanks again for the advice!

Followers List v1.0 mod released....  Waiting for approval.  8)

samborabora

Quote from: dougiefresh on July 13, 2014, 09:30:47 PM
Yup....  Sure can!  I just hadn't gotten that far yet!  Thanks again for the advice!

Followers List v1.0 mod released....  Waiting for approval.  8)

Wow, is this finished? Have you got it available anywhere like github so I can give it a test spin?

dougiefresh

Quote from: samborabora on July 14, 2014, 02:42:35 PM
Wow, is this finished? Have you got it available anywhere like github so I can give it a test spin?
Yup yup....   ;D Impatience we are...   ::) Check your PMs....

samborabora

Quote from: dougiefresh on July 14, 2014, 06:51:15 PM
Quote from: samborabora on July 14, 2014, 02:42:35 PM
Wow, is this finished? Have you got it available anywhere like github so I can give it a test spin?
Yup yup....   ;D Impatience we are...   ::) Check your PMs....

How long does it take for a mod to be approved? The version you sent works really well so far, need to do some thorough testing to be certain at the minute. I'm using a link to add and remove buddies on the users profile, does this somehow work differently with the buddy's list add/remove mothod, because if I add users via the buddy list, they show up on the other users followers perfectly, however if I use a link to add or remove a buddy, it does not reflect on the followers list. Here's the code I'm using for my add/remove link on profile.template.php:

// Can they add this member as a buddy?
//ALREADY BUDDY
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'] && !$context['member']['is_buddy'] )
echo '
<span class="profefol"><a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['buddy_add'], ' ', $context['member']['name'], '</a></span><br />';
//NOT YET A BUDDY
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'] && $context['member']['is_buddy'] )
echo '
<span class="profeunfol"><a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['buddy_remove'], '</a></span><br />';


Would I need something else in there to make the followers table populate/depopulate upon clicking?

dougiefresh

Quote from: samborabora on July 15, 2014, 04:55:48 PM
How long does it take for a mod to be approved?
As long as it takes.....

Quote from: samborabora on July 15, 2014, 04:55:48 PM
The version you sent works really well so far, need to do some thorough testing to be certain at the minute. I'm using a link to add and remove buddies on the users profile, does this somehow work differently with the buddy's list add/remove mothod, because if I add users via the buddy list, they show up on the other users followers perfectly, however if I use a link to add or remove a buddy, it does not reflect on the followers list.  Would I need something else in there to make the followers table populate/depopulate upon clicking?
I must have missed that method of adding/removing buddies....  I'll add it and submit it....

samborabora

Quote from: dougiefresh on July 16, 2014, 07:02:12 PM
Quote from: samborabora on July 15, 2014, 04:55:48 PM
How long does it take for a mod to be approved?
As long as it takes.....

Quote from: samborabora on July 15, 2014, 04:55:48 PM
The version you sent works really well so far, need to do some thorough testing to be certain at the minute. I'm using a link to add and remove buddies on the users profile, does this somehow work differently with the buddy's list add/remove mothod, because if I add users via the buddy list, they show up on the other users followers perfectly, however if I use a link to add or remove a buddy, it does not reflect on the followers list.  Would I need something else in there to make the followers table populate/depopulate upon clicking?
I must have missed that method of adding/removing buddies....  I'll add it and submit it....

I gave this version a go, and now the add buddy link just goes to a white blank screen! I tested after uninstalling it, and it works if the mod is not installed, so this versions definitely causing something to break, I'm afraid!

dougiefresh

Quote from: samborabora on July 17, 2014, 12:39:15 AM
I gave this version a go, and now the add buddy link just goes to a white blank screen! I tested after uninstalling it, and it works if the mod is not installed, so this versions definitely causing something to break, I'm afraid!
The only add buddy link that I'm aware of is in the Profiles page of another user.  My tests work fine for that.  So I assume that you're using custom code....  correct?

Hj Ahmad Rasyid Hj Ismail

There is one mod that can add buddy via display page. May be he is using that one. It should however have the same effect as the one in profile page.

samborabora

Quote from: dougiefresh on July 17, 2014, 03:23:02 PM
Quote from: samborabora on July 17, 2014, 12:39:15 AM
I gave this version a go, and now the add buddy link just goes to a white blank screen! I tested after uninstalling it, and it works if the mod is not installed, so this versions definitely causing something to break, I'm afraid!
The only add buddy link that I'm aware of is in the Profiles page of another user.  My tests work fine for that.  So I assume that you're using custom code....  correct?

I can't quite remember if it was a script from here or just the one in the default theme, I split it apart so I could define separate styles for the links, but it works the same, here's the add link:
<a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['buddy_add'], ' ', $context['member']['name'], '</a>

Quote from: ahrasis on July 17, 2014, 03:27:52 PM
There is one mod that can add buddy via display page. May be he is using that one. It should however have the same effect as the one in profile page.
I'm using the link in the profile page, I haven't got the add buddy on the profile page, but like you say it should work the same?

dougiefresh

Quote from: samborabora on July 17, 2014, 04:54:11 PM
I can't quite remember if it was a script from here or just the one in the default theme, I split it apart so I could define separate styles for the links, but it works the same, here's the add link:
<a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['buddy_add'], ' ', $context['member']['name'], '</a>
@samborabora: It should work.  I installed it on my clean localhost  forum and it worked just fine, but I didn't make any other modifications.....  Attach your Profile.template.php, as well as the Profile-Modify.php from Sources here so I can look at it....  (I don't think it's related to my mod, but if it is, I'll update the mod to correct it!)

@Everybody: The mod has been approved.  Please discuss the mod in this topic.  Thanks.

Bigguy


Hj Ahmad Rasyid Hj Ismail

Well with regards to the mod I mentioned, it is in the tips and tricks section call add buddy button on post (display) page. It has been used by Mr. Pedram in his mod Buddies Block.

By this mod, user can add a buddy (follow a member) via post / display page (instead of only from their profile page). Note: Depending on how it is useful and important, this add buddy (follow a member) things can be extended to memberlist, board index, messsage index if someone is willing to code it. I can see dougiefresh is very good in creating good mods, so may be, just may be, he can look into it? :)

I am however not so sure whether this will be included in dougiefresh Followers List mod though I really think it should works just fine.

samborabora

Quote from: ahrasis on July 18, 2014, 08:10:15 AM
Well with regards to the mod I mentioned, it is in the tips and tricks section call add buddy button on post (display) page. It has been used by Mr. Pedram in his mod Buddies Block.

By this mod, user can add a buddy (follow a member) via post / display page (instead of only from their profile page). Note: Depending on how it is useful and important, this add buddy (follow a member) things can be extended to memberlist, board index, messsage index if someone is willing to code it. I can see dougiefresh is very good in creating good mods, so may be, just may be, he can look into it? :)

I am however not so sure whether this will be included in dougiefresh Followers List mod though I really think it should works just fine.

I think anything that could go towards working and strengthening the Followers mod expanding it's integration would be beneficial, so +1 this. Dougiefresh has done an incredible job so far (still hoping to get it to work with add buddy links in addition to the submit form) and hopefully people will appreciate this incredibly useful mod he's coded.

(PS, aharis, you're too modest, you're work on that improved times mod is amazing, I think ALOT of people are very happy with what you've done ;) )

dougiefresh

Quote from: ahrasis on July 18, 2014, 08:10:15 AM
Well with regards to the mod I mentioned, it is in the tips and tricks section call add buddy button on post (display) page. It has been used by Mr. Pedram in his mod Buddies Block.

By this mod, user can add a buddy (follow a member) via post / display page (instead of only from their profile page). Note: Depending on how it is useful and important, this add buddy (follow a member) things can be extended to memberlist, board index, messsage index if someone is willing to code it. I can see dougiefresh is very good in creating good mods, so may be, just may be, he can look into it? :)

I am however not so sure whether this will be included in dougiefresh Followers List mod though I really think it should works just fine.
Quote from: samborabora on July 18, 2014, 09:57:16 AM
I think anything that could go towards working and strengthening the Followers mod expanding it's integration would be beneficial, so +1 this.  Dougiefresh has done an incredible job so far (still hoping to get it to work with add buddy links in addition to the submit form) and hopefully people will appreciate this incredibly useful mod he's coded.
Thanks, guys!  I don't see how that tip/trick has any relationship a list of people who are buddies with you....  Doesn't mean it can't be made into a separate mod though, because that trick relies on a nearby piece of code within Sub-Members.php;D  So, if I were to write this mod, based on that trick, where should I put the buddy links?  I mean, post display code and memberlist is kinda obvious, but board index and message index?

samborabora

Quote from: dougiefresh on July 19, 2014, 07:53:14 PM
Quote from: ahrasis on July 18, 2014, 08:10:15 AM
Well with regards to the mod I mentioned, it is in the tips and tricks section call add buddy button on post (display) page. It has been used by Mr. Pedram in his mod Buddies Block.

By this mod, user can add a buddy (follow a member) via post / display page (instead of only from their profile page). Note: Depending on how it is useful and important, this add buddy (follow a member) things can be extended to memberlist, board index, messsage index if someone is willing to code it. I can see dougiefresh is very good in creating good mods, so may be, just may be, he can look into it? :)

I am however not so sure whether this will be included in dougiefresh Followers List mod though I really think it should works just fine.
Quote from: samborabora on July 18, 2014, 09:57:16 AM
I think anything that could go towards working and strengthening the Followers mod expanding it's integration would be beneficial, so +1 this.  Dougiefresh has done an incredible job so far (still hoping to get it to work with add buddy links in addition to the submit form) and hopefully people will appreciate this incredibly useful mod he's coded.
Thanks, guys!  I don't see how that tip/trick has any relationship a list of people who are buddies with you....  Doesn't mean it can't be made into a separate mod though, because that trick relies on a nearby piece of code within Sub-Members.php;D  So, if I were to write this mod, based on that trick, where should I put the buddy links?  I mean, post display code and memberlist is kinda obvious, but board index and message index?
Is the followers mod working with add buddy links at the moment? I attached the two files you requested to the mod support topic, is it working with the default theme or is it just me currently?

dougiefresh

Quote from: ahrasis on July 18, 2014, 08:10:15 AM
Well with regards to the mod I mentioned, it is in the tips and tricks section call add buddy button on post (display) page. It has been used by Mr. Pedram in his mod Buddies Block.

By this mod, user can add a buddy (follow a member) via post / display page (instead of only from their profile page). Note: Depending on how it is useful and important, this add buddy (follow a member) things can be extended to memberlist, board index, messsage index if someone is willing to code it. I can see dougiefresh is very good in creating good mods, so may be, just may be, he can look into it? :)
Sure!   ;D Quick Buddies v1.0 mod has been released.  Waiting for approval....  Thanks, ahrasis for pointing me to the  Add Buddy Button On Post thread!

Quote from: samborabora on July 20, 2014, 09:49:17 AM
Is the followers mod working with add buddy links at the moment? I attached the two files you requested to the mod support topic, is it working with the default theme or is it just me currently?
@samborabora:  Well, I don't know if it does, but the mod mentioned above should automate the install of this tip/trick.  The tip/trick isn't exactly compatible with the Followers mod because it makes some changes in the same area as the tip/trick.  So find this string:
Code (Find) Select
// Redirect back to the profile
and replace the line below it with this:
Code (Replace) Select
// Redirect back to the profile
if (isset($_GET['topic']))
redirectexit('topic=' . $_GET['topic'] . ';msg' . $_GET['msg'] . '#msg' . $_GET['msg']);
else
redirectexit('action=profile;u=' . $_REQUEST['u']);

These manual steps will get the tip/trick to work.  The Quick Buddies mod will co-exist with the Followers mod, as well as the Buddies Block mod.

Quote from: samborabora on July 20, 2014, 09:49:17 AM
I attached the two files you requested to the mod support topic, is it working with the default theme or is it just me currently?
Can you remove that post from the mod thread?  It doesn't belong there, as I asked you to attach those files to THIS thread.

Hj Ahmad Rasyid Hj Ismail

Quote from: dougiefresh on July 20, 2014, 12:10:05 PM
Quote from: ahrasis on July 18, 2014, 08:10:15 AM
Well with regards to the mod I mentioned, it is in the tips and tricks section call add buddy button on post (display) page. It has been used by Mr. Pedram in his mod Buddies Block.

By this mod, user can add a buddy (follow a member) via post / display page (instead of only from their profile page). Note: Depending on how it is useful and important, this add buddy (follow a member) things can be extended to memberlist, board index, messsage index if someone is willing to code it. I can see dougiefresh is very good in creating good mods, so may be, just may be, he can look into it? :)
Sure!   ;D Quick Buddies v1.0 mod has been released.  Waiting for approval....  Thanks, ahrasis for pointing me to the  Add Buddy Button On Post thread!

That was quick! Nice job.

dougiefresh


Took me about a day  :P  Thanks!

Also wrote a Lazy Admin Menu mod today, loosely based on snow's post from [TIP] Lazy Admin Menu....

dougiefresh

Both have been approved.  Please discuss them in the appropriate thread....

Advertisement: