Skip to Content Skip to Menu

Plugin - Friends Updates

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
16 years 3 weeks ago #75462 by krileon
Replied by krileon on topic Re:Friends Updates
Wow I can't see the difference, but I did get it working before seeing this. Unfortionately I also get these 2 errors, lol.


Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in W:\www\includes\database.php on line 502

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in W:\www\includes\database.php on line 509

Here's the code I managed to make. I put it under the first query and it works really really well, but like I said I get 2 stubborn errors, lol.

[code:1] if (count($results)>10){
$query = "DELETE FROM #__liveshoutbox WHERE nameid = '66'"
. "ORDER BY id ASC LIMIT 1";
$database->setQuery($query);
$cleanup = $database->loadObjectList();
}
[/code:1]

I'll try what ya posted and see what happens. =D

*update* Ok what I had first attempted and you fixed does work, but it deletes much more then wanted. The second approach works perfectly in handling the deletion, BUT it gives those 2 errors. So now to figure out how to get them to go away, lol.

*update* Ok I got it to check the users own count everytime they visit a profile or visit their own. This will ensure other users can't trigger another users update deletion. It works flawlessly except for the same 2 stupid errors, which I have no clue why they appear.

Here's the queries (takes 2)
[code:1]
$check = "SELECT *"
. "\n FROM #__liveshoutbox"
. "\n WHERE nameid=".$my->id;
$database->setQuery( $check );
$cleancount = $database->loadObjectList();
if (count($cleancount)>10){
$query = "DELETE FROM #__liveshoutbox WHERE nameid=".$my->id." "
. "ORDER BY id ASC LIMIT 1";
$database->setQuery($query);
$cleanup = $database->loadObjectList();
}
[/code:1]

If you know how to combine the 2 queries into 1 that'd be cool, but I don't know if it'd work. It's the count that determines if the second should be triggered or not. Otherwise the second query never fires.

Post edited by: krileon, at: 2008/09/25 02:51

Post edited by: krileon, at: 2008/09/25 02:58


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
16 years 3 weeks ago #75482 by krileon
Replied by krileon on topic Re:Friends Updates
I did it! Holy crap I figured it out. My mind is now blown, lol.

I'm going to try and clean it up some more tomorrow and see if I can get a couple lines of the code removed.

But here it is. It works and error free.
[code:1] $check = "SELECT *"
. "\n FROM #__liveshoutbox"
. "\n WHERE nameid=".$my->id;
$database->setQuery( $check );
$cleancount = $database->loadObjectList();
if (count($cleancount)>10){
$query = "DELETE FROM #__liveshoutbox WHERE nameid=".$my->id." "
. "ORDER BY id ASC LIMIT 1";
$database->setQuery($query);
$cleanup = $database->query();
}
[/code:1]

I'm tired so I won't be finishing the plugin tonight, but tomorrow folks. Expect a working Friends Updates plugin. It's standalone BTW. You don't need shoutbox or announcer installed. I'm going to change the tables it uses so you can still use shoutbox on your site if you want to.

ATM It only has options for Login/Logout, Profile Update, and Avatar Update.

I'll add more, but right now I just want it up and working bug free.

*edit*
Also a big thanks goes to steve for helping me out. Without his hard work. I would've been more lost then I already was.

Post edited by: krileon, at: 2008/09/25 04:40


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • NateM
  • NateM
  • OFFLINE
  • Posts: 31
  • Thanks: 0
  • Karma: 3
16 years 3 weeks ago #75483 by NateM
Replied by NateM on topic Re:Friends Updates
Sounds great. I've subscribed to this thread. Looking forward to when it is released.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
16 years 3 weeks ago #75523 by krileon
Replied by krileon on topic Re:Friends Updates
Done.

Version 1 is now available. It will create it's own table separate of shoutbox. It will delete it self entirely upon uninstall. It shows login/logout, profile update, and avatar update. It also cleans up old entries.

You can control how many entries are displayed/saved by using the plugin params at backend. You can determine the messages said for the events outlined above as well.

I plan to add more announcement support to it as well. So this is only version 1.

I've ran debug mode and removed any bugs. I've cleaned up all un-necessary code. It doesn't appear to slow down page loads at all. Query count is approx 3.

The tab created by the plugin is moveable to your desired location.

If you find any problems then let me know. Enjoy.

*Update*
Working on a mini-hack for profilebook so you can see when your friends receive a new comment (I've modified PB to be a profile commenter. You can change the message if you want). This will not require u to replace the entire PB plugin. Instructions will be provided to show you where to insert the code.

I'll be making mini-hacks like this for all the components I use. If you want any others then I'll have an example written in the instructions that you may use to add support to other components. It's very simple and only requires trial & error for the correct placement of the code. Other then that it's copy and paste.

*Update* (I'll update with my progress. Thus users will know this project is highly active.)
Now Supported Components -> PonyGallery, ProfileBook, JEvents, Seyret, Groupjive, Mamblog, AdsManager, Fireboard

*Update*
Ok the components/plugins I have listed is where I am stopping. I don't need anymore then that. I've actually created 2 I didn't need as their popular choices for CB builders. I did not add puarcade, because well it's just too much spam. Too many games and too many friends = TON of highscore spam. So I didn't make the hack for it. You're welcome to do so though.

I'm adding some CSS styling options which you can change directly from the backend without having to edit files. Then I'll be ready to upload the new version. As well as the instructions for introducing the hacks.

Post edited by: krileon, at: 2008/09/25 20:34

Post edited by: krileon, at: 2008/09/25 21:46


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
16 years 3 weeks ago #75542 by krileon
Replied by krileon on topic Re:Friends Updates
Version 2 is completed.

Supported Components/Plugins via Hacks: PonyGallery, ProfileBook, JEvents, Seyret, Groupjive, Mamblog, AdsManager, Fireboard.

Supported Integration: Login, Logout, Profile Update, Avatar Update.

Configuration: Number of updates, full styling, options to change integrated updates.

This is configured to be english only, sorry. To change language you'll have to do it all manually.

Detailed instructions are included on how to apply the hacks. Use wordpad so you can see the styling as it's setup to be much more easier to read.

If you find any bugs then let me know. Enjoy everyone.

Attachment plug_friendsupdates_v2.zip not found



Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in or Create an account to join the conversation.

  • NateM
  • NateM
  • OFFLINE
  • Posts: 31
  • Thanks: 0
  • Karma: 3
16 years 3 weeks ago #75555 by NateM
Replied by NateM on topic Re:Friends Updates
I tried it, installed it. No errors, and everything appears to be working. However, I can't get the tab to show up on my profile, no matter what I do.

www.tianjinexpats.com/component/option,com_comprofiler/task,userProfile/Itemid,83/

Is it perhaps only for CB 1.2?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum