Link to the mod (https://custom.simplemachines.org/index.php?mod=368)
Avatar Select on new user register. The user must select an avatar from the avatar gallery. Mod modifies the default register.template.php
Cool idea 8)
Thanks for the upgrade, works in IE7 ;D
Yeah this is good.
/me is puzzled
I saw this mod before, how come the thread is no new? :)
good mod btw ;)
edit: oh, I have some translations for the mod, want me to pm them?
/me is still puzzled
the files I have are v1.2?
I fixed the mod. It was never on the mod site before since it didn't work with internet explorer. But now the mod works with internet explorer as well!
It's working perfectly!... oldies version does'nt work for me n_n
Quote from: alperuzi on December 29, 2006, 08:44:03 AM
/me is puzzled
I saw this mod before, how come the thread is no new? :)
good mod btw ;)
edit: oh, I have some translations for the mod, want me to pm them?
/me is still puzzled
the files I have are v1.2?
i had downloaded the previus version of this mod from smfhacks.com and gived it in Turkish board(translated)... u have seen it there...
You should update that version as well then since this one works will all browsers
yeah i checked it, u have choosen the error of registering a user from admin panel too, thanx...
I installed it without any problem, but when I go test it, it generates loads of errors in the log :
Quote
http://www.marcovanveelen.nl/forum/index.php?action=register
8: Undefined index: member
Bestand: /home/vhosts/marcovanveelen.nl/httpdocs/forum/Themes/default/languages/Profile.dutch-utf8.php (eval?)
Regel: 875
What could be the trick to get this solved ?
Hello everybody,
I was unfortunately having some trouble installing this mod manually on my RC2 board. I get the following error:
Fatal error: Call to undefined function: getavatars() in /hsphere/local/home/thunting/thunting.com/smf/Sources/Load.php(1613) : eval()'d code on line 116
Here is my register.template.php in which I suppose there might be an error:
<?php
// Version: 1.1 RC2; Register
// Before registering - get their information.
function template_before()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Make sure they've agreed to the terms and conditions.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function verifyAgree()
{
if (document.forms.creator.passwrd1.value != document.forms.creator.passwrd2.value)
{
alert("', $txt['register_passwords_differ_js'], '");
return false;
}';
// If they haven't checked the "I agree" box, tell them and don't submit.
if ($context['require_agreement'])
echo '
if (!document.forms.creator.regagree.checked)
{
alert("', $txt['register_agree'], '");
return false;
}';
// Otherwise, let it through.
echo '
return true;
}
function checkAgree()
{
document.forms.creator.regSubmit.disabled = isEmptyText(document.forms.creator.user) || isEmptyText(document.forms.creator.email) || isEmptyText(document.forms.creator.passwrd1) || !document.forms.creator.regagree.checked;
}
// ]]></script>
<form action="', $scripturl, '?action=register2" method="post" name="creator" id="creator" onsubmit="return verifyAgree();">
<br>
<table border="0" width="100%" cellpadding="3" cellspacing="0" class="tborder">
<tr><td><table width=100% cellpadding=0 cellspacing=0 border=0><tr><td valign=top><font face=verdana,arial,helvetica size=+1>Gain real Treasure for free:</font></b><p><div align=justify><font size=-1 verdana,arial,helvetica>THunting.com offers the unique possibility of gaining real treasure and relics for free! For each new topic that you start on our forum you will be given <b>10</b> credits and <b>5</b> credits for each reply to an existing topic. Credits can be exchanged for items such as old silver coins, tokens, medals and much more in our <i>THunting.com Shop</i>. <p>Furthermore you will be given <b>250</b> credits for each new member that you refer to THunting.com. The new member will need to insert your screen name in the below <i>Referrer</i> field.<p><i><b>THunting.com is where Treasure is!</b></i></td><td width=15></td><td valign=top><img src="http://www.thunting.com/thunting/images/shopbuy.jpg"></td></tr></table></td></tr>
<tr class="titlebg">
<td>', $txt[97], ' - ', $txt[517], '</td>
</tr>
<tr class="windowbg">
<td width="100%">
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tr>
<td width="40%">
<b>', $txt[98], ':</b>
</td>
<td>
<input type="text" name="user" size="20" tabindex="', $context['tabindex']++, '" maxlength="25" />
</td>
</tr><tr>
<td width="40%">
<b>', $txt[69], ':</b>
<div class="smalltext">', $txt[679], '</div>
</td>
<td>
<input type="text" name="email" size="30" tabindex="', $context['tabindex']++, '" />';
// Are they allowed to hide their email?
if ($context['allow_hide_email'])
echo '
<label for="hideEmail"><input type="checkbox" name="hideEmail" id="hideEmail" class="check" /> ', $txt[721], '</label>';
echo '
</td>
</tr><tr>
<td width="40%">
<b>', $txt[81], ':</b><br><div class="smalltext">Must be at least 8 characters long
</td>
<td>
<input type="password" name="passwrd1" size="30" tabindex="', $context['tabindex']++, '" />
</td>
</tr><tr>
<td width="40%">
<b>', $txt[82], ':</b>
</td>
<td>
<input type="password" name="passwrd2" size="30" tabindex="', $context['tabindex']++, '" />
</td>
</tr><tr>
<!-- Begin CAPTCHA Mod 0.1 -->
<td width="40%">
<b>', $txt['captchaEnter'], ':</b>
</td>
<td>
', $context['captcha_image'], '</br> Attention: All characters are <b>case sensitive
<!--<input type="password" name="passwrd2" size="30" />-->
</td>
<!-- End CAPTCHA Mod -->
</tr>
';
loadlanguage('Profile');
echo '<tr>
<td width="40%">
<b>Avatar Select:</b>
<div class="smalltext">Please select an avatar.</div>
<div style="margin: 2ex;"><img name="avatar" id="avatar" src="' . $modSettings['avatar_url'] . '/blank.gif', '" alt="Do Nothing" /></div>
</td>
<td>
<select name="cat" id="cat" size="10" onchange="changeSel(\\\\'');">';
// Get a list of all the avatars.
$context['avatar_list'] = array();
$context['avatars'] = is_dir($modSettings['avatar_directory']) ? getAvatars('', 0) : array();
// This lists all the file catergories.
foreach ($context['avatars'] as $avatar)
echo '
<option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected="selected"' : ''), '>', $avatar['name'], '</option>';
echo '</select>
<select name="file" id="file" size="10" style="display: none;" onchange="showAvatar()" disabled="disabled"><option></option></select>
</td>
</tr>';
// If flags is set for registration show it.
if (!empty($modSettings['country_flag_ask']) && $modSettings['country_flag_ask'] == 2 || $modSettings['country_flag_ask'] == 3)
{
// Call the function that has all the flag info
$flags = CountryFlag();
echo '
<script language="JavaScript" type="text/javascript">
function showflags()
{
document.images.flags.src = document.forms.creator.country.options[document.forms.creator.country.selectedIndex].value != \\\\'' ? \\\\'' . $settings['default_theme_url'] . '/images/flags/' + document.forms.creator.country.options[document.forms.creator.country.selectedIndex].value + \\\\'.png' : \\\\'' . $settings['default_theme_url'] . '/images/flags/blank.gif';
}
</script>
<tr>
<td width="40%" align="top">
<b>', $txt['country_flag_label'], ':</b>
</td>
<td>
<select name="country" onchange="showflags()">
<option value=""></option>';
// Loop and show the drop down.
foreach ($flags as $key => $name)
echo '
<option value="', $key, '">', $name, '</option>';
echo '
</select>
<img id="flags" src="', $settings['default_theme_url'], '/images/blank.gif" width="25" height="15" align="top" />
</td>
</tr>';
}
global $sourcedir;
require_once($sourcedir . '/CustomProfile.php');
RegistrationFields();
echo '
</table>
</td>
</tr>
</table>';
// Require them to agree here?
if ($context['require_agreement'])
echo '
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="5" class="tborder" style="border-top: 0;">
<tr>
<td class="windowbg2" style="padding-top: 8px; padding-bottom: 8px;"><div align=justify>
', $context['agreement'], '
</td>
</tr>
<tr>
<td align="center" class="windowbg2">
<table><tr><td>
<label for="skip_coppa"><input type="checkbox" name="skip_coppa" id="skip_coppa" tabindex="', $context['tabindex']++, '" class="check" /> <b>', $context['coppa_desc'], '.</b></label><br>
<label for="regagree"><input type="checkbox" name="regagree" onclick="checkAgree();" id="regagree" class="check" /> <b>', $txt[585], '</b></label>
</td></tr></table>
</td>
</tr>
</table>';
echo '
<br />
<div align="center">
<input type="submit" name="regSubmit" value="', $txt[97], '" />
</div>
</form>';
// Uncheck the agreement thing....
if ($context['require_agreement'])
echo '
<script language="JavaScript" type="text/javascript">';
echo '
<!-- // -->'. chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
echo '
var files = ["' . implode('", "', $context['avatar_list']) . '"];
var avatar = document.getElementById("avatar");
var cat = document.getElementById("cat");
var selavatar = "' . $context['avatar_selected'] . '";
var avatardir = "' . $modSettings['avatar_url'] . '/";
var size = avatar.alt.substr(3, 2) + " " + avatar.alt.substr(0, 2) + String.fromCharCode(117, 98, 116);
var file = document.getElementById("file");
if (avatar.src.indexOf("blank.gif") > -1)
changeSel(selavatar);
else
previewExternalAvatar(avatar.src)
function changeSel(selected)
{
if (cat.selectedIndex == -1)
return;
if (cat.options[cat.selectedIndex].value.indexOf("/") > 0)
{
var i;
var count = 0;
file.style.display = "inline";
file.disabled = false;
for (i = file.length; i >= 0; i = i - 1)
file.options[i] = null;
for (i = 0; i < files.length; i++)
if (files[i].indexOf(cat.options[cat.selectedIndex].value) == 0)
{
var filename = files[i].substr(files[i].indexOf("/") + 1);
var showFilename = filename.substr(0, filename.lastIndexOf("."));
showFilename = showFilename.replace(/[_]/g, " ");
file.options[count] = new Option(showFilename, files[i]);
if (filename == selected)
{
if (file.options.defaultSelected)
file.options[count].defaultSelected = true;
else
file.options[count].selected = true;
}
count++;
}
if (file.selectedIndex == -1 && file.options[0])
file.options[0].selected = true;
showAvatar();
}
else
{
file.style.display = "none";
file.disabled = true;
document.getElementById("avatar").src = avatardir + cat.options[cat.selectedIndex].value;
document.getElementById("avatar").style.width = "";
document.getElementById("avatar").style.height = "";
}
}
function showAvatar()
{
if (file.selectedIndex == -1)
return;
document.getElementById("avatar").src = avatardir + file.options[file.selectedIndex].value;
document.getElementById("avatar").alt = file.options[file.selectedIndex].text;
document.getElementById("avatar").alt += file.options[file.selectedIndex].text == size ? "!" : "";
document.getElementById("avatar").style.width = "";
document.getElementById("avatar").style.height = "";
}
function previewExternalAvatar(src)
{
if (!document.getElementById("avatar"))
return;
var maxHeight = ', !empty($modSettings['avatar_max_height_external']) ? $modSettings['avatar_max_height_external'] : 0, ';
var maxWidth = ', !empty($modSettings['avatar_max_width_external']) ? $modSettings['avatar_max_width_external'] : 0, ';
var tempImage = new Image();
tempImage.src = src;
if (maxWidth != 0 && tempImage.width > maxWidth)
{
document.getElementById("avatar").style.height = parseInt((maxWidth * tempImage.height) / tempImage.width) + "px";
document.getElementById("avatar").style.width = maxWidth + "px";
}
else if (maxHeight != 0 && tempImage.height > maxHeight)
{
document.getElementById("avatar").style.width = parseInt((maxHeight * tempImage.width) / tempImage.height) + "px";
document.getElementById("avatar").style.height = maxHeight + "px";
}
document.getElementById("avatar").src = src;
}';
echo '
//' . chr(93) . chr(93) . chr(62);
echo '
</script>';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
document.forms.creator.regagree.checked = false;
document.forms.creator.regSubmit.disabled = !document.forms.creator.regagree.checked;
// ]]></script>';
}
// After registration... all done ;).
function template_after()
{
global $context, $settings, $options, $txt, $scripturl;
// Not much to see here, just a quick... "you're now registered!" or what have you.
echo '
<br />
<table border="0" width="80%" cellpadding="3" cellspacing="0" class="tborder" align="center">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr><tr class="windowbg">
<td align="left">', $context['description'], '<br /><br /></td>
</tr>
</table>
<br />';
}
// Template for giving instructions about COPPA activation.
function template_coppa()
{
global $context, $settings, $options, $txt, $scripturl;
// Formulate a nice complicated message!
echo '
<br />
<table width="60%" cellpadding="4" cellspacing="0" border="0" class="tborder" align="center">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr><tr class="windowbg">
<td align="left">', $context['coppa']['body'], '<br /></td>
</tr><tr class="windowbg">
<td align="center">
<a href="', $scripturl, '?action=coppa;form;member=', $context['coppa']['id'], '" target="_blank">', $txt['coppa_form_link_popup'], '</a> | <a href="', $scripturl, '?action=coppa;form;dl;member=', $context['coppa']['id'], '">', $txt['coppa_form_link_download'], '</a><br /><br />
</td>
</tr><tr class="windowbg">
<td align="left">', $context['coppa']['many_options'] ? $txt['coppa_send_to_two_options'] : $txt['coppa_send_to_one_option'], '</td>
</tr>';
// Can they send by post?
if (!empty($context['coppa']['post']))
{
echo '
<tr class="windowbg">
<td align="left"><b>1) ', $txt['coppa_send_by_post'], '</b></td>
</tr><tr class="windowbg">
<td align="left" style="padding-bottom: 1ex;">
<div style="padding: 4px; width: 32ex; background-color: white; color: black; margin-left: 5ex; border: 1px solid black;">
', $context['coppa']['post'], '
</div>
</td>
</tr>';
}
// Can they send by fax??
if (!empty($context['coppa']['fax']))
{
echo '
<tr class="windowbg">
<td align="left"><b>', !empty($context['coppa']['post']) ? '2' : '1', ') ', $txt['coppa_send_by_fax'], '</b></td>
</tr><tr class="windowbg">
<td align="left" style="padding-bottom: 1ex;">
<div style="padding: 4px; width: 32ex; background-color: white; color: black; margin-left: 5ex; border: 1px solid black;">
', $context['coppa']['fax'], '
</div>
</td>
</tr>';
}
// Offer an alternative Phone Number?
if ($context['coppa']['phone'])
{
echo '
<tr class="windowbg" style="padding-bottom: 1ex;">
<td align="left">', $context['coppa']['phone'], '</td>
</tr>';
}
echo '
</table>
<br />';
}
// An easily printable form for giving permission to access the forum for a minor.
function template_coppa_form()
{
global $context, $settings, $options, $txt, $scripturl;
// Show the form (As best we can)
echo '
<table border="0" width="100%" cellpadding="3" cellspacing="0" class="tborder" align="center">
<tr>
<td align="left">', $context['forum_contacts'], '</td>
</tr><tr>
<td align="right">
<i>', $txt['coppa_form_address'], '</i>: ', $context['ul'], '<br />
', $context['ul'], '<br />
', $context['ul'], '<br />
', $context['ul'], '
</td>
</tr><tr>
<td align="right">
<i>', $txt['coppa_form_date'], '</i>: ', $context['ul'], '
<br /><br />
</td>
</tr><tr>
<td align="left">
', $context['coppa_body'], '
</td>
</tr>
</table>
<br />';
}
function template_admin_register()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<form action="', $scripturl, '?action=regcenter" method="post" name="postForm" id="postForm">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function onCheckChange()
{
if (document.forms.postForm.emailActivate.checked)
{
document.forms.postForm.emailPassword.disabled = true;
document.forms.postForm.emailPassword.checked = true;
}
else
document.forms.postForm.emailPassword.disabled = false;
}
// ]]></script>
<table border="0" cellspacing="0" cellpadding="4" align="center" width="70%" class="tborder">
<tr class="titlebg">
<td colspan="2" align="center">', $txt['admin_browse_register_new'], '</td>
</tr>';
if (!empty($context['registration_done']))
echo '
<tr class="windowbg2">
<td colspan="2" align="center"><br />
', $context['registration_done'], '
</td>
</tr><tr class="windowbg2">
<td colspan="2" align="center"><hr /></td>
</tr>';
echo '
<tr class="windowbg2">
<th width="50%" align="right">
<label for="user_input">', $txt['admin_register_username'], ':</label>
</th>
<td width="50%" align="left">
<input type="text" name="user" id="user_input" size="30" maxlength="25" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="email_input">', $txt['admin_register_email'], ':</label>
<div class="smalltext" style="font-weight: normal;">', $txt['admin_register_email_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="text" name="email" id="email_input" size="30" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="password_input">', $txt['admin_register_password'], ':</label>
<div class="smalltext" style="font-weight: normal;">', $txt['admin_register_password_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="password" name="password" id="password_input" size="30" /><br />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="group_select">', $txt['admin_register_group'], ':</label>
<div class="smalltext" style="font-weight: normal;">', $txt['admin_register_group_desc'], '</div>
</th>
<td width="50%" align="left">
<select name="group" id="group_select">';
foreach ($context['member_groups'] as $id => $name)
echo '
<option value="', $id, '">', $name, '</option>';
echo '
</select><br />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="emailPassword_check">', $txt['admin_register_email_detail'], ':</label>
<div class="smalltext" style="font-weight: normal;">', $txt['admin_register_email_detail_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="checkbox" name="emailPassword" id="emailPassword_check" checked="checked"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? ' disabled="disabled"' : '', ' class="check" /><br />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="emailActivate_check">', $txt['admin_register_email_activate'], ':</label>
</th>
<td width="50%" align="left">
<input type="checkbox" name="emailActivate" id="emailActivate_check"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? ' checked="checked"' : '', ' onclick="onCheckChange();" class="check" /><br />
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="2" align="right">
<input type="submit" name="regSubmit" value="', $txt[97], '" />
<input type="hidden" name="sa" value="register" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
// Form for editing the agreement shown for people registering to the forum.
function template_edit_agreement()
{
global $context, $settings, $options, $scripturl, $txt;
// Just a big box to edit the text file ;).
echo '
<form action="', $scripturl, '?action=regcenter" method="post">
<table border="0" cellspacing="0" cellpadding="4" align="center" width="80%" class="tborder">
<tr class="titlebg">
<td align="center">', $txt['smf11'], '</td>
</tr>';
// Warning for if the file isn't writable.
if (!empty($context['warning']))
echo '
<tr class="windowbg2">
<td style="color: red; font-weight: bold;" align="center">
', $context['warning'], '
</td>
</tr>';
echo '
<tr class="windowbg2">
<td align="center" style="padding-bottom: 1ex; padding-top: 2ex;">';
// Show the actual agreement in an oversized text box.
echo '
<textarea cols="70" rows="20" name="agreement" style="width: 94%; margin-bottom: 1ex;">', $context['agreement'], '</textarea><br />
<label for="requireAgreement"><input type="checkbox" name="requireAgreement" id="requireAgreement"', $context['require_agreement'] ? ' checked="checked"' : '', ' value="1" /> ', $txt[584], '.</label><br />
<br />
<input type="submit" value="', $txt[10], '" />
<input type="hidden" name="sa" value="agreement" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
function template_edit_reserved_words()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<form action="', $scripturl, '?action=regcenter" method="post">
<table border="0" cellspacing="1" class="bordercolor" align="center" cellpadding="4" width="80%">
<tr class="titlebg">
<td align="center">
', $txt[341], '
</td>
</tr><tr>
<td class="windowbg2" align="center">
<div style="width: 80%;">
<div style="margin-bottom: 2ex;">', $txt[342], '</div>
<textarea cols="30" rows="6" name="reserved" style="width: 98%;">', implode("\\\\n", $context['reserved_words']), '</textarea><br />
<div align="left" style="margin-top: 2ex;">
<label for="matchword"><input type="checkbox" name="matchword" id="matchword" ', $context['reserved_word_options']['match_word'] ? 'checked="checked"' : '', ' class="check" /> ', $txt[726], '</label><br />
<label for="matchcase"><input type="checkbox" name="matchcase" id="matchcase" ', $context['reserved_word_options']['match_case'] ? 'checked="checked"' : '', ' class="check" /> ', $txt[727], '</label><br />
<label for="matchuser"><input type="checkbox" name="matchuser" id="matchuser" ', $context['reserved_word_options']['match_user'] ? 'checked="checked"' : '', ' class="check" /> ', $txt[728], '</label><br /> <label for="matchname"><input type="checkbox" name="matchname" id="matchname" ', $context['reserved_word_options']['match_name'] ? 'checked="checked"' : '', ' class="check" /> ', $txt[729], '</label><br />
</div>
<input type="submit" value="', $txt[10], '" name="save_reserved_names" style="margin: 1ex;" />
</div>
</td>
</tr>
</table>
<input type="hidden" name="sa" value="reservednames" />
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
function template_admin_settings()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<form action="', $scripturl, '?action=regcenter" method="post">
<table border="0" cellspacing="1" cellpadding="4" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center">', $txt['settings'], '</td>
</tr>
<tr class="windowbg2">
<td align="center">';
// Functions to do some nice box disabling dependant on age restrictions.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function checkCoppa()
{
var coppaDisabled = document.getElementById(\\\\'coppaAge_input').value == 0;
document.getElementById(\\\\'coppaType_select').disabled = coppaDisabled;
var disableContacts = coppaDisabled || document.getElementById(\\\\'coppaType_select').options[document.getElementById(\\\\'coppaType_select').selectedIndex].value != 1;
document.getElementById(\\\\'coppaPost_input').disabled = disableContacts;
document.getElementById(\\\\'coppaFax_input').disabled = disableContacts;
document.getElementById(\\\\'coppaPhone_input').disabled = disableContacts;
}
// ]]></script>';
echo '
<table border="0" cellspacing="0" cellpadding="4" align="center" width="100%">
<tr class="windowbg2">
<th width="50%" align="right">
<label for="registration_method_select">', $txt['admin_setting_registration_method'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=registration_method" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<select name="registration_method" id="registration_method_select">
<option value="0"', empty($modSettings['registration_method']) ? ' selected="selected"' : '', '>', $txt['admin_setting_registration_standard'], '</option>
<option value="1"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? ' selected="selected"' : '', '>', $txt['admin_setting_registration_activate'], '</option>
<option value="2"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 2 ? ' selected="selected"' : '', '>', $txt['admin_setting_registration_approval'], '</option>
<option value="3"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3 ? ' selected="selected"' : '', '>', $txt['admin_setting_registration_disabled'], '</option>
</select>
</td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="notify_new_registration_check">', $txt['admin_setting_notify_new_registration'], '</label>:
</th>
<td width="50%" align="left">
<input type="checkbox" name="notify_new_registration" id="notify_new_registration_check" ', !empty($modSettings['notify_new_registration']) ? 'checked="checked"' : '', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="send_welcomeEmail_check">', $txt['admin_setting_send_welcomeEmail'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=send_welcomeEmail" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<input type="checkbox" name="send_welcomeEmail" id="send_welcomeEmail_check"', !empty($modSettings['send_welcomeEmail']) ? ' checked="checked"' : '', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="password_strength_select">', $txt['admin_setting_password_strength'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=password_strength" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<select name="password_strength" id="password_strength_select">
<option value="0"', empty($modSettings['password_strength']) ? ' selected="selected"' : '', '>', $txt['admin_setting_password_strength_low'], '</option>
<option value="1"', !empty($modSettings['password_strength']) && $modSettings['password_strength'] == 1 ? ' selected="selected"' : '', '>', $txt['admin_setting_password_strength_medium'], '</option>
<option value="2"', !empty($modSettings['password_strength']) && $modSettings['password_strength'] == 2 ? ' selected="selected"' : '', '>', $txt['admin_setting_password_strength_high'], '</option>
</select>
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="2" align="center">
<hr />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaAge_input">', $txt['admin_setting_coppaAge'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=coppaAge" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['admin_setting_coppaAge_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="text" name="coppaAge" id="coppaAge_input" value="', !empty($modSettings['coppaAge']) ? $modSettings['coppaAge'] : '', '" size="3" maxlength="3" onkeyup="checkCoppa();" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaType_select">', $txt['admin_setting_coppaType'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=coppaType" onclick="return reqWin(this.href);">?</a>)</span>:
</th>
<td width="50%" align="left">
<select name="coppaType" id="coppaType_select" onchange="checkCoppa();">
<option value="0"', empty($modSettings['coppaType']) ? ' selected="selected"' : '', '>', $txt['admin_setting_coppaType_reject'], '</option>
<option value="1"', !empty($modSettings['coppaType']) && $modSettings['coppaType'] == 1 ? ' selected="selected"' : '', '>', $txt['admin_setting_coppaType_approval'], '</option>
</select>
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaPost_input">', $txt['admin_setting_coppaPost'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=coppaPost" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['admin_setting_coppaPost_desc'], '</div>
</th>
<td width="50%" align="left">
<textarea name="coppaPost" id="coppaPost_input" rows="4" cols="35">', $context['coppaPost'], '</textarea>
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaFax_input">', $txt['admin_setting_coppaFax'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=coppaPost" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['admin_setting_coppaPost_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="text" name="coppaFax" id="coppaFax_input" value="', !empty($modSettings['coppaFax']) ? $modSettings['coppaFax'] : '', '" size="22" maxlength="35" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="coppaPhone_input">', $txt['admin_setting_coppaPhone'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=coppaPost" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['admin_setting_coppaPost_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="text" name="coppaPhone" id="coppaPhone_input" value="', !empty($modSettings['coppaPhone']) ? $modSettings['coppaPhone'] : '', '" size="22" maxlength="35" />
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="2" align="center">
<hr />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="pm_register_enable">', $txt['pm_register_enable'], '</label>:
</th>
<td width="50%" align="left">
<input type="checkbox" name="pm_register_enable" id="pm_register_enable" ', !empty($modSettings['pm_register_enable']) ? 'checked="checked"' : '', ' />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="pm_register_id">', $txt['pm_register_id'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['pm_register_id_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="text" name="pm_register_id" id="pm_register_id" value="', !empty($modSettings['pm_register_id']) ? $modSettings['pm_register_id'] : 0, '" size="9" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="pm_register_from">', $txt['pm_register_from'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['pm_register_from_desc'], '</div>
</th>
<td width="50%" align="left">
<input type="text" name="pm_register_from" id="pm_register_from" value="', !empty($modSettings['pm_register_from']) ? $modSettings['pm_register_from'] : '', '" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="pm_register_subject">', $txt['pm_register_subject'], '</label>:
</th>
<td width="50%" align="left">
<input type="text" name="pm_register_subject" id="pm_register_subject" value="', !empty($modSettings['pm_register_subject']) ? $modSettings['pm_register_subject'] : '', '" />
</td>
</tr><tr class="windowbg2" valign="top">
<th width="50%" align="right">
<label for="pm_register_body">', $txt['pm_register_body'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['pm_register_body_desc'], '</div>
</th>
<td width="50%" align="left">
<textarea name="pm_register_body" id="pm_register_body" rows=5" cols="35">' ,!empty($modSettings['pm_register_body']) ? $modSettings['pm_register_body'] : $txt['pm_register_body_sample'], '</textarea>
</td>
</tr><tr class="windowbg2">
<td width="100%" colspan="3" align="right">
<input type="submit" name="save" value="', $txt[10], '" />
<input type="hidden" name="sa" value="settings" />
</td>
</tr>
</table>';
// Handle disabling of some of the input boxes.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';
if (empty($modSettings['coppaAge']) || empty($modSettings['coppaType']))
echo '
document.getElementById(\\\\'coppaPost_input').disabled = true;
document.getElementById(\\\\'coppaFax_input').disabled = true;
document.getElementById(\\\\'coppaPhone_input').disabled = true;';
if (empty($modSettings['coppaAge']))
echo '
document.getElementById(\\\\'coppaType_select').disabled = true;';
echo '
// ]]></script>
</td>
</tr>
</table>
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
?>
// Recursive function to retrieve avatar files
function getAvatars($directory, $level)
{
global $context, $txt, $modSettings;
$result = array();
// Open the directory..
$dir = dir($modSettings['avatar_directory'] . (!empty($directory) ? '/' : '') . $directory);
$dirs = array();
$files = array();
if (!$dir)
return array();
while ($line = $dir->read())
{
if (in_array($line, array('.', '..', 'blank.gif', 'index.php')))
continue;
if (is_dir($modSettings['avatar_directory'] . '/' . $directory . (!empty($directory) ? '/' : '') . $line))
$dirs[] = $line;
else
$files[] = $line;
}
$dir->close();
// Sort the results...
natcasesort($dirs);
natcasesort($files);
if ($level == 0)
{
$result[] = array(
'filename' => 'blank.gif',
'checked' => in_array($context['member']['avatar']['server_pic'], array('', 'blank.gif')),
'name' => &$txt[422],
'is_dir' => false
);
}
foreach ($dirs as $line)
{
$tmp = getAvatars($directory . (!empty($directory) ? '/' : '') . $line, $level + 1);
if (!empty($tmp))
$result[] = array(
'filename' => htmlspecialchars($line),
'checked' => strpos($context['member']['avatar']['server_pic'], $line . '/') !== false,
'name' => '[' . htmlspecialchars(str_replace('_', ' ', $line)) . ']',
'is_dir' => true,
'files' => $tmp
);
unset($tmp);
}
foreach ($files as $line)
{
$filename = substr($line, 0, (strlen($line) - strlen(strrchr($line, '.'))));
$extension = substr(strrchr($line, '.'), 1);
// Make sure it is an image.
if (strcasecmp($extension, 'gif') != 0 && strcasecmp($extension, 'jpg') != 0 && strcasecmp($extension, 'jpeg') != 0 && strcasecmp($extension, 'png') != 0 && strcasecmp($extension, 'bmp') != 0)
continue;
$result[] = array(
'filename' => htmlspecialchars($line),
'checked' => $line == $context['member']['avatar']['server_pic'],
'name' => htmlspecialchars(str_replace('_', ' ', $filename)),
'is_dir' => false
);
if ($level == 1)
$context['avatar_list'][] = $directory . '/' . $line;
}
return $result;
}
Any help is highly appreciated. Thank you!
Sincerly,
Christian
Or is it that this Mod can't be made to work with RC2 at all? Any help is highly appreciated. Thank you!
It seems you did not copy the getavatars function to the register.template.php or register.php in the sources folder.
Helo,
here is the solution for the problem (with RC2):
The instalation wants to add the getavatars function after ?> in register.template.php but in order to have it work properly it needs to be added before it.
Once you do this it will work just fine with RC2.
Thanks for this fine mod!
I have two questions, requests though:
1. What code change is neccessary to make the avatar select optional instead of requiring a user to select one
2. An upload function for your own avatar picture would be very nice, too
Regards,
Christian
1. You would have to change the code in Register.php and remove the check the mod added.
Thank you!
Do you also think that an upload option will be coming in the future?
I don't see that happening I am busy with other mods.
where can i setting up this mod after installation?
Mod appears on the register.template.php of the default theme.
i mean in the forum admin panel
There is no option in the admin panel for it.
I installed it and it works fine, but every time someone registers, my error log is filling itself with loads and loads of errors
8: Undefined index: member
Bestand: /var/www/t/theflyingdoctorsforum.nl/HTML/Forum/Themes/default/languages/Profile.dutch.php (eval?)
Regel: 908
Anyway...tried to uninstall the mod, but got an error there as well. Then I upgraded to SMF 1.1.2 and now the option to uninstall is completely gone. Any advice on how to uninstall this mod?
Anyone?
(sorry...I hate to bump, but my error log is just flooding with each new registry)
I don't have a fix for this at this time. You can disable error logging or unistall the mod.
yes, but the thing is: there's no uninstall option visible anymore since the upgrade from 1.1.1 to 1.1.2, so I've got no clue how to do an uninstall now...
[edit] re-reading the topic i see my question was already asked - upload own avatar feature. sorry.
Anyone knows how I can safely uninstall this mod, cause it gives me this error:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.xs4all.nl%2F%7Eicicle%2Ferror.png&hash=2b58fcdf06cc19078ee9828cbc774174abb32ef7)
there is a problem using IE not firefox...
the image of avatar not showed in IE
No it's fine now, working perfectly, can test it on my site if you wan't.
Hello,
I have installed a new SMF board and no longer recall what code must be changed in order to make the selecting of an avatar OPTIONAL (instead of being required). Could someone please kindly let me know?
Thank you!
Nobody?
where is the admin for this mod?
anyone?
@ twinklewitch
You will need to reverse the process of a manual installation of the mod editing the files manually.
Please read:
http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)
...and the following may also help:
http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
@ tonzi
There is no admin screen for this mod as vbgamer45 already answered in this topic...please read the topic before posting questions.
@ samurai-lupin
Your question is also already answered in this topic.
how come it dont appear during registration.
@ tonzi
If you are using a custom theme you will need to do a manual installation of the mod. If it isn't working for you in the SMF Default theme please do a manual check to ensure that the mod was applied properly as per the manual installation process and edit accordingly if required.
http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)
You may also find the following useful:
http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
How would I go about also adding a box to upload an avatar and a place to put a link to an avatar? I would like them to have a wider variety then just the avatars I provide. :)
Brianjw
TP 0.9.8
SMF 1.1.3
I can select / view the avatar pics on the registration page but after registration the avatar doesnt appear, it shows as a box with a red x... i have to go in and fix it through the profile...
SMF 1.1.4
not sure if this a bug or not but after installing this mod, there is a problem for us.
Our Avatars are in two folders, one with US Flags and the other with World Flags.
To thel eft it shows:
Avatar Select:
Please select an avatar.
The to the right:no pic, USA FLAGS. WORLD FLAGS.When you click on the USA FLAGS, no problem, a drop down wndow with the selections appears to the right.
However, when you click on the WORLD FLAGS
Hello guys, I have a problem, I don't want to force everyone to select an avatar, so is it possible to replace the (no pic) for the default avatar, which is noava.gif for example.
I think I'm loosing too many members for forcing them to select a picture, they just get tired and wont end registration.
You would need to remove the following from
Sources/Sub-Members.php
if (empty($regOptions['avatar']) && $_REQUEST['action'] == 'register2')
fatal_error('An avatar is required! Please select one.', false);
Quote from: brianjw on August 20, 2007, 11:13:27 AM
How would I go about also adding a box to upload an avatar and a place to put a link to an avatar? I would like them to have a wider variety then just the avatars I provide. :)
Brianjw
same can someone please provide the code for that?
If they're going to be required to select an avatar, more than the avatars we store should be allowed to be selected on register.
I like this mod.
please can you make a more improved version of this mod which makes it compulsory to complete all the profile fields before a user can register.
That would be a different mod. I would talk to the profile fileds mod creator I thoght that mod did that already.
Quote from: vbgamer45 on December 18, 2007, 09:22:20 PM
That would be a different mod. I would talk to the profile fileds mod creator I thoght that mod did that already.
I was saying about the default profile features already in smf like
avatar
gender
age
location
it would be nice to make them compulsory
and it you want to go even further and support profile fields mod or ultimate profile fields mod then it would be just great.
an option given in the admin area means all profile fields will be given in the admin area, where the admin will be given a choice to checkmark the profile fields which the admin wants to make compulsory and uncheckmark the profile fields which are not compulsory to necessary to register and so also will be not seen on the register page.
None of us can just take over another developers mod as you suggest...it would be extremely unfair, to say nothing of plain rude, to try to do so unless the mod were obviously abandoned and one had gone through the official SMF channels to take it over or the original developer had offered it for adoption.
The Ultimate Profile mod you mention is not even an official mod and it is coded so that it is an unsafe mod that opens users forums to attack...I would advise, strongly actually, against its use.
Quote from: TrueSatan on December 19, 2007, 04:27:24 AM
None of us can just take over another developers mod as you suggest...it would be extremely unfair, to say nothing of plain rude, to try to do so unless the mod were obviously abandoned and one had gone through the official SMF channels to take it over or the original developer had offered it for adoption.
The Ultimate Profile mod you mention is not even an officia mod and it is coded so that it is an unsafe mod that opens users forums to attack...I would advise, strongly actually, against its use.
please try to understand wot I say
I am not saying take over something to vbgamer45
I am just saying that I have many members who have not posted a single post and their profiles are empty.
so I am just saying that make some profile fields compulsory which are provided by smf by default I donot want empty profiles of members
also if the other mod authors give permissions then also make your mod compatible with others.
also the profile fields mod is default in smf 2.0 which will release soon.
Quote from: brianjw on August 20, 2007, 11:13:27 AM
How would I go about also adding a box to upload an avatar and a place to put a link to an avatar? I would like them to have a wider variety then just the avatars I provide. :)
Brianjw
Quote from: brianjw on December 19, 2007, 01:03:22 PM
Quote from: brianjw on August 20, 2007, 11:13:27 AM
How would I go about also adding a box to upload an avatar and a place to put a link to an avatar? I would like them to have a wider variety then just the avatars I provide. :)
Brianjw
I also agree.
are our request accepted.
what?
Quote from: falguni1 on December 18, 2007, 01:38:37 AM
I like this mod.
please can you make a more improved version of this mod which makes it compulsory to complete all the profile fields before a user can register.
will you include these features.
This is a completely different mod you're wanting. This mod adds avatar select and avatar select only. If you wish to request a Mod, make a post in the Mod Requests board as this has nothing to do with needing support for the avatar select mod which is what this topic is about.
brianjw
I dowloaded the mod and wanted to manually apply the modifications to my forum, with a little help from Package Parser. Unfortunately the zip-file I downloaded creates errors when used with Package Parser.
Here is a link to package parser. (http://www.adrevenueshare.com/parser)
Here is what the page displays when opening AvatarSelect.zip
General Package Information
This is general information about the package, such as the package ID and name.
Package ID: vbgamer45:AvatarSelect
Package name: AvatarSelect
Package version: 1.1.2
Package type: modification
Installation instructions for SMF versions: 1.1.4
Readme:
*******************************
Avatar Select
By: vbgamer45
http://www.smfhacks.com
*******************************
Mod Information:
For SMF 1.1.2
Adds a avatar select to the user registration page.
Other mods can be found at SMFHacks.com
Include:
SMF Trader System
SMF Archive
SMF Staff
SMFHacks package server address is:
http://www.smfhacks.com
Modifications to SMF files
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 39: parser error : Opening and ending tag mismatch: file line 6 and operation in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: </operation> in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 155: parser error : Opening and ending tag mismatch: modification line 3 and file in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: </file> in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 156: parser error : Extra content at the end of the document in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: <file name="$sourcedir/Register.php"> in /home/ars/public_html/package.php on line 431
Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/ars/public_html/package.php on line 431
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/ars/public_html/package.php:431 Stack trace: #0 /home/ars/public_html/package.php(431): SimpleXMLElement->__construct('<?xml version="...') #1 /home/ars/public_html/package.php(400): parseModificationXML('/tmp/AvatarSele...', Object(SimpleXMLElement), 'all') #2 /home/ars/public_html/package.php(75): parsePackageInfoXML('/tmp/package-in...', 'install', 'all') #3 /home/ars/public_html/package.php(754): parseArchive('/tmp/phpZMGebT', 'install', 'all') #4 {main} thrown in /home/ars/public_html/package.php on line 431
Could this please be fixed? Thank you :)
Regards Tom
Fixed redownload the mod.
vbgamer45, have you ever thought of adding a place for the people who are registering to be able to link to a image or browse for an image in this mod? I think this is a good idea and would make it a little more of a variety around my forum of avatars because my users don't edit there profiles very much.
Add the suggestion to my mod tracker
http://www.smfhacks.com/index.php?action=modtracker
Quote from: brianjw on August 20, 2007, 11:13:27 AM
How would I go about also adding a box to upload an avatar and a place to put a link to an avatar? I would like them to have a wider variety then just the avatars I provide. :)
Brianjw
Indeed.
This would be a great add to this mod
Hello,
can you please let me know what code exactly I need to remove from register.php to make the avatar selection optional uppon registration? Thank you!
Christian
Nobody?
Hello? Anybody there?
How can I make it so it isn't required to select an avatar and they can just select (no picture)?
You would need to remove the check that see's if the avatar is required on upload then you can select no picture and it will be fine.
Quote from: brianjw on August 20, 2007, 11:13:27 AM
How would I go about also adding a box to upload an avatar and a place to put a link to an avatar? I would like them to have a wider variety then just the avatars I provide. :)
Brianjw
Has anybody accomplished this yet, and just hasnt posted it?
Hasn't gotten anywhere. But someone said something about copy and pasting something in the forum profile section and putting in register page. I am going to try that later...
Yea.. I was gonna try that also, but I have an issue Im solving at the mo, so will either wait till that is taken care of, or until someone else, such as yourself, has done it.
Thanks for the reply mate :)
If I do mange to figure out how to make it work. I'll create a mod for it..
hi all
I cannot see a changelog, I have the 1.1.2 version, should I update it to 1.1.3?
there are security improvement?
nice mod, thx
No security issues probably just a minor fix.
will u update this mod for smf 2 beta 3 ?
Probably not will update it for SMF 2.0 once it is released.
I can't seem to uninstall this mod.
I have made it so that people can still register on the forum, they just don't choose an avatar, but the mod is still in the packages and I can not uninstall it because it comes up with this
2. Execute Modification ./Sources/Register.php Test failed
3. Execute Modification ./Sources/Subs-Members.php Test failed
I edited the subs-member.php file I took out a line of code as someone said in this thread it makes people not have to choose an avatar...but I can't delete the mod, just wondering what I have done, and I want to be careful because earlier people couldn't register to my forum.
here is the register section of my forum
http://dvdholocaust.com/forum/index.php?action=register
Hai vbgamer45,
What a great mod!
I'm very happy with it, but there is one little problem, when i make in my admin a new member (registration).
But there i can't choose a avatar. When i make a new member its works fine, but in my errormessenger i found:
http://www.website.com/?/action,regcenter.html
8: Undefined index: avatar
Bestand: /home/httpd/vhosts/website.com/httpdocs/Sources/Subs-Members.php
Regel: 725
in the Subs-Member 725 i found:
'avatar' => "'$regOptions[avatar]'",
Maybe you know what the problem is.
Thanx a lot
That would be if a bot or someone did not select an avatar
if have a register page with the avatar mod.
It works perfect on the register, when some not select an avatar then it gives an error message to the member (please choose a avatar).
It works oke.
But what i mean, in my admin i can handly make a new member (admin>categorie members>Registration). There i see not a avatar box. When i fill the form en send it, it makes a new member registration, en it works, but there is no avatar box there en thats the reason why it give the error (he can't find a avatar).
How can i fix it?
That currently is not part of the mod you would need to edit that admin page.
but can i fix it maybe..
Yes you could you would need to study the mod's code and then make the changes to that file in the admin side.
Great mod thank you so much this has solved all my problems very easy to install no edits thanks again
can anyone help with this on the registration page it apears strange.
When no avatar is selected all apears ok but when you start selecting an avatar and the avatar is displayed, the words AVATAR SELECT: jump behing the avatar picture.
Please see my attached images, the first one is with no avatar selected and the second with an avatar selected.
Also please note that it was doing this even befor i added the other mods
Simple and effective! thanks Buddy.
Is this compatible with SMF 1.1.7? If so, will it install automatically through packages and will it now allow the user NOT to select an avatar when the screen shows on registration? Thanks! This is an awesome mod if it'll work on my 1.1.7!
Yes it will work on SMF 1.1.7
It would be awesome to have this mod if and only if it allowed a user to pick <No Avatar> upon registration as well. I installed the generic Avatar (great mod!) that will give generic avatars to people that haven't selected one at all - the avatars are classy and non-offensive... not everyone would like to have an avatar of a musician, actor, etc. Just a suggestion!
Quote from: lobo777 on November 25, 2008, 09:30:32 AM
It would be awesome to have this mod if and only if it allowed a user to pick <No Avatar> upon registration as well.
In your avatar folder, the one named blank.gif is the "no avatar" selection.
You could upload any default avatar you would like, and rename it to blank.gif, then you will have your no avatar for automatic selection.
There are a few options one could use, and the generic avatar mod you're using is great also.
There is even an older mod which I still use(as Ive modified it to my needs) named "Default Avatar" which basically does the same thing.
There are few limits to what you could do/achieve.
Any chance you can get this to work for 2.0RC1
Once SMF 2.0 goes final
Possible to add user be able to upload their own or use a link to a avatar like in their profiles?
Is this SMF 2.0RC1 ready ?
Thanks
Gibby
Bump for above post...
Is it ready for 2.0RC1 yet?
No but will be for SMF 2.0 final
Cant wait till it comes out for 2.0 RC1-1 :D
Any idea on a release date?
Planning for SMF 2.0 final.
Doh ...ok I will porb just modify the current one to work then :D
Quote from: vbgamer45 on May 23, 2009, 09:10:21 PM
Planning for SMF 2.0 final.
Looking forward for this release! :D I'm waiting for it ;D Great mod! 8)
Quote from: Penelope on July 17, 2009, 03:08:54 PM
Quote from: vbgamer45 on May 23, 2009, 09:10:21 PM
Planning for SMF 2.0 final.
Looking forward for this release! :D I'm waiting for it ;D Great mod! 8)
Wish Granted
Updated the mod for SMF 2.0
Thanks for the update vgamer, but I tried out the mod on my SMF 2.0 RC1.2 test site and got the following message after trying to register:
Fatal error: Cannot redeclare getavatars() (previously declared in /home/mysite/public_html/mysite.com/forum/Sources/Register.php:846) in /home/mysite/public_html/mysite.com/forum/Sources/Profile-Modify.php on line 1613
Not sure what it means, but after I uninstalled the mod I was able to click on 'register' without this error message.
Quote from: RoarinRow on July 19, 2009, 12:21:21 PM
Thanks for the update vgamer, but I tried out the mod on my SMF 2.0 RC1.2 test site and got the following message after trying to register:
Fatal error: Cannot redeclare getavatars() (previously declared in /home/mysite/public_html/mysite.com/forum/Sources/Register.php:846) in /home/mysite/public_html/mysite.com/forum/Sources/Profile-Modify.php on line 1613
Not sure what it means, but after I uninstalled the mod I was able to click on 'register' without this error message.
Fixed reuploaded on modsite
Quote from: vbgamer45 on July 19, 2009, 10:50:10 AM
Quote from: Penelope on July 17, 2009, 03:08:54 PM
Quote from: vbgamer45 on May 23, 2009, 09:10:21 PM
Planning for SMF 2.0 final.
Looking forward for this release! :D I'm waiting for it ;D Great mod! 8)
Wish Granted
Updated the mod for SMF 2.0
Super!! 8) Thanks for the update! 8) :D Your the best vbgamer! :D
Quote from: vbgamer45 on July 19, 2009, 12:30:34 PM
Quote from: RoarinRow on July 19, 2009, 12:21:21 PM
Thanks for the update vgamer, but I tried out the mod on my SMF 2.0 RC1.2 test site and got the following message after trying to register:
Fatal error: Cannot redeclare getavatars() (previously declared in /home/mysite/public_html/mysite.com/forum/Sources/Register.php:846) in /home/mysite/public_html/mysite.com/forum/Sources/Profile-Modify.php on line 1613
Not sure what it means, but after I uninstalled the mod I was able to click on 'register' without this error message.
Fixed reuploaded on modsite
Excellent, the update worked! Thank you!
Awesome Mod for sure. I have a suggestion or request, how ever you would like to put it.
When I Register A new member through the Admin Panel an error will be in the logs about Undefined index: avatar because there is no avatar select there.
How about adding that to the ACP Register member and have the option to turn it off or on as in the Register page. This way no errors will result out of this.
As I said more of a suggestion than anything.
Are you planning to update this for RC2 anytime soon? If not please say so, so I can update it myself.
Attempted to but will revisit this mod at a later time took more changes that I thought to upgrade it to RC2
Just looked into this and it should work by simply adding 'avatar_choice' to 'registration_fields' in the settings table. However 2.0 RC2 has some problems which screw that up. The functions it calls assume you are in your already created profile and gives errors. I hacked it a bit to remove the errors but it still doesn't work as it should and I'm to tired to bother looking into this more.
I should probably post a bug report if one hasn't already been posted....
Added support for SMF 2.0 RC2!
Updated for SMF 2.0 RC3!
Russian translation:
// Begin Avatar Select Text Strings
$txt['avatarselect_error_req'] = 'Вы должны выбрать аватар для своей учётной записи!';
$txt['avatarselect_avatar'] = 'Выбор аватара:';
$txt['avatarselect_pleaseselect'] = 'Пожалуйста, выберите аватар.';
// END Avatar Select Text Strings
Thanks for the translation!!!
Is it possible add this option to select one avatar?
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=382311.0;attach=145700;image)
Im use SMF 2.0 RC3
Not possible
People who use mods "AvatarSelect" along with "Default Avatar" must delete this line in the file "Subs-members.php"
Quote
// No avatar?! You need to get an avatar!
if (empty($regOptions['avatar']) && $_REQUEST['action'] == 'register2')
fatal_error($txt['avatarselect_error_req'], false);
Because if you do not fail in the new user registration ... Greetings!
Thanks for the tip!
Great Mod I really love it.
It was working perfect with Default theme but since I changed to custom theme and registering for account;
- After Selecting and proceeding it says AVATAR IS REQUIRED TO SELECT. even I already selected avatar.
I parsed Mod to install it manually but this theme use all default theme files which need modification for this mod.
I will highly appreciate for help
Thanks
I have uninstalled and installed it again manually. This works.
Glad you got it working
Quote from: MaNaRa on May 19, 2010, 10:59:23 AM
Is it possible add this option to select one avatar?
(https://www.simplemachines.org/community/index.php?action=dlattach;topic=382311.0;attach=145700;image)
Im use SMF 2.0 RC3
This would be a great idea, shame you said it's not possible bvull, Great mod :).
Translation by MOD Translator SirtLanVadisi in turkish and turkish-utf8 languages
<file name="$themedir/languages/Modifications.turkish.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Avatar Select MOD Translation by SirtLanVadisi.NeT
$txt['avatarselect_error_req'] = 'Bir Avatar gerekli! Lütfen bir Avatar seçiniz.';
$txt['avatarselect_avatar'] = 'Avatar seçiniz:';
$txt['avatarselect_pleaseselect'] = 'Lütfen bir Avatar seçin.';
// END Avatar Select MOD Translation by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.turkish-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Avatar Select MOD Translation by SirtLanVadisi.NeT
$txt['avatarselect_error_req'] = 'Bir Avatar gerekli! Lütfen bir Avatar seçiniz.';
$txt['avatarselect_avatar'] = 'Avatar seçiniz:';
$txt['avatarselect_pleaseselect'] = 'Lütfen bir Avatar seçin.';
// END Avatar Select MOD Translation by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
Translation by MOD Translator SirtLanVadisi in german and german-utf8 languages
<file name="$themedir/languages/Modifications.german.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Avatar Select MOD Translation by SirtLanVadisi.NeT
$txt['avatarselect_error_req'] = 'Ein Avatar ist erforderlich! Bitte wählen Sie ein Avatar aus.';
$txt['avatarselect_avatar'] = 'Ein Avatar wählen :';
$txt['avatarselect_pleaseselect'] = 'Bitte ein Avatar wählen.';
// END Avatar Select MOD Translation by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.german-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Avatar Select MOD Translation by SirtLanVadisi.NeT
$txt['avatarselect_error_req'] = 'Ein Avatar ist erforderlich! Bitte wählen Sie ein Avatar aus.';
$txt['avatarselect_avatar'] = 'Ein Avatar wählen :';
$txt['avatarselect_pleaseselect'] = 'Bitte ein Avatar wählen.';
// END Avatar Select MOD Translation by SirtLanVadisi.NeT
]]></add>
</operation>
</file>
There is Hardcoded Text in Register.template.php
<div class="smalltext">Please select an avatar.</div>
I installed this, and a blank box pops up at the register screen, there's no choices for avatars.
UPDATE:
I had to change the avatar directory.
Quote from: xxwckdxx on March 26, 2009, 04:00:59 AM
Possible to add user be able to upload their own or use a link to a avatar like in their profiles?
it would be cool if this mod added this feature for those of us who let users upload their own avatars
Quote from: NHWD on April 02, 2011, 05:10:37 AM
Quote from: xxwckdxx on March 26, 2009, 04:00:59 AM
Possible to add user be able to upload their own or use a link to a avatar like in their profiles?
it would be cool if this mod added this feature for those of us who let users upload their own avatars
Um, they could pick any avatar when registering and then once a member, they would be able to upload their own.
Just my two cents, O:)
Cloud 8)
Okay,
So I upgraded to ver 2.0 Final and of course, wiped out the mods, so with this one, if the default theme is default, do I really need to do anything in case a member selects to use another theme?
Would they lose their avatar when they switch er something weird like that? ???
Thanks in advance.
Be Well,
Cloud 8)
Hey here is an idea I got earlier after installing this mod,that being an option to allow members to upload their own avatar on register.
I think that would make this mod x2 better.
How to translate to Dutch ?
And how remove the no avater ?
Translate the text added by avatar mod to themes/default/languages/modifications.english.php
Quote from: vbgamer45 on August 19, 2011, 01:21:20 PM
Translate the text added by avatar mod to themes/default/languages/modifications.english.php
Yes that was it vbgamer45.
Thnx for a great mod.
;)
Glad you enjoy it!
Hi, thanks for the great mod (avatar select on register). I am using SMF 1.1.15. Just wondering if anyone cares to add 3 additional features please?
DEFAULT AVATAR
Currently the first selection is "(No pic)" and if the user forgets to choose an avatar, they are then reminded to go back and pick one. I'd like the selection bar to be by default on a particular avatar already. So even if the user doesn't move the bar to other avatars, when they checkout they are automatically assigned that default avatar.
AUTOPREVIEW AND CLICKABLE ALL AVATARS ICONS
I have a database of 10 avatar folders and each folder has about 100 avatars. So in total there are 1000 avatars for my user to choose from. Can you make an extra box or window that will show mini icons of all the avatars for a particular group. For example if the user selects "Musicians", the mod will show all 100 mini pictures lined up 10 rows by 10 columns (eg. all force scaled to sizes 20x20) at once. The user can then hover their mouse over any of the icons shown, and a big version will be shown (like in Google Images). When the user clicks on the mini picture they like, that will select it automatically, plus also shows the enlarged version on the left.
FORCE SCALE
My avatars are of different sizes, some 100x100, some 65x65, others 125x125, 200x200. Can you have a feature to automatically reject all avatars <100x100 and force scale all avatars >100x100 to display as exactly 100x100 in profile please?
This is already a very good mod. Would be even better if has these additional features. Thanks!
i installed this mod on 1.1.15 and my registration page died, i uninstall it and select avatar remains on the registration page, users can not select coz its blank and without that no registration. please how to i remove it. (from cpanel or from where?)
Get manual uninstall instructions from mod site page for this mod and make changes to file to ensure removal.
its not working, please if you could guide me.
Quote from: vbgamer45 on November 02, 2011, 12:06:11 PM
Get manual uninstall instructions from mod site page for this mod and make changes to file to ensure removal.
please show me how to do it, p lease
This is an excellent mod to keep spambots from registering automatically on your forums. I tried it and it works so far. :) Thanks, vbgamer45.
i installed this mod on 1.1.15 and my registration page died, i uninstall it and select avatar remains on the registration page, users can not select coz its blank and without that no registration. please how to i remove it. (from cpanel or from where?)
Goto http://mods.simplemachines.org/index.php?mod=368
Get manual install instructions and reverse it
Can someone help me, after updated to SMF 202 from 201 i have no avatar/image visible on register form?
I can't come on any idea why it's not show up when select an avatar, the list is there but no image
on the left side as before?
Thanks in advance...
You may have to reinstall the mod depending on your upgraded your forum.
I have uninstalled/installed and try to look for errors but can't find any, i'm no specialist in this codes :(
I'll post you the subs-members.php because in the installation process it says it failed, but to me
this file looks okay. I would appreciate if you take a look on it, the avatar image is still missing
from the register form?
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines http://www.simplemachines.org
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0.1
*/
if (!defined('SMF'))
die('Hacking attempt...');
/* This file contains some useful functions for members and membergroups.
void deleteMembers(array $users, bool check_not_admin = false)
- delete of one or more members.
- requires profile_remove_own or profile_remove_any permission for
respectively removing your own account or any account.
- non-admins cannot delete admins.
- changes author of messages, topics and polls to guest authors.
- removes all log entries concerning the deleted members, except the
error logs, ban logs and moderation logs.
- removes these members' personal messages (only the inbox), avatars,
ban entries, theme settings, moderator positions, poll votes, and
karma votes.
- updates member statistics afterwards.
int registerMember(array options, bool return_errors)
- registers a member to the forum.
- returns the ID of the newly created member.
- allows two types of interface: 'guest' and 'admin'. The first
includes hammering protection, the latter can perform the
registration silently.
- the strings used in the options array are assumed to be escaped.
- allows to perform several checks on the input, e.g. reserved names.
- adjusts member statistics.
- if an error is detected will fatal error on all errors unless return_errors is true.
bool isReservedName(string name, int id_member = 0, bool is_name = true, bool fatal = true)
- checks if name is a reserved name or username.
- if is_name is false, the name is assumed to be a username.
- the id_member variable is used to ignore duplicate matches with the
current member.
array groupsAllowedTo(string permission, int board_id = null)
- retrieves a list of membergroups that are allowed to do the given
permission.
- if board_id is not null, a board permission is assumed.
- takes different permission settings into account.
- returns an array containing an array for the allowed membergroup ID's
and an array for the denied membergroup ID's.
array membersAllowedTo(string permission, int board_id = null)
- retrieves a list of members that are allowed to do the given
permission.
- if board_id is not null, a board permission is assumed.
- takes different permission settings into account.
- takes possible moderators (on board 'board_id') into account.
- returns an array containing member ID's.
int reattributePosts(int id_member, string email = false, string membername = false, bool add_to_post_count = false)
- reattribute guest posts to a specified member.
- does not check for any permissions.
- returns the number of successful reattributed posts.
- if add_to_post_count is set, the member's post count is increased.
void BuddyListToggle()
- add a member to your buddy list or remove it.
- requires profile_identity_own permission.
- called by ?action=buddy;u=x;session_id=y.
- redirects to ?action=profile;u=x.
void populateDuplicateMembers(&array members)
// !!!
*/
// Delete a group of/single member.
function deleteMembers($users, $check_not_admin = false)
{
global $sourcedir, $modSettings, $user_info, $smcFunc;
// Try give us a while to sort this out...
@set_time_limit(600);
// Try to get some more memory.
if (@ini_get('memory_limit') < 128)
@ini_set('memory_limit', '128M');
// If it's not an array, make it so!
if (!is_array($users))
$users = array($users);
else
$users = array_unique($users);
// Make sure there's no void user in here.
$users = array_diff($users, array(0));
// How many are they deleting?
if (empty($users))
return;
elseif (count($users) == 1)
{
list ($user) = $users;
if ($user == $user_info['id'])
isAllowedTo('profile_remove_own');
else
isAllowedTo('profile_remove_any');
}
else
{
foreach ($users as $k => $v)
$users[$k] = (int) $v;
// Deleting more than one? You can't have more than one account...
isAllowedTo('profile_remove_any');
}
// Get their names for logging purposes.
$request = $smcFunc['db_query']('', '
SELECT id_member, member_name, CASE WHEN id_group = {int:admin_group} OR FIND_IN_SET({int:admin_group}, additional_groups) != 0 THEN 1 ELSE 0 END AS is_admin
FROM {db_prefix}members
WHERE id_member IN ({array_int:user_list})
LIMIT ' . count($users),
array(
'user_list' => $users,
'admin_group' => 1,
)
);
$admins = array();
$user_log_details = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
if ($row['is_admin'])
$admins[] = $row['id_member'];
$user_log_details[$row['id_member']] = array($row['id_member'], $row['member_name']);
}
$smcFunc['db_free_result']($request);
if (empty($user_log_details))
return;
// Make sure they aren't trying to delete administrators if they aren't one. But don't bother checking if it's just themself.
if (!empty($admins) && ($check_not_admin || (!allowedTo('admin_forum') && (count($users) != 1 || $users[0] != $user_info['id']))))
{
$users = array_diff($users, $admins);
foreach ($admins as $id)
unset($user_log_details[$id]);
}
// No one left?
if (empty($users))
return;
// Log the action - regardless of who is deleting it.
$log_inserts = array();
foreach ($user_log_details as $user)
{
// Integration rocks!
call_integration_hook('integrate_delete_member', array($user[0]));
// Add it to the administration log for future reference.
$log_inserts[] = array(
time(), 3, $user_info['id'], $user_info['ip'], 'delete_member',
0, 0, 0, serialize(array('member' => $user[0], 'name' => $user[1], 'member_acted' => $user_info['name'])),
);
// Remove any cached data if enabled.
if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
cache_put_data('user_settings-' . $user[0], null, 60);
}
// Do the actual logging...
if (!empty($log_inserts) && !empty($modSettings['modlog_enabled']))
$smcFunc['db_insert']('',
'{db_prefix}log_actions',
array(
'log_time' => 'int', 'id_log' => 'int', 'id_member' => 'int', 'ip' => 'string-16', 'action' => 'string',
'id_board' => 'int', 'id_topic' => 'int', 'id_msg' => 'int', 'extra' => 'string-65534',
),
$log_inserts,
array('id_action')
);
// Make these peoples' posts guest posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:guest_id}, poster_email = {string:blank_email}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'blank_email' => '',
'users' => $users,
)
);
$smcFunc['db_query']('', '
UPDATE {db_prefix}polls
SET id_member = {int:guest_id}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
// Make these peoples' posts guest first posts and last posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}topics
SET id_member_started = {int:guest_id}
WHERE id_member_started IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
$smcFunc['db_query']('', '
UPDATE {db_prefix}topics
SET id_member_updated = {int:guest_id}
WHERE id_member_updated IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
$smcFunc['db_query']('', '
UPDATE {db_prefix}log_actions
SET id_member = {int:guest_id}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
$smcFunc['db_query']('', '
UPDATE {db_prefix}log_banned
SET id_member = {int:guest_id}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
$smcFunc['db_query']('', '
UPDATE {db_prefix}log_errors
SET id_member = {int:guest_id}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
// Delete the member.
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}members
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
// Delete the logs...
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_actions
WHERE id_log = {int:log_type}
AND id_member IN ({array_int:users})',
array(
'log_type' => 2,
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_boards
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_comments
WHERE id_recipient IN ({array_int:users})
AND comment_type = {string:warntpl}',
array(
'users' => $users,
'warntpl' => 'warntpl',
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_group_requests
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_karma
WHERE id_target IN ({array_int:users})
OR id_executor IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_mark_read
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_notify
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_online
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_subscribed
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_topics
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}collapsed_categories
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
// Make their votes appear as guest votes - at least it keeps the totals right.
//!!! Consider adding back in cookie protection.
$smcFunc['db_query']('', '
UPDATE {db_prefix}log_polls
SET id_member = {int:guest_id}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
// Delete personal messages.
require_once($sourcedir . '/PersonalMessage.php');
deleteMessages(null, null, $users);
$smcFunc['db_query']('', '
UPDATE {db_prefix}personal_messages
SET id_member_from = {int:guest_id}
WHERE id_member_from IN ({array_int:users})',
array(
'guest_id' => 0,
'users' => $users,
)
);
// They no longer exist, so we don't know who it was sent to.
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}pm_recipients
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
// Delete avatar.
require_once($sourcedir . '/ManageAttachments.php');
removeAttachments(array('id_member' => $users));
// It's over, no more moderation for you.
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}moderators
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}group_moderators
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
// If you don't exist we can't ban you.
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}ban_items
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
// Remove individual theme settings.
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}themes
WHERE id_member IN ({array_int:users})',
array(
'users' => $users,
)
);
// These users are nobody's buddy nomore.
$request = $smcFunc['db_query']('', '
SELECT id_member, pm_ignore_list, buddy_list
FROM {db_prefix}members
WHERE FIND_IN_SET({raw:pm_ignore_list}, pm_ignore_list) != 0 OR FIND_IN_SET({raw:buddy_list}, buddy_list) != 0',
array(
'pm_ignore_list' => implode(', pm_ignore_list) != 0 OR FIND_IN_SET(', $users),
'buddy_list' => implode(', buddy_list) != 0 OR FIND_IN_SET(', $users),
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$smcFunc['db_query']('', '
UPDATE {db_prefix}members
SET
pm_ignore_list = {string:pm_ignore_list},
buddy_list = {string:buddy_list}
WHERE id_member = {int:id_member}',
array(
'id_member' => $row['id_member'],
'pm_ignore_list' => implode(',', array_diff(explode(',', $row['pm_ignore_list']), $users)),
'buddy_list' => implode(',', array_diff(explode(',', $row['buddy_list']), $users)),
)
);
$smcFunc['db_free_result']($request);
// Make sure no member's birthday is still sticking in the calendar...
updateSettings(array(
'calendar_updated' => time(),
));
updateStats('member');
}
function registerMember(&$regOptions, $return_errors = false)
{
global $scripturl, $txt, $modSettings, $context, $sourcedir;
global $user_info, $options, $settings, $smcFunc;
loadLanguage('Login');
// We'll need some external functions.
require_once($sourcedir . '/Subs-Auth.php');
require_once($sourcedir . '/Subs-Post.php');
// Put any errors in here.
$reg_errors = array();
// Registration from the admin center, let them sweat a little more.
if ($regOptions['interface'] == 'admin')
{
is_not_guest();
isAllowedTo('moderate_forum');
}
// If you're an admin, you're special ;).
elseif ($regOptions['interface'] == 'guest')
{
// You cannot register twice...
if (empty($user_info['is_guest']))
redirectexit();
// Make sure they didn't just register with this session.
if (!empty($_SESSION['just_registered']) && empty($modSettings['disableRegisterCheck']))
fatal_lang_error('register_only_once', false);
}
// What method of authorization are we going to use?
if (empty($regOptions['auth_method']) || !in_array($regOptions['auth_method'], array('password', 'openid')))
{
if (!empty($regOptions['openid']))
$regOptions['auth_method'] = 'openid';
else
$regOptions['auth_method'] = 'password';
}
// No name?! How can you register with no name?
if (empty($regOptions['username']))
$reg_errors[] = array('lang', 'need_username');
// No avatar?! You need to get an avatar!
if (empty($regOptions['avatar']) && $_REQUEST['action'] == 'register2')
fatal_error($txt['avatarselect_error_req'], false);
// Spaces and other odd characters are evil...
$regOptions['username'] = preg_replace('~[\t\n\r\x0B\0' . ($context['utf8'] ? ($context['server']['complex_preg_chars'] ? '\x{A0}' : "\xC2\xA0") : '\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $regOptions['username']);
// Don't use too long a name.
if ($smcFunc['strlen']($regOptions['username']) > 25)
$reg_errors[] = array('lang', 'error_long_name');
// Only these characters are permitted.
if (preg_match('~[<>&"\'=\\\\]~', preg_replace('~&#(?:\\d{1,7}|x[0-9a-fA-F]{1,6});~', '', $regOptions['username'])) != 0 || $regOptions['username'] == '_' || $regOptions['username'] == '|' || strpos($regOptions['username'], '[code') !== false || strpos($regOptions['username'], '[/code') !== false)
$reg_errors[] = array('lang', 'error_invalid_characters_username');
if ($smcFunc['strtolower']($regOptions['username']) === $smcFunc['strtolower']($txt['guest_title']))
$reg_errors[] = array('lang', 'username_reserved', 'general', array($txt['guest_title']));
// !!! Separate the sprintf?
if (empty($regOptions['email']) || preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', $regOptions['email']) === 0 || strlen($regOptions['email']) > 255)
$reg_errors[] = array('done', sprintf($txt['valid_email_needed'], $smcFunc['htmlspecialchars']($regOptions['username'])));
if (!empty($regOptions['check_reserved_name']) && isReservedName($regOptions['username'], 0, false))
{
if ($regOptions['password'] == 'chocolate cake')
$reg_errors[] = array('done', 'Sorry, I don\'t take bribes... you\'ll need to come up with a different name.');
$reg_errors[] = array('done', '(' . htmlspecialchars($regOptions['username']) . ') ' . $txt['name_in_use']);
}
// Generate a validation code if it's supposed to be emailed.
$validation_code = '';
if ($regOptions['require'] == 'activation')
$validation_code = generateValidationCode();
// If you haven't put in a password generate one.
if ($regOptions['interface'] == 'admin' && $regOptions['password'] == '' && $regOptions['auth_method'] == 'password')
{
mt_srand(time() + 1277);
$regOptions['password'] = generateValidationCode();
$regOptions['password_check'] = $regOptions['password'];
}
// Does the first password match the second?
elseif ($regOptions['password'] != $regOptions['password_check'] && $regOptions['auth_method'] == 'password')
$reg_errors[] = array('lang', 'passwords_dont_match');
// That's kind of easy to guess...
if ($regOptions['password'] == '')
{
if ($regOptions['auth_method'] == 'password')
$reg_errors[] = array('lang', 'no_password');
else
$regOptions['password'] = sha1(mt_rand());
}
// Now perform hard password validation as required.
if (!empty($regOptions['check_password_strength']))
{
$passwordError = validatePassword($regOptions['password'], $regOptions['username'], array($regOptions['email']));
// Password isn't legal?
if ($passwordError != null)
$reg_errors[] = array('lang', 'profile_error_password_' . $passwordError);
}
// If they are using an OpenID that hasn't been verified yet error out.
// !!! Change this so they can register without having to attempt a login first
if ($regOptions['auth_method'] == 'openid' && (empty($_SESSION['openid']['verified']) || $_SESSION['openid']['openid_uri'] != $regOptions['openid']))
$reg_errors[] = array('lang', 'openid_not_verified');
// You may not be allowed to register this email.
if (!empty($regOptions['check_email_ban']))
isBannedEmail($regOptions['email'], 'cannot_register', $txt['ban_register_prohibited']);
// Check if the email address is in use.
$request = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE email_address = {string:email_address}
OR email_address = {string:username}
LIMIT 1',
array(
'email_address' => $regOptions['email'],
'username' => $regOptions['username'],
)
);
// !!! Separate the sprintf?
if ($smcFunc['db_num_rows']($request) != 0)
$reg_errors[] = array('lang', 'email_in_use', false, array(htmlspecialchars($regOptions['email'])));
$smcFunc['db_free_result']($request);
// If we found any errors we need to do something about it right away!
foreach ($reg_errors as $key => $error)
{
/* Note for each error:
0 = 'lang' if it's an index, 'done' if it's clear text.
1 = The text/index.
2 = Whether to log.
3 = sprintf data if necessary. */
if ($error[0] == 'lang')
loadLanguage('Errors');
$message = $error[0] == 'lang' ? (empty($error[3]) ? $txt[$error[1]] : vsprintf($txt[$error[1]], $error[3])) : $error[1];
// What to do, what to do, what to do.
if ($return_errors)
{
if (!empty($error[2]))
log_error($message, $error[2]);
$reg_errors[$key] = $message;
}
else
fatal_error($message, empty($error[2]) ? false : $error[2]);
}
// If there's any errors left return them at once!
if (!empty($reg_errors))
return $reg_errors;
$reservedVars = array(
'actual_theme_url',
'actual_images_url',
'base_theme_dir',
'base_theme_url',
'default_images_url',
'default_theme_dir',
'default_theme_url',
'default_template',
'images_url',
'number_recent_posts',
'smiley_sets_default',
'theme_dir',
'theme_id',
'theme_layers',
'theme_templates',
'theme_url',
);
// Can't change reserved vars.
if (isset($regOptions['theme_vars']) && array_intersect($regOptions['theme_vars'], $reservedVars) != array())
fatal_lang_error('no_theme');
// Some of these might be overwritten. (the lower ones that are in the arrays below.)
$regOptions['register_vars'] = array(
'member_name' => $regOptions['username'],
'email_address' => $regOptions['email'],
'passwd' => sha1(strtolower($regOptions['username']) . $regOptions['password']),
'password_salt' => substr(md5(mt_rand()), 0, 4) ,
'posts' => 0,
'date_registered' => time(),
'member_ip' => $regOptions['interface'] == 'admin' ? '127.0.0.1' : $user_info['ip'],
'member_ip2' => $regOptions['interface'] == 'admin' ? '127.0.0.1' : $_SERVER['BAN_CHECK_IP'],
'validation_code' => $validation_code,
'real_name' => $regOptions['username'],
'personal_text' => $modSettings['default_personal_text'],
'pm_email_notify' => 1,
'id_theme' => 0,
'id_post_group' => 4,
'lngfile' => '',
'buddy_list' => '',
'pm_ignore_list' => '',
'message_labels' => '',
'website_title' => '',
'website_url' => '',
'location' => '',
'icq' => '',
'aim' => '',
'yim' => '',
'msn' => '',
'time_format' => '',
'signature' => '',
'avatar' => "'$regOptions[avatar]'",
'usertitle' => '',
'secret_question' => '',
'secret_answer' => '',
'additional_groups' => '',
'ignore_boards' => '',
'smiley_set' => '',
'openid_uri' => (!empty($regOptions['openid']) ? $regOptions['openid'] : ''),
);
// Setup the activation status on this new account so it is correct - firstly is it an under age account?
if ($regOptions['require'] == 'coppa')
{
$regOptions['register_vars']['is_activated'] = 5;
// !!! This should be changed. To what should be it be changed??
$regOptions['register_vars']['validation_code'] = '';
}
// Maybe it can be activated right away?
elseif ($regOptions['require'] == 'nothing')
$regOptions['register_vars']['is_activated'] = 1;
// Maybe it must be activated by email?
elseif ($regOptions['require'] == 'activation')
$regOptions['register_vars']['is_activated'] = 0;
// Otherwise it must be awaiting approval!
else
$regOptions['register_vars']['is_activated'] = 3;
if (isset($regOptions['memberGroup']))
{
// Make sure the id_group will be valid, if this is an administator.
$regOptions['register_vars']['id_group'] = $regOptions['memberGroup'] == 1 && !allowedTo('admin_forum') ? 0 : $regOptions['memberGroup'];
// Check if this group is assignable.
$unassignableGroups = array(-1, 3);
$request = $smcFunc['db_query']('', '
SELECT id_group
FROM {db_prefix}membergroups
WHERE min_posts != {int:min_posts}' . (allowedTo('admin_forum') ? '' : '
OR group_type = {int:is_protected}'),
array(
'min_posts' => -1,
'is_protected' => 1,
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$unassignableGroups[] = $row['id_group'];
$smcFunc['db_free_result']($request);
if (in_array($regOptions['register_vars']['id_group'], $unassignableGroups))
$regOptions['register_vars']['id_group'] = 0;
}
// ICQ cannot be zero.
if (isset($regOptions['extra_register_vars']['icq']) && empty($regOptions['extra_register_vars']['icq']))
$regOptions['extra_register_vars']['icq'] = '';
// Integrate optional member settings to be set.
if (!empty($regOptions['extra_register_vars']))
foreach ($regOptions['extra_register_vars'] as $var => $value)
$regOptions['register_vars'][$var] = $value;
// Integrate optional user theme options to be set.
$theme_vars = array();
if (!empty($regOptions['theme_vars']))
foreach ($regOptions['theme_vars'] as $var => $value)
$theme_vars[$var] = $value;
// Call an optional function to validate the users' input.
call_integration_hook('integrate_register', array(&$regOptions, &$theme_vars));
// Right, now let's prepare for insertion.
$knownInts = array(
'date_registered', 'posts', 'id_group', 'last_login', 'instant_messages', 'unread_messages',
'new_pm', 'pm_prefs', 'gender', 'hide_email', 'show_online', 'pm_email_notify', 'karma_good', 'karma_bad',
'notify_announcements', 'notify_send_body', 'notify_regularity', 'notify_types',
'id_theme', 'is_activated', 'id_msg_last_visit', 'id_post_group', 'total_time_logged_in', 'warning',
);
$knownFloats = array(
'time_offset',
);
$column_names = array();
$values = array();
foreach ($regOptions['register_vars'] as $var => $val)
{
$type = 'string';
if (in_array($var, $knownInts))
$type = 'int';
elseif (in_array($var, $knownFloats))
$type = 'float';
elseif ($var == 'birthdate')
$type = 'date';
$column_names[$var] = $type;
$values[$var] = $val;
}
// Register them into the database.
$smcFunc['db_insert']('',
'{db_prefix}members',
$column_names,
$values,
array('id_member')
);
$memberID = $smcFunc['db_insert_id']('{db_prefix}members', 'id_member');
// Update the number of members and latest member's info - and pass the name, but remove the 's.
if ($regOptions['register_vars']['is_activated'] == 1)
updateStats('member', $memberID, $regOptions['register_vars']['real_name']);
else
updateStats('member');
// Theme variables too?
if (!empty($theme_vars))
{
$inserts = array();
foreach ($theme_vars as $var => $val)
$inserts[] = array($memberID, $var, $val);
$smcFunc['db_insert']('insert',
'{db_prefix}themes',
array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
$inserts,
array('id_member', 'variable')
);
}
// If it's enabled, increase the registrations for today.
trackStats(array('registers' => '+'));
// Administrative registrations are a bit different...
if ($regOptions['interface'] == 'admin')
{
if ($regOptions['require'] == 'activation')
$email_message = 'admin_register_activate';
elseif (!empty($regOptions['send_welcome_email']))
$email_message = 'admin_register_immediate';
if (isset($email_message))
{
$replacements = array(
'REALNAME' => $regOptions['register_vars']['real_name'],
'USERNAME' => $regOptions['username'],
'PASSWORD' => $regOptions['password'],
'FORGOTPASSWORDLINK' => $scripturl . '?action=reminder',
'ACTIVATIONLINK' => $scripturl . '?action=activate;u=' . $memberID . ';code=' . $validation_code,
'ACTIVATIONLINKWITHOUTCODE' => $scripturl . '?action=activate;u=' . $memberID,
'ACTIVATIONCODE' => $validation_code,
);
$emaildata = loadEmailTemplate($email_message, $replacements);
sendmail($regOptions['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);
}
// All admins are finished here.
return $memberID;
}
// Can post straight away - welcome them to your fantastic community...
if ($regOptions['require'] == 'nothing')
{
if (!empty($regOptions['send_welcome_email']))
{
$replacements = array(
'REALNAME' => $regOptions['register_vars']['real_name'],
'USERNAME' => $regOptions['username'],
'PASSWORD' => $regOptions['password'],
'FORGOTPASSWORDLINK' => $scripturl . '?action=reminder',
'OPENID' => !empty($regOptions['openid']) ? $regOptions['openid'] : '',
);
$emaildata = loadEmailTemplate('register_' . ($regOptions['auth_method'] == 'openid' ? 'openid_' : '') . 'immediate', $replacements);
sendmail($regOptions['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);
}
// Send admin their notification.
adminNotify('standard', $memberID, $regOptions['username']);
}
// Need to activate their account - or fall under COPPA.
elseif ($regOptions['require'] == 'activation' || $regOptions['require'] == 'coppa')
{
$replacements = array(
'REALNAME' => $regOptions['register_vars']['real_name'],
'USERNAME' => $regOptions['username'],
'PASSWORD' => $regOptions['password'],
'FORGOTPASSWORDLINK' => $scripturl . '?action=reminder',
'OPENID' => !empty($regOptions['openid']) ? $regOptions['openid'] : '',
);
if ($regOptions['require'] == 'activation')
$replacements += array(
'ACTIVATIONLINK' => $scripturl . '?action=activate;u=' . $memberID . ';code=' . $validation_code,
'ACTIVATIONLINKWITHOUTCODE' => $scripturl . '?action=activate;u=' . $memberID,
'ACTIVATIONCODE' => $validation_code,
);
else
$replacements += array(
'COPPALINK' => $scripturl . '?action=coppa;u=' . $memberID,
);
$emaildata = loadEmailTemplate('register_' . ($regOptions['auth_method'] == 'openid' ? 'openid_' : '') . ($regOptions['require'] == 'activation' ? 'activate' : 'coppa'), $replacements);
sendmail($regOptions['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);
}
// Must be awaiting approval.
else
{
$replacements = array(
'REALNAME' => $regOptions['register_vars']['real_name'],
'USERNAME' => $regOptions['username'],
'PASSWORD' => $regOptions['password'],
'FORGOTPASSWORDLINK' => $scripturl . '?action=reminder',
'OPENID' => !empty($regOptions['openid']) ? $regOptions['openid'] : '',
);
$emaildata = loadEmailTemplate('register_' . ($regOptions['auth_method'] == 'openid' ? 'openid_' : '') . 'pending', $replacements);
sendmail($regOptions['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);
// Admin gets informed here...
adminNotify('approval', $memberID, $regOptions['username']);
}
// Okay, they're for sure registered... make sure the session is aware of this for security. (Just married :P!)
$_SESSION['just_registered'] = 1;
return $memberID;
}
// Check if a name is in the reserved words list. (name, current member id, name/username?.)
function isReservedName($name, $current_ID_MEMBER = 0, $is_name = true, $fatal = true)
{
global $user_info, $modSettings, $smcFunc, $context;
// No cheating with entities please.
$replaceEntities = create_function('$string', '
$num = substr($string, 0, 1) === \'x\' ? hexdec(substr($string, 1)) : (int) $string;
if ($num === 0x202E || $num === 0x202D) return \'\'; if (in_array($num, array(0x22, 0x26, 0x27, 0x3C, 0x3E))) return \'&#\' . $num . \';\';' .
(empty($context['utf8']) ? 'return $num < 0x20 ? \'\' : ($num < 0x80 ? chr($num) : \'&#\' . $string . \';\');' : '
return $num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) ? \'\' : ($num < 0x80 ? chr($num) : ($num < 0x800 ? chr(192 | $num >> 6) . chr(128 | $num & 63) : ($num < 0x10000 ? chr(224 | $num >> 12) . chr(128 | $num >> 6 & 63) . chr(128 | $num & 63) : chr(240 | $num >> 18) . chr(128 | $num >> 12 & 63) . chr(128 | $num >> 6 & 63) . chr(128 | $num & 63))));')
);
$name = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~e', '$replaceEntities(\'\\2\')', $name);
$checkName = $smcFunc['strtolower']($name);
// Administrators are never restricted ;).
if (!allowedTo('moderate_forum') && ((!empty($modSettings['reserveName']) && $is_name) || !empty($modSettings['reserveUser']) && !$is_name))
{
$reservedNames = explode("\n", $modSettings['reserveNames']);
// Case sensitive check?
$checkMe = empty($modSettings['reserveCase']) ? $checkName : $name;
// Check each name in the list...
foreach ($reservedNames as $reserved)
{
if ($reserved == '')
continue;
// The admin might've used entities too, level the playing field.
$reservedCheck = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~e', '$replaceEntities(\'\\2\')', $reserved);
// Case sensitive name?
if (empty($modSettings['reserveCase']))
$reservedCheck = $smcFunc['strtolower']($reservedCheck);
// If it's not just entire word, check for it in there somewhere...
if ($checkMe == $reservedCheck || ($smcFunc['strpos']($checkMe, $reservedCheck) !== false && empty($modSettings['reserveWord'])))
if ($fatal)
fatal_lang_error('username_reserved', 'password', array($reserved));
else
return true;
}
$censor_name = $name;
if (censorText($censor_name) != $name)
if ($fatal)
fatal_lang_error('name_censored', 'password', array($name));
else
return true;
}
// Characters we just shouldn't allow, regardless.
foreach (array('*') as $char)
if (strpos($checkName, $char) !== false)
if ($fatal)
fatal_lang_error('username_reserved', 'password', array($char));
else
return true;
// Get rid of any SQL parts of the reserved name...
$checkName = strtr($name, array('_' => '\\_', '%' => '\\%'));
// Make sure they don't want someone else's name.
$request = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE ' . (empty($current_ID_MEMBER) ? '' : 'id_member != {int:current_member}
AND ') . '(real_name LIKE {string:check_name} OR member_name LIKE {string:check_name})
LIMIT 1',
array(
'current_member' => $current_ID_MEMBER,
'check_name' => $checkName,
)
);
if ($smcFunc['db_num_rows']($request) > 0)
{
$smcFunc['db_free_result']($request);
return true;
}
// Does name case insensitive match a member group name?
$request = $smcFunc['db_query']('', '
SELECT id_group
FROM {db_prefix}membergroups
WHERE group_name LIKE {string:check_name}
LIMIT 1',
array(
'check_name' => $checkName,
)
);
if ($smcFunc['db_num_rows']($request) > 0)
{
$smcFunc['db_free_result']($request);
return true;
}
// Okay, they passed.
return false;
}
// Get a list of groups that have a given permission (on a given board).
function groupsAllowedTo($permission, $board_id = null)
{
global $modSettings, $board_info, $smcFunc;
// Admins are allowed to do anything.
$member_groups = array(
'allowed' => array(1),
'denied' => array(),
);
// Assume we're dealing with regular permissions (like profile_view_own).
if ($board_id === null)
{
$request = $smcFunc['db_query']('', '
SELECT id_group, add_deny
FROM {db_prefix}permissions
WHERE permission = {string:permission}',
array(
'permission' => $permission,
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
$smcFunc['db_free_result']($request);
}
// Otherwise it's time to look at the board.
else
{
// First get the profile of the given board.
if (isset($board_info['id']) && $board_info['id'] == $board_id)
$profile_id = $board_info['profile'];
elseif ($board_id !== 0)
{
$request = $smcFunc['db_query']('', '
SELECT id_profile
FROM {db_prefix}boards
WHERE id_board = {int:id_board}
LIMIT 1',
array(
'id_board' => $board_id,
)
);
if ($smcFunc['db_num_rows']($request) == 0)
fatal_lang_error('no_board');
list ($profile_id) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
}
else
$profile_id = 1;
$request = $smcFunc['db_query']('', '
SELECT bp.id_group, bp.add_deny
FROM {db_prefix}board_permissions AS bp
WHERE bp.permission = {string:permission}
AND bp.id_profile = {int:profile_id}',
array(
'profile_id' => $profile_id,
'permission' => $permission,
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
$smcFunc['db_free_result']($request);
}
// Denied is never allowed.
$member_groups['allowed'] = array_diff($member_groups['allowed'], $member_groups['denied']);
return $member_groups;
}
// Get a list of members that have a given permission (on a given board).
function membersAllowedTo($permission, $board_id = null)
{
global $smcFunc;
$member_groups = groupsAllowedTo($permission, $board_id);
$include_moderators = in_array(3, $member_groups['allowed']) && $board_id !== null;
$member_groups['allowed'] = array_diff($member_groups['allowed'], array(3));
$exclude_moderators = in_array(3, $member_groups['denied']) && $board_id !== null;
$member_groups['denied'] = array_diff($member_groups['denied'], array(3));
$request = $smcFunc['db_query']('', '
SELECT mem.id_member
FROM {db_prefix}members AS mem' . ($include_moderators || $exclude_moderators ? '
LEFT JOIN {db_prefix}moderators AS mods ON (mods.id_member = mem.id_member AND mods.id_board = {int:board_id})' : '') . '
WHERE (' . ($include_moderators ? 'mods.id_member IS NOT NULL OR ' : '') . 'mem.id_group IN ({array_int:member_groups_allowed}) OR FIND_IN_SET({raw:member_group_allowed_implode}, mem.additional_groups) != 0)' . (empty($member_groups['denied']) ? '' : '
AND NOT (' . ($exclude_moderators ? 'mods.id_member IS NOT NULL OR ' : '') . 'mem.id_group IN ({array_int:member_groups_denied}) OR FIND_IN_SET({raw:member_group_denied_implode}, mem.additional_groups) != 0)'),
array(
'member_groups_allowed' => $member_groups['allowed'],
'member_groups_denied' => $member_groups['denied'],
'board_id' => $board_id,
'member_group_allowed_implode' => implode(', mem.additional_groups) != 0 OR FIND_IN_SET(', $member_groups['allowed']),
'member_group_denied_implode' => implode(', mem.additional_groups) != 0 OR FIND_IN_SET(', $member_groups['denied']),
)
);
$members = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$members[] = $row['id_member'];
$smcFunc['db_free_result']($request);
return $members;
}
// This function is used to reassociate members with relevant posts.
function reattributePosts($memID, $email = false, $membername = false, $post_count = false)
{
global $smcFunc;
// Firstly, if email and username aren't passed find out the members email address and name.
if ($email === false && $membername === false)
{
$request = $smcFunc['db_query']('', '
SELECT email_address, member_name
FROM {db_prefix}members
WHERE id_member = {int:memID}
LIMIT 1',
array(
'memID' => $memID,
)
);
list ($email, $membername) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
}
// If they want the post count restored then we need to do some research.
if ($post_count)
{
$request = $smcFunc['db_query']('', '
SELECT COUNT(*)
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board AND b.count_posts = {int:count_posts})
WHERE m.id_member = {int:guest_id}
AND m.approved = {int:is_approved}
AND m.icon != {string:recycled_icon}' . (empty($email) ? '' : '
AND m.poster_email = {string:email_address}') . (empty($membername) ? '' : '
AND m.poster_name = {string:member_name}'),
array(
'count_posts' => 0,
'guest_id' => 0,
'email_address' => $email,
'member_name' => $membername,
'is_approved' => 1,
'recycled_icon' => 'recycled',
)
);
list ($messageCount) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
updateMemberData($memID, array('posts' => 'posts + ' . $messageCount));
}
$query_parts = array();
if (!empty($email))
$query_parts[] = 'poster_email = {string:email_address}';
if (!empty($membername))
$query_parts[] = 'poster_name = {string:member_name}';
$query = implode(' AND ', $query_parts);
// Finally, update the posts themselves!
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:memID}
WHERE ' . $query,
array(
'memID' => $memID,
'email_address' => $email,
'member_name' => $membername,
)
);
return $smcFunc['db_affected_rows']();
}
// This simple function adds/removes the passed user from the current users buddy list.
function BuddyListToggle()
{
global $user_info;
checkSession('get');
isAllowedTo('profile_identity_own');
is_not_guest();
if (empty($_REQUEST['u']))
fatal_lang_error('no_access', false);
$_REQUEST['u'] = (int) $_REQUEST['u'];
// Remove if it's already there...
if (in_array($_REQUEST['u'], $user_info['buddies']))
$user_info['buddies'] = array_diff($user_info['buddies'], array($_REQUEST['u']));
// ...or add if it's not and if it's not you.
elseif ($user_info['id'] != $_REQUEST['u'])
$user_info['buddies'][] = (int) $_REQUEST['u'];
// Update the settings.
updateMemberData($user_info['id'], array('buddy_list' => implode(',', $user_info['buddies'])));
// Redirect back to the profile
redirectexit('action=profile;u=' . $_REQUEST['u']);
}
function list_getMembers($start, $items_per_page, $sort, $where, $where_params = array(), $get_duplicates = false)
{
global $smcFunc;
$request = $smcFunc['db_query']('', '
SELECT
mem.id_member, mem.member_name, mem.real_name, mem.email_address, mem.icq, mem.aim, mem.yim, mem.msn, mem.member_ip, mem.member_ip2, mem.last_login,
mem.posts, mem.is_activated, mem.date_registered, mem.id_group, mem.additional_groups, mg.group_name
FROM {db_prefix}members AS mem
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)
WHERE ' . $where . '
ORDER BY {raw:sort}
LIMIT {int:start}, {int:per_page}',
array_merge($where_params, array(
'sort' => $sort,
'start' => $start,
'per_page' => $items_per_page,
))
);
$members = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$members[] = $row;
$smcFunc['db_free_result']($request);
// If we want duplicates pass the members array off.
if ($get_duplicates)
populateDuplicateMembers($members);
return $members;
}
function list_getNumMembers($where, $where_params = array())
{
global $smcFunc, $modSettings;
// We know how many members there are in total.
if (empty($where) || $where == '1')
$num_members = $modSettings['totalMembers'];
// The database knows the amount when there are extra conditions.
else
{
$request = $smcFunc['db_query']('', '
SELECT COUNT(*)
FROM {db_prefix}members AS mem
WHERE ' . $where,
array_merge($where_params, array(
))
);
list ($num_members) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
}
return $num_members;
}
function populateDuplicateMembers(&$members)
{
global $smcFunc;
// This will hold all the ip addresses.
$ips = array();
foreach ($members as $key => $member)
{
// Create the duplicate_members element.
$members[$key]['duplicate_members'] = array();
// Store the IPs.
if (!empty($member['member_ip']))
$ips[] = $member['member_ip'];
if (!empty($member['member_ip2']))
$ips[] = $member['member_ip2'];
}
$ips = array_unique($ips);
if (empty($ips))
return false;
// Fetch all members with this IP address, we'll filter out the current ones in a sec.
$request = $smcFunc['db_query']('', '
SELECT
id_member, member_name, email_address, member_ip, member_ip2, is_activated
FROM {db_prefix}members
WHERE member_ip IN ({array_string:ips})
OR member_ip2 IN ({array_string:ips})',
array(
'ips' => $ips,
)
);
$duplicate_members = array();
$duplicate_ids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
//$duplicate_ids[] = $row['id_member'];
$member_context = array(
'id' => $row['id_member'],
'name' => $row['member_name'],
'email' => $row['email_address'],
'is_banned' => $row['is_activated'] > 10,
'ip' => $row['member_ip'],
'ip2' => $row['member_ip2'],
);
if (in_array($row['member_ip'], $ips))
$duplicate_members[$row['member_ip']][] = $member_context;
if ($row['member_ip'] != $row['member_ip2'] && in_array($row['member_ip2'], $ips))
$duplicate_members[$row['member_ip2']][] = $member_context;
}
$smcFunc['db_free_result']($request);
// Also try to get a list of messages using these ips.
$request = $smcFunc['db_query']('', '
SELECT
m.poster_ip, mem.id_member, mem.member_name, mem.email_address, mem.is_activated
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE m.id_member != 0
' . (!empty($duplicate_ids) ? 'AND m.id_member NOT IN ({array_int:duplicate_ids})' : '') . '
AND m.poster_ip IN ({array_string:ips})',
array(
'duplicate_ids' => $duplicate_ids,
'ips' => $ips,
)
);
$had_ips = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
// Don't collect lots of the same.
if (isset($had_ips[$row['poster_ip']]) && in_array($row['id_member'], $had_ips[$row['poster_ip']]))
continue;
$had_ips[$row['poster_ip']][] = $row['id_member'];
$duplicate_members[$row['poster_ip']][] = array(
'id' => $row['id_member'],
'name' => $row['member_name'],
'email' => $row['email_address'],
'is_banned' => $row['is_activated'] > 10,
'ip' => $row['poster_ip'],
'ip2' => $row['poster_ip'],
);
}
$smcFunc['db_free_result']($request);
// Now we have all the duplicate members, stick them with their respective member in the list.
if (!empty($duplicate_members))
foreach ($members as $key => $member)
{
if (isset($duplicate_members[$member['member_ip']]))
$members[$key]['duplicate_members'] = $duplicate_members[$member['member_ip']];
if ($member['member_ip'] != $member['member_ip2'] && isset($duplicate_members[$member['member_ip2']]))
$members[$key]['duplicate_members'] = array_merge($member['duplicate_members'], $duplicate_members[$member['member_ip2']]);
// Check we don't have lots of the same member.
$member_track = array($member['id_member']);
foreach ($members[$key]['duplicate_members'] as $duplicate_id_member => $duplicate_member)
{
if (in_array($duplicate_member['id'], $member_track))
{
unset($members[$key]['duplicate_members'][$duplicate_id_member]);
continue;
}
$member_track[] = $duplicate_member['id'];
}
}
}
// Generate a random validation code.
function generateValidationCode()
{
global $smcFunc, $modSettings;
$request = $smcFunc['db_query']('get_random_number', '
SELECT RAND()',
array(
)
);
list ($dbRand) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
return substr(preg_replace('/\W/', '', sha1(microtime() . mt_rand() . $dbRand . $modSettings['rand_seed'])), 0, 10);
}
?>
I totally agree with some of the posts. I would use this mod if they were allowed to upload/link to their own avatar initially.
Quote from: luper on February 20, 2012, 12:48:39 PM
I totally agree with some of the posts. I would use this mod if they were allowed to upload/link to their own avatar initially.
Maybe one day if someone donates for it.
Is there a way to tell new people that want to register that it is temporary and for registartion only? I assume that would let live spammers know what to do. It would help against bots though
I already installed this script and I think it's great but my only problem is that my board is installed in Spanish and this script is in English :S
Is there a way for me to manually change the language after it's been installed? Or is the mod available in Spanish?
Yes you can modify the language strings added to the themes/default/languages/modifications.english.php or move to modifications.spanish.php
Nice Mod
when update portuguese dont forget portuguese files
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// Begin Avatar Select Text Strings Translate By Candidosa2
$txt['avatarselect_error_req'] = 'Um avatar é necessário! Por favor seleccione um.';
$txt['avatarselect_avatar'] = 'Selecione um Avatar:';
$txt['avatarselect_pleaseselect'] = 'Por favor escolha um avatar.';
// END Avatar Select Text Strings Support SMFPT.NET
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// Begin Avatar Select Text Strings Translate By Candidosa2
$txt['avatarselect_error_req'] = 'Um avatar é necessário! Por favor seleccione um.';
$txt['avatarselect_avatar'] = 'Selecione um Avatar:';
$txt['avatarselect_pleaseselect'] = 'Por favor escolha um avatar.';
// END Avatar Select Text Strings Support SMFPT.NET
]]></add>
</operation>
</file>
I can't even uninstall -
Here's what happens when I visit my forum now:
White screen & error~>
Quote
Parse error: syntax error, unexpected '$txt' (T_VARIABLE) in /home/ourmo0/public_html/community/Themes/default/languages/Modifications.english.php on line 219
Can you help?
If you can attach the file, we can have it fixed for you in no time :)
Thanks so much!
Quote<?php
// Version: 2.0; Modifications
// SMF Sitemap Strings
$txt['sitemap'] = 'Sitemap';
$txt['sitemap_boards'] = 'Boards';
$txt['sitemap_topics'] = 'Topics';
$txt['sitemap_xml'] = 'Show Sitemap XML <em>link</em>';
$txt['sitemap_topic_count'] = 'Maximum number of topics to display in XML sitemap<br /><span class="smalltext">0 to show all (<strong class="error">NOT RECOMMENDED ON LARGE BOARDS</strong>)</span>';
$txt['sitemap_cache_ttl'] = 'Time that XML data should be cached (seconds)';
$txt['sitemap_board_none'] = 'No boards to display';
$txt['sitemap_topic_none'] = 'No topics to display';
$txt['sitemap_30day_priority'] = 'Priority for topics active in the last 30 days';
$txt['sitemap_60day_priority'] = 'Priority for topics active in the last 60 days';
$txt['sitemap_90day_priority'] = 'Priority for topics active in the last 90 days';
$txt['sitemap_91day_priority'] = 'Priority for topics older than 90 days';
$txt['invalid_sitemap_subaction'] = 'Invalid selection';
$txt['banned_user_avatar_url'] = 'For banned users, use this URL as an avatar:';
$txt['default_user_avatar_url'] = 'For users who have not set an avatar, use this URL as an avatar:';
$txt['noisen_footnote'] = 'Footnote';
$txt['infobox'] = 'Add Info Box';
$txt['sd_add'] = 'Share me:';
$txt['sd_social_bookmarks'] = 'Share me';
$txt['searchi'] = 'Search';
$txt['paypal'] = 'Donations';
$txt['cannot_payPal_view'] = 'Sorry, you\'re not allowed to view the Donation Page.';
$txt['permissionname_payPal_view'] = 'View Donation Page';
$txt['permissionhelp_payPal_view'] = 'Allow the people to view the Donation Page. If not set, the people will not see the page.';
$txt['DonationsNotEnabled'] = 'Sorry, the donation page is not enabled at the moment. Please check back later.';
// Reason for editing mod
$txt['reason'] = 'Reason';
$txt['reason_edit'] = 'Reason For Edit';
$txt['permissionname_reason_edit'] = 'Set Reason for edit';
$txt['permissionhelp_reason_edit'] = 'Set if the membergroup is allowed to put the reason for edit their own posts.';
// Reason for editing mod END
//reCAPTCHA for SMF
$txt['recaptcha_configure'] = 'reCAPTCHA Verification System';
$txt['recaptcha_configure_desc'] = 'Use the reCAPTCHA Verification System. Don\'t have a key for reCAPTCHA? <a href="http://recaptcha.net/api/getkey?app=recaptcha_for_smf"> Get your reCAPTCHA key here</a>.';
$txt['recaptcha_enabled'] = 'Use reCAPTCHA Verification System';
$txt['recaptcha_enable_desc'] = '(This replaces the built-in visual verification with reCAPTCHA)';
$txt['recaptcha_theme'] = 'reCAPTCHA Theme';
$txt['recaptcha_theme_clean'] = 'Clean';
$txt['recaptcha_theme_blackglass'] = 'Black Glass';
$txt['recaptcha_theme_red'] = 'Red';
$txt['recaptcha_theme_white'] = 'White';
$txt['recaptcha_public_key'] = 'reCAPTCHA Public Key';
$txt['recaptcha_private_key'] = 'reCAPTCHA Private Key';
$txt['recaptcha_no_key_question'] = 'Don\'t have a key for reCAPTCHA?';
$txt['recaptcha_get_key'] = 'Get your reCAPTCHA key here.';
$txt['permissionname_profile_signature'] = 'Edit signature';
$txt['permissionname_profile_signature_own'] = 'Own signature';
$txt['permissionname_profile_signature_any'] = 'Any signature';
$txt['permissionname_simple_profile_signature_own'] = 'Edit their signature';
$txt['permissionname_simple_profile_signature_any'] = 'Edit other people\'s signatures';
$txt['permissionname_profile_website'] = 'Edit website details';
$txt['permissionname_profile_website_own'] = 'Own profile';
$txt['permissionname_profile_website_any'] = 'Any profile';
$txt['permissionname_simple_profile_website_own'] = 'Edit their website details';
$txt['permissionname_simple_profile_website_any'] = 'Edit other people\'s website details';
$txt['permissionname_profile_displayname'] = 'Edit display name';
$txt['permissionname_profile_displayname_own'] = 'Own display name';
$txt['permissionname_profile_displayname_any'] = 'Any display name';
$txt['permissionname_simple_profile_displayname_own'] = 'Edit their displayed name';
$txt['permissionname_simple_profile_displayname_any'] = 'Edit other people\'s displayed name';
// PJL : Start of Redirect on login/logout Mod.
$txt['logon_redirect_enable'] = 'Enable Logon Redirect<br /><span class="smalltext">(This redirect users to given URL when they login)</span>';
$txt['logon_redirect_url'] = 'Enter Login URL';
$txt['logout_redirect_enable'] = 'Enable Logout Redirect?<br /><span class="smalltext">(This redirect users to given URL when they logout)</span>';
$txt['logout_redirect_url'] = 'Enter Logout URL';
// End Mod.
$txt['lbnr'] = 'Look But No Read';
$txt['mods_cat_lbnr'] = 'Look But No Read';
$txt['boards_deny_guest_browsing'] = 'Boards to deny guest reading:';
$txt['categories_deny_guest_browsing'] = 'Categories to deny guest reading:';
$txt['enable_guest_browsing_control'] = 'Enable guest browsing control:';
// Topic Solved
$txt['topic_solved'] = 'Topic Solved';
$txt['topic_not_solved'] = 'Topic Not Solved';
$txt['topic_solved_quick'] = 'Mark selected as solved';
$txt['topic_solved_quick_confirm'] = 'Are you sure you want to mark selected topics as solved?';
$txt['topic_solved_board'] = 'Topic Solved Board';
$txt['topic_solved_board_desc'] = 'Enables the Topic Solved feature in the board';
$txt['topic_solved_log'] = 'Topic Solved Log';
$txt['topic_solved_no_log'] = 'There are no topic solve actions logged.';
$txt['topic_solved_desc'] = 'Lists topic solved actions that have been performed by moderators on your forum.';
$txt['modlog_topicsolved_log_desc'] = 'Below is a list of all the topic solved actions that have been carried out by moderators of the forum.<br /><b>Please note:</b> Entries cannot be removed from this log until they are at least twenty-four hours old.';
$txt['modlog_ac_solve'] = 'Solved "{topic}"';
$txt['modlog_ac_not_solve'] = 'Un-Solved "{topic}"';
$txt['permissionname_solve_topic'] = 'Marks topics solved';
$txt['permissionhelp_solve_topic'] = 'This permission allows a user to a topic solved.';
$txt['permissionname_solve_topic_own'] = 'Own topic';
$txt['permissionname_solve_topic_any'] = 'Any topic';
$txt['permissionname_simple_solve_topic_own'] = 'Mark their own topic as solved';
$txt['permissionname_simple_solve_topic_any'] = 'Mark anyone\'s topic as solved';
$txt['topic_solved_error_no_board'] = 'Sorry, topic solved feature is not enabled in this board.';
$txt['cannot_support_tools_solve_topic_own'] = 'You cannot mark your topics as solved.';
$txt['cannot_support_tools_solve_topic_any'] = 'You cannot mark topics as solved.';
// Topic Solved
$txt['pm_register'] = 'Send pm to new members';
$txt['pm_register_id'] = 'Select the ID of the sender';
$txt['pm_register_username'] = 'Select the Username of the sender';
$txt['pm_register_subject'] = 'The subject of the PM';
$txt['pm_register_body'] = 'The message of the PM (BBCODE)';
$txt['pm_register_body_desc'] = 'This is where you set the message that you would like to send to the user. To insert the username of the user just insert "<b>{$username}</b>". For forum name use "<b>{$forumname}</b>".';
$txt['googleAnalyticsCode'] = 'Google Analytics code<br /><span class="smalltext">E.g. UA-00000000-0</span>';
// Start Posting Announcement mod by Nas
$txt['enable_announcement_guests']='Show an announcement to Guests';
$txt['enable_announcement_members']='Show an announcement to Members';
$txt['text_announcement_guests']='Announcement to display (for Guests)<div class="smalltext">HTML and BBC may be used.</div>';
$txt['text_announcement_members']='Announcement to display (for Memebers) <div class="smalltext">HTML and BBC may be used.</div>';
// End Posting Announcement mod by Nas
// ForumFirewall Start
$txt['permissionname_forumfirewall_goodgroup'] = 'Forum Firewall Whitelist Group';
$txt['permissionhelp_forumfirewall_goodgroup'] = 'This option will make a member group exempt from the Forum Firewall bandwidth check. This group will not to be tested for Forum Firewall DOS attempts.';
// ForumFirewall End
//Begin Member Notepad Text Strings
$txt['mempad_title'] = 'Personal Notes';
$txt['mempad_save'] = 'Save Notes';
$txt['mempad_error'] = 'You are not allowed to edit this user\'s notepad.';
//END Member Notepad Text Strings
// Start Referrals System
$txt['ref_admin'] = 'Referrals System';
$txt['ref_settings'] = 'Settings';
$txt['ref_save_settings'] = 'Save Settings';
$txt['ref_refferals'] = 'Referrals:';
$txt['ref_refferal_link'] = 'Referral Link:';
$txt['ref_reffered_by'] = 'Referred by Membername:';
// Setttings
$txt['ref_showreflink'] = 'Show referral link on profile page';
$txt['ref_showonpost'] = 'Show referrals on post display';
$txt['ref_trackcookiehits'] = 'Track hits for referral link clicks';
$txt['ref_cookietrackdays'] = 'Number of days to store the tracking cookie for referrals';
// End Referrals System
//Start S.P.O.X.S. MOD
global $ID_MEMBER;
$txt['spoxs_submit'] = 'Save';
$txt['spoxs_admin_title'] = 'SPOXS - General Configuration';
$txt['spoxs_admin_description'] = 'Setting the area responsible for S.P.O.X.S.(Send.PM.On.X.Posts) Mod';
$txt['spoxs_enable'] = 'Activate Send Pm On X Posts?';
$txt['spoxs_pm_from'] = '<strong>Author ID</strong>
<br />ID Author of the user\'s Personal Message.
<br />This field is required entrance
<br /><strong>Your ID is: '.$ID_MEMBER.'</strong>';
$txt['spoxs_groups_select'] = '<strong>Post count based groups</strong>
<br />Select the groups that will be sent to the MP when you get the new Group';
$txt['spoxs_pm_subject'] = '<strong>Title</strong>
<br />Title PM to be sent';
$txt['spoxs_pm_message'] = '<strong>Message</strong>
<br />The message received by the user.
<br />You can use the variable <strong>[RANK]</strong> to provide for the New Range, <strong>[USERNAME]</strong> to display the user name
<br />and<strong>[POSTS]</strong> to show the number of posts filled.
<br />Accepts BBCode';
$txt['spoxs_pm_default_body'] = 'Congratulations [USERNAME], You have [POSTS] posts and now your new group is [RANK].';
$txt['spoxs_pm_default_subject'] = 'Congratulations, New Group.';
//End S.P.O.X.S. MOD
// Added by Related Topics
$txt['admin_related_topic'] = 'Related Topics';
$txt['admin_related_topics_information'] = 'Information';
$txt['admin_related_topics_settings'] = 'Settings';
$txt['admin_related_topics_methods'] = 'Methods';
$txt['related_topics_admin_title'] = 'Related Topics';
$txt['related_topics_admin_desc'] = '';
$txt['related_latest_news'] = 'Latest News';
$txt['related_news_unable_to_connect'] = 'Unable to connect to <a href="http://www.smfarcade.info">SMFArcade.info</a> for latest news...';
$txt['related_version_info'] = 'Version Information';
$txt['related_installed_version'] = 'Installed Version';
$txt['related_latest_version'] = 'Latest Version';
$txt['related_topics_ignored_boards'] = 'Ignored Boards';
$txt['related_topics_methods_title'] = 'Methods';
$txt['related_topics_methods'] = 'Select methods used for determining Related Topics<div class="smalltext">Rebuild of index is required after changing these settings</div>';
$txt['related_topics_index'] = 'Index';
$txt['related_topics_rebuild'] = 'Rebuild Indexes';
$txt['related_topics_rebuild_desc'] = 'Use this after changing settings or to build initial cache';
$txt['relatedFulltext'] = 'Fulltext';
$txt['related_topics_settings_title'] = 'Related Topics';
$txt['relatedTopicsEnabled'] = 'Enable Related Topics';
$txt['relatedTopicsCount'] = 'How many related topics to show';
$txt['no_methods_selected'] = 'You haven\'t selected which methods to use to determine related topics';
$txt['related_topics'] = 'Related Topics';
$txt['Advertise'] = 'Advertise';
$txt['Logout'] = 'Logout';
$txt['ContactUs'] = 'Contact Us'
// END Added by Related Topics
// Begin Avatar Select Text Strings
$txt['avatarselect_error_req'] = 'An avatar is required! Please select one.';
$txt['avatarselect_avatar'] = 'Avatar Select:';
$txt['avatarselect_pleaseselect'] = 'Please select an avatar.';
// END Avatar Select Text Strings
?>
Solution as posted in http://www.simplemachines.org/community/index.php?topic=514847.msg3639704#msg3639704
Thanks a million :D
But I see no avatar selection on the registration form.
Would be SUPER if this mod worked!
Are there any errors in the error log?
no -
what it did was ruin the spacing at the top of my site & not produce any avatar selection on the registration page so I uninstalled it.
Use this MOD for over a year and never had problems. The author this of congratulations!!!
Well - what's the secret?
Please help! I WANT this mod :D
This mod is a wonderful one and i have been using it now for months. I sincerely thank the creator of this mod and i also appreciate all his effort.
However recently, i noticed that when some one wants to register using he/her java enabled phone, for example Nokia C3, LG phone, it doesnt work. when they select the avatar, lets say [Musicians], it doesn't loop or load to bring up the avatars of the musicians for them to select. And as a result of this they can not register successfully. However this work perfectly on Android phones.
Please is there a way to fix this, or mute the mod on wireless.templete.php or can the mod be use with Default Avatar mod without any problem, so that even when they can select the avatar there will be on there for them automatically.
is it possible to force user to add/choose avatar before completing the registration?
i used Specify avatar by URL - i want users to specific their url and not to leave this blank
any help please, im using smf 2.0
Even I have removed this mod still their option on register to select avatar please give anything to remove it completely
Go to the mod site find the manual install instructions and reverse those on your forum.
after installing this mod, is it compulsory for a user to select avatar on register page ? or if we not choose any avatar on register page then it will use a default avatar ? :-\
Yes it is.
This mod is a good idea, because it engages the user immediately and allows them to invest a bit more into their forum participation from the beginning. I suggest making avatar selection optional instead of compulsory, so it won't be a barrier for people who really prefer to lurk instead of participate. For example, they might register simply to get notifications of new topics or replies. Also, it appears this mod doesn't allow the user to upload their own avatar image, so that might be another nice feature to have.
Hi.
This mos is the best anti-robot and anti-spam tool ever made for SMF !
There have not been any unwanted subscription since I installed it.
Great! I haven't even thought of that.
I installed this mode without any error and the problem is that when someone goes to register page the mod does not show any images of avatars while we choose them. User can choose avatar and can register on forum but while choosing avatar it does not get from the avatar picture.
CHMOD I put on 777 (avatar folder and all within avatar folder).
When I enter in my profile or any other profile we can see the avatars while we choose them.
I have avatars on the server and as I said before CHMOD is set up on 777. :-\
Quote from: Cola-Coca on March 30, 2018, 10:24:10 PM
I installed this mode without any error and the problem is that when someone goes to register page the mod does not show any images of avatars while we choose them. User can choose avatar and can register on forum but while choosing avatar it does not get from the avatar picture.
CHMOD I put on 777 (avatar folder and all within avatar folder).
When I enter in my profile or any other profile we can see the avatars while we choose them.
I have avatars on the server and as I said before CHMOD is set up on 777. :-\
Can anyone help? :-\
Hi,
Would it be possible to update the MOD to RC 1?
Thanks in advance.
possible yes
Have updated the mod to support SMF 2.1.x