2009-06-26, 03:15 PM
2009-06-26, 03:20 PM
Why that?
Do you make differences between your friends?
Do you make differences between your friends?
2009-06-26, 04:22 PM
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:
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.
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.
2009-06-26, 04:58 PM
(2009-06-26, 03:20 PM)Lennart Sauter Wrote: [ -> ]Why that?
Do you make differences between your friends?
ROFLOL! Maybe having the following "friends types" may be sufficient:
Best Friends
Good Friends
Friends
Acquaintances
Profile Decorations
Sorry, couldn't resist...
Gene
2009-06-26, 05:31 PM
(2009-06-26, 04:58 PM)Gene53 Wrote: [ -> ]Profile Decorations
Awesome one
2009-06-26, 08:48 PM
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
2009-06-30, 06:22 AM
What to do Appropriate box / Removing space?
2009-07-01, 11:55 AM
(2009-06-30, 06:22 AM)Pars Wrote: [ -> ]What to do Appropriate box / Removing space?
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 )...
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.Thanks, in next version i will modify the plugin and i will use the buddylist
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.
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");When i'll integrate this with the buddy system there will be no more need for this
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");
(2009-06-26, 04:22 PM)labrocca Wrote: [ -> ]Why have 2 lang files?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
$lang->load("friends");
$lang->load("friends2");
Thanks all for the comments!!
I hope what i wrote is understandable
MapoGio
2009-07-01, 04:23 PM
what do the middle of the text & avatar?
<center .... <center/>
<center .... <center/>