Hi. Perhaps I'm being daft here... The code seems to imply there is a way to disable users' ability to invite their friends, but I can't seem to find this setting anywhere?
Is it possible? My network is invitation (by me) only. How do I disallow non-admin members from inviting friends without hacking out all the "Invite more" links everywhere?
This is a great question. I am trying to create a network, in which the members of the network are actually members of a physical organization. So I don't want them to be able to bring their friends into the network. I don't want them to be able to share, videos, pics, etc. with people that aren't in the network. Any input would REALLY BE GREAT!!!
I spent a good portion of my afternoon trying to resolve this very issue today, and alas, I finally figured it out. To remove EVERY invite link from your site, including the invite tab ontop of everyones page you do need to access the source code. At least this seems to be the simplest way I have found to do this...
But anyhow, once you access the source code you can open the file XG_App.php in your editor.
Scroll down to line 959.
There you should see the following code:
public static function allowInvites() {
return true;
}
change the true to false. Save your file, upload it to the server and voila!
No more invite links.
I haven't yet figured out the share links.
And I think that they may be more problematic. Especially with regard to the photo viewer, and video player, as I believe those links are generated from within an .fla (Flash) file. Which we cannot edit without the actual .fla file, and they only provide us with access to the .swf files. Anyhow, I hope this helps.
Couple of quick notes...
A) the file XG_App, is located in your lib folder.
B) Once you change it to false you can no longer invite anyone. Even if you are the Creator of the site. I suppose if you know your registration link you could provide it to your admins through a private group. So to reactivate invitations even for the creator or admins, you'll have to reset this line of code to true...
I am going to try and find out how ning identifies who is an admin, and who is a creator, and write a php script that allows invites to be on for admins or creators or both only. If and when I do I'll let you know.
Also, in addition to what's mentioned above, be sure to change:
public static function canSeeInviteLinks($profile) {
// Shouldn't the isMember call be in canSendInvites? [Jon Aquino 2007-08-29]
return self::canSendInvites($profile) && User::isMember($profile);
}
to
public static function canSeeInviteLinks($profile) {
// Shouldn't the isMember call be in canSendInvites? [Jon Aquino 2007-08-29]
return false;
}
otherwise, you (every member) will continue seeing the invite link on the left top member summary
I went in the language editor and put in a hidden html comment for "Invite More", "Invite More People", and "Invite Friends" ...hideme.txt
The only downside I have seen so far is even admin looses the links too, so you'll need to record the link (and maybe add it to some admin text somewhere) or use the link provided for the creator in the privacy settings.
BTW I think the link is "MainNingAddress"/main/invitation/new
So I have the basics implemented and they are working exept there is still two loopholes that need to be closed.
The personalization box a user has until they click the x to remove it. And in the member section where they can choose to logout. The "quick add.." offers them a spot to invite there as well.
You can remove the invite links from the templates for both features. The template for the green welcome box can be found here:
/widgets/index/templates/embed/embed2welcome.php
The template for the quick add feature can be found here:
/widgets/index/templates/quickadd/bar.php