Thread Rating:
  • 4 Vote(s) - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release]MyFriends (vers 1.0)
#21
This user has been denied support. This user has been denied support.
works great a nice add on would be to choose top friends
Reply
#22
Why that?
Do you make differences between your friends? Wink
My Company - I am Microsoft Certified in HTML5, CSS3 and JS
Reply
#23
Here are some tips for you from one plugin author to another.

You should imho have simply hooked into the buddy list feature of mybb. No sense in creating what's already there. Most of the difference is that you have a page for the "friends" and a section in profiles. This same effect could be achived by hooks and template changes.


$db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."friends");
Could be:
$db->drop_table("friends");

This seems like it could be improved:
	$query = $db->query("SELECT away, friend_id AS id, ".TABLE_PREFIX."users.uid, username, reputation, postnum, avatar, namestyle
FROM ".TABLE_PREFIX."friends, ".TABLE_PREFIX."users, ".TABLE_PREFIX."usergroups
WHERE ((
".TABLE_PREFIX."friends.uid =".$uid."
AND ".TABLE_PREFIX."friends.friend_id = ".TABLE_PREFIX."users.uid
AND ".TABLE_PREFIX."usergroups.gid = ".TABLE_PREFIX."users.usergroup
)

OR (
".TABLE_PREFIX."friends.friend_id =".$uid."
AND ".TABLE_PREFIX."friends.uid = ".TABLE_PREFIX."users.uid
AND ".TABLE_PREFIX."usergroups.gid = ".TABLE_PREFIX."users.usergroup
))
AND ".TABLE_PREFIX."friends.check = '1'
ORDER BY username");

Why have 2 lang files?
$lang->load("friends");
$lang->load("friends2");

And part of the reason I think using the buddy list would be nicer is because it would add more functionality to an existing mybb feature versus recreating that same feature.

I looked for any obvious exploits and didn't find any. It's good code overall and it's a nice plugin. I would have just liked a few things different. Great job and congrats on release.
Reply
#24
(2009-06-26, 03:20 PM)Lennart Sauter Wrote: Why that?
Do you make differences between your friends? Wink

ROFLOL! Maybe having the following "friends types" may be sufficient:

Best Friends
Good Friends
Friends
Acquaintances
Profile Decorations

Sorry, couldn't resist... Big Grin
Gene
“The road to positivity is strewn with the abandoned vehicles of the faint-hearted.” Peter McWilliams
Reply
#25
(2009-06-26, 04:58 PM)Gene53 Wrote: Profile Decorations

Awesome one Big Grin
My Company - I am Microsoft Certified in HTML5, CSS3 and JS
Reply
#26
labrocca Wrote:You should imho have simply hooked into the buddy list feature of mybb. No sense in creating what's already there

I agree with Jesse, why re-invent the wheel? Your plugin would be great if it worked with the existing buddy system.

Cheers,
Gene
“The road to positivity is strewn with the abandoned vehicles of the faint-hearted.” Peter McWilliams
Reply
#27
What to do Appropriate box / Removing space?

[Image: 1246381299.jpg]
Reply
#28
(2009-06-30, 06:22 AM)Pars Wrote: What to do Appropriate box / Removing space?

[Image: 1246381299.jpg]

Simple!! just go to global templates, edit templates friends_all and friends_rand
in CSS edit the width in "li.mybbfriends" and decrease it as you like(the best to fit all screen is 48% i think Wink)...
this will allow friends box to display correctly for all screens!!


(2009-06-26, 04:22 PM)labrocca Wrote: Here are some tips for you from one plugin author to another.

You should imho have simply hooked into the buddy list feature of mybb. No sense in creating what's already there. Most of the difference is that you have a page for the "friends" and a section in profiles. This same effect could be achived by hooks and template changes.
Thanks, in next version i will modify the plugin and i will use the buddylist Wink
But at the moment i'm quite busy and i won't release this very soon...

(2009-06-26, 04:22 PM)labrocca Wrote: $db->query("DROP TABLE IF EXISTS ".TABLE_PREFIX."friends");
Could be:
$db->drop_table("friends");

This seems like it could be improved:
	$query = $db->query("SELECT away, friend_id AS id, ".TABLE_PREFIX."users.uid, username, reputation, postnum, avatar, namestyle
FROM ".TABLE_PREFIX."friends, ".TABLE_PREFIX."users, ".TABLE_PREFIX."usergroups
WHERE ((
".TABLE_PREFIX."friends.uid =".$uid."
AND ".TABLE_PREFIX."friends.friend_id = ".TABLE_PREFIX."users.uid
AND ".TABLE_PREFIX."usergroups.gid = ".TABLE_PREFIX."users.usergroup
)

OR (
".TABLE_PREFIX."friends.friend_id =".$uid."
AND ".TABLE_PREFIX."friends.uid = ".TABLE_PREFIX."users.uid
AND ".TABLE_PREFIX."usergroups.gid = ".TABLE_PREFIX."users.usergroup
))
AND ".TABLE_PREFIX."friends.check = '1'
ORDER BY username");
When i'll integrate this with the buddy system there will be no more need for this Wink

(2009-06-26, 04:22 PM)labrocca Wrote: Why have 2 lang files?
$lang->load("friends");
$lang->load("friends2");
Because friends.php uses some lang var used also in member.php and if i would have used a unique lang file there would have been conflicts Wink

Thanks all for the comments!!

I hope what i wrote is understandable Wink

MapoGio
Reply
#29
what do the middle of the text & avatar?
<center .... <center/>

[Image: 1246468932.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)