$group=form_textfield(t('Number of topics in block'),'forum_block_num',variable_get('forum_block_num','5'),5,5,t('The number of topics to show in the "Forum topics" block. To enable the block, go to the <a href="%block-administration">block administration</a> page.',array('%block-administration'=>url('admin/block'))));
$group=form_select(t('Number of topics in block'),'forum_block_num',variable_get('forum_block_num','5'),drupal_map_assoc(array(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)),t('The number of topics to show in the "Forum topics" block. To enable the block, go to the <a href="%block-administration">block administration</a> page.',array('%block-administration'=>url('admin/block'))));
$group=form_textfield(t('Number of topics in block'),'forum_block_num',variable_get('forum_block_num','5'),5,5,t('The number of topics to show in the "Forum topics" block. To enable the block, go to the <a href="%block-administration">block administration</a> page.',array('%block-administration'=>url('admin/block'))));
$group=form_select(t('Number of topics in block'),'forum_block_num',variable_get('forum_block_num','5'),drupal_map_assoc(array(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)),t('The number of topics to show in the "Forum topics" block. To enable the block, go to the <a href="%block-administration">block administration</a> page.',array('%block-administration'=>url('admin/block'))));
drupal_set_message(t('Note: The body contents of this page are written in PHP and you do not have sufficient permissions to make changes to the body. You can edit the other elements of the page.'));
drupal_set_message(t('the body contents of this page are written in PHP and you do not have sufficient permissions to make changes to the body. You can edit the other elements of the page.'));
drupal_set_message(t('Note: The body contents of this page are written in PHP and you do not have sufficient permissions to make changes to the body. You can edit the other elements of the page.'));
drupal_set_message(t('the body contents of this page are written in PHP and you do not have sufficient permissions to make changes to the body. You can edit the other elements of the page.'));
drupal_set_message(t('The post is queued for approval. You can check the votes in the <a href="%queue">submission queue</a>.',array('%queue'=>url('queue'))));
drupal_set_message(t('the post is queued for approval. You can check the votes in the <a href="%queue">submission queue</a>.',array('%queue'=>url('queue'))));
}
elseif($node->moderate){
drupal_set_message(t('The post is queued for approval. The editors will decide whether it should be published.'));
drupal_set_message(t('the post is queued for approval. The editors will decide whether it should be published.'));
form_set_error('file_directory_temp',t('Directory does not exist, or is not writable.'));
form_set_error('file_directory_temp',t('the directory does not exist, or is not writable.'));
}
$group=form_textfield(t('File system path'),'file_directory_path',variable_get('file_directory_path','files'),70,255,t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'));
$group.=form_textfield(t('Temporary directory'),'file_directory_temp',variable_get('file_directory_temp',(PHP_OS=='WINNT'?'c:\\windows\\temp':'/tmp')),70,255,t('Location where files can be saved temporarily. This directory should not be accessible from the web.'));
form_set_error('file_directory_temp',t('Directory does not exist, or is not writable.'));
form_set_error('file_directory_temp',t('the directory does not exist, or is not writable.'));
}
$group=form_textfield(t('File system path'),'file_directory_path',variable_get('file_directory_path','files'),70,255,t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.'));
$group.=form_textfield(t('Temporary directory'),'file_directory_temp',variable_get('file_directory_temp',(PHP_OS=='WINNT'?'c:\\windows\\temp':'/tmp')),70,255,t('Location where files can be saved temporarily. This directory should not be accessible from the web.'));
$result=db_query("SELECT d.tid, d.name, MAX(n.created) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE n.status = 1 GROUP BY d.tid ORDER BY updated DESC, d.name");
$result=db_query("SELECT d.tid, d.name, MAX(n.created) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE n.status = 1 GROUP BY d.tid ORDER BY updated DESC, d.name");
returnt('Enables users to link to stories, articles or similar content by title.');
case'filter#short-tip':
returnt('<a href=\"%title-help\">Link to content</a> on this site using <em>[title|text]</em>.',array("%title-help"=>url('filter/tips',NULL,'filter-title')));
case'filter#long-tip':
return'<p>'.t('You may quickly link to content on the site using this syntax: <em>[title|text]</em>. This will generate a link labeled "text" to the content with the title "title". If you omit "|text", the label becomes "title".').'</p>';
* Menu callback; displays the matching node or a list of search results.
*/
functiontitle_page($query){
$title=urldecode($query);
$result=db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title = '%s' AND n.status = 1 ORDER BY n.created DESC",$title);
// No node with exact title found; try a substring.
$result=db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%%%s%%' AND n.status = 1 ORDER BY n.created DESC",$title);
returnform_group(t('Title filter'),t('Wiki-like [node title|text] links are enabled. These shortcuts generate a link labeled "text" to the node with the title "node title". If you omit "|text", the label becomes "node title". You may use a substring of a node title if desired. When multiple matching titles are found, a list of matching nodes will be displayed. If no matching titles are found, a full-text search is returned.'));
$output=t('There are currently %members and %visitors online.',array('%members'=>format_plural($total_users,'1 user','%count users'),'%visitors'=>format_plural($guests->count,'1 guest','%count guests')));
@@ -1003,9 +1001,9 @@ function user_register($edit = array()) {
functionuser_edit_form($uid,$edit){
// Account information:
$group=form_textfield(t('Username'),'name',$edit['name'],30,55,t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'));
$group.=form_textfield(t('E-mail address'),'mail',$edit['mail'],30,55,t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'));
$group.=form_item(t('Password'),'<input type="password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" name="edit[pass2]" size="12" maxlength="24" />',t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'));
$group=form_textfield(t('Username'),'name',$edit['name'],30,55,t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'),NULL,TRUE);
$group.=form_textfield(t('E-mail address'),'mail',$edit['mail'],30,55,t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),NULL,TRUE);
$group.=form_item(t('Password'),'<input type="password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" name="edit[pass2]" size="12" maxlength="24" />',t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'),NULL,TRUE);
@@ -1284,9 +1282,9 @@ function user_admin_create($edit = array()) {
}
}
$output=form_textfield(t('Username'),'name',$edit['name'],30,55,t('Provide the username of the new account.'));
$output.=form_textfield(t('E-mail address'),'mail',$edit['mail'],30,55,t('Provide the e-mail address associated with the new account.'));
$output.=form_textfield(t('Password'),'pass',$edit['pass'],30,55,t('Provide a password for the new account.'));
$output=form_textfield(t('Username'),'name',$edit['name'],30,55,t('Provide the username of the new account.'),NULL,TRUE);
$output.=form_textfield(t('E-mail address'),'mail',$edit['mail'],30,55,t('Provide the e-mail address associated with the new account.'),NULL,TRUE);
$output.=form_password(t('Password'),'pass',$edit['pass'],30,55,t('Provide a password for the new account.'),NULL,TRUE);
$output.=form_submit(t('Create account'));
$output=form_group(t('Create new user account'),$output);
...
...
@@ -1416,7 +1414,7 @@ function user_admin_perm($edit = array()) {
functionuser_admin_role($edit=array()){
$op=$_POST['op'];
$id=arg(3);
$id=arg(4);
if($op==t('Save role')){
db_query("UPDATE {role} SET name = '%s' WHERE rid = %d",$edit['name'],$id);
...
...
@@ -1425,8 +1423,7 @@ function user_admin_role($edit = array()) {
db_query('DELETE FROM {role} WHERE rid = %d',$id);
db_query('DELETE FROM {permission} WHERE rid = %d',$id);
// Users with only the deleted role are put back in the authenticated users pool.
$aid=_user_authenticated_id();
// Update the users who have this role set:
$result=db_query('SELECT DISTINCT ur1.uid FROM {users_roles} ur1 LEFT JOIN {users_roles} ur2 ON ur2.uid = ur1.uid WHERE ur1.rid = %d AND ur2.rid != ur1.rid',$id);
$uid=array();
...
...
@@ -1434,8 +1431,12 @@ function user_admin_role($edit = array()) {
$uid[]=$u->uid;
}
db_query('DELETE FROM {users_roles} WHERE rid = %d AND uid IN (%s)',$id,implode(', ',$uid));
db_query('UPDATE {users_roles} SET rid = %d WHERE rid = %d',$aid,$id);
if($uid){
db_query('DELETE FROM {users_roles} WHERE rid = %d AND uid IN (%s)',$id,implode(', ',$uid));
}
// Users with only the deleted role are put back in the authenticated users pool.
db_query('UPDATE {users_roles} SET rid = %d WHERE rid = %d',_user_authenticated_id(),$id);
}
elseif($op==t('Add role')){
db_query("INSERT INTO {role} (name) VALUES ('%s')",$edit['name']);
...
...
@@ -1458,7 +1459,7 @@ function user_admin_role($edit = array()) {
$output=t('There are currently %members and %visitors online.',array('%members'=>format_plural($total_users,'1 user','%count users'),'%visitors'=>format_plural($guests->count,'1 guest','%count guests')));
@@ -1003,9 +1001,9 @@ function user_register($edit = array()) {
functionuser_edit_form($uid,$edit){
// Account information:
$group=form_textfield(t('Username'),'name',$edit['name'],30,55,t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'));
$group.=form_textfield(t('E-mail address'),'mail',$edit['mail'],30,55,t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'));
$group.=form_item(t('Password'),'<input type="password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" name="edit[pass2]" size="12" maxlength="24" />',t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'));
$group=form_textfield(t('Username'),'name',$edit['name'],30,55,t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'),NULL,TRUE);
$group.=form_textfield(t('E-mail address'),'mail',$edit['mail'],30,55,t('Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),NULL,TRUE);
$group.=form_item(t('Password'),'<input type="password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" name="edit[pass2]" size="12" maxlength="24" />',t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'),NULL,TRUE);