Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Customizing registration  (Read 5587 times)

0 Members and 1 Guest are viewing this topic.

loverboy

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Customizing registration
« on: August 13, 2004, 02:18:41 am »

Hi there,

I'm wondering if it's possible to customize the registration fields. For example, I don't need certain fields (eg occupation) but want to replace them with someone else (eg nickname, experience, etc.).

Hope there's a way to do this.

Thanks!
V
Logged

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: Customizing registration
« Reply #1 on: August 13, 2004, 02:51:13 am »

There's an easy way and a hard way.
The easy way is to just use the fields that already exist in the database, but relabel them on the Registration page.
Open register.php
Look for:
Code: [Select]
array('input', 'occupation', $lang_register_php['occupation'], 255),Change it to
Code: [Select]
array('input', 'occupation', $lang_register_php['nickname'], 255),
Then, open /lang/english.php
Find:
Code: [Select]
$lang_register_php = array(and look for
Code: [Select]
'occupation' => 'Occupation',Change this to:
Code: [Select]
'nickname' => 'Nickname',
Repeat this for each field you want to relabel.  If you want to add new fields, you'll have to do a bit more work.
« Last Edit: August 13, 2004, 01:11:14 pm by Nibbler »
Logged
GO IRISH

loverboy

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Customizing registration
« Reply #2 on: August 13, 2004, 05:13:19 am »

HI thanks this is very helpful and it seems to work to make the form look right.

I also followed some instructions so htat instead of the registration form being a verification email, it is sent instead to the admin to verify.

However, what seems to happen is that only the username and passwords are sent.

I went into english.php and found the text sent in the email.  the username and password fields seem to be in {}.   I am not sure if this is just default stuff set by coppermine ,but I'd liek to be able to have hte email send out the person's 'occupation', 'location', 'interests' fields.

Would this be possible?

Thanks!
Logged

Nibbler

  • Guest
Re: Customizing registration
« Reply #3 on: August 13, 2004, 01:18:35 pm »

In register.php, find:

Code: [Select]
        $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'],
            '{USER_NAME}' => $user_name,
            '{PASSWORD}' => $password,
            '{ACT_LINK}' => $act_link
            );

and add the stuff you want:

Code: [Select]
        $template_vars = array('{SITE_NAME}' => $CONFIG['gallery_name'],
            '{USER_NAME}' => $user_name,
            '{PASSWORD}' => $password,
            '{ACT_LINK}' => $act_link,
            '{LOCATION}' => $location,
            '{INTERESTS}' => $interests,
            '{OCCUPATION}' => $occupation
            );

And in the email, you set how you want them to display:

Code: [Select]
Your username is : "{USER_NAME}"
Your password is : "{PASSWORD}"
Location : "{LOCATION}"
Interests : "{INTERESTS}"
Occupation : "{OCCUPATION}"
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Customizing registration
« Reply #4 on: August 13, 2004, 07:16:06 pm »

Full insructions for how to edit the fields, or add extra fields, so they show on all relevent pages, such as profile etc., are on this thread in the mods board, http://forum.coppermine-gallery.net/index.php?topic=7827.0
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

loverboy

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Customizing registration
« Reply #5 on: August 13, 2004, 09:26:37 pm »

This is all very helpful!! Thanks guys.

I have the registration now customized as I want them and will tweak it all a bit later to make the fields al lrequired (as at the moment some are sitll optional).

I also have it setup so that it emails me the info, instead of emailing the person registering so I can approve them.

One thing I still can't figure out - is it possible to set it up so that when I verify the person by clicking the link, the person will automaitcally get an email saying that his /her account has been activated?

Thank you!
V
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Customizing registration
« Reply #6 on: August 14, 2004, 12:09:54 am »

You should be able to setup a script that is called when you activate their account to email them. I haven't looked in depth into the process, but that would be the simpliest way to email a "second" registration notice. Shouldn't be that hard to code - just recalling a modified version of the registration email...
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.

loverboy

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Customizing registration
« Reply #7 on: August 14, 2004, 05:08:12 pm »

That sounds awesome... i'm quite clueless with PHP myself (except knowing to follow upload and edit instructions).  If such a script is around, I would love to get hold of it.. anyone?

Thanks!!
V
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 16 queries.