Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 5 6 7 Next > End >>
Re:Friends Updates
Date: 2008/09/25 02:30 By: krileon Status: CB Doc subscriber  
Karma: 38  
Platinum Joomlapolitan

Posts: 511
graphgraph
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:wwwincludesdatabase.php on line 502

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in W:wwwincludesdatabase.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:

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



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:

                                  $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();                                 }



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
AllMySocials
"Where social networks come together"
www.allmysocials.com
Click here to see the profile of this user The administrator has disabled public write access.

Re:Friends Updates
Date: 2008/09/25 04:21 By: krileon Status: CB Doc subscriber  
Karma: 38  
Platinum Joomlapolitan

Posts: 511
graphgraph
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:

                                 $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();                                 }



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
AllMySocials
"Where social networks come together"
www.allmysocials.com
Click here to see the profile of this user The administrator has disabled public write access.

Re:Friends Updates
Date: 2008/09/25 04:32 By: NateM Status: User  
Karma: 2  
Senior Joomlapolitan

Posts: 54
graphgraph
Sounds great. I've subscribed to this thread. Looking forward to when it is released.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Friends Updates
Date: 2008/09/25 13:45 By: krileon Status: CB Doc subscriber  
Karma: 38  
Platinum Joomlapolitan

Posts: 511
graphgraph
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
AllMySocials
"Where social networks come together"
www.allmysocials.com
Click here to see the profile of this user The administrator has disabled public write access.

Re:Friends Updates
Date: 2008/09/25 21:51 By: krileon Status: CB Doc subscriber  
Karma: 38  
Platinum Joomlapolitan

Posts: 511
graphgraph
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.
File Attachment:
File name: plug_friendsupdates_v2.zip
File size:5913 bytes

AllMySocials
"Where social networks come together"
www.allmysocials.com
Click here to see the profile of this user The administrator has disabled public write access.

Re:Friends Updates
Date: 2008/09/26 01:40 By: NateM Status: User  
Karma: 2  
Senior Joomlapolitan

Posts: 54
graphgraph
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.

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

Is it perhaps only for CB 1.2?
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 3 4 5 6 7 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC4)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC4, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers and now also to all registered joomlapolitans.

CB Login