News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom profile fields in Who is online and Memberlist

Started by HunterP, July 08, 2012, 12:46:19 PM

Previous topic - Next topic

Arantor

An upgrade *probably* won't remove the additional columns but it will remove the code you've added. If it's in a mod package it might be alright, but it also might need a rewrite for 2.1 depending on if the devs decide a change is required to the code or not.

HunterP

Quote from: Arantor on July 20, 2012, 07:06:30 PM
An upgrade *probably* won't remove the additional columns but it will remove the code you've added. If it's in a mod package it might be alright, but it also might need a rewrite for 2.1 depending on if the devs decide a change is required to the code or not.

So far I got every mod working on every version, so that shouldn't be a big deal, thanks :)

HunterP

Quote from: Arantor on July 20, 2012, 06:29:42 PM
You could probably do it with casting and a LOT of work (one query per user)

One query per user? I was thinking of someting like this :

UPDATE smf_members m, smf_themes t SET m.newcolumn=t.value WHERE m.id_member=t.id_member AND t.variable='mycustomfield';

With or without casting, or might this not work?

Arantor

Try it, but I've had trouble with multi-table queries like that in the past...

Mind you, you know all the answers, don't know why I'm bothering offering support.

thunderchld

Notes:

I've updated the changes to account for 2.0.15. However, I'm running into the install issue:

Error:
Table 'SCHEME.custom_fields' doesn't exist
File: /PATH/Packages/temp/install.php
Line: 16


Line 16 of install.php:
$columns = $smcFunc['db_list_columns']('custom_fields');

First, I feel we are missing the database prefix.  My table should be SCHEME.testing_custom_fields.  Okay, I can fix that.

Second, and this is a dumb question I am sure. Are we -looking- for or -adding- "custom_fields".  If we are looking for - I believe it should be "cf_" or "cust_"  Or, I'm not understanding what this line should be doing.

pepa

Hi thunderchild

Did you resolve this, I'm pretty interested in getting this thing going?

Irisado

As this topic is from 2012 and ought not to have been revived six years on, I'm locking it.  If anyone is having an issue relating to these, please either make a new mod request topic (if looking for a mod) or new coding discussion topic (if working on this for themselves).  Thank you.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Advertisement: