Custom Profile Field Mod Request

Started by myaicons, January 15, 2008, 09:25:29 AM

Previous topic - Next topic

myaicons

im gonna put this out there in case there is some uber talented and super nice code genius that would be willing to modify and tinker with the Custom Profile Field Mod... so it can be turned on or off by the admin specific to a membergroup  :)

i.e.  the admin can choose which membergroup can have extra profile fields... or even better... different fields can be set depending on membergroup

i know this can be quite a task... but im sure there is someone brilliant enough to make it happen :-*

i offer 4 beers (or beverage) of choice to the one who can make it happen  ;D
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

I made an improved version of that mod that you can find here

http://wgnrs.dynalias.com/smf/customprofile.html

With it you can restrict the editing and viewing to member groups.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

myaicons

#2
not quite sure if that is what im looking for... it says it restricts the viewing or editing to membergroup....

what im looking for is the ability to set certain membergroups to have a certain set of additional profile fields (so they can be different from let say a regular member not in that membergroup)
i need everyone to be able to see the fields... just that there would be different fields per membergroup...

what you have is pretty good and close tho!
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

If I understand what you want correctly it will do what your asking. The restrictions are settable per field. So if you had member group A you would set its view/edit restrictions to only group A. That means any member in that group can view the field.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

myaicons

Quote from: rsw686 on January 15, 2008, 10:49:59 PM
So if you had member group A you would set its view/edit restrictions to only group A. That means any member in that group can view the field.

what about members in other membergroups or even just a regular member?  would they be able to view the answers to the profile fields that "group A" have also? 

if so... that is what im looking for :)
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

Quote from: myaicons on January 15, 2008, 11:01:57 PM
what about members in other membergroups or even just a regular member?  would they be able to view the answers to the profile fields that "group A" have also? 

if so... that is what im looking for :)

You've got me slightly confused. So what you are asking is that only Group A can edit the fields, but the other membergroups can view the fields. Yes that is possible. You would only need to set an edit restriction for Group A. Leave the view restrictions unchecked.

Atleast I think that is what you are asking. You should just create a test forum and try the mod out. If it works then put it on your live forum.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

myaicons

#6
ok... so im trying it out right now... and so far it seems to be working... but a few questions:

do i need to install the dbconvert if i have removed all  of my previous existing profile fields ?  because this is what i got after pointing my browser to it:
QuoteCustom Profile Fields Database Converter
<a href="?convert>Click to Start

and it wont "click to start"

also....

the fields show on the profile eventhough it was not filled out.... is there a way to not have the fields show if the member does not answer it?

its great that that only the set fields show when the member is editing is the profile... but the rest of the fields that are not for that member are showing on his/her profile eventhough it is empty
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

The error was because I forgot the other " in the link. No you don't need to convert if you removed your old fields.

The fields show even if not filled out so that all user's profiles look the same. You'd need to change the coding to check if the fields were empty.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

jackregan

Quote from: rsw686 on January 15, 2008, 10:49:59 PM
If I understand what you want correctly it will do what your asking. The restrictions are settable per field. So if you had member group A you would set its view/edit restrictions to only group A. That means any member in that group can view the field.
I've just upgraded to the latest version and I CAN'T do that. I can restrict editing and viewing of fields to ADMINS, but not to any group...
Bible Study, Catholic News, Youth Group Stuff (my humble attempt at an SMF site... I'm grateful to the amazing people who have made SMF what it is!!

rsw686

Quote from: jackregan on January 16, 2008, 04:44:31 PM
I've just upgraded to the latest version and I CAN'T do that. I can restrict editing and viewing of fields to ADMINS, but not to any group...

You probably are using the Custom Profile Field Mod not the Custom Profile Field Improved mod. Mine wasn't accepted into the SMF Mod site due to issues with it being identical in the interface to the other mod.

You can download it here

http://wgnrs.dynalias.com/smf/customprofile.html

Your field settings page should look like

http://wgnrs.dynalias.com/smf/cp_field_settings.gif
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

jackregan

Very nice.

If I install this, will my current fields remain the same. as in, will all the data people have entered remain intact??
Bible Study, Catholic News, Youth Group Stuff (my humble attempt at an SMF site... I'm grateful to the amazing people who have made SMF what it is!!

myaicons

Quote from: rsw686 on January 16, 2008, 04:06:47 PM
The fields show even if not filled out so that all user's profiles look the same. You'd need to change the coding to check if the fields were empty.

umm.... forgive me...but im a bit coding challenged...i can follow directions real good tho :)

if it wouldnt be much trouble can you tell me how to do that?  (to have the fields not show when it is not filled out)
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

Quote from: jackregan on January 16, 2008, 04:53:36 PM
Very nice.

If I install this, will my current fields remain the same. as in, will all the data people have entered remain intact??

You would need to use the dbconvert_1.1.php file. It does not modify the old profile field data, just makes a copy of it in the correct format for my mod. The directions for how to do this are at the bottom of the link I gave you. As always I recommend making a backup of your forum first.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rsw686

Quote from: myaicons on January 16, 2008, 04:54:20 PM
umm.... forgive me...but im a bit coding challenged...i can follow directions real good tho :)

if it wouldnt be much trouble can you tell me how to do that?  (to have the fields not show when it is not filled out)

Open Sources\CustomProfile.php

Find

function displayCustomFieldsProfile()
{
global $db_prefix, $context;

$request = db_query("
SELECT p.ID_PROFILE, p.name, p.type, p.parseBBC,
p.showDivider, p.groupsView, m.choice
FROM {$db_prefix}profile AS p
LEFT JOIN {$db_prefix}profile_members AS m
ON (p.ID_PROFILE = m.ID_PROFILE AND m.ID_MEMBER = '{$context['member']['id']}')
WHERE p.enabled = 1 AND p.showProfile = 1
ORDER BY p.profileOrder ASC", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($request))
{
// Check permissions
if(!fieldCheckPerm($row['groupsView']))
continue;


Add after

// Skip empty fields
if(empty($row['choice']))
continue;
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

myaicons

OMG!  I love you! it works!! :D

okay... not to be a pest... one last thing....

for text areas... answers that are not brocken up by a return shows up as a long line and resizes the theme table.... how can i stop it from doing that?
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

Quote from: myaicons on January 16, 2008, 05:15:42 PM
OMG!  I love you! it works!! :D

okay... not to be a pest... one last thing....

for text areas... answers that are not brocken up by a return shows up as a long line and resizes the theme table.... how can i stop it from doing that?

Can you show me a screen shot of this? Are there spaces in the answer? I tried place a long line of text in the text area (with spaces) and it wraps at the space. Not sure why the answer wouldn't include some spaces.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

myaicons

so apparently i had a lapse of insanity coz now the text area is working fine... (its only if you write a super long word that exceeds the text area does it resize the theme table.. which i think does that for any field)
i scratch your back you scratch my back...
funny thing about my back is its located on my...

rsw686

Quote from: myaicons on January 16, 2008, 05:43:59 PM
so apparently i had a lapse of insanity coz now the text area is working fine... (its only if you write a super long word that exceeds the text area does it resize the theme table.. which i think does that for any field)


Yep the only way around that is to wrap the field text in a div tag with and have it show scroll bars. I think that's worse as spaces won't cause it to wrap then.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

myaicons

I Love Love Love your mod....

but i think it is causing this error...

this shows up periodically in my error log:


http://blahblah.com/sforum/index.php?action=register2 
8: Undefined variable: memberID
File: /home/content/html/sforum/Sources/Register.php
Line: 172



and im afraid it might be not letting some guests register.... (which is not good because i need members!)


please assist   help ! asap!
i scratch your back you scratch my back...
funny thing about my back is its located on my...

Jed C

i could also be interested in this mod
couple of questions first
myaicons did you get the last prob sorted ???

rsw686 i have Custom Profile Field Mod installed but not in use
can i just remove mod then install yours without the dbconvert.php ???

cheers steve

rsw686

Quote from: steve b on March 31, 2008, 01:48:15 PM
rsw686 i have Custom Profile Field Mod installed but not in use
can i just remove mod then install yours without the dbconvert.php ???

Yep you sure can. The dbconvert was to migrate the user entered data.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Jed C


Kindred

It should be noted as a warning:

Since this mod is not on the SMF mod site, it has not been reviewed by the SMF team.
Сл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."

fgoc

#23
Is there any way of preventing members editing their own custom profile fields (or at least some of them) with this mod?

Ignore me - got it sorted ;)

5Stars

#24
Quote from: rsw686 on January 15, 2008, 10:01:24 PM
I made an improved version of that mod that you can find here

hxxp:wgnrs.dynalias.com/smf/customprofile.html [nonactive]

With it you can restrict the editing and viewing to member groups.

ah the custom field profile mod didn't work for me, don't know why!
hxxp:www.that70sforum.com/ [nonactive]

Jed C

can i ask why you not got this mod approved by smf rsw686  ???

rsw686

Quote from: steve b on April 05, 2008, 07:06:07 PM
can i ask why you not got this mod approved by smf rsw686  ???

There are multiple threads on it. They wouldn't approve it because the interface was the same as this mod. Even though the underlying code is completely different. Not like I can really change the interface as I'm limited to the SMF modifications pre-built deal. Regardless it doesn't really matter as I'm not using the mod for SMF 2.0. I wrote a script to migrate the data to the built in interface.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Jed C

cheers rsw686 i was just wondering  ;)

fgoc

Hi - since upgrading to this mod from the standard CPF mod, I have been finding that the CPF information has been randomly disappearing from members profiles?

I can't figure out why it is doing this or any pattern to when it does it, I just know that it is doing it. Help!!??

fgoc

After looking through the profile_members table in the SQl database, it has completely dropped the records relating to the members whose CPF data has gone from their profile. Any idea what would cause this to happen? "Something" must be causing this as only I have access to the SQL database and only I have access to edit the CPF fields on the forum.

Big help required as I can;t just have data dropping out of the DB like this?

Thanks

Paul

fgoc

#30
Sorry for the triple post, but I have just managed to replicate this on my test account by changing the avatar. Is there any way to stop this? Is anyone else having this issue?


EDIT:
It happens whenever ANY information in the member's profile is edited by them or Admin. All of the CPF info that is not editable by the member's membergroup is deleted.

Jed C

i finally got round to installing this mod and i must say its exactly what i wanted  ;)
i have set it up to display real names of members within groups
just wondering if it would be possible to see these name when viewing list of members in admin cp  ???

not come across the prob yet  fgoc but will shout out if i do  ;)

Advertisement: