Advertisement:

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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,363
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Profile Field Mod
« Reply #940 on: February 15, 2007, 11:51:30 AM »
look in the mod package...   find the installation xml and follow the instructions for each of the named files.
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 cloudee1

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
  • I'm a Llama!
    • SCI ~ Sierra Creative Interpreter ~ Community
Re: Custom Profile Field Mod
« Reply #941 on: February 16, 2007, 03:21:27 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 :)
I've looked in settings and found nothing about the cp1 or 2 that I've got. and I looked in themes and found no long text corresponding to any cp1 or 2. I am creating a members sites page for my main site and I need to know what tables everything is in and I sure don't see it any either of those.

 
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!

Offline Sarke

  • Jr. Member
  • **
  • Posts: 315
Re: Custom Profile Field Mod
« Reply #942 on: February 16, 2007, 06:03:54 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 :)
I've looked in settings and found nothing about the cp1 or 2 that I've got. and I looked in themes and found no long text corresponding to any cp1 or 2. I am creating a members sites page for my main site and I need to know what tables everything is in and I sure don't see it any either of those.


Try

Code: [Select]
SELECT * FROM smf_settings WHERE variable LIKE 'CP%'
and

Code: [Select]
SELECT * FROM smf_themes WHERE variable LIKE 'CP%'
My MODs          Please don't PM me for support, post in the appropriate topic.

Offline mediainvita.de

  • Newbie
  • *
  • Posts: 3
Re: Custom Profile Field Mod
« Reply #943 on: February 17, 2007, 10:30:41 AM »
hi

First things first: Thumbs up! Great Mod :-)

Anyway it misses a feature i really would like to see. I could program it myself, but i need some information first...

How could i realize a multiple selection Box with different ( alphabetically sorted ) Options.

I need it to realize something like a "my offer" selection. Admin offers some options and the user can select several points from the list. ( Normal users are shopowners which offer a wide variety of goods, which need to be selectable )

Any Idea?
 

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 13,084
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Re: Custom Profile Field Mod
« Reply #944 on: February 17, 2007, 09:31:30 PM »
Would the shop mod not be better suited for this. ???

hi

First things first: Thumbs up! Great Mod :-)

Anyway it misses a feature i really would like to see. I could program it myself, but i need some information first...

How could i realize a multiple selection Box with different ( alphabetically sorted ) Options.

I need it to realize something like a "my offer" selection. Admin offers some options and the user can select several points from the list. ( Normal users are shopowners which offer a wide variety of goods, which need to be selectable )

Any Idea?
 

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #945 on: February 17, 2007, 09:59:46 PM »
JamesWC - Try $user_info['options']['CP1'].

That doesn't seem to work, unfortunately. I'm happy to wait for the new version though, so if you could keep this issue in mind when writing it then maybe the solution will become straightforward. Thanks. :)

This works for me ..
global $sourcedir;
$p_id=$_GET['u'];

require($sourcedir . '/Profile.php');

loadThemeOptions($p_id);

echo "CP1 = " . $context['member']['options']['CP1'];


http://www.simplemachines.org/community/index.php?topic=86793.msg966176#msg966176

 

Offline cloudee1

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
  • I'm a Llama!
    • SCI ~ Sierra Creative Interpreter ~ Community
Re: Custom Profile Field Mod
« Reply #946 on: February 18, 2007, 03:14:50 AM »
But I want to do it from outside of the forum folder. So I can't use all of the context stuff. Assuming I have the user id, which I will from pulling the website title and url from the members table, what would the sql using the member id  need to be to pull the information for CP1.

SELECT CP1 FROM ?????? WHERE ?????? ='9'

I figured asking this way would solve the trouble of convincing me it's where everyone says it is.  
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!

Offline mediainvita.de

  • Newbie
  • *
  • Posts: 3
Re: Custom Profile Field Mod
« Reply #947 on: February 18, 2007, 05:05:58 AM »
Would the shop mod not be better suited for this. ???

hi

First things first: Thumbs up! Great Mod :-)

Anyway it misses a feature i really would like to see. I could program it myself, but i need some information first...

How could i realize a multiple selection Box with different ( alphabetically sorted ) Options.

I need it to realize something like a "my offer" selection. Admin offers some options and the user can select several points from the list. ( Normal users are shopowners which offer a wide variety of goods, which need to be selectable )

Any Idea?
 


Actually the site i am developing is not a shop. It is a shoplist. The Users are Shopowners with a wide variety of goods and services. And i need to offer them a possibility to fill in their shopoffers into their profile? I dont know if this works with the shopmodule...as most of the things i need are already within the custom profile mod.

Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #948 on: February 18, 2007, 07:14:11 AM »
JamesWC - Try $user_info['options']['CP1'].

That doesn't seem to work, unfortunately. I'm happy to wait for the new version though, so if you could keep this issue in mind when writing it then maybe the solution will become straightforward. Thanks. :)

This works for me ..
global $sourcedir;
$p_id=$_GET['u'];

require($sourcedir . '/Profile.php');

loadThemeOptions($p_id);

echo "CP1 = " . $context['member']['options']['CP1'];


http://www.simplemachines.org/community/index.php?topic=86793.msg966176#msg966176

That gives me the following error in my custom action:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4
File: /home/mysite/public_html/forums/Sources/Profile.php
Line: 3263

Offline winterlok

  • Semi-Newbie
  • *
  • Posts: 15
Re: Custom Profile Field Mod
« Reply #949 on: February 18, 2007, 10:26:13 AM »
I feel fairly stupid, but I cannot figure out why they wont show in the profile area. I would like to update my "character's" profile, but when I go to fill out the profile fields I just added, they aren't showing up in the profile to be filled out. It also isn't showing up on my registration page, for my users to fill out when they sign up. I hope this makes sense to whomever reads it. Please let me know what I'm doing wrong.

Thanks!
« Last Edit: February 18, 2007, 12:12:24 PM by winterlok »

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #950 on: February 18, 2007, 10:59:18 AM »
But I want to do it from outside of the forum folder. So I can't use all of the context stuff. Assuming I have the user id, which I will from pulling the website title and url from the members table, what would the sql using the member id  need to be to pull the information for CP1.

SELECT CP1 FROM ?????? WHERE ?????? ='9'

I figured asking this way would solve the trouble of convincing me it's where everyone says it is. 

select value from smf_themes where variable='CP1' and ID_MEMBER=the id of the member

I'm also doing things outside of the forum folder.  I'm creating a separate library that sources in the smf include files, so that I can use all of the smf variables.  Really all you have to do is require the smf php include files that you want to use.
« Last Edit: February 18, 2007, 11:01:40 AM by drossman »

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #951 on: February 18, 2007, 11:06:49 AM »
JamesWC - Try $user_info['options']['CP1'].

That doesn't seem to work, unfortunately. I'm happy to wait for the new version though, so if you could keep this issue in mind when writing it then maybe the solution will become straightforward. Thanks. :)

This works for me ..
global $sourcedir;
$p_id=$_GET['u'];

require($sourcedir . '/Profile.php');

loadThemeOptions($p_id);

echo "CP1 = " . $context['member']['options']['CP1'];


http://www.simplemachines.org/community/index.php?topic=86793.msg966176#msg966176

That gives me the following error in my custom action:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4
File: /home/mysite/public_html/forums/Sources/Profile.php
Line: 3263


:shrug:

Have you  modified Profile.php?  What is the content of CP1 ??

Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #952 on: February 18, 2007, 11:26:06 AM »
JamesWC - Try $user_info['options']['CP1'].

That doesn't seem to work, unfortunately. I'm happy to wait for the new version though, so if you could keep this issue in mind when writing it then maybe the solution will become straightforward. Thanks. :)

This works for me ..
global $sourcedir;
$p_id=$_GET['u'];

require($sourcedir . '/Profile.php');

loadThemeOptions($p_id);

echo "CP1 = " . $context['member']['options']['CP1'];


http://www.simplemachines.org/community/index.php?topic=86793.msg966176#msg966176

That gives me the following error in my custom action:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4
File: /home/mysite/public_html/forums/Sources/Profile.php
Line: 3263


:shrug:

Have you  modified Profile.php?  What is the content of CP1 ??

CP1 is a text field - in my account it contains "2".

I have a few packages that may have altered Profile.php:

Custom Profile Field
MySpace Field (redundant now of course)
Profile Comments
Profile User Action

I have no trouble retrieving non-custom profile fields though.

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #953 on: February 18, 2007, 11:42:58 AM »
My example is assuming that you add ;u=ID_MEMBER (as a number) to the query string, so that the action knows which user to get the context for.  I believe you'll get that error if you don't add it.

So, try this.. http://yoursite/index.php?action=youraction;u=yourmember

Offline JamesWC

  • Jr. Member
  • **
  • Posts: 158
Re: Custom Profile Field Mod
« Reply #954 on: February 18, 2007, 11:55:01 AM »
Problem solved, thanks a lot! :)

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #955 on: February 18, 2007, 12:42:43 PM »
sweet...and thanks winrules for the great mods... (linuxrules)!

Offline winterlok

  • Semi-Newbie
  • *
  • Posts: 15
Re: Custom Profile Field Mod
« Reply #956 on: February 18, 2007, 04:19:02 PM »
Decided to update my issue, in the hopes that maybe someone would understand by looking at screenshots of what is going on.

I have no errors at all, but basically when I make a custom profile field nothing happens in the profile itself.





You can tell by looking at a copy of my profile that they aren't showing up. Could it be because of my template?

More Information
Template Name: Endar
Website URL: http://www.winterlok.com [nofollow]
Version: 1.1.2

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #957 on: February 18, 2007, 04:27:08 PM »
Did you apply the mod changes to your template?

Offline winterlok

  • Semi-Newbie
  • *
  • Posts: 15
Re: Custom Profile Field Mod
« Reply #958 on: February 18, 2007, 04:32:36 PM »
I'm real new to SMF, I generally use Invision Power Boards, but my license ran out, so I'm not sure how all of it works. I had the template installed and in use when I uploaded this mod, but I don't know if I applied them to my template. If I haven't, how would I go about doing so?

Offline drossman

  • Semi-Newbie
  • *
  • Posts: 27
Re: Custom Profile Field Mod
« Reply #959 on: February 18, 2007, 05:02:33 PM »
Switch to the default theme and verify that it works, then do a search on adding mods to other themes :)  I use the default template, so I haven't had to aply changes manually.