Posted on: 05/03/05 05:42am
By: Anonymous (ct)
Posted on: 05/14/05 04:21pm
By: ofey
Posted on: 05/14/05 05:58pm
By: machinari
Posted on: 05/14/05 06:49pm
By: ofey
Posted on: 05/14/05 09:19pm
By: machinari
Posted on: 05/15/05 03:01am
By: ofey
function newuserform($msg = '') { global $LANG04, $_CONF; $retval = ''; if (!empty ($msg)) { $retval .= COM_startBlock ($LANG04[21], '', COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } $user_templates = new Template($_CONF['path_layout'] . 'users'); $user_templates->set_file('regform','registrationform.thtml'); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block', COM_startBlock($LANG04[22])); $user_templates->set_var('lang_instructions', $LANG04[23]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_warning', $LANG04[24]); $user_templates->set_var('lang_register', $LANG04[27]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates->parse('output', 'regform'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; }
{start_block} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td> <form action="{site_url}/users.php" method="post"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td colspan="2">{lang_instructions}</td> </tr> <tr> <td align="right"><b>{lang_username}:</b></td> <td><input type="text" size="16" maxlength="16" name="username"></td> </tr> <tr> <td align="right"><b>{lang_email}:</b></td> <td><input type="text" size="16" maxlength="96" name="email"></td> </tr> <tr> <td align="center" class="warning" colspan="2">{lang_warning}</td> </tr> <tr> <td align="center" colspan="2"> <input type="hidden" name="mode" value="create"> <input type="submit" value="{lang_register}"> </td> </tr> </table> </form> </td> </tr> </table> {end_block}
<!-- This is an example template file for the Custom User Registration Feature --> <!-- To be located under theme/custom directory - Example professional/custom/memberdetail.thtml --> {start_block} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td> <form action="{site_url}/users.php" method="post"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td colspan="2">{lang_instructions}</td> </tr> <tr> <td align="right"><b>{USERNAME}:</b></td> <td><input type="text" size="16" maxlength="16" name="username"></td> </tr> <tr> <td align="right"><b>{lang_email}:</b></td> <td><input type="text" size="16" maxlength="96" name="email"></td> </tr> <tr> <td align="center" class="warning" colspan="2">{lang_warning}</td> </tr> <tr> <td align="center" colspan="2"> <input type="hidden" name="mode" value="create"> <input type="submit" value="{lang_register}"> </td> </tr> </table> </form> </td> </tr> </table> {end_block}
<tr> <td align="right"><b>{fullname}:</b></td> <td><input type="text" size="16" maxlength="16" name="fullname"></td> </tr>
Posted on: 05/15/05 03:55am
By: machinari
$user_templates->set_var('lang_username', $LANG04[2]);
from newuserform() over to custom_userform(), and ensure that the variable finds its way into memberdetail.thtml.
Posted on: 05/15/05 05:27am
By: ofey
function custom_userform($uid="",$msg="") { global $_CONF,$_TABLES, $LANG04; if (!empty($msg)) { $retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock(); COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } $post_url = $_CONF['site_url']."/users.php"; $postmode = "create"; $submitbutton = ''; $passwd_input = ""; $message = "<br><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b>"; $A=array(); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block', COM_startBlock($LANG04[22])); $user_templates->set_var('lang_instructions', $LANG04[23]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_warning', $LANG04[24]); $user_templates->set_var('lang_register', $LANG04[27]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates = new Template ($_CONF['path_layout'] . 'custom'); $user_templates->set_file('memberdetail', 'memberdetail.thtml'); $user_templates->set_var('layout_url', $_CONF['layout_url']); $user_templates->set_var('post_url', $post_url); // $user_templates->set_var('startblock', COM_startBlock("Custom Registration Example")); $user_templates->set_var('message', $message); $user_templates->set_var('USERNAME', "Username"); $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); $user_templates->set_var('username', $A['username']); $user_templates->set_var('passwd_input', $passwd_input); $user_templates->set_var('EMAIL', "Email Address"); $user_templates->set_var('EMAIL_HELP', ""); $user_templates->set_var('email', $A['email']); $user_templates->set_var('FULLNAME', "Full Name"); $user_templates->set_var('FULLNAME_HELP', "First and Last Name"); $user_templates->set_var('fullname', $A['fullname']); $user_templates->set_var('user_id', $user); $user_templates->set_var('postmode', $postmode); $user_templates->set_var('submitbutton', $submitbutton); // $user_templates->set_var('endblock', COM_endBlock()); $user_templates->parse('output', 'memberdetail'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; }
Posted on: 05/15/05 01:56pm
By: machinari
if (!empty ($msg)) { $retval .= COM_startBlock ($LANG04[21], '', COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); }or else leave it as it was originally. Basically, to fix your error you just need to replace a semicolon with a concatenation operator (a period).
Posted on: 05/15/05 03:12pm
By: ofey
function custom_userform($uid="",$msg="") { global $_CONF,$_TABLES, $LANG04; if (!empty ($msg)) { $retval .= COM_startBlock ($LANG04[21], '', COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } $post_url = $_CONF['site_url']."/users.php"; $postmode = "create"; $submitbutton = ''; $passwd_input = ""; $message = "<br><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b>"; $A=array(); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block', COM_startBlock($LANG04[22])); $user_templates->set_var('lang_instructions', $LANG04[23]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_warning', $LANG04[24]); $user_templates->set_var('lang_register', $LANG04[27]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates = new Template ($_CONF['path_layout'] . 'custom'); $user_templates->set_file('memberdetail', 'memberdetail.thtml'); $user_templates->set_var('layout_url', $_CONF['layout_url']); $user_templates->set_var('post_url', $post_url); // $user_templates->set_var('startblock', COM_startBlock("Custom Registration Example")); $user_templates->set_var('message', $message); $user_templates->set_var('USERNAME', "Username"); $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); $user_templates->set_var('username', $A['username']); $user_templates->set_var('passwd_input', $passwd_input); $user_templates->set_var('EMAIL', "Email Address"); $user_templates->set_var('EMAIL_HELP', ""); $user_templates->set_var('email', $A['email']); $user_templates->set_var('FULLNAME', "Full Name"); $user_templates->set_var('FULLNAME_HELP', "First and Last Name"); $user_templates->set_var('fullname', $A['fullname']); $user_templates->set_var('user_id', $user); $user_templates->set_var('postmode', $postmode); $user_templates->set_var('submitbutton', $submitbutton); // $user_templates->set_var('endblock', COM_endBlock()); $user_templates->parse('output', 'memberdetail'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; }
Posted on: 05/15/05 03:22pm
By: ofey
Posted on: 05/15/05 04:42pm
By: machinari
function custom_userform($uid="",$msg="") { global $_CONF,$_TABLES, $LANG04; if (!empty ($msg)) { $retval .= COM_startBlock ($LANG04[21], '', COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } $post_url = $_CONF['site_url']."/users.php"; $postmode = "create"; $submitbutton = ''; $passwd_input = ""; $message = "<br><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b>"; $A=array(); $user_templates = new Template ($_CONF['path_layout'] . 'custom'); $user_templates->set_file('memberdetail', 'memberdetail.thtml'); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block', COM_startBlock($LANG04[22])); $user_templates->set_var('lang_instructions', $LANG04[23]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_warning', $LANG04[24]); $user_templates->set_var('lang_register', $LANG04[27]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates->set_var('layout_url', $_CONF['layout_url']); $user_templates->set_var('post_url', $post_url); $user_templates->set_var('message', $message); $user_templates->set_var('USERNAME', "Username"); $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); $user_templates->set_var('username', $A['username']); $user_templates->set_var('passwd_input', $passwd_input); $user_templates->set_var('EMAIL', "Email Address"); $user_templates->set_var('EMAIL_HELP', ""); $user_templates->set_var('email', $A['email']); $user_templates->set_var('FULLNAME', "Full Name"); $user_templates->set_var('FULLNAME_HELP', "First and Last Name"); $user_templates->set_var('fullname', $A['fullname']); $user_templates->set_var('user_id', $user); $user_templates->set_var('postmode', $postmode); $user_templates->set_var('submitbutton', $submitbutton); $user_templates->parse('output', 'memberdetail'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; }
Posted on: 05/15/05 05:37pm
By: ofey
{start_block} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td> <form action="{site_url}/users.php" method="post"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td colspan="2">{lang_instructions}</td> </tr> <tr> <td align="right" ><b>{FULLNAME}:</b></td> <td><input type="text" size="25" maxlength="40" name="cust_fullname"></td> </tr> <tr> <td align="right"><b>{lang_username}:</b></td> <td><input type="text" size="16" maxlength="16" name="username"></td> </tr> <tr> <td align="right"><b>{lang_email}:</b></td> <td><input type="text" size="16" maxlength="96" name="email"></td> </tr> <tr> <td align="center" class="warning" colspan="2">{lang_warning}</td> </tr> <tr> <td align="center" colspan="2"> <input type="hidden" name="mode" value="create"> <input type="submit" value="{lang_register}"> </td> </tr> </table> </form> </td> </tr> </table> {end_block}
Posted on: 05/15/05 05:46pm
By: Dirk
Posted on: 05/15/05 06:29pm
By: machinari
Posted on: 05/16/05 02:48am
By: ofey
Wed May 11 19:08:12 2005 - Could not open the file. /hsphere/local/home/fjryanio/trojanswimclub.ie/backend/geeklog.rdf Wed May 11 19:39:00 2005 - Could not open the file. /hsphere/local/home/fjryanio/trojanswimclub.ie/backend/geeklog.rdf Wed May 11 19:41:33 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%Dave%' OR Quoted like '%Dave%' OR username like '%Dave%' OR Source like '%Dave%') ORDER BY Date DESC Wed May 11 19:44:49 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%%' OR Quoted like '%%' OR username like '%%' OR Source like '%%') AND q.UID='41' ORDER BY Date DESC Thu May 12 16:40:50 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%24 hour swim%' OR Quoted like '%24 hour swim%' OR username like '%24 hour swim%' OR Source like '%24 hour swim%') ORDER BY Date DESC Thu May 12 16:43:32 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%Aishling McHugh%' OR Quoted like '%Aishling McHugh%' OR username like '%Aishling McHugh%' OR Source like '%Aishling McHugh%') ORDER BY Date DESC Thu May 12 16:43:57 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%24 hour swin%' OR Quoted like '%24 hour swin%' OR username like '%24 hour swin%' OR Source like '%24 hour swin%') ORDER BY Date DESC Thu May 12 16:44:06 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%24 hour swim%' OR Quoted like '%24 hour swim%' OR username like '%24 hour swim%' OR Source like '%24 hour swim%') ORDER BY Date DESC Fri May 13 09:51:05 2005 - [pear_error: message="unable to connect to smtp server mail.hosting365.ie:25" code=0 mode=return level=notice prefix="" info=""] Fri May 13 15:19:30 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%dave%' OR Quoted like '%dave%' OR username like '%dave%' OR Source like '%dave%') ORDER BY Date DESC Fri May 13 17:38:28 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%banahan%' OR Quoted like '%banahan%' OR username like '%banahan%' OR Source like '%banahan%') ORDER BY Date DESC Sat May 14 20:38:10 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%photographs%' OR Quoted like '%photographs%' OR username like '%photographs%' OR Source like '%photographs%') ORDER BY Date DESC Sat May 14 20:43:44 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%ben murphy%' OR Quoted like '%ben murphy%' OR username like '%ben murphy%' OR Source like '%ben murphy%') ORDER BY Date DESC Sat May 14 20:43:53 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%paul murohy%' OR Quoted like '%paul murohy%' OR username like '%paul murohy%' OR Source like '%paul murohy%') ORDER BY Date DESC Sat May 14 20:44:03 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%paul murphy%' OR Quoted like '%paul murphy%' OR username like '%paul murphy%' OR Source like '%paul murphy%') ORDER BY Date DESC Sat May 14 21:03:21 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%under 16 age group%' OR Quoted like '%under 16 age group%' OR username like '%under 16 age group%' OR Source like '%under 16 age group%') ORDER BY Date DESC Sat May 14 21:03:32 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%%' OR Quoted like '%%' OR username like '%%' OR Source like '%%') ORDER BY Date DESC Sat May 14 21:04:08 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%%' OR Quoted like '%%' OR username like '%%' OR Source like '%%') ORDER BY Date DESC Sat May 14 21:07:35 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%ben murphy%' OR Quoted like '%ben murphy%' OR username like '%ben murphy%' OR Source like '%ben murphy%') ORDER BY Date DESC Sat May 14 21:07:44 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%ben murphy%' OR Quoted like '%ben murphy%' OR username like '%ben murphy%' OR Source like '%ben murphy%') ORDER BY Date DESC Sat May 14 21:07:49 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%ben%' OR Quoted like '%ben%' OR username like '%ben%' OR Source like '%ben%') ORDER BY Date DESC Sun May 15 19:27:46 2005 - Could not open the file. /hsphere/local/home/fjryanio/trojanswimclub.ie/backend/geeklog.rdf Sun May 15 21:11:31 2005 - dailyquote Search: SELECT DISTINCT ID, Quotes, Quoted, q.UID, username FROM gl_dailyquote_quotes q, gl_dailyquote_lookup l, gl_users gl WHERE (q.Status='1' AND q.UID=gl.uid AND l.QID=ID AND l.Status='1') AND (Quotes like '%florry%' OR Quoted like '%florry%' OR username like '%florry%' OR Source like '%florry%') ORDER BY Date DESC Sun May 15 22:29:25 2005 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid='74'' at line 1. SQL in question: DELETE FROM WHERE uid='74' Sun May 15 22:29:32 2005 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid='74'' at line 1. SQL in question: DELETE FROM WHERE uid='74' Sun May 15 22:29:44 2005 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid='73'' at line 1. SQL in question: DELETE FROM WHERE uid='73' Sun May 15 22:30:08 2005 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid='74'' at line 1. SQL in question: DELETE FROM WHERE uid='74'
Posted on: 05/16/05 04:59am
By: machinari
global $_CONF, $_TABLES, $_USER;
and the error would be caused by not having $_TABLES listed..
Posted on: 05/16/05 05:33am
By: ofey
function custom_usercreate($uid) { global $_CONF,$_TABLES,$HTTP_POST_VARS; $fullname = COM_applyFilter($_POST['cust_fullname']); // Ensure all data is prepared correctly before inserts, quotes may need to be escaped with addslashes() DB_query("UPDATE {$_TABLES['users']} SET email='{$HTTP_POST_VARS['email']}',homepage='{$HTTP_POST_VARS['homepage']}', fullname='{$HTTP_POST_VARS['fullname']}' WHERE uid=$uid"); DB_query("UPDATE {$_TABLES['users']} SET fullname = '$fullname' WHERE uid='$uid'"); return true; } // Delete any records from custom tables you may have used function custom_userdelete($uid) { global $_TABLES; DB_query("DELETE FROM {$_TABLES['localuserinfo']} WHERE uid='$uid'"); return true; }
Posted on: 05/16/05 11:58am
By: machinari
function custom_userdelete($uid) { //global $_TABLES; //DB_query("DELETE FROM {$_TABLES['localuserinfo']} WHERE uid='$uid'"); return true; }Just commented the delete statements because they are unnecessary ATM. The function still needs to return "true" however.
Posted on: 05/16/05 03:03pm
By: ofey
Posted on: 10/25/05 04:38pm
By: richardpitt
if (!empty ($msg) && ($msg != 'new')) ...