Jump to content

Extension talk:SocialProfile/Archive 2

Add topic
From mediawiki.org
Latest comment: 16 years ago by Ivolucien in topic Stable?

Upload file error?

[edit]

this is different to the others

Internal error
Could not copy file "C:\xampp\tmp\php66EC.tmp" to "".

i have a folder in my wiki dir. \images\avatars but i dont know how to fix it? —The preceding unsigned comment was added by VegaterianLord (talkcontribs) . Please sign your posts with ~~~~!

I've had the same error on a Unix system. It was a file permissions error, I had to chown the images/avatar/ directory to the Apache user (www-data). I don't know how to fix it on a Windows box, but make sure that your Apache can read the images/avatar/ folder and has permissions to execute commands etc. --Sayuri 09:50, 26 July 2008 (UTC)Reply
____
This can also show up if ImageMagick isn't available for whatever reason. SpecialUploadAvatar.php tries to call convert to create the various sizes of thumbnail graphics from the one you upload, and if that fails for any reason it will give the same error. Run convert --version as a quick test to make sure it's available. Also, see my note below, under Stable, regarding installation under Windows. - Ivolucien 23:41, 5 August 2008 (UTC)Reply


_____

Also You may need to manually create the directory if it is not there

Support for MediaWiki 1.12

[edit]

Do you have any intentions to support MediaWiki 1.12?

Gnom 10:45, 10 June 2008 (UTC)Reply

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)Reply

Stable?

[edit]

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.

I haven't tested it, but if you install the Windows version of ImageMagick and make sure that it's in the path before the Windows system32\convert.exe utility, it should be possible to make this work. That does presume that the command line is the same, or that one adds OS detection code to the createThumbnail function in SpecialUploadAvatar.php to use the appropriate command line. - Ivolucien 23:51, 5 August 2008 (UTC)Reply

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)Reply

In rev: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 <userboard_message> 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)Reply
Ok, I have updated the files in rev: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)Reply
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)Reply
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)Reply
The User Levels code completely depends on everyone having set up that feature. You are forced to either comment out code (as Sayuri suggests) or set up the User Level functionality as described here. It would be easy to add an option to turn this feature on or off (like $wgUserProfileDisplay['levels']), and test it before calling the various dependent functions. Hopefully they'll include that or something similar in v1.2. - Ivolucien 01:08, 6 August 2008 (UTC)Reply

Customizing

[edit]

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)Reply

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)Reply
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)Reply
The MediaWiki messages work for me. Check that $wgUseDatabaseMessages is set to true. --Sayuri 14:04, 23 May 2008 (UTC)Reply

Relationship requests

[edit]

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)Reply
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 to proper values in LocalSettings.php, e.g. $wgUserRelationshipScripts = "http://example.com/extensions/SocialProfile/UserRelationship"; and so on. --Sayuri 14:04, 23 May 2008 (UTC)Reply
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)Reply


Avatar Uploading

[edit]

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 foreach()in /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:
  1. Has the default images folder and files being correctly placed within your wiki images folder folder? (eg. /your_site/images/avatars/) This is required.
  2. Has the images folder been chmod 777? This is required.
  3. 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.
  4. 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: rev:34829
As for the warning message:
Warning: Invalid argument supplied for foreach()in /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)Reply
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

[edit]

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

[edit]

In SocialProfile.php, I think $wgScriptPath needs to be prepended to $wgUserBoardScripts, $wgUserProfileScripts, $wgUserRelationshipScripts, 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)Reply

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

Parts not the whole

[edit]

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)Reply
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

[edit]

The relationship settings don't seem to be working properly: I can't disable the friends and/or foes features, even when I set $wgUserProfileDisplay['friends'] = false;
$wgUserProfileDisplay['board'] = false;
in LocalSettings.php.

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

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)Reply
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

[edit]

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)Reply

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)Reply


Is there another way to create tables if I don't have access to the command line?

[edit]

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)Reply

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)Reply
# Do nothing if the table exists
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" );
	}
}

# 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" );
	}
}

# 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" );
	}
}

# 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" );
	}
}
Thank you very much for your help! It works:)

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

Deleting messages

[edit]

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)Reply

Don't have command line, but I have phpMyAdmin?

[edit]

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)Reply

Go to the database you use for your wiki, go to the SQL tab, and enter this code:
# Do nothing if the table exists
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" );
	}
}

# 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" );
	}
}

# 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" );
	}
}

# 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" );
	}
}
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)Reply
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:

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

MySQL said: Documentation
#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' ) ) {
    echo( "The table already exists. No ' at line 2 
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)Reply
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)Reply
Thanks, that worked! :) --74.130.36.17 18:38, 2 July 2008 (UTC)Reply

Class 'SpecialPage' not found?

[edit]

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)Reply

By any chance, are you using the outdated SourceForge release? If so, don't — 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)Reply
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)Reply

Unicode Encoding Problem

[edit]

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)Reply

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)Reply
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 &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)Reply
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)Reply
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)Reply
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)Reply
Thanks for the patch, I did a few quick tests and applied it to SVN (see rev:37604). :-) --Sayuri 09:33, 13 July 2008 (UTC)Reply

Why does SpecialUpdateProfile.php call User::sendConfirmationMail() ?

[edit]

Why does SpecialUpdateProfile.php call User::sendConfirmationMail() 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)Reply

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)Reply
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)Reply
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)Reply

Namespace Conflict

[edit]

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)Reply

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:
$wgExtraNamespaces[NS_USER_PROFILE] = "User_profile";
$wgExtraNamespaces[NS_USER_WIKI] = "UserWiki";
Instead, you need to add them to the $wgExtraNamespaces array, so then you'd have something like this:
$wgExtraNamespaces = array(
	110 => "Custom_namespace",
	111 => "Custom_namespace_talk",
	NS_USER_PROFILE => "User_profile",
	NS_USER_WIKI => "UserWiki",
);
--Sayuri 13:45, 17 July 2008 (UTC)Reply
Thanks, that's all I needed, the bottom part.
Thanks,
Bluegoblin7 17:06, 17 July 2008 (UTC)Reply

Upload Avatar bug

[edit]

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)Reply
Thank you for your answer, yes it's on www.wikiastuces.fr . There is a problem when two users have the same IP adress but not all the time :). --84.103.193.23 17:32, 28 July 2008 (UTC)Reply

Database error on MW1.12

[edit]

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)Reply

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)Reply
yes ,me too, SocialProfile version 1.1. SQL is: SELECT * FROM `user_profile` WHERE up_user_id = '1' LIMIT 1. How set $wgDBprefix? --Shizhao 06:18, 25 July 2008 (UTC)Reply
My TABLES:
+-------------------+
| Tables_in_wikidb  |
+-------------------+
| archive           | 
| categorylinks     | 
| externallinks     | 
| filearchive       | 
| hitcounter        | 
| image             | 
| imagelinks        | 
| interwiki         | 
| ipblocks          | 
| job               | 
| langlinks         | 
| logging           | 
| math              | 
| objectcache       | 
| oldimage          | 
| page              | 
| page_restrictions | 
| pagelinks         | 
| protected_titles  | 
| querycache        | 
| querycache_info   | 
| querycachetwo     | 
| recentchanges     | 
| redirect          | 
| revision          | 
| searchindex       | 
| site_stats        | 
| templatelinks     | 
| text              | 
| trackbacks        | 
| transcache        | 
| user              | 
| user_groups       | 
| user_newtalk      | 
| watchlist         | 
+-------------------+

not 'user_profile' etc. But run 'php install.php':

The table 'user_board' has been set up correctly.
The table 'user_profileard' has been set up correctly.
The table 'user_stats' has been set up correctly.
The tables 'user_relationship', and 'user_relationship_request' have been set up correctly.

Why?--Shizhao 07:16, 25 July 2008 (UTC)Reply

The installer script is probably faulty. I don't know, I've never used it personally. Try creating the tables manually with these queries: user_board.sql, user_profile.sql, user_relationship.sql and user_stats.sql. That should work. --Sayuri 08:22, 25 July 2008 (UTC)Reply
Thanks--Shizhao 17:00, 25 July 2008 (UTC)Reply

Issues with foreach within UserStatsClass.php

[edit]

I am receiving the following error whenever I try to update points:


Invalid argument supplied for foreach() in /webroot/extensions/SocialProfile/UserStats/UserStatsClass.php on line 433


Line 433 starts:

                       foreach($this->point_values as $point_field => $point_value){
                               if($this->stats_fields[$point_field]){
                                       $field = $this->stats_fields[$point_field];
                                       $new_total_points += $point_value * $row->$field;
                               }                        }

Does anyone have any idea what the issue is?

--74.2.87.82 17:12, 29 July 2008 (UTC)Reply