News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Profile Field Mod

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

Previous topic - Next topic

winrules

1. Have you added $user_info to the globals (global $user_info)?
2. Are you still using it on a custom action page or just with SSI?


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


SunilDVR

Hi winrules,

Excellent mod - many thanks! Great to hear it's still under development, too.

When you do release a new version, will this migrate existing data? I just have visions of writing it all down... hehe.

Cheers,

Sunil

JamesWC

Quote from: winrules on February 13, 2007, 06:32:01 PM1. Have you added $user_info to the globals (global $user_info)?
2. Are you still using it on a custom action page or just with SSI?

I'm using it on a custom action page. I've just tried adding the line "global $user_info;" at the start of the custom action, to no avail. Where should I be adding it?

winrules

SunilDVR - Don't worrk, there you will be able to upgrade :).

JamesWC - Can you post (or attach if it is large) the code you are using for the custom action page?


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


JamesWC

Quote from: winrules on February 13, 2007, 06:51:30 PMJamesWC - Can you post (or attach if it is large) the code you are using for the custom action page?

At the moment I'm only testing so the code is short:

global $user_info;

echo $user_info['options']['CP1'];


It displays nothing.

winrules

CP1 is the data ID of the field you are trying to display, right?


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


JamesWC

Yes, and it's a single-line text field.

winrules

Do you get any errors in your error log?

Like "Undefined Index" ones?


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


JamesWC

Now that you mention it, yes. For the custom action:

8: Undefined index: options
File: /home/mysite/public_html/forums/Themes/default/CustomAction.template.php (eval?)
Line: 3

winrules

Can you replace the echo line with this:


print_r($user_info);


And PM me what it says? If you want you can astrick out some of the information if you don't want me to know. All I really need is the keys.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


JamesWC

Okay, PM sent. Thanks for taking the time to look into this.

Weird1993

Before I install this, I want to ask, is there an option that lets admins select groups able to view and edit and hide from other groups?

perplexed

hi Winrules

were is the custom profile field information stored?  I want to start again with different fields, have uninstalled and reinstalled the mod, and deleted all the CP Fields that were there previously, but when I create CP1 again, the information that used to be in the old CP1 is there (and obviously doesnt make any sense as the name of the field is different)

If there was a way to delete all of the information entered previously by users, that would be great as I am basically starting again.

any help appreciated

Kindred

it's stored in the themes table...
Сл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

thanks Kindred, I couldnt find anything in themes table though.  I looked at the mod files and it mentioned settings, so I looked in smf_settings and found this:

     Edit      Delete      CP1_hr     summary_edit
     variable    value
   Edit    Delete    CP1_id    CP1
   Edit    Delete    CP1_data2    
   Edit    Delete    CP1_data1    
   Edit    Delete    CP1_bbc    0
   Edit    Delete    CP1_profile    1
   Edit    Delete    CP1_name    My Interests
   Edit    Delete    enable_CP1    1
   Edit    Delete    CP1_post    0
   Edit    Delete    CP1_edit    0
   Edit    Delete    CP1_reg    0
   Edit    Delete    CP1_type    text
   Edit    Delete    CP1_desc    List your Hobbies here
   Edit    Delete    CP1_view    0

but I can't find where the member entered info is, as even though that CP1 field is now called 'my interests'  (after reinstalling the mod and deleting and recreating the field) in the member profile it still displays the text from the old CP1 field which was called 'education' and therefore doesnt make sense.  I need to delete all the previously entered member information from the 10 or so CP fields I had so I can create new ones, but the old info keeps coming back :(

Sarke

The information about the profile fields, such as it's name, type, desc, etc are in settings, while the information that each user inputs are in the themes table.   

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

Gantry

#936
I downloaded the mod twice today, I'm missing something but it just won't install.  My environment is:

Joomla! version 1.0.12
SMF version is 1.1.2
Orstio's bridge is 1.1.7

"ERROR: Could not find a Joomla! XML setup file in the package."

...

PS - safemode is OFF, as well my folders are writeable.

What am I doing wrong?

PPS - Just solved the problem: not enough sleep.  Was trying to install it thru my Joomla mod installer *doh!* instead of SMF.....  :'(

beeeee

I have the same problem like naitram
Quote from: naitram on February 10, 2007, 04:09:21 PM
i have been playing this mod, and i added a new field CP4 that i want to display on the top of every page

i have the follwing code in my index.template.php


        if ($context['user']['is_logged']) {
        global $sourcedir;
        require($sourcedir . '/CustomProfile.php');

                        if ($context['member']['options']['CP4']){


this works when i'm on the profile screen but not on any other screen, i'm sure i'm missing something simple but i can't seem to find it
Where's my fault?

perplexed

Quote from: Sarke on February 14, 2007, 02:46:49 PM
The information about the profile fields, such as it's name, type, desc, etc are in settings, while the information that each user inputs are in the themes table.   

thanks I'll check again but I couldnt see it yesterday in themes table :)

apis

what are the files that i need to modify??

Advertisement: