Using Gallery for Artists Registry

penny

Joined: 2005-03-20
Posts: 2
Posted: Sun, 2005-03-20 17:22

I'm looking to modify the registration form to include full contact information to be used for our arts council's artists registry database. I'm a total newbie at this, but I think the gallery format is the best way to approach the online artists registry. Any suggestions?

 
khsjr1970

Joined: 2004-04-24
Posts: 271
Posted: Mon, 2005-03-21 02:54

this would take some detailed work within and with the creation of new varibles.

 
brocaa

Joined: 2004-05-06
Posts: 39
Posted: Mon, 2005-03-21 13:46

Hi penny

I recently did something similar at http://www.moopics.com (well if I understand what you're saying it's similar)

Depending on how experienced you are with php it shouldn't take that long to do. At the moment I dont have a mod for it.

If you can let me know if it is what you're looking for I'll try and put some notes together so that you could do it

Aaron Brockhurst
Covenant Solutions

 
penny

Joined: 2005-03-20
Posts: 2
Posted: Mon, 2005-03-21 16:30

Yes, this is what I'm looking for. If you wouldn't mind, I'd really appreciate any help you can give.

 
brocaa

Joined: 2004-05-06
Posts: 39
Posted: Mon, 2005-03-21 22:48

Hi Penny

It'll take a couple of days to put together, hopefully I'll be able to complete it by the weekend but may run till after easter.

Aaron

 
brocaa

Joined: 2004-05-06
Posts: 39
Posted: Wed, 2005-03-30 09:47

Hi Penny

Apologies for the delay

OK, from memory (and forgive me if I miss something) but there are 3 files that you need to change.

1) in the directory html you need to make the following changes to the userData.inc file:

At the line:

if (!isset($uname)) { $uname=""; }
if (!isset($old_password)) { $old_password=""; }
if (!isset($new_password1)) { $new_password1=""; }
if (!isset($new_password2)) { $new_password2=""; }

add the following code for each field you want the person to complete

if (!isset($fieldname)) { $fieldname=""; }

Further down in the file you'll see the table and row entries for the form the user has to complete. Again add the following for each field you want them to add (you'll need to change the variable "fieldname" to some suitable, eg address, tel, post code, etc)

<?php if ($allowChange["fieldname"] === true) { ?>
<tr>
<td class="adminPlain">
<?php echo _("fieldname") ?>
</td>
<td>
<input type=text name="fieldname" value="<?php echo $fieldname ?>">
</td>
</tr>

<?php echo errorRow("fieldname") ?>

<?php } ?>

2) in the directory classes you need to make the following alterations to the user.php file:

Add in the variables for the addittional fields after the following lines:

class Abstract_User {
var $username;

var $fieldname;

Further down add the following for each field after the similar entries:

function setFieldname($fieldname) {
$this->fieldname = $fieldname;
}

Add these before the entry

function isAdmin() {
return $this->isAdmin;
}

3) Lastly you need to edit the file register.php with the following

After the entries:

$allowChange['uname'] = true;
$allowChange['password'] = false;
$allowChange['old_password'] = false;
$allowChange['fullname'] = true;

Add the following for each fieldname that you have
$allowChange['fieldname'] = true;

Further down, add the following:

if (empty($fieldname) || !strcmp($fieldname, '')) {
$gErrors['fieldname'] = _("You must specify a valid fieldname.");
$errorCount++;
}

After the following entries:

$tmpUser->setUsername($uname);
$tmpUser->setPassword($password);
$tmpUser->setFullname($fullname);

Add the following for each fieldname

$tmpUser->setFieldname($fieldname);

I think I've got everything and I've tried to make it as straight forward as possible, but please let me know if I have missed anything. Dont forget to keep your fieldnames consitent otherwise it wont work

Let me know if you get stuck

 
vdd

Joined: 2005-08-11
Posts: 134
Posted: Wed, 2005-10-05 10:57

mr. brocaa
Is your solution valid for Gallery 2?
I yes, please tell me where I can find the UseruserData.inc file,directory classes ,register.php
Thanks in advance
vdd

 
khsjr1970

Joined: 2004-04-24
Posts: 271
Posted: Wed, 2005-10-05 17:28

The code given by Mr. Broccaa is not G2 Valid in its current form which is why you cannot find the files you seek. G2 is a total rewrite, therefore very few, if any, mods for G1 will work as expected in G2 if at all.

 
vdd

Joined: 2005-08-11
Posts: 134
Posted: Wed, 2005-10-05 18:33

Khsjr
Thanks for the quick answer.

 
e3Rany

Joined: 2004-01-21
Posts: 2
Posted: Sat, 2006-11-18 08:20

is there any instruction for the galler 2???

 
zro

Joined: 2006-12-06
Posts: 2
Posted: Wed, 2006-12-06 02:40

edit
nevermind

 
markdj

Joined: 2008-03-01
Posts: 18
Posted: Wed, 2008-03-05 08:23

This is the solution I'm looking for but I need it for G2. Is there a G2 hack to do this or will this work if I find the right code?