News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Profile Field Mod

Started by winrules, March 30, 2006, 02:21:25 PM

Previous topic - Next topic

Kindred

look at the file in Themes/default/languages/modifications.english.php
find the strings added by the mod (probably the last set in the file, if this was the last mod you installed)
translate them and add the same sting variable names (with Croatian words in the values) into modifications.croatian.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DeMar

I'm new in this.
Can U please tell me where I can edit this.
Thanks

[embed-flash(width,height)]

Kindred

on your site:
Themes/default/languages/modifications.english.php
Themes/default/languages/modifications.croatian.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

3 Hit U

#1243
Modification parse error
I have the Arcade Mod installed, but that shouldn't affect it at all.

If it's any use to you, my host is Servage.

[nofollow]

TrueSatan

#1244
The only times I've seen this error have been when:

1) The server had safe_mode_on
2) The modification file was very large and the php version would not accept such a large file (a php 5.x issue.)

Could you then please confirm your php version and your phpinfo details?

You may also find that if you create a "temp" directory in your Packages directory and give that CHMOD 777 that might resolve your problem.

3 Hit U

Quote from: TrueSatan on June 15, 2007, 12:03:27 PM
The only times I've seen this error have been when:

1) The server had safe_mode_on
2) The modification file was very large and the php version would not accept such a large file (a php 5.x issue.)

Could you then please confirm your php version and your phpinfo details?

You may also find that if you create a "temp" directory in your Packages directory and give that CHMOD 777 that might resolve your problem.

Safe mode is off, here are the top half of the details;
[nofollow]

I tried creating a temp directory, still same thing.

If you want the bottom half, let me know.

TrueSatan

You are on php5.x but I've tried this mod on that version and it worked without any issues so I don't think it can be a php related file size problem. As I know I have a download of the current version of this mod that I've used, as I said, on php5.x I'll upload it here for you, ask you to again add that "temp" directory and CHMOD it to 777 and ask you to try the version I provide. If this also fails then we will know it's not a corrupt mod file problem. As I've run this on php5.x we will also know it isn't a php5.x problem. You've confirmed that php safe mode is off and your phpinfo doesn't look, to me, to have anything showing that might cause the problem.

Having tried the above would you please try installing any other mod and seeing if it works properly...this might reveal some problem but I doubt that it will.

3 Hit U

#1247
I fixed it before :)

I saw a previous post asking about a "RuneScape" link to the highscores (RuneScape is an online game).
But it would require 3 fields, which isn't possible, so...

Is there any text you can use to call the "Text to display after field (BBC is ok if enabled above)"

EG:

Field 1: [url=http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user=
Field2:]CALL TEXT[/url]


As I need the following to display:
[url=http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user=MYACCOUNT]MYACCOUNT[/url]
Sadly, there is no other way around it.

Any help with this would be grand.

TrueSatan

It's about 2 in the morning my time so I'm too tired to think about Runescape issues right now...maybe somebody else will know.

Would you mind telling me how you resolved your previous problem just to satisfy my curiosity and so I might be better able to help some other member in future?

3 Hit U

Had to use some php settings via .htaccess in my directory, because my host (Servage) pretty much sucks for forums.

nolageek

Is it possible to have multi-check boxes?  I appologize if this has been checked, but there's 63 pages in this thread!

What I'm looking for is:

--------------------------------------------------------------------------------
I'm here for:
  • Find Friends      [  ] Find travel partners       
  • Conversation         [  ] Eat ice cream

    --------------------------------------------------------------------------------

    I thought this would be what the 'check box' field could be used for, but I cant get them to be grouped together in one set.  'Selection Box' is only good when you want ONE option picked.

    Is this possible?

nolageek

Quote from: vkot on August 17, 2006, 05:47:17 AM
winrules, can you put an option to have a multiple select box for the custom fields?

For example, in my forum I want to have a field "musical instrument that you play". There are many users that play more than one instrument.

I know someone else had to have wanted this! :)

choloman05

^ if that's you in your avtar, I know someone who looks a whole lot like you do.   

And yes, this is a good question to which I don't have the answer. haven't tried it out either.

extremehikers

I am having problems with the Custom Profile Mo, it installs but does not appear for customizing (adding fields) in features and options.

I am using SMF 1.1.2 installed thru Fantastico.

Can someone help?

TrueSatan

The first thing I would check, and it's a common problem mentioned before in this topic so you could have found the previous answers, is that your forum is set to english and not english utf8 (ACP>Server Settings.) Also ensure that you are using the SMF default theme as the mod only installs into that...you will have to manually install into other themes.

extremehikers


merosler

Hello,

Now that I have the profile fields working great, has there been any discussion on updating:

1) the "View all members" grid
(http://www.websitename.com/smf/index.php?action=mlist;sa=all)
-to reflect the new profile fields entered in the custom profile field mod (new columns to sort by for each new profile field)

2) the "Search for members" page
(http://www.websitename.com/smf/index.php?action=mlist;sa=search)
-to allow users to search by the new fields entered in the custom profile field mod

The true power of these updated profile fields is to allow other users to search for other users based on these new profile fields..

thanks,
Matt



mdp

#1257
I changed new forum on same old server and added this mods to new forum then exported data from old database to new database (all on same server) and now profile is not displaying?

I am not sure what went wrong?  Only mods I have other than custom profile is SMF Pro Gallery.

Edit:  Maybe if you tell me where I can locate the data that is storing this information beside the database then I could try to upload it into new forum or something.  I just know there should be a file that store the information somewhere!!

merosler

Hi,

Any thoughts from the developers out there about integrating a module into the custome profile fields that would allow a new user to tag himself? 

These tags would then appear in tag cloud of all user tags.  This would allow users of the board to browse other users by tag words according to (i.e.) "profession", "class year", "location", etc..


thanks,
Matt


rpalmer68

#1259
Quote from: rpalmer68 on May 21, 2007, 09:17:51 AM
phonelist.php


<?
mysql_connect("localhost","<DATABASE LOGIN>","<PASSWORD>");
mysql_select_db("<DATABASE NAME>");

$select = "SELECT ID_MEMBER FROM smf_themes WHERE variable = 'CP_instrument' ORDER BY value";
$query = mysql_query($select)or die(mysql_error());
$t=getdate();
$today=date('jS M Y',$t[0]);
echo "<center><strong>MEMBERSHIP LIST<br>";
echo "Generated on the " . $today;
echo "</strong>";
echo"<br>";
echo "<table width=1200 border=1>";
echo "<tr>";
echo "<th width=200 scope=col>Instrument</th>";
echo "<th width=150 scope=col>Name</th>";
echo "<th width=120 scope=col>Home Phone</th>";
echo "<th width=120 scope=col>Work Phone</th>";
echo "<th width=120 scope=col>Mobile Phone</th>";
echo "<th width=300 scope=col>Email Address</th>";
echo "<th width=300 scope=col>Address</th>";
echo "</tr>";


echo "<br>";
while($list = mysql_fetch_object($query))
{
echo "<tr>";
$id = $list->ID_MEMBER;



//--- get the instrument from the database
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_instrument'";
$res = mysql_query($sql);
$instrument = mysql_result($res, 0);



//--- get the homePhone from the database
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_homePhone'";
$res = mysql_query($sql);
$homePhone = mysql_result($res, 0);
if ($homePhone ==""){
&nbsp; &nbsp; $homePhone = "&nbsp;";
}


//--- get the workPhone from the database
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_workPhone'";
$res = mysql_query($sql);
$workPhone = mysql_result($res, 0);
if ($workPhone ==""){
&nbsp; &nbsp; $workPhone = "&nbsp;";
}

//--- get the mobilePhone from the database
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_mobilePhone'";
$res = mysql_query($sql);
$mobilePhone = mysql_result($res, 0);
if ($mobilePhone ==""){
&nbsp; &nbsp; $mobilePhone = "&nbsp;";
}

//--- get the homeAddress from the database
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_homeAddress'";
$res = mysql_query($sql);
$homeAddress = mysql_result($res, 0);
if ($homeAddress ==""){
&nbsp; &nbsp; $homeAddress = "&nbsp;";
}


//--- get the membername from the database
$sql = "SELECT realName FROM smf_members WHERE ID_MEMBER = " . $id;
$res = mysql_query($sql);
$memberName = mysql_result($res, 0);

//--- get the email from the database
$sql = "SELECT emailAddress FROM smf_members WHERE ID_MEMBER = " . $id;
$res = mysql_query($sql);
$emailAddress = mysql_result($res, 0);

//--- echo the results
echo&nbsp; "<td>$instrument</td><td>$memberName</td><td>$homePhone</td><td>$workPhone</td><td>$mobilePhone</td><td>$emailAddress</td><td>$homeAddress</td>" ;
echo "</tr>";
}
echo "</table>"
?>


Hi Folks,
I've been using the above code to generate my phone list now for a little while and it's been working well.

Today I added a new field called CP_hide as a checkbox to be able to hide certain members details.

So I changed the code as follows;
while($list = mysql_fetch_object($query))
{
$id = $list->ID_MEMBER;

//--- Check if user should be displayed
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_hide'";
$res = mysql_query($sql);
$hide = mysql_result($res, 0);

If ($hide != "1")
{
echo "<tr>";
//--- get the instrument from the database
$sql = "SELECT value FROM smf_themes WHERE ID_MEMBER = " . $id . " AND variable = 'CP_instrument'";
$res = mysql_query($sql);
$instrument = mysql_result($res, 0);



Now when I generate my list I get a page or warning messages like

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 251 in /home/lccb/public_html/members/phonelist_print.php on line 35


And then after all the warnings I get my generated list with the correct members hidden.


(Line 35 is the $hide = mysql_result($res, 0); line)

Any ideas what's causing the warnings and how to fix them or hide them?

Many thanks
Richard
Richard

Advertisement: