how can we greet a user by showing their first and last name how can we greet a user by showing their first and last name
 

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]

Main Menu

how can we greet a user by showing their first and last name

Started by bit bit spears, March 26, 2004, 11:32:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bit bit spears

how can we greet a user by showing their first and last name?

i think that would be a great addition to coppermine.

do any of you know how we would show their first and last name instead of their username? i/e

Welcome, Matt Harris

Casper

This would require the registration procedure to get the users real name.  In standalone cpg, that would require extra fields in the registration (no problem, there's a mod I did for that), and those fields to be called on the welcome screen instead of the username, again, no problem I think.

If bridged to a board, then it would be there the changes are needed to the registration.

Of course, lots of users don't want to use their real name.
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

bit bit spears

true true casper!

so you think this is achievable?

i'll search the board, get your mod, and add the fields-so i use these tags

{WHATEVER THE FIELD IS} like you told me in the beginning about how to customize my welcome:) thanks so much casper for your help, i really appreciate it.

bit bit spears

uh-oh casper

hey i looked on the board and couldn't find your mod-could you post a link to it? :wink:

Casper

Hi tb,

my mod never actually made it to the mods board :( , it's still in feature requests, but anyway here it is.

Download full instructions HERE
See it at http://forum.coppermine-gallery.net/index.php?topic=2492.
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

bit bit spears

:oops: i feel like a dimwit for not knowing how to create another field in phpmyadmin.

anyone know how to? (i've looked)

Casper

open your database, click on the _users table, you will see all the rows displayed and a bit further down, the words 'Add new field'.

just click go if only adding 1 field, or change the number first if adding more.
Fill in the name/s etc, and click save.

Note, I changed one error in the mod earlier today, so if you copied it, please go back and get new copy.
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

bit bit spears

hmm i don't see that-here's what i gathered from what you said:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Ftangiblebrit.com%2Farchive%2Fimages%2F1-db.jpg&hash=efc7322d6b29536c56759e1e9f121a4966322c34)
ok i clicked that table

it brings up this page
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Ftangiblebrit.com%2Farchive%2Fimages%2F2-db.jpg&hash=ebff29c82d74a12d332613b0321319ef004999eb)

i assume you click on insert new row

it brings up this page-confused
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Ftangiblebrit.com%2Farchive%2Fimages%2F3-db.jpg&hash=28fc2017f2ed2fd15710b1ec91b621e257f53959)

Casper

When you go into the table, you need to go to the 'structure' page,

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.langportrd.f2s.com%2Fss%2FScreenShot006.jpg&hash=0ced82e691d594fef17f181ccd139205e5342b50)


Now look down for the add field box

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.langportrd.f2s.com%2Fss%2FScreenShot007.jpg&hash=07d014b84fbf20e9b6a6b3a339cd30de3ea17d0b)

Your database seems to open in the browse page, mine opens in the structure page.  If your tool is not phpMyAdmin, it may be called something else, but will look similar.
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

bit bit spears

THANK YOU SO MUCH CASPER!

i'm sorry for not understanding-thank you for showing me what to do

i'm sorry that you had to do all of that work for me :wink: thanks a whole lot

i finally made that field:

user_extra1

And i used this mod i did for a long time ago
http://forum.coppermine-gallery.net/index.php?topic=2930&highlight=

so i tried replacing this variable (to make it print our first name or user_extra1)

'{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]",

and change this variable

'{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_EXTRA1 . "]",

all it did was print

You are logged in as USER_EXTRA1.

what should i put in there if user extra won't work (i also tried extra1)