1
robbhammack
Re: Direct Friends Problem
  • 2006/6/3 21:33

  • robbhammack

  • Just popping in

  • Posts: 2

  • Since: 2006/6/3 2


I've gotten it (mostly) working under 2.2.4 - it was fairly easy, only took a few hours.
The database structure has changed, and the sql needs to be updated to reflect that. Also, I changed the way he accesses configuration variables to use the XOOPS constants from mainfile.php (not sure if it was necessary, but it seemed like a good idea)

I should really rewrite all the database code to use the $xoopsDB object, but this is a temporary hack - I'll be writing a much more full-featured "social networking" module and framework from scratch over the next few months.

Changes:
Mostly replacing $xoopsconfig["xoops_url"], etc with the equivalent constants, like XOOPS_URL

I.E. in myfriends.php
@mysql_connect($xoopsConfig["dbhost"],$xoopsConfig["dbuname"],$xoopsConfig["dbpass"])
becomes
@mysql_connect(XOOPS_DB_HOST,XOOPS_DB_USER,XOOPS_DB_PASS);

and rewriting the sql strings to use new fields.
I.E.
$sqlstr8="SELECT uid, time FROM ".$xoopsDB->prefix("sessions")."";
becomes
$sqlstr8="SELECT member_id, sess_updated FROM ".XOOPS_DB_PREFIX."_session"."";

I'll be happy to email you a zip of what I have so far, I'm still working on a few things as I'm new to XOOPS - I haven't figured out how to tell when a user is online, for example. email me at robbhammack@gmail.com and I'll send you a zip file of the working module ;o)

--Robb



2
robbhammack
Re: direct friend can not adds user
  • 2006/6/3 21:10

  • robbhammack

  • Just popping in

  • Posts: 2

  • Since: 2006/6/3 2


I've hacked the directfriends module to work under 2.2.3
I'm still working on it, but the add / delete / list /priate message all works. The status for online / offline still needs to be done, however.
If your interested, I'll send you the hack so you can try it out. Email me at robbhammack@gmail.com

I'm not sure of the propriety of hacking someone else's module, but when I have it fairly solid I'll see about releasing it to the general community. I'm not planning to support it or do enhancements, because I'll also be involved in a much more full featured "social networking" module, overseeing some work by an offshore team.
Our planned module will implement the FOAFnet standard, allowing people to easily import / export friend lists between different systems, allow different security levels for friends, and a lot more ;o)
The company I'm doing some work for needed something very basic _quickly_ so I decided to fix Directfriends rather than starting from scratch for the short-term goal of having something available by June 15th, 2006
I've discussed it with the business people, and we will be licensing it under a open-source license and releasing it to the public at some point.

--Robb




TopTop



Login

Who's Online

143 user(s) are online (54 user(s) are browsing Support Forums)


Members: 0


Guests: 143


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits