Custom Profile Field Mod

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

Previous topic - Next topic

wm

I'm interested in some changes to this mod - add an option to have the fields show as Account fields instead of Profile, and give the user an option to hide the fields.  I've been hacking at it and have some of it working.  My eventual goal is to have a set of "contact data" fields (address, phone numbers) which the user must enter on registration but can hide from others if they wish.

I could see doing this as a separate mod, or as changes to this one.

William

perplexed

Quote from: wm on February 23, 2007, 04:50:38 PM
I'm interested in some changes to this mod - add an option to have the fields show as Account fields instead of Profile, and give the user an option to hide the fields.  I've been hacking at it and have some of it working.  My eventual goal is to have a set of "contact data" fields (address, phone numbers) which the user must enter on registration but can hide from others if they wish.

I could see doing this as a separate mod, or as changes to this one.

William

You can do this sort of...

you can have fields to complete at registration, and then have them edited or viewed only by Admin.  But that would mean the user might not be able to update them,but its a start :)

Compton

When inserting a custom field inot the post area how do you get rid of the ":" that is placed infront of the field?

DTDestroyer

Is it possible within this mod to block just a couple fields from certain member groups but have them remain visible to others?

Vandaahl

#984
Question: I added a custom profile field and new registrants are required to fill it in. When they don't, they get a message that something went wrong during registration but there is no text visible telling them what went wrong. English is not the default language of my board, so I'm sure that's where the problem lies. How do I correct this?

EDIT: never mind, I was missing a file ;)

Inflame

Quote from: Inflame on February 23, 2007, 09:26:21 AM
Heya,

I think I don't understand this mod too well yet, since something is going wrong,

Members complained about the fact that they couldn't find any of the new profile fields,
I tried it out with my test account, and it indeed turned-out to not work.

Users can not see any of the custom profile fields,
I checked-out the permission area to see if they were not allowed, but I couldn't find anything there related to this mod.

Can someone please help out to fix this?

Thanks you

God bless

I would like to get some answers on this question,

it does not have anything to do with the theme, so that answer is already given ;)

wm

Inflame, you could start by giving us some more information...  Can you see the fields as admin?  What are the settings for one of the fields?  Is "Show in Profile" checked?  How about a screen shot?  Can you show us what the test account sees when you go to the "Forum Profile Section"?

Inflame

#987
Quote from: wm on February 26, 2007, 11:40:07 AM
Inflame, you could start by giving us some more information...  Can you see the fields as admin?  What are the settings for one of the fields?  Is "Show in Profile" checked?  How about a screen shot?  Can you show us what the test account sees when you go to the "Forum Profile Section"?

Yes, I can see the fields as admin on profiles


This is one of the fields I added :)

This is what I see as admin in a members profile:


As user you just see nothing, only the normal profile stuff everyone should see when they just install SMF :P

Is this enough information?

full pics at:
www.inflame.nu/image/SMF/CPF1.JPG
www.inflame.nu/image/SMF/CPF2.JPG


EDIT
As guests, and as regular member you can see the fields I filled in in my own profile :)
maybe good to know ;)

Bazil Greyson

I am working on using this to replace pretty much the entire default profile page. One request I have from my members is this. Is there a way to hide from view, fields that are not filled in by the member?  For example.. if I didn't have an AIM name, then the blank field would not be seen by others viewing my profile.

wm

Quote from: Inflame on February 26, 2007, 01:14:57 PM
As guests, and as regular member you can see the fields I filled in in my own profile :)
maybe good to know ;)

Yes - that is the clue we needed.  Empty rows in the table do not display.  I've been thinking of trying to modify this, sounds like you will want to do that as well...

William

Inflame

Quote from: wm on February 26, 2007, 04:45:59 PM
Quote from: Inflame on February 26, 2007, 01:14:57 PM
As guests, and as regular member you can see the fields I filled in in my own profile :)
maybe good to know ;)

Yes - that is the clue we needed.  Empty rows in the table do not display.  I've been thinking of trying to modify this, sounds like you will want to do that as well...

William

But how could someone fill in if the empty rows don't show up?

They don't even can fill in anything, that's the whole issue.

wm

Inflame: you have "only admins can edit" set, according to the images you posted.

Inflame

OH now I feel soo stupid,

but thanks for helping out,

I didn't use my brains for this hahahah

But thanks anyway mate :)

ibpnyc

Im sorry I am new to this forum and new to setting up forums.  I just put up my first forum and tried to install this package into the forum.  This is the first package that I am trying to install and I am getting the test failed errors.  I am using version SMF 1.1.1 according to the admin center.  I was wondering how you guys were able to get around these errors.   

perplexed

if you could post the fails you are getting, someone may be able to help you identify the problems you have

Just copy/paste the install fails here :)

equestrianerd

#995
I'm not sure if this has been mentioned or not, but it would be great to have the selection box field type allow you to submit both a value and a name (so that you can link to other tables).

i.e. you have a table of user levels for your site
1 Member
2 Admin
3 Banned
etc.

the selection box should have options to create an option for Member (value = 1, text = Member), Admin (value = 2, text = Admin), etc, rather than just straight value = Member, text = Member as it is now.

Edited to add...
The ability to select an option as the default (for all fields, not just selection fields) would be good as well.

cloudee1

Alright sorry to bring it back, But I still don't get where the info is. Basicly this is what I need


           $sql="SELECT CP2
                       FROM smf_themes
                       WHERE ID_MEMBER='$memberid' ";
            $result = mysql_query($sql);
             while ($row = mysql_fetch_array($result))
              {$customfield2= $row['CP2'];
                echo $customfield2;
              }


Could someone please adjust this sql as necesary. please.
Visit my SCI programmers community [nofollow].
Where we make adventure games using the Sierra Creative Interpreter.
Just like Space Quest, King's Quest, and Leisure Suit Larry!

Sarke

cloudee1, are you just trying to get one profile field from one member, or something else (not sure why you have the loop in there when the SQL you're trying to do will only return it for one member)?

If it's the former, here's how you do it:


<?php

$sql 
"SELECT value
FROM smf_themes
WHERE ID_MEMBER = '
$memberid' AND variable = 'CP2'
LIMIT 1"
;

$result mysql_query($sql);

if (
$row mysql_fetch_array($result))
$customfield2 $row['value'];
else
$customfield2 '(empty)';

echo 
$customfield2;

?>



I haven't tested it, but it should work.

My MODs          Please don't PM me for support, post in the appropriate topic.

ibpnyc

#998
Quote from: perplexed on February 27, 2007, 09:12:29 AM
if you could post the fails you are getting, someone may be able to help you identify the problems you have

Just copy/paste the install fails here :)

thanks for the response..

here are the errors that im getting:


Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ././Sources/ModSettings.php    File not found
2.    Execute Modification    ././Themes/default/Profile.template.php    File not found
3.    Execute Modification    ././Themes/default/Display.template.php    File not found
4.    Execute Modification    ././Themes/default/PersonalMessage.template.php    File not found
5.    Execute Modification    ././Themes/default/Register.template.php    File not found
6.    Execute Modification    ././Sources/Register.php    File not found
7.    Extract File    ./Sources/CustomProfile.php    
8.    Extract File    ./Themes/default/languages/CustomProfile.english.php


Advertisement: