1
3lr0n
Custom fields in profile
  • 2005/12/4 22:39

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Hi.. i wanna know how can i insert new fields in profile section but linked to another table on my db. I try to explain:

I want my users to select (in reg time or whenever they want) the kind of microprocessor they have (like, amd or intel) so i make a new table on the db called "micros" (is not for only 2 values, thats for the example, it will be a lot of them and the user have to take one).

I want to add a new fiel called "micro" so when the users going to reg (or modify when is set) all the values on the "micros" table are shown on a combo box, they pick one and then the micro_id is kept in the users table.

How can i do that?

Ta in advance
Spanish Overclocking Community xoops based site : www.overclocking.es

2
m0nty
Re: Custom fields in profile
  • 2005/12/5 2:01

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


munno bout with a diff table.. it would be adding more work than necessary..

which XOOPS version u using..

2.0.13.2 then you could modify or utilise my profile fields hack..

do a search for profile fields hack (in news articles and or the forum) for discussions of it..

or visit my testing site HERE

the code and hack is clearly commented in every file.. read the instructions, and follow it and you'll figure it out easily enough, even if you're not a coder..

but if u require more help let me know..

oh and make sure you download the correct version for your version of xoops.

3
m0nty
Re: Custom fields in profile
  • 2005/12/5 2:04

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


the micro selection box is a bit trickier, you will have to create that as a new formselectmicro.php class

xoops 2.2.3 is far easier to do as you can do it straight from admin without any hacks..

4
3lr0n
Re: Custom fields in profile
  • 2005/12/5 15:25

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


i plan to use XOOPS 2.2.3 and i c in admin panel how to create new fields, but those dinamyc fields ddoesnt fit my needs cause im planning to manage a lot of data (every micro in a table, every ram, every modbo...) so its hard to do it with this dinamyc fields (that i have to introduce the data manually).

So i have to add new fields and populate them with data on a table in the combo.. the user select the value he/she wants and then in another table (or user table dont know yet) XOOPS save the id of the choosen item.

I hope i could explain well, my english is very poor , but try to do my best, lol
Spanish Overclocking Community xoops based site : www.overclocking.es

5
m0nty
Re: Custom fields in profile
  • 2005/12/5 16:46

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i think i get what you mean..

you mean if the user selects say "AMD" in 1 field, then the next field would only show items related to AMD" so they then choose say "AMD 64 3500+" the next field for motherboards would then only show motherboards compatible with that AMD processor..

kinda a like a selection tree based on each option..

am i correct?

6
3lr0n
Re: Custom fields in profile
  • 2005/12/6 0:07

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Thats was my first idea, but i think i only can do that with xmlhttprequest (like gmail does) or by hidding with css the non-apropiate combos.

I only need 1 combo to show the complete processor (like AMD San Diego 3700+). All the micros will be on a table with this structure:

micro_id | micro_name

I want to populate the combo with all the micros and then when the user select one save the micro id in a table like:

user_id | micro_id |ram_id |modbo_id | etc...
Spanish Overclocking Community xoops based site : www.overclocking.es

7
3lr0n
Re: Custom fields in profile
  • 2005/12/8 23:23

  • 3lr0n

  • Not too shy to talk

  • Posts: 167

  • Since: 2004/3/13


Anyone know how can i populate a dinamyc field (added with extended profiles) with data from another table?
Spanish Overclocking Community xoops based site : www.overclocking.es

Login

Who's Online

217 user(s) are online (133 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits