Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

HUNIVERSEL FRIEND

9 years 5 months ago
  • sarl's Avatar
    Topic Author
  • sarl
  • Offline
  • Fresh Boarder
  • Thank you received: 1
Licenses:
JomSocial Expired

I have add this code in components/com_community/models/profil.php on line 466.

To add a friend when a user is registering. This work fine for me.
The only probleme is that when a new user is log, firend id 667 is in this friend list but he can t see his stream until he go to freinds page.

I suppose it s because the friends field in community_user is not completed until user open the friends page.
Is there anyway to solve this?

I know this is not a part of your support, but it can made a good tips.

// add huniversal friend
$db->setQuery("INSERT INTO `#__community_connection` (`connect_from`,`connect_to`,`status` ,`group`) VALUES ( '".$userId."', '667', '1', '0')");
$db->query();
$db->setQuery("INSERT INTO `#__community_connection` (`connect_from`,`connect_to`,`status` ,`group`) VALUES ( '667', '".$userId."', '1', '0')");
$db->query();

Thanks again for all your great job.

9 years 5 months ago
Licenses:

Hi, Sarl.

I assign developer to this thread, so maybe he could have a tip for you.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: sarl
9 years 5 months ago
Licenses:

Hi Sarl,

for community_user you must update the friendcount number and put userid as friends value for both user (667 and $userId).
for friends field must use coma as separator if friends more then one

Regards,
Albert

9 years 5 months ago
  • sarl's Avatar
    Topic Author
  • sarl
  • Offline
  • Fresh Boarder
  • Thank you received: 1
Licenses:
JomSocial Expired

Thanks a lot, it looks much more complicated than i was thinking. I have tried some request to change the value of the fields friend, in community users but nothing work.

I have tried to assign a default value in this field by php my admin, same problem.

as when a user create a new account, it will always be friend with the 667 users, is there any way to put 667 as default value for the friends fiels in all new account?
The 667 friends count will be wrong, but it s not a problem for me as this user is only here to send the first message in the stream.

9 years 5 months ago
Licenses:

Hi Sarl,

the safety way you need to "copy" the function updateFriendCount from /components/com_community/model/friends.php line 62.
updateFriendCount need to be done for 667 and $userid (new user).

Regards,
Albert

The following user(s) said Thank You: sarl
9 years 5 months ago
  • sarl's Avatar
    Topic Author
  • sarl
  • Offline
  • Fresh Boarder
  • Thank you received: 1
Licenses:
JomSocial Expired

Thanks a lot, all is ok now!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW