Custom Profile Field Mod

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

Previous topic - Next topic

perplexed

#2820
Quote from: quiteperplexed on December 13, 2009, 07:37:04 AM
Quote from: Kindred on December 12, 2009, 10:10:57 PM
yes, you should be able to see the CP1, etc added from this mod.

Ok I looked at more entries.  I only looked at the first 500 and they all had names rather than CP1, CP2 etc, but after I looked at a few thousand entries the CP field names started to appear.

I've worked out what most of them should be but I can't get the data into the fields now.

I created a new field in features and options > profile fields using the instructions given above by winrules.  I called it CP1 then saved it, then modified it to the correct display name. Then I ran the sql code that you posted in the post quoted above.  I just have an empty field with no data in it.

I think I'm doing something wrong but I don't know what.



I still cannot get this to display the data from the old CP fields using the instructions above.  I don't know where I'm going wrong but it's very frustrating.

I can get it to change the field names but I don't get any of the data displayed from the old fields.

Looking through the themes table, I have variables called CP1, CP2, etc but also variables with the old name of the field.  I think it is called CP1, CP2, etc if the member has not filled any data in the field, but for those members who did fill in data in the old fields, they have field names like "text_fav_movie" instead of "CP1"

Is that right?

Anyway, I can change the field name using the sql code above but it does not display the data entered in the fields.

Kindred

no... if a user has not entered data, then there will not be any entry at all...
Сл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."

perplexed

#2822
but for the people who have entered data, that is not displaying either.  In phpmyadmin  some of the vaiables (with data) are called for example "text_fav_movie" and the same fields without data are called "CP1" so I have tried it both ways using "text_fav_movie" as the old field name and using "CP1" as the old field name (testing it with different fields not the same one!) and I still get no data displayed in the fields for members who have entered it.  The field name has changed looking in phpmyadmin and the data is in the field but it won't display in the forum.

here's a couple of examples

for the field - fav browser- called CP9 and "text_favorite_browser"





Kindred

and did you set up the new fields in your smf 2.0 installation?   What, specifically are the new field names?
Сл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."

perplexed

I set up the new field in 2.0 and called it for example CP1 as per the instructions in winrules' post.  Saved it.  Then modified it and gave it the original name.  That created a field but with no data in the field.

Then I tried it your way with another field. 

Quote from: Kindred on March 19, 2008, 05:36:58 PM
I posted this a month ago... :)


BTW: To convert this to the standard 2.0 custom fields...
UPDATE `smf_themes` SET `variable` = '*NewFieldName*' WHERE `variable` = 'CP1';  (or CP2, or CP2, etc)


tried it with new field name being 'FavFilm' when old field name was CP14, still no data in the field even if member had it previously.

Also tried it again with a different field, giving it an entirely new name for the old CP field. 
Also tried with another field calling it 'text_fav_whatever' ie the name in the variable and old CP number.

I don't know where I'm going wrong but it might be creating new empty fields instead of overriding what's there?

Graion Dilach

Sorry if this was asked before, but 142 pages are a bit longer than my available time... :-[

I have a problem.

Actually, on the Forum Profile Information page, the Enters in the Text Area fields are recognised, while they aren't on the main Profile Screen.

I'm using SMF 1.1.11 with Hungarian-UTF-8 coding.

Arantor

What theme are you using? If your theme has a custom Display.template.php file you will likely have to edit it yourself.

Graion Dilach

That could be possible. I use BlackDay.

Thanks... I hope I can find the relevant edits in the xmls...

Arantor

If you go to the mod's page, you can select your version and press Parse and it'll tell you all the edits needed.

LBizGrl

Can this be used in 1.1.11 yet?
Smile! :)

It burns WAY more calories than a frown!

perplexed

Quote from: quiteperplexed on December 14, 2009, 10:02:21 AM
I set up the new field in 2.0 and called it for example CP1 as per the instructions in winrules' post.  Saved it.  Then modified it and gave it the original name.  That created a field but with no data in the field.

Then I tried it your way with another field. 

Quote from: Kindred on March 19, 2008, 05:36:58 PM
I posted this a month ago... :)


BTW: To convert this to the standard 2.0 custom fields...
UPDATE `smf_themes` SET `variable` = '*NewFieldName*' WHERE `variable` = 'CP1';  (or CP2, or CP2, etc)


tried it with new field name being 'FavFilm' when old field name was CP14, still no data in the field even if member had it previously.

Also tried it again with a different field, giving it an entirely new name for the old CP field. 
Also tried with another field calling it 'text_fav_whatever' ie the name in the variable and old CP number.

I don't know where I'm going wrong but it might be creating new empty fields instead of overriding what's there?


Can anyone help - I don't know what I'm doing wrong but it still won't display the field data.

BLueSS

#2831
Quote from: nza2k on November 16, 2009, 08:49:59 PM
I'd like to know how can we manualy extract data from custom fields on other parts of the website. I've looked for new fields in smf_members table but I haven't found any...
So I've been trying to do this as well; although I'm not sure how to manually extract the data. I tried the following below (from my post earlier)

Quote from: BLueSS on December 13, 2009, 03:06:33 AM
Read and searched through the thread, trying to see if this was possible, but haven't been able to get it to work.

What I'm trying to do: Use a check box field as an option to enable code on *any page* not just profile pages. (ie: load the custom profile setting on index.template.php)

I created a new check box field, it works great, it is in the database properly - everything there is good. My mod works, I just need to load it on the rest of my pages.

This is what I'm trying to put in my theme's index.template.php
if (!$context['member']['options']['mycheckboxfield']=='1')
{
run script
}


The error I receive is
8: Undefined index: member
File: myurl.net/web/public/smf/Themes/default/TPortal.template.php (tp_above sub template - eval?)

I'm running tiny portal, but I can tell that I'm trying to call to search $context['member']['options'] before it has been loaded.

I've tried adding the following code (before the call above) to index.template.php and SSI.php, but it didn't help any
require_once($sourcedir . '/Profile.php');
loadThemeOptions($context['user']['id']);

I got that from This post.  That post also referenced there would be a way to do it with SSI later? If there was a way added, I don't know how to utilize the SSI so that is no help right now for me.

Is what I'm trying to do possible?
I would just like a user-configurable check box that enables/disables a script on my page.

Is there a simple way to just call the custom field per user in the database like nza2k was bringing up?

LBizGrl

Can this be used in 1.1.11 yet?
Smile! :)

It burns WAY more calories than a frown!

Arantor

It probably works on 1.1.11 already, have a read of the past page or so, no doubt someone will have documented it.

BLueSS

Quote from: The Grinch on December 22, 2009, 12:53:52 PM
It probably works on 1.1.11 already, have a read of the past page or so, no doubt someone will have documented it.
While yes, he could have read the previous; your post doesn't help anyone who *has* read the thread and searched, but only sees a user who had trouble with the mod.

In addition, searching for "1.1.11" in this topic only gets the last post, not all of them.

There isn't any definite answer yet.

Arantor

Guess I'll have to test it then.

jay.clark

I am using this mod on a site with 1.1.9 and quite like it, am now working on a new site with 2.0 RC2, am wondering if there are any plans in the works for a version of Custom Profiles that will work with RC2?

jayr
SMF 1.11- SMF 2.0 RC2/RC3 - - RSS Feed Poster 2.2,RSS Feeder 1.1.4, Downloads System Pro 1.0.17.1, SMF Classifieds 1.3.5, SMF Gallery Pro 3.0.2, SimpleDesk - Integrated Helpdesk for Simple Machines Forum 1.0 Felidae, Aeva Media 1.1b, Ultimate Profile     0.9, Google Analytics Code 1.1, Twitter and Facebook Publisher mod 2.4, Stop Spammer 2.3.7, SMF Links 2.2, Site map 2.1.2, AjaxChat Integration 3.2.1, Ad Management 2.3.6

SMF (Donated) SMF Links (donated) - Ad Manager (donated) - phpMyChat (donated)

Arantor

Quote from: jay.clark on December 25, 2009, 02:17:34 PM
I am using this mod on a site with 1.1.9 and quite like it, am now working on a new site with 2.0 RC2, am wondering if there are any plans in the works for a version of Custom Profiles that will work with RC2?

No because the functionality is part of 2.0 out of the box. It's a little different, but it's a core feature nonetheless, so no point making a mod for it.

jay.clark

Quote from: Arantor on December 25, 2009, 04:06:59 PM
o because the functionality is part of 2.0 out of the box. It's a little different, but it's a core feature nonetheless, so no point making a mod for it.

I have been trying to use the built in functionality of 2.0, but it seems to lack the ability to do check boxes and radio  buttons, which I think was in the Custom Profile Field Mod.

I put in ultimate profile but it seems aimed at letting the user do things to their individual profile.

I have in mind a rather complex profile for my system and need the check boxes and radio buttons, also would like to make them part of registration as a way of pre-screening signups
SMF 1.11- SMF 2.0 RC2/RC3 - - RSS Feed Poster 2.2,RSS Feeder 1.1.4, Downloads System Pro 1.0.17.1, SMF Classifieds 1.3.5, SMF Gallery Pro 3.0.2, SimpleDesk - Integrated Helpdesk for Simple Machines Forum 1.0 Felidae, Aeva Media 1.1b, Ultimate Profile     0.9, Google Analytics Code 1.1, Twitter and Facebook Publisher mod 2.4, Stop Spammer 2.3.7, SMF Links 2.2, Site map 2.1.2, AjaxChat Integration 3.2.1, Ad Management 2.3.6

SMF (Donated) SMF Links (donated) - Ad Manager (donated) - phpMyChat (donated)

Arantor

Well... radio buttons can be emulated using dropdowns; the same result is there, that you have a required choice of a preset list. Check boxes... fairly sure you can do but haven't tried it in a long time.

Advertisement: