4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: MadSci on September 14, 2007, 01:02:48 PM
-
1. on the front page to have: Welcome to our newest member {user_name} of the one who just registered. :lol:
ms
-
This might help:
http://www.4homepages.de/forum/index.php?topic=10629.0
or
In lang/english/main.php file,
find:
$lang['lang_loggedin_msg'] = "Logged in as: <b>{loggedin_user_name}</b>";
replace:
$lang['lang_loggedin_msg'] = "Welcome: <b>{loggedin_user_name}</b>";
-
Humm that will welcome every user who is logged in..what I meant was:
1.user registers
2.Gets an email with the activation link
3. Clicks on the link
4. msg shows on the front page:
"Welcome to our newest member:" and then show the name of the person who registered last.
ms
-
1.user registers
2.Gets an email with the activation link
3. Clicks on the link
This is 4images core. You can configure in ACP - > setting page for register confirm by email.
4. msg shows on the front page:
"Welcome to our newest member:" and then show the name of the person who registered last.
I like. :)
// Step 1
In register.php file,
find:
$site_email->set_body("activation_success", $config['language_dir']);
$site_email->send_email();
}
}
}
add after:
$welcome_activation_msg = str_replace(array("{welcome_user_name}", "{site_name}"), array(format_text(trim($row[$user_table_fields['user_name']]), 2), format_text($config['site_name'], 2)), $lang['welcome_activation_message']);
$welcome_activation_template = $site_template->parse_template("member_activation_content");
$site_template->register_vars("welcome_activation_msg", trim($welcome_activation_msg));
find:
"msg" => $msg,
add after:
"welcome_activation_template" => trim($welcome_activation_template),
// Step 2
In lang/english/main.php file,
add top of ?>:
$lang['welcome_activation_message'] = "Dear {welcome_user_name},<br /><br />we would like to welcome you to our gallery: <b>{site_name}</b>.";
// Step 3
In templates/your_template folder, create file: member_activation_content.html .
Use: {if welcome_activation_msg}{welcome_activation_msg}{endif welcome_activation_msg} .
// Step 4
In templates/your_template/member.html file,
use: {if welcome_activation_template}{welcome_activation_template}{endif welcome_activation_template} where you want in file.
-
so the welcome msg will be seen by evrybody on the fron page right ...not only by the person who just registered...?
look at the upper right hand corner of this board..there is a windown that says "KEY STATS" and then under Total Members and then Latest member: ...some name"
ms
-
so the welcome msg will be seen by evrybody on the fron page right ...not only by the person who just registered...?
This MOD good for all USER_AWAITING level to USER (activate account). No other.
-
can we make it like this board...for everybody..
thnx
ms
-
On this board ... ?
Where you see welcome message for everybody on this board ... ?
-
Ok look I want same thing for 4images ( check attachment)
ms
-
Ahh ! good. Now tawk my language. ;)
// Step 1
In includes/functions.php file,
add top ?>:
function show_last_registered_users() {
global $site_db, $lang, $site_sess, $site_template, $additional_user_fields, $user_table_fields;
$additional_sql = "";
if (isset($additional_user_fields) && is_array($additional_user_fields) && !empty($additional_user_fields)) {
foreach ($additional_user_fields as $key => $val) {
$additional_sql .= ", " . $key;
}
}
$sql = "
SELECT " . get_user_table_field("", "user_id") . get_user_table_field(", ", "user_name") . $additional_sql . "
FROM " . USERS_TABLE . "
WHERE " . get_user_table_field("", "user_level") . " >= '" . USER . "'
ORDER BY " . get_user_table_field("", "user_joindate") . " DESC
";
$row = $site_db->query_firstrow($sql);
$last_user_id = (isset($row[$user_table_fields['user_id']])) ? $row[$user_table_fields['user_id']] : "";
$last_user_name = (isset($row[$user_table_fields['user_name']])) ? $row[$user_table_fields['user_name']] : "";
$site_template->register_vars("show_last_user_name", str_replace(array("{last_user_name}", "{last_user_name_link}"), array(format_text(trim($last_user_name), 2), $site_sess->url(ROOT_PATH . "member.php?action=showprofile&" . URL_USER_ID . "=" . (int)$last_user_id)), $lang['last_user_name']));
$last_user_name_template = $site_template->parse_template("last_user_name_registered");
$site_template->register_vars("last_user_name_template", trim($last_user_name_template));
}
// Step 2
In lang/english/main.php file,
add top ?>:
$lang['last_user_name'] = "Last member: <a href=\"{last_user_name_link}\" class=\"link\" /><b>{last_user_name}</b></a>";
// Step 3
In includes/page_header.php file,
find:
//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------
add before:
//-----------------------------------------------------
//--- Show last registered user -----------------------
//-----------------------------------------------------
if (function_exists('show_last_registered_users')) {
show_last_registered_users();
}
// Step 4
In templates/your_template, create file: last_user_name_registered.html .
Add:
{if show_last_user_name}{show_last_user_name}{endif show_last_user_name}
// Step 5
Add any HTML you want (1 template of choice) have {header} to {footer} - this tag:
{if last_user_name_template}{last_user_name_template}{endif last_user_name_template}
Should work. ;)
-
thank you thank you thats is cool...
back to the editor..
ms
I have another q. but will open new post.
ms
UPDATE:
========
Works Like a charm thank you one more time
-
1.user registers
2.Gets an email with the activation link
3. Clicks on the link
This is 4images core. You can configure in ACP - > setting page for register confirm by email.
4. msg shows on the front page:
"Welcome to our newest member:" and then show the name of the person who registered last.
I like. :)
// Step 1
In register.php file,
find:
$site_email->set_body("activation_success", $config['language_dir']);
$site_email->send_email();
}
}
}
add after:
$welcome_activation_msg = str_replace(array("{welcome_user_name}", "{site_name}"), array(format_text(trim($row[$user_table_fields['user_name']]), 2), format_text($config['site_name'], 2)), $lang['welcome_activation_message']);
$welcome_activation_template = $site_template->parse_template("member_activation_content");
$site_template->register_vars("welcome_activation_msg", trim($welcome_activation_msg));
find:
"msg" => $msg,
add after:
"welcome_activation_template" => trim($welcome_activation_template),
// Step 2
In lang/english/main.php file,
add top of ?>:
$lang['welcome_activation_message'] = "Dear {welcome_user_name},<br /><br />we would like to welcome you to our gallery: <b>{site_name}</b>.";
// Step 3
In templates/your_template folder, create file: member_activation_content.html .
Use: {if welcome_activation_msg}{welcome_activation_msg}{endif welcome_activation_msg} .
// Step 4
In templates/your_template/member.html file,
use: {if welcome_activation_template}{welcome_activation_template}{endif welcome_activation_template} where you want in file.
dont show nothing message welcome in member
create template
member_activation_content.html
modify lang/main.php
$lang['welcome_activation_message'] = "Dear {welcome_user_name},<br /><br />we would like to welcome you to our gallery: <b>{site_name}</b>.";
insert in member this
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="row2" valign="top">{if welcome_activation_template}{welcome_activation_template}{endif welcome_activation_template}</td>
</tr>
</table>
other step register change
thanks
-
I see only LAST MEMBER without nickname and error:
An unexpected error occured. Please try again later.
-
please follow this topic to get exact error message:
An unexpected error occured. Please try again later (http://www.4homepages.de/forum/index.php?topic=24177.0)