Advertisement:

Author Topic: Custom Profile Field Mod  (Read 950197 times)

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #920 on: February 13, 2007, 06:32:01 PM »
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.


Offline SunilDVR

  • Semi-Newbie
  • *
  • Posts: 68
Re: Custom Profile Field Mod
« Reply #921 on: February 13, 2007, 06:37:00 PM »
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

Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #922 on: February 13, 2007, 06:47:21 PM »
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?

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?

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #923 on: February 13, 2007, 06:51:30 PM »
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.


Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #924 on: February 13, 2007, 06:56:49 PM »
JamesWC - 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:

Code: [Select]
global $user_info;

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

It displays nothing.

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #925 on: February 13, 2007, 07:01:24 PM »
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.


Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #926 on: February 13, 2007, 07:02:52 PM »
Yes, and it's a single-line text field.

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #927 on: February 13, 2007, 07:07:20 PM »
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.


Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #928 on: February 13, 2007, 07:11:27 PM »
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

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #929 on: February 13, 2007, 07:40:13 PM »
Can you replace the echo line with this:

Code: [Select]
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.


Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #930 on: February 13, 2007, 07:50:14 PM »
Okay, PM sent. Thanks for taking the time to look into this.

Offline Weird1993

  • Semi-Newbie
  • *
  • Posts: 34
  • Gender: Male
  • What do you want?!?! :D
Re: Custom Profile Field Mod
« Reply #931 on: February 13, 2007, 10:41:17 PM »
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?

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Custom Profile Field Mod
« Reply #932 on: February 14, 2007, 07:38:32 AM »
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

Offline Kindred

  • The Mean One
  • Lead Support Specialist
  • SMF Legend
  • *
  • Posts: 60,427
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Profile Field Mod
« Reply #933 on: February 14, 2007, 07:58:56 AM »
it's stored in the themes table...
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."

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Custom Profile Field Mod
« Reply #934 on: February 14, 2007, 08:23:16 AM »
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 :(

Offline Sarke

  • Jr. Member
  • **
  • Posts: 315
Re: Custom Profile Field Mod
« Reply #935 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.   
My MODs          Please don't PM me for support, post in the appropriate topic.

Offline Gantry

  • Jr. Member
  • **
  • Posts: 133
    • Carcassonne Central
Re: Custom Profile Field Mod
« Reply #936 on: February 14, 2007, 11:27:42 PM »
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.....  :'(
« Last Edit: February 15, 2007, 05:36:34 AM by Gantry »

Offline beeeee

  • Semi-Newbie
  • *
  • Posts: 21
Re: Custom Profile Field Mod
« Reply #937 on: February 15, 2007, 01:48:14 AM »
I have the same problem like naitram
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

Code: [Select]
        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?

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Custom Profile Field Mod
« Reply #938 on: February 15, 2007, 07:10:40 AM »
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 :)

Offline apis

  • Newbie
  • *
  • Posts: 5
Re: Custom Profile Field Mod
« Reply #939 on: February 15, 2007, 09:36:36 AM »
what are the files that i need to modify??