Extension talk:SocialProfile/Archive 2

Archived discussion: 1

Support for MediaWiki 1.12
Do you have any intentions to support MediaWiki 1.12?

Gnom 10:45, 10 June 2008 (UTC)


 * What do you mean exactly? IIRC, this works quite nicely on 1.13alpha and thus should work on 1.12 likewise. -- Sayuri 13:18, 10 June 2008 (UTC)

Stable?
NOTE: This extension will not work for installations running on Windows. In SpecialUploadAvatar.php, there is a method that executes thus: exec("convert -size " . $thumbWidth . "x" . $thumbHeight ... etc Note that 'convert' on Windows does not convert images, rather it 'Converts a FAT volume to NTFS'. While you won't end up doing that, you will certainly get an error when trying to upload. Discovered whilst trying to get avatars working on a WAMP system.

Sayuri, this extension has been changed to 'Stable' now, I notice you made that change, and also that the SVN files must have been updated somewhat to include the avatars...

I still have the issues stated on the previous page...so unless their has been substantial updates, I still would not consider this extension stable?

Can you tell me what else has changed, to justify the stable status?

Cheers --HTPCnz 11:00, 18 May 2008 (UTC)


 * In 34829 I added the avatars directory from the SourceForge release, made some hardcoded strings i18n-able, fixed message loading in user profile pages (UserBoard messages weren't being loaded and had to be created manually if one wanted to have other text in there than &lt;userboard_message&gt; or such). The preg_replace_callback issue with the 'cut_link_text' function was fixed by commenting out a line...it didn't break anything on my development wiki, more like fixed things.


 * If CSS/JS aren't being loaded, you can change the values of $wgUserBoardScripts, $wgUserProfileScripts and $wgUserRelationshipScripts in LocalSettings.php. Yes, I'm very much aware of things like UserStatsClass.php throwing errors or Special:InviteContacts not being included in the package. However, those are things that I cannot fix myself. It would require Wikia, Inc. to release more of their code to the public. As far as I'm concerned, they're working on it.


 * It works relatively nicely on this one wiki that I administrate (which isn't even English and has $wgDBprefix set, btw) and I haven't heard too many complaints from our users. I'm not saying that this is something of CheckUser quality, I'm saying that this is stable enough that I dare to put it on a live site that is open for everyone. -- Sayuri 12:06, 18 May 2008 (UTC)


 * Ok, I have updated the files in 34829, and agree the extension is much better now.


 * It has removed most of my previous issues and warnings...I now have no warnings remaining on screen, and every feature works.


 * The only issues I have now is that the following warning:
 * Warning: Invalid argument supplied for foreach in /xxxx/xxxxxx/xxxxxxxx/htpcnz.net/extensions/SocialProfile/UserStats/UserStatsClass.php on line 378
 * It appears in the following cases:
 * After accepting new freind/foe requests
 * After sending someone a message using the Board
 * After using Board Blast


 * You already know of it, but any other thoughts?
 * --HTPCnz 09:55, 19 May 2008 (UTC)


 * If you feel adventurous enough, I suppose you could comment out the foreach loop (lines 378-384) and see what breaks, if anything. Better solution (IMO) would be to get Wikia release their UserLevels extension. ;-> -- Sayuri 12:32, 19 May 2008 (UTC)


 * Ok...commenting that loop out has worked, all warnings are gone, and everything still works...Perfect!
 * I will keep testing and digging to see if anything breaks as a result, and if so will post back here...but at this point, all looks perfect :) --HTPCnz 13:55, 19 May 2008 (UTC)

Customizing
Now that I have eveything stable and running perfectly, I will attempt to modify the code to display what I want, and any help/advice would be appreciated.

I want to change the 'Custom information' section... The 'Tidbits' currently have 4 'Custom' text input boxes available, I want to add more, and rename them...

Current example:
 * Custom 1
 * Custom 2
 * Custom 3
 * Custom 4

What I want:
 * Case
 * Motherboard
 * TV Tuner
 * Hard Drive
 * CPU
 * etc etc......

Anyone know where I should start looking? --HTPCnz 14:12, 19 May 2008 (UTC)


 * Edit MediaWiki:Custom-info-field1, MediaWiki:Custom-info-field2, MediaWiki:Custom-info-field3 and MediaWiki:Custom-info-field4. I'm not sure if you can add more fields without hacking the source. However, writing a quick extension might be possible if you use the four given hooks. -- Sayuri 14:58, 19 May 2008 (UTC)


 * Editing the files MediaWiki:Custom-info-field1, MediaWiki:Custom-info-field2, MediaWiki:Custom-info-field3 and MediaWiki:Custom-info-field4 does nothing.


 * I was able to cheat, and change the UserProfile.i18n file to change the names...but thats tacky.


 * I also modified UserProfilePage.php, UserProfileClass.php and SpecialUpdateProfile files to add another feild, with no success. :( --HTPCnz 09:33, 20 May 2008 (UTC)


 * The MediaWiki messages work for me. Check that $wgUseDatabaseMessages is set to true. -- Sayuri 14:04, 23 May 2008 (UTC)

Relationship requests
MediaWiki: 1.11.0

svn revision: 35175 (of 35213)
 * Not able to accept or reject Relationship requests. Access website.com/wiki/index.php/Special:ViewRelationshipRequests, select "Accept" and I get a js object error "Special:ViewRelationshipRequests line 102"

error.log

Undefined variable: output in /srv/mediawiki/extensions/SocialProfile/UserProfile/UserProfilePage.php on line 532, Undefined variable: output in /srv/mediawiki/extensions/SocialProfile/UserProfile/UserProfilePage.php on line 561 File does not exist: /srv/www/html/extensions, referer: http://website.com/wiki/index.php/Special:ViewRelationshipRequests


 * Please help! --ReidSerozi 02:59, 23 May 2008 (UTC)


 * One problem might be MediaWiki 1.11, I dunno really, but I guess it should work under 1.11 too.


 * Regarding the JS problem, make sure to set $wgUserBoardScripts, $wgUserProfileScripts and $wgUserRelationshipScripts</tt> to proper values in LocalSettings.php, e.g. $wgUserRelationshipScripts = "http://example.com/extensions/SocialProfile/UserRelationship";</tt> and so on. -- Sayuri 14:04, 23 May 2008 (UTC)


 * I have it working on MediaWiki 1.11 with no issues (now)
 * I made a small page highlighting the modifications I made to get this extension to work error free, and have made a download available including the version files I used with the edits I made. It can be found here. --HTPCnz 23:09, 23 May 2008 (UTC)

Avatar Uploading
I have big problems uploading avatars and i can not see the default avatars either. When I try to upload I always get the following message:

Warning: Invalid argument supplied for foreachin /mnt/web8/40/11/5926111/htdocs/hs/fhwiki/wiki/extensions/SocialProfile/UserStats/UserStatsClass.php on line 378 Interner Fehler: File „/mnt/shared/tmp/phpzeaqfz“ could not be copied to „“.

I tried many things with "imagemagick", but maybe I use the wrong absolute path to its convert command? But on the other hand I think the sample avatars must be viewable, but i can´t see them. Can anybody help me? Thanks alot.


 * I've got a similar problem. I can see the default avatars, but if I try to upload my own avatar, I got the same message: "Interner Fehler: Die Datei „D:\xampp\tmp\php1083.tmp“ konnte nicht nach „“ kopiert werden."


 * A couple of possible reasons for avatar errors:


 * Has the default images folder and files being correctly placed within your wiki images folder folder? (eg. /your_site/images/avatars/) This is required.
 * Has the images folder been chmod 777? This is required.
 * Does your wiki use a prefix? This causes/caused problems, and for this extension to work error free, you may have to remove use of prefix.
 * What version files are you using?...some files have been updated and have fixed many of past errors/issues. I recommend updating files to those found here: 34829


 * As for the warning message:
 * Warning: Invalid argument supplied for foreachin /mnt/web8/40/11/5926111/htdocs/hs/fhwiki/wiki/extensions/SocialProfile/UserStats/UserStatsClass.php on line 378
 * This can be removed by commenting out the foreach loop (lines 378-384)...everything else still works fine.


 * I would also suggest reading through all the comments left on the 'archived' discussion page, as many of these issues have come up time and time again and there can be soloutions hidden there.


 * Hope that helps --HTPCnz 10:46, 9 June 2008 (UTC)


 * Hmm I tried everything and looked some of the archieved articles - so I found out that I must have a ImageMagick-problem... -->

problem with ImageMagick functions
I tried to upload a picture with the regular "Upload file"-function and - voila - there is a problem! The convert command can not be found although I put in the path to the special ImageMagick software of my provider "Strato" (i know i know, it´s not the favourite one, but I am afraid of changing it for just this reason). They say that this should be the path to it:

/opt/RZmagick4/bin/

Regarding the absolute path the FAQ gives the following instruction:

/home/strato/www/first_two_letters/www.yourdomain.de/htdocs/

so normaly i would type in:

$wgImageMagickConvertCommand = "/home/strato/www/first_two_letters/www.yourdomain.de/htdocs/opt/RZmagick4/bin/convert"

But I still got the message: Mistake creating the thumbnail: sh: /home/strato/www/first_two_letters/www.yourdomain.de/htdocs/opt/RZmagick4/bin/convert: not found

I spent several hours changing the paths and searching the web for a solution - but still have no success. I would be so thankful if someone could help me

Paths to custom CSS
In SocialProfile.php</tt>, I think $wgScriptPath</tt> needs to be prepended to $wgUserBoardScripts</tt>, $wgUserProfileScripts</tt>, $wgUserRelationshipScripts</tt>, for some installations. E.g.: $wgUserBoardScripts = "$wgScriptPath/extensions/SocialProfile/UserBoard"; $wgUserProfileScripts = "$wgScriptPath/extensions/SocialProfile/UserProfile"; $wgUserRelationshipScripts = "$wgScriptPath/extensions/SocialProfile/UserRelationship";

-Jlerner 19:39, 15 June 2008 (UTC)


 * Fixed in 36399. -- Sayuri 19:22, 17 June 2008 (UTC)

Parts not the whole
Is it possible to use parts of this extension (since they download into subdirectories) and not the whole? Specifically I just want the social profile pages to replace user pages but don't need the boards and stuff.

Kay


 * I'd say that it's relatively impossible. By relatively, I mean that it takes too much work. It's simpler to download the whole extension and disable some of the features. -- Sayuri 21:41, 25 June 2008 (UTC)


 * OK, thanks. I tried doing it by following the read me instructions.. I wanted UserProfiles and that said it needed UserStats and YUI but just installing those three caused some other issues. So i ended up using the whole set. It works great for my personal wiki but work thought the boardblast and friending/foeing wasn't something they wanted me to put in for the wiki at work so i had to uninstall there.

Kay

Undisableable relationship features
The relationship settings don't seem to be working properly: I can't disable the friends and/or foes features, even when I set in LocalSettings.php.

Also, SpecialPopulateExistingUsersProfiles.php doesn't seem to properly account for the database prefix. —Emufarmers(T 17:42, 22 June 2008 (UTC)


 * I don't know why you would want to disable those features...but try setting them in SocialProfile.php or in /SocialProfile/UserProfile/UserProfile.php. And I'm aware of the database prefix issue, but fixing it wasn't quite straightforward and since it's a script that should be ran only once, I figured it wouldn't matter too much. -- Sayuri 21:41, 25 June 2008 (UTC)


 * I didn't think those lines were suposed to disable the friends/foe feature, simply remove them from showing up on the profile pages?

Can't download the files SVN
Hello,

I have download an prog to download the files by adding the link in that programm / map (TortoiseSVN). Now i added this link at import: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SocialProfile. And this is the error; Error: Repository moved permanently to Error: '/viewvc/mediawiki/trunk/extensions/SocialProfile/'; please relocate Can someone upload the files good or what do i have to do? --Cobra 20:50, 25 June 2008 (UTC)


 * Use /svnroot/ instead of /viewvc/. So the URL would look like http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SocialProfile/ then. -- Sayuri 21:41, 25 June 2008 (UTC)

Is there another way to create tables if I don't have access to the command line?
I like this extension so much, however I am using a shared server and can't access the command line. Is there a workaround for that? Can you please provide some SQL code so I can create the tables without running the install.php script? Thanks a lot!--24.6.151.20 23:36, 27 June 2008 (UTC)


 * The code you need is there within install.php, you just have to extract the part you need. (how I installed the tables on my shared hosting) --HTPCnz 10:00, 28 June 2008 (UTC)

if( $dba->tableExists( 'user_board' ) ) { echo( "The table already exists. No action was taken.\n" ); } else { $sql = $dir. '/UserBoard/user_board.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The table 'user_board' has been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists

if( $dba->tableExists( 'user_profile' ) ) { echo( "The table already exists. No action was taken.\n" ); } else { $sql = $dir. '/UserProfile/user_profile.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The table 'user_profileard' has been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists

if( $dba->tableExists( 'user_stats' ) ) { echo( "The table already exists. No action was taken.\n" ); } else { $sql = $dir. '/UserStats/user_stats.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The table 'user_stats' has been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists

if( $dba->tableExists( 'user_relationship' ) || $dba->tableExists( 'user_relationship_request' ) ) { echo( "'user_relationship', and/or 'user_relationship_request' already exist. No action was taken.\n" ); } else { $sql = $dir. '/UserRelationship/user_relationship.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The tables 'user_relationship', and 'user_relationship_request' have been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists


 * Thank you very much for your help! It works:)

--24.6.151.20 20:59, 28 June 2008 (UTC)

Deleting messages
Ok. everything seems to be working in my installation except, i can't manage to delete messages from message boards. any thoughts on what i should check?

Kay


 * I got the same problem.--Junflower 02:10, 12 July 2008 (UTC)

Don't have command line, but I have phpMyAdmin?
I don't have the command line, but I have phpMyAdmin, but I am a complete noob at it... what do I do on phpMyAdmin to install the extension? --74.130.36.17 07:44, 2 July 2008 (UTC)


 * Go to the database you use for your wiki, go to the SQL tab, and enter this code:

if( $dba->tableExists( 'user_board' ) ) { echo( "The table already exists. No action was taken.\n" ); } else { $sql = $dir. '/UserBoard/user_board.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The table 'user_board' has been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists

if( $dba->tableExists( 'user_profile' ) ) { echo( "The table already exists. No action was taken.\n" ); } else { $sql = $dir. '/UserProfile/user_profile.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The table 'user_profileard' has been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists

if( $dba->tableExists( 'user_stats' ) ) { echo( "The table already exists. No action was taken.\n" ); } else { $sql = $dir. '/UserStats/user_stats.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The table 'user_stats' has been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists

if( $dba->tableExists( 'user_relationship' ) || $dba->tableExists( 'user_relationship_request' ) ) { echo( "'user_relationship', and/or 'user_relationship_request' already exist. No action was taken.\n" ); } else { $sql = $dir. '/UserRelationship/user_relationship.sql'; if( $dba->sourceFile( $sql ) ) { echo( "The tables 'user_relationship', and 'user_relationship_request' have been set up correctly.\n" ); } }
 * 1) Do nothing if the table exists
 * That will install the tables you require, thats all you have to do within phpMyAdmin...
 * The rest is simply uploading the files using ftp, and making the required changes to your localsettings.php file. --HTPCnz 08:03, 2 July 2008 (UTC)


 * I'm getting an error when I do that. I know I am doing it correctly, though. Here's the error code:

Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 42 STR: -> SQL: # Do nothing if the table exists if( $dba->tableExists( 'user_board' ) ) { echo( "The table already exists. No action was taken.\n" )

SQL query:


 * 1) Do nothing if the table exists if( $dba->tableExists( 'user_board' ) ) { echo( "The table already exists. No action was taken.\n" )

MySQL said: Documentation echo( "The table already exists. No ' at line 2
 * 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 'if( $dba->tableExists( 'user_board' ) ) {
 * I am running 5.0.5 (cgi) PHP and 4.1.22-standard MySQL if that helps. --74.130.36.17 18:26, 2 July 2008 (UTC)


 * That is because you pasted PHP code into a MySQL query prompt...which you shouldn't obviously do. To create the tables, copy the SQL code from user_board.sql, user_profile.sql, user_relationship.sql and user_stats.sql to your phpMyAdmin SQL query prompt. You may or may not need to remove the comments (lines beginning with two dashes, ). -- Sayuri  18:34, 2 July 2008 (UTC)


 * Thanks, that worked! :) --74.130.36.17 18:38, 2 July 2008 (UTC)

Class 'SpecialPage' not found?
Hey, I'm getting an error on my wiki:

Fatal error: Class 'SpecialPage' not found in /home/www/****.**********.com/w/extensions/SocialProfile/UserBoard/SpecialUserBoard.php on line 17

What do I need to do to fix that? --74.130.36.17 19:41, 2 July 2008 (UTC)


 * By any chance, are you using the outdated SourceForge release? If so, don't &mdash; update to the latest SVN revision instead. In any case, I'd suggest updating your copy of SocialProfile. Maybe you also need to update your MediaWiki to 1.12 or 1.13alpha. -- Sayuri 20:11, 2 July 2008 (UTC)


 * I figured it out. LocalSettings.php was in conflict with SocialProfile. I've fixed it and it's working now. :) --74.130.36.17 18:17, 3 July 2008 (UTC)

Unicode Encoding Problem
In userBoard, the messages in Chinese characters are not displayed correctly. It's always displaying the unicode, e.g. %u4E0A%u56F4%u6CB9%u680F ... The userProfile is working well with Chinese characters. Could you please help out? Thanks a lot! --Junflower 02:43, 6 July 2008 (UTC)
 * Seems no one has the answer... Sayuri, what do you think? Why userProfile works with Chinese text input while userBoard doesn't? I guess I may have to completely disable the userBoard which is such a useful feature...--Junflower 01:07, 10 July 2008 (UTC)


 * To be honest, I don't know. However, I've experienced the same problem with Finnish characters: if the UserBoard message has a character like Ä, the message gets completely truncated (and it looks like as if you sent a blank message), but encoded entities such as &amp;Auml; work.


 * In any case, I'll try to pass this on to the Wikia team. Now that Wikia's SVN repository is public, I'll try to work with them to add more (working!) features to SocialProfile and get annoying bugs, such as this one, fixed. -- Sayuri 14:02, 10 July 2008 (UTC)


 * Thanks for your help! I guess the encoding problem may have been solved. It's all related to escape in the send_message function.The "escape" method in the javascript is deprecated because it wasn't designed to handle unicode chars properly, and we should use encodeURIComponent instead. Thanks for your excellent extension! --Junflower 01:01, 12 July 2008 (UTC)
 * I got the same Unicode problem in UserBoard message. Could you issue your code that may fix this? Vietbio 19:08, 12 July 2008 (UTC)


 * In UserBoard/SpecialUserBoard.php, search for the send_message function. Find the following line: var pars = 'rs=wfSendBoardMessage&rsargs[]=' + escape(\$(\"user_name_to\").value) +'&rsargs[]=' + escape(\$(\"message\").value) + '&rsargs[]=' + \$(\"message_type\").value + '&rsargs[]={$per_page}'; Change escape(\$(\"message\").value) to encodeURIComponent (\$(\"message\").value).


 * Similarly, in UserProfile/UserProfile.js, search for the send_message function and find the following line: var pars = 'rs=wfSendBoardMessage&rsargs[]=' + $("user_name_to").value +'&rsargs[]=' + escape($("message").value) + '&rsargs[]=' + $("message_type").value +'&rsargs[]=10'; Change escape($("message").value) to encodeURIComponent($("message").value). --Junflower 23:52, 12 July 2008 (UTC)


 * Thanks for the patch, I did a few quick tests and applied it to SVN (see 37604). :-) -- Sayuri 09:33, 13 July 2008 (UTC)

Why does SpecialUpdateProfile.php call User::sendConfirmationMail ?
Why does SpecialUpdateProfile.php</tt> call User::sendConfirmationMail</tt> on submitting the form at Special:UpdateProfile ?! It generates an email like: Someone, probably you from IP address 127.0.0.1, has registered an account "Joshua" with this e-mail address on OrganizedWisdom Health.

To confirm that this account really does belong to you and activate e-mail features on OrganizedWisdom Health, open this link in your browser:

http://organizedwisdom.com/Special:Confirmemail/CONFIRMCODE

If this is *not* you, don't follow the link. This confirmation code will expire at 15:45, July 22, 2008. This makes no sense - my account already exists! -Jlerner 23:29, 15 July 2008 (UTC)


 * Admittedly, it's a good question (that I cannot answer, only the original developers can). What e-mail notifications you have turned on (see Special:UpdateProfile/preferences)? I don't have any of the four on and I've never gotten such an email. As of version 1.1, the available toggles are: when I get a private board message, when someone adds me as a friend/foe, when I recieve a gift (this does not work yet though, as UserGifts functionality hasn't been implemented yet) and when I advance to a new level. -- Sayuri 13:45, 17 July 2008 (UTC)


 * We're on version 1.0. I have the following e-mail notifications checked:
 * Please email me when I am sent a message
 * Please email me when another user adds me as a friend
 * -Jlerner 22:59, 20 July 2008 (UTC)


 * I'd suggest contacting Aaron & David (original authors of SocialProfile) about this...maybe you could disable SocialProfile's email notifications for the time being. I haven't tested the email notifications extensively myself, though. -- Sayuri 19:53, 24 July 2008 (UTC)

Namespace Conflict
Hey,

If I add the extension whilst I have custom NS, then the UserWiki and User profile ones do not appear, corrupting the wiki.

What should I do? I have removed them for now but we do really need our Custom NS.

Cheers,

Bluegoblin7 11:16, 17 July 2008 (UTC)


 * What do you mean by corrupting the wiki? How? What gets corrupted?


 * Anyway, the simple solution is to change the numbers that your custom namespaces use. SocialProfile uses namespaces 200 (UserWiki) and 202 (User profile). Your custom namespaces could use, say, namespaces 110 and 111.


 * I should probably note that if $wgExtraNamespaces is already defined, then the following will not work:


 * Instead, you need to add them to the $wgExtraNamespaces array, so then you'd have something like this:


 * -- Sayuri 13:45, 17 July 2008 (UTC)


 * Thanks, that's all I needed, the bottom part.
 * Thanks,
 * Bluegoblin7 17:06, 17 July 2008 (UTC)

Upload Avatar bug
When logged, if you click on “import an avatar”, you get an error message saying that you must be logged to copy files on the server. Thanks for your help. Philippe


 * Works for me. Could you provide either an URL to the wiki (if it's public) or MediaWiki/SocialProfile/PHP/MySQL versions? -- Sayuri 19:53, 24 July 2008 (UTC)

Database error on MW1.12
setup SocialProfile done. Edit userpage:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "UserProfile::getProfile". MySQL returned error "1146: Table 'wikidb.user_profile' doesn't exist (localhost)". --Shizhao 19:29, 24 July 2008 (UTC)


 * Are you using the latest version of SocialProfile? And have you checked that the tables exist in the database? I have a wiki with SocialProfile version 1.1 enabled and $wgDBprefix set but I've never come across this error. Earlier versions of this extension did not take $wgDBprefix into account and that might've caused such errors. -- Sayuri 19:53, 24 July 2008 (UTC)