Customising a component: call a username
Posted: Wed Feb 13, 2008 11:08 pm
I'm working with Linx a links submission component, which is great but I'd like to modify it slightly:
where it asks you to enter your name in a field, i'd like it to hard code the users (user)name:
This is from the php file and creates the fields to fill stuff in:
$recip_url = mosGetParam( $_REQUEST, 'recip_url', '' );
$new_url = mosGetParam( $_REQUEST, 'new_url', '' );
$new_url_name = mosGetParam( $_REQUEST, 'new_url_name', '' );
$new_url_description = mosGetParam( $_REQUEST, 'new_url_description', '' );
$new_name = mosGetParam( $_REQUEST, 'new_name', '' );
$new_email = mosGetParam( $_REQUEST, 'new_email', '' );
$cat_id = mosGetParam( $_REQUEST, 'cat_id', '' );
I'd like to replace this:
$new_name = mosGetParam( $_REQUEST, 'new_name', '' );
with something that calls the (user)name instead of the field.
I grabbed this from the debug when opening a (community builder) profile page:
7
SELECT id, name, email, block, sendEmail, registerDate, lastvisitDate, activation, params
FROM jos_users
WHERE id = 62
I tried echo statements, but all i got was errors, what should I do?
where it asks you to enter your name in a field, i'd like it to hard code the users (user)name:
This is from the php file and creates the fields to fill stuff in:
$recip_url = mosGetParam( $_REQUEST, 'recip_url', '' );
$new_url = mosGetParam( $_REQUEST, 'new_url', '' );
$new_url_name = mosGetParam( $_REQUEST, 'new_url_name', '' );
$new_url_description = mosGetParam( $_REQUEST, 'new_url_description', '' );
$new_name = mosGetParam( $_REQUEST, 'new_name', '' );
$new_email = mosGetParam( $_REQUEST, 'new_email', '' );
$cat_id = mosGetParam( $_REQUEST, 'cat_id', '' );
I'd like to replace this:
$new_name = mosGetParam( $_REQUEST, 'new_name', '' );
with something that calls the (user)name instead of the field.
I grabbed this from the debug when opening a (community builder) profile page:
7
SELECT id, name, email, block, sendEmail, registerDate, lastvisitDate, activation, params
FROM jos_users
WHERE id = 62
I tried echo statements, but all i got was errors, what should I do?