Extension talk:SocialProfile/Archive 6

''Please post new topics here, with the newest posts being at the bottom of the page. Discussions are archived gradually, so please check the archives to make sure that your question hasn't been answered already!''

gift error
from within function "". MySQL returned error "1146: Table 'uopedia_wiki1.gift' doesn't exist (localhost)". Any help? —The preceding unsigned comment was added by 66.43.40.131 (talk • contribs). Please sign your posts with ~ !


 * See above. --Jack Phoenix (Contact) 10:52, 18 February 2010 (UTC)
 * Yes, I have looked at everything above carefully and still I had to turn off the gifts because when I turn it on it still give me that error. I have put in all the tables people are posting but none with the name gift. Help?--66.43.40.131 03:00, 22 February 2010 (UTC)


 * How did you disable/turn off gifts?
 * --Enterprise user 19:04, 6 January 2011 (UTC)

Invite Friends
When I look at my friends list at the top it says "Want more friends? Invite them." with a link to a special page that is not there! How do i get this invite page and if possible make it work with the awards system? -- Redeye 01:02, 25 December 2010 (UTC)


 * Yes, it's not there because it's a separate extension. Feel free to remove the link there. I'll try to get it ready eventually, but since no-one's paying me, everything depends on the developers' interests, and currently I'm the only one actively developing SocialProfile and I have other, more important projects than fixing the mess that the InviteContacts extension is. --Jack Phoenix (Contact) 19:34, 6 January 2011 (UTC)

Fatal error
After adding the appropriate lines to LocalSettings.php, and creating the tables, I encounter a blank page when accessing a user profile. After enabling PHP debug, the following Fatal Error is displayed on the user profile page:

Any information on how to resolve this?

--Enterprise user 18:02, 6 January 2011 (UTC)


 * Mark suggested me to make SocialProfile user that function in code review for r75007 and I committed the change in r77339. iAlex introduced unixTimestamp function in r77231. Reedy noted on the comment section for r77231 that the unixTimestamp function has been superseded by the querypage-work2 branch, which was merged to trunk in r78786. Roan removed the unixTimestamp functions in r79345.


 * I've reverted my r77339 in r79748; please update to that revision to fix this issue. Thank you for reporting this, this issue went unnoticed for quite a long time... --Jack Phoenix (Contact) 19:34, 6 January 2011 (UTC)


 * Your change seems to of corrected the issue. SocialProfile seems to be working fine now, although I haven't extensively tested all of its features. Note that my SVN update was to 79753 not 79748. Thanks for the timely response. --Enterprise user 21:06, 6 January 2011 (UTC)

Remove/Disable either the 'Friend' or 'Foe' Feature
Is there a way to disable or remove either the 'Friend' or 'Foe' feature? Thanks --Enterprise user 22:36, 7 January 2011 (UTC)


 * There is a global called $wgFriendingEnabled for enabling friending, it's set to true on SocialProfile.php, but as the doc comment notes, you shouldn't rely on it. Maybe one day I'll fix it or remove it entirely. I personally don't see why someone would want to disable either friending or foeing or both, but I do know some sites that do this nevertheless. Safest option at the moment is to hack SocialProfile, unfortunately. --Jack Phoenix (Contact) 00:21, 28 January 2011 (UTC)

Namespace Corruption
I recently noticed that my properties created by Semantic Tasks are being associated with the userprofile namespace. For example, when display a list of past and recently created properties, they're displayed as userprofile:foo instead of property:foo. Is there a way to resolve this without disabling SocialProfile? --Enterprise user 22:59, 24 January 2011 (UTC)


 * I don't know, I've never used any of the Semantic extensions, sorry. :-( --Jack Phoenix (Contact) 00:21, 28 January 2011 (UTC)

Link to main user profile page (Special:MyPage)
I want to add the text "View your updated profile" to the confirmation message you get when you save updates to your profile. I tried using a link to Special:MyPage (which works when I use it in various MediaWiki system messages) but when I click the link from within Social Profile it opens a new tab and takes me to a page for my logged out IP address, even if I'm logged in.

To clarify, I have tried adding an html link to the full domain.com/index.php/Special:MyPage and also tried using the wikitext formatting. The html link took me to a logged out, IP address profile page, the wikitext one simply rendered as normal text.

How can I provide a link back to the user's main profile page? —The preceding unsigned comment was added by 70.55.241.63 (talk • contribs). Please sign your posts with ~ !

SpecialUploadAvatar broken
When the height is larger as width from the source picture the picture rendered wrong. Then it change the width to the 50px and not the height.

Regards 84.173.117.112 15:30, 2 February 2011 (UTC)


 * You should probably report this as a bug on our Bugzilla. --Jack Phoenix (Contact) 20:50, 16 February 2011 (UTC)

Errors on the page
I am getting this error when i am trying to leave message on users Board: Warning: Invalid argument supplied for foreach in C:\wamp\www\MyWiki\extensions\SocialProfile\UserStats\UserStatsClass.php on line 517

When the users doesn't input his age into the profile, this Notice is displayed at the top of the page. Notice: Undefined variable: birthday_date in C:\wamp\www\MyWiki\extensions\SocialProfile\UserProfile\SpecialUpdateProfile.php on line 234

I get this notice when I am on this page localhost/MyWiki/index.php/Special:TopUsers Notice: Undefined variable: last_level in C:\wamp\www\WikiError\extensions\SocialProfile\UserStats\TopUsers.php on line 117 I only have there 2 users, both have 1000 points.

When I am trying to upload image to a gift i get this Notice Notice: Undefined variable: type in C:\wamp\www\WyWiki\extensions\SocialProfile\SystemGifts\SpecialSystemGiftManagerLogo.php on line 331 From this page localhost/MyWiki/index.php?title=Special:SystemGiftManagerLogo&gift_id=1

Any suggestions on how to fix this? —The preceding unsigned comment was added by 71.105.189.52 (talk • contribs). Please sign your posts with ~ !


 * IIRC the last one has been fixed in the trunk version of SocialProfile. If you're seeing these notices on your production site, disable PHP's error reporting, as it really isn't a good idea to have PHP notices and errors displayed on a production site. --Jack Phoenix (Contact) 20:50, 16 February 2011 (UTC)

Friends and Foes feature not appearing on MW1.15
Running PHP5.2.8 and MW 1.15.1 and downloaded the 1.15.X version of SocialProfile extension. This seems to be called Version 1.3. It all appears to be functioning currently with the exception of Frieds/Foes feature which does not appear at all. I tried the suggestions of other posters to these talk pages including the extensive changes to LocalSettings.php, Common.css and Common.js on one of the other posts, but to no avail. The Friends and Foes feature just does not appear.

Has anyone else noticed this and do they have a work-around?

I do have two additional special pages called "View Relationships" and "View Relationship Requests", however when I run these they first say I have 0 relationships and that I should "invite some". However, when I press this link I get an error saying that I have requested an Invalid Page. It seems it is looking for a page called "SpecialPage:InviteContacts" which doesn't exist on my wiki.

My production wiki is running MW1.16 but I am reluctant to try and install it there, until I can test the features in MW1.15.

Also, the Message Board is displayed but I have no way of making a post.

Brett Tyson 6 February 2011


 * Just read an earlier post about InviteContacts which is apparently another extension. I am assuming that I do not need this extension in addition to SocialProfile? Am I correct, or are these extensions only not required in V1.4 of the SocialProfile extension.
 * Brett Tyson 6 February 2011


 * InviteContacts is a separate extension, which is not ready for production yet (the code is quite ugly). I'd suggest updating your MediaWiki and SocialProfile, I'm not supporting the ancient releases. --Jack Phoenix (Contact) 20:50, 16 February 2011 (UTC)

Why use ImageMagic?
ImageMagic (IM) takes up to 50M in space, and the only feature of IM we are using in this extension is image resize, I don't see the point of using IM. Isn't there other much much smaller in size softwares/extensions that will do the same thing? But, if that was the only problem, with IM we also must check if host provider willing to install IM on their servers, especially it would be a lot of the paint if I had to move to another hosting that offers a good deal, but doesn't want or can't install IM. —The preceding unsigned comment was added by 71.105.189.52 (talk • contribs). Please sign your posts with ~ !


 * SocialProfile uses ImageMagick before that's what it has always been using. If you are able to fix it so that it uses whatever alternatives there are available (i.e. PHP's GD library), feel free to submit a patch by opening a bug on our Bugzilla. --Jack Phoenix (Contact) 20:50, 16 February 2011 (UTC)

Getting an error while adding table through phpMyAdmin
I added other tables including this one, but while I was adding this one I got error. Table still got added, but I don't know if it did with out errors in it? This is the code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SocialProfile/UserBoard/user_board.sql?view=markup

Here is the copy of the error: Error SQL query:

CREATE INDEX /*i*/ub_user_id ON /*_*/user_board(

ub_user_id ), CREATE INDEX /*i*/ub_user_id_from ON /*_*/user_board( ub_user_id_from ), CREATE INDEX /*i*/ub_type ON /*_*/user_board( ub_type ) MySQL said:

CREATE INDEX ub_user_id_from ON user_board (ub_user_id_from), CREATE INDEX ub' at line 1
 * 1) 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '

—The preceding unsigned comment was added by 71.105.189.52 (talk • contribs). Please sign your posts with ~ !


 * I'll look into this. It looks like the definition in the .sql file is messed up. --Jack Phoenix (Contact) 20:50, 16 February 2011 (UTC)


 * @Jack Phoenix I asked about this error in http://forums.mysql.com/read.php?22,406496,406496#msg-406496, see their solution.

Uploading problems even in other uploading areas of MW
I am getting an error Warning: Invalid argument supplied for foreach in C:\wamp\www\MyWiki\extensions\SocialProfile\UserStats\UserStatsClass.php on line 552 when I am trying to upload image through http://localhost/WikiError/index.php/Special:UploadWindow However, even with error image does upload to awards/6/62/imagefilez.gif

I am getting broken link for the image i uploaded trough http://localhost/MyWiki/index.php/Special:Upload It shows page with upload image but the link is broken, the broken link points to (http://localhost/MyWiki/images/1/1b/Smile.jpg), yes, the image did get uploaded. But it uploaded image to images/awards/1/1b/Smile.jpg (located inside awards)

I don't really get this part: The following directories should exist under the wiki's $wgUploadDirectory: avatars/ — the directory where all user-uploaded avatar images are stored awards/ — system gift (award) and normal gift images will be stored here Please read below for more info. I already moved avatars and awards folders into image folder, then what, how exactly add $wgUploadDirectory ? Do add something like this? $wgUploadDirectory = "images/avatars"; $wgUploadDirectory = "images/awards"; or something like this $wgUploadDirectory = "images"; ???


 * You should leave $wgUploadDirectory at its default (just remove it from LocalSettings.php). —Emufarmers(T 15:38, 8 February 2011 (UTC)


 * So, I should comment out $wgUploadDirectory from LocalSettings?


 * Yes. —Emufarmers(T 05:43, 9 February 2011 (UTC)

Changing preferences has no effect
All the checkboxes are checked by default on Special:UpdateProfile/preferences unchecking them and then clicking the Update button appears to have no effect. Changing the code so that the default is 0 instead of 1 seems to fix this issue e.g.

$wgUser->getIntOption( 'notifyhonorifics', 0 ) == 1 ) ? 'checked' : 'unchecked' )

I've sent a patch by email with this change to each of these fields. --Goibhniu 13:37, 16 Mar 2011 (UTC)

SocialProfile+PostgreSQL
I have SocialProfile from SVN (84408), PostgreSQL 8.4.7 and Mediawiki 1.16.2 Tables in base are created, but at calling on page of the user I receive an error:

A database error has occurred Query: SELECT ug_id,ug_user_id_from,ug_user_name_from,ug_gift_id,ug_date,ug_status,gift_name,gift_description,gift_given_count,UNIX_TIMESTAMP(ug_date) AS unix_time FROM user_gift INNER JOIN gift ON ((ug_gift_id = gift_id)) WHERE (ug_user_id_to = 2) ORDER BY ug_id DESC LIMIT 4 OFFSET 0 Function: UserGifts::getUserGiftList Error: 1 ERROR: function unix_timestamp(timestamp with time zone) does not exist LINE 1: ...tatus,gift_name,gift_description,gift_given_count,UNIX_TIMES... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Backtrace: --Duskman 18:08, 20 March 2011 (UTC)
 * 1) 0 /var/www/site/public_html/includes/db/Database.php(538): DatabasePostgres->reportQueryError('ERROR: functio...', 1, 'SELECT ug_id,u...', 'UserGifts::getU...', false)
 * 2) 1 /var/www/site/public_html/includes/db/Database.php(874): DatabaseBase->query('SELECT ug_id,u...', 'UserGifts::getU...')
 * 3) 2 /var/www/site/public_html/extensions/SocialProfile/UserGifts/UserGiftsClass.php(327): DatabaseBase->select(Array, Array, Array, 'UserGifts::getU...', Array, Array)
 * 4) 3 /var/www/site/public_html/extensions/SocialProfile/UserProfile/UserProfilePage.php(920): UserGifts->getUserGiftList(0, 4)
 * 5) 4 /var/www/site/public_html/extensions/SocialProfile/UserProfile/UserProfilePage.php(69): UserProfilePage->getGifts('DuskMan')
 * 6) 5 /var/www/site/public_html/includes/Wiki.php(493): UserProfilePage->view
 * 7) 6 /var/www/site/public_html/includes/Wiki.php(70): MediaWiki->performAction(Object(OutputPage), Object(UserProfilePage), Object(Title), Object(User), Object(WebRequest))
 * 8) 7 /var/www/site/public_html/index.php(117): MediaWiki->performRequestForTitle(Object(Title), Object(UserProfilePage), Object(OutputPage), Object(User), Object(WebRequest))
 * 9) 8 {main}


 * PostgreSQL (and any non-MySQL DBMS for that matter) support sucks, it's a known issue; see 27732 and 28279 (one of those bugs should probably be closed and marked as duplicate of the other...). --Jack Phoenix (Contact) 08:45, 29 April 2011 (UTC)

Avatars in Talk Discussions?
Does Social Profile display the users avatars when they participate on a talk page? If not, that would be quite cool would it not...? Is there a way to easily get SP to do this?

Thanks 122.57.135.67 23:09, 22 March 2011 (UTC)


 * It'd indeed be cool, but I'd guess that it's be pretty tough to code. So no, there's no easy way of getting SP to do that. --Jack Phoenix (Contact) 08:45, 29 April 2011 (UTC)

How to change descriptions of fields
HI, I want to change the description under 'about me' to something different. How/where can i do this? Thanks —The preceding unsigned comment was added by 122.57.135.67 (talk • contribs). Please sign your posts with ~ !

To answer my own question, you can change it via MediaWiki:User-profile-personal-aboutme —The preceding unsigned comment was added by 122.57.135.67 (talk • contribs). Please sign your posts with ~ !

How to uninstall
I love this extension but need to uninstall it for now - what's the best way to do that? I mean including all the database tables etc...? THANKS --Fxk2 19:17, 17 April 2011 (UTC)


 * I'm curious as to why you need to uninstall it, but anyway...


 * Remove/comment out the require_once line from LocalSettings.php and any related configuration settings
 * Drop the following database tables: user_system_gift, system_gift, user_gift, gift, user_board, user_profile, user_relationship</tt>, user_relationship_request</tt>, user_stats</tt> and user_system_messages</tt>
 * Profit?
 * Profit?


 * --Jack Phoenix (Contact) 08:45, 29 April 2011 (UTC)
 * Why uninstall? Well, we had a look at it - and we - for now - prefer to hold on to simple user pages, no extra stuff - and I wanted to know and make sure, what to remove/drop, to keep the database slim - if possible. Thanks for your reply --Fxk2 12:11, 29 April 2011 (UTC)

Gift error
Hi, when trying to send a gift, or access any of the special gift pages, I get:

Woops, you took a wrong turn! The link you have entered is invalid

The db tables have been created fine.

MW 1.16.2 Social Profile 1.4

Failing a fix, how can I disable the Gifts features?

Thanks 222.152.234.200 23:36, 25 April 2011 (UTC)


 * IIRC you need to generate at least one gift via Special:GiftManager to make that error go away. Disabling the gifts functionality is not possible without editing the codebase. --Jack Phoenix (Contact) 08:45, 29 April 2011 (UTC)

Add more custom fields
Is there a way to add more custom fields?

Some variable I can set somewhere?

Thanks 222.152.234.200 00:53, 26 April 2011 (UTC)


 * Not really. To do this, you'd have to edit the codebase (take a look at the stuff in the UserProfile directory). --Jack Phoenix (Contact) 08:45, 29 April 2011 (UTC)

Friend/Foe not appearing in 1.16-r66255
Hello! First, thanks for all of the hard work you've put into this, and I'm sorry to sound like a whiner.

That said, I've turned on your extension with the following settings:

require_once("$IP/extensions/SocialProfile/SocialProfile.php"); $wgUserProfileDisplay['friends'] = true; $wgUserProfileDisplay['foes'] = true;

$wgUserBoard = true; $wgUserProfileDisplay['board'] = true;

So based on this, people should be able to see their friends/foe lists. However, I'm having the following errors:

1. In the user profile, the Friends/Foe list does not appear at all.

2. When testing adding friends, I had one of the users add me. I received the email telling me to go to http://gamerspress.com/index.php?title=Special:ViewRelationshipRequests. I noticed the request without any problems, however, when I click either "Accept" or "Reject", the page simply goes blank and I can't add that friend. This is using either Google Chrome or Safari on OS X.

Thanks again for this extension, and let me know if there's anything I can do to help.

--Johnhummel 02:15, 5 May 2011 (UTC)


 * Hi John and thanks for the compliments! I don't think that bug reports and requests for help count as whining. :-)


 * That being said, the first thing I'd recommend you to do is to update your copy of SocialProfile &mdash; the SVN HEAD version should be totally compatible with MediaWiki 1.16 branch; if it turns out that someone has broken backwards compatibility, please notify me as soon as possible and I'll go yell at them!


 * Do note that SVN HEAD of SocialProfile uses jQuery instead of YUI; if I recall correctly, jQuery is not included on every page by default in the 1.16 branch. You need to add an extension function (see jQuery) to your wiki's LocalSettings.php to include jQuery on every page load.


 * Let me know if the problems still persist after upgrading SocialProfile. --Jack Phoenix (Contact) 13:18, 5 May 2011 (UTC)

Mr. Phoenix,

Just to make sure I have it all happy, here's the steps that I've undergone:

1. svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SocialProfile/ - this gives me revision 87497 (most current). 2. Upload SocialProfile into /extensions on the web page. 3. Made the copy of /awards and /avatar into /images (aka the upload directory, set to writable). 4. Just for good measure, I'm double checking the LocalSettings.php file here:


 * //This adds in the SocialExtensions, available here:
 * //http://www.mediawiki.org/wiki/Extension:SocialProfile
 * require_once("$IP/extensions/SocialProfile/SocialProfile.php");
 * $wgUserProfileDisplay['friends'] = true;
 * $wgUserProfileDisplay['foes'] = true;


 * $wgUserBoard = true;
 * $wgUserProfileDisplay['board'] = true;


 * $wgExtraNamespaces[NS_USER_WIKI]   = 'UserWiki';
 * // this talkspace is basically unused
 * $wgExtraNamespaces[201]            = 'UserWiki_talk';
 * $wgExtraNamespaces[NS_USER_PROFILE] = 'User_profile';
 * // this talkspace is basically unused
 * $wgExtraNamespaces[203]            = 'User_profile_talk';

OK - so we're good so far.

5. Just to make totally sure everything is happy, go into /maintenance/ and run php update.php (using the php from php5). This runs the MediaWiki 1.6.4 updater again (odds are I didn't have to do this, but let's be complete).

6. Adding in the jQuery data into LocalSettings.php with:
 * // Include jQuery
 * function wfIncludeJQuery {
 * global $wgOut;
 * $wgOut->includeJQuery;
 * }
 * $wgExtensionFunctions[] = 'wfIncludeJQuery';

7. OK - at this point, I should use a fresh browser to make sure there's no cache issues. Log in, then go to my userpage. The good news is the profile data works (I can update my picture), the level data works (I can gain points and so on). But sadly the friend/foe functionality doesn't want to be happy. Here's a picture of what I see: http://www.gamerspress.com/images/social_userprofile_test.png

Thanks again for your attention. Hopefully this has given all of the information that's useful.

update.php
Excuse my ignorance, but how do I run update.php from the command line? I tried googling this info but I literally couldn't find it after 10 minutes of searching. Thanks 67.169.112.14 06:22, 7 May 2011 (UTC)
 * Try Manual:Update.php and/or Manual:Upgrading. Regards, --Davydog 17:25, 19 May 2011 (UTC)

Looking for a developer
Can anybody help us to improve/modify this extension for us (with pay)? Please let us know at  ahmetcaglar @infokent.com thanks Bamtelim 18:58, 27 May 2011 (UTC)

Removing Gifts (System Awards)
Hi, thanks for this extension. I accidentally sent an award out to several users, and I can't seem to remove it. I found an archived discussion where it was confirmed that the functionality for removing awards does not exist. Is this still the case? I notice in the extension documentation it says that Special:SystemGiftManager allows removing gifts, but it doesn't seem to offer that option for me (I am in the awardsmanage, giftadmin, and staff groups). My version of SocialProfile is 1.4, with MediaWiki 1.16.2.

If this functionality is still nonexistant, is it possible to remove or hide the award either at the mediawiki folder level, or in the mysql database? It is pretty embarrassing to have an unintended award given to so many people, so I've resorted to replacing the gift image with a 1x1 pixel image to minimize its visual impact... not a long-term solution as you could imagine.

Thanks for any help you can provide. -kotra 05:20, 9 June 2011 (UTC)


 * Hello Jack Phoenix: Along with kotra, I'm one of the other primary admins with the civic wiki experiencing this issue. I can confirm that we're truly scratching our heads over this one. Kotra, in particular, has done extensive trouble-shooting to try and resolve this glitch, without results so far. In happier news, your extension is definitely popular with the PortlandWiki crowd, especially with some of our younger participants. Davydog 17:27, 13 June 2011 (UTC)


 * Hi Kotra and Davydog, there sadly still isn't an option to delete system gifts. :-( If you know SQL, you can fiddle around in the database to remove the data (look in the  and   tables).


 * If you want such a feature, please file a feature request on our Bugzilla.


 * Also, I would recommend upgrading your version of SocialProfile &mdash; version 1.4 is rather old, current trunk version should be 100% compatible with MediaWiki 1.16.x branch. --Jack Phoenix (Contact) 18:20, 13 June 2011 (UTC)