Quote from: Nas on July 19, 2009, 12:30:06 PM
Hi Didds! :)
Would you like to have this image automaticly made?
For example, I change my name to Nasalala, the image would be generated and changed for me without you, the admin, doing anything?
Or would you like to create each image for each member yourself?
Quote from: Kat on July 19, 2009, 12:33:34 PM
We did this on our forum, by doing it with the "Censored words" feature.
We added some smileys and made them hidden.
Say you wanted an image named "Didds.gif" to replace the word "Didds". We made a smiley with the ciode ":didds:" and, in "Censored words", replace "Didds" with ":didds:", which will show the smiley graphic, whenever the name is entered.
No need to add code for custom themes, that way. :)
Quote from: t2noob on July 21, 2009, 06:32:20 PM
I tried this didn't work when I change my display name it just stays as the word noob. I made a hidden smiley called noob. code for it is :noob: censored word was noob which will change the word to :noob:
Quote from: Didds on July 21, 2009, 06:42:53 PM
Ohhh I use SMF 2.0 RC1.....I don't see Add Smiley.... :( Is this SMF 1 only? :(
Quote from: t2noob on July 21, 2009, 06:45:02 PMI want it to change the Title to a picture. How can you say that using censored words would work ?
Quote from: Kat on July 21, 2009, 06:35:22 PM
That only replaces the name in posts, not in titles and stuff.
Quote from: Didds on July 25, 2009, 11:31:59 AMHere's how I want them to be (Go there and look at their names) thelandingforum.com
Username Images 1.0 Beta 1 Displays a bar in posts and/or profiles, showing how active the user is. Link to Mod (http://www.simplemachines.org/community/index.php?topic=325248.0) | Development topic (http://www.simplemachines.org/community/index.php?topic=325248.0) | Author: Nas (http://custom.simplemachines.org/mods/index.php?action=profile;u=143954) Type: New feature (http://custom.simplemachines.org/mods/index.php?action=search;type=1) Available since: July 26 2009 Latest version: 1.0 Beta 1 Compatible with: Beta is compatible with 1.1.x only. 2.0 version under development. Available languages: (https://www.simplemachines.org/site_images/lang/english.gif) |
Changelog legend + New feature - Feature removal ! Bugfix > New language < Removed language * New version support $ Initial release / Big update | Versionnames Format: $.o.x.! Example: 3.2.4.1 $ New version o New features added x Bugfix ! Small bugfix / New version support | Passed versions of this mod None. |
Username Images 1.0 Beta 1.1 Replaces usernames around the forum with a automaticly generated text image. Link to Mod (http://www.simplemachines.org/community/index.php?topic=325248.0) | Development topic (http://www.simplemachines.org/community/index.php?topic=325248.0) | Author: Nas (http://custom.simplemachines.org/mods/index.php?action=profile;u=143954) Type: New feature (http://custom.simplemachines.org/mods/index.php?action=search;type=1) Available since: July 26 2009 Latest version: 1.0 Beta 1.1 Compatible with: 1.1.x, 2.0 RC1.2 Available languages: (https://www.simplemachines.org/site_images/lang/english.gif) (https://www.simplemachines.org/site_images/lang/swedish.gif) |
Changelog legend + New feature - Feature removal ! Bugfix > New language < Removed language * New version support $ Initial release / Big update | Versionnames Format: $.o.x.! Example: 3.2.4.1 $ New version o New features added x Bugfix ! Small bugfix / New version support | Passed versions of this mod 1.0 Beta 1 |
// Username Images modification by Nas
$txt['ui_font'] = 'Font <div class="smalltext">The font used in the username images. The fonts listed are the default fonts in SMF.';
$txt['ui_width'] = 'Image width <div class="smalltext">The width of the username images.';
$txt['ui_height'] = 'Image height <div class="smalltext">The height of the username images.';
$txt['ui_fontsize'] = 'Font size <div class="smalltext">The font size used in the username images.';
$txt['ui_useshadows'] = 'Use shadows <div class="smalltext">Enable this to add a shadow to each username image.';
$txt['ui_defaultcolor'] = 'Default color <div class="smalltext">This color will be used if an user has not set any color themself. (Hex color code, <b>without leading <i>#</i></b>)';
$txt['ui_forgottb'] = 'Forgottb';
$txt['ui_kimbalt'] = 'Kimbalt';
$txt['ui_screenge'] = 'Screenge';
$txt['ui_walshes'] = 'Walshes';
$txt['ui_venusris'] = 'Venusris';
// Username Images modification by Nas
$txt['ui_forgottb'] = 'Forgottb';
$txt['ui_kimbalt'] = 'Kimbalt';
$txt['ui_screenge'] = 'Screenge';
$txt['ui_walshes'] = 'Walshes';
$txt['ui_venusris'] = 'Venusris';
// Username Images modification by Nas
$txt['ui_font'] = 'Fonte <div class="smalltext">A fonte usada nas imagens dos nomes dos usuários. As fontes listadas são as padrão do SMF.';
$txt['ui_width'] = 'Largura da imagem <div class="smalltext">A largura da imagem do nome dos usuários.';
$txt['ui_height'] = 'Altura da imagem <div class="smalltext">A altura da imagem do nome dos usuários.';
$txt['ui_fontsize'] = 'Tamanho da fonte <div class="smalltext">O tamanho da fonte da imagem do nome dos usuários.';
$txt['ui_useshadows'] = 'Usar sombras <div class="smalltext">Habilite isto para adicionar sombreamento nas imagens.';
$txt['ui_defaultcolor'] = 'Cor padrão <div class="smalltext">Esta cor vai ser usada se o usuário não escolher uma cor. (Código Hex, <b>Sem usar o prefixo <i>#</i></b>)';
$txt['ui_forgottb'] = 'Forgottb';
$txt['ui_kimbalt'] = 'Kimbalt';
$txt['ui_screenge'] = 'Screenge';
$txt['ui_walshes'] = 'Walshes';
$txt['ui_venusris'] = 'Venusris';
// Username Images modification by Nas
Quote from: Nas on July 27, 2009, 12:47:56 PM
That's correct. Would you like me to include this translation in the package in the next update? :)
Note: If a file does not exist in your theme, it doesn't matter (as the file from the Default theme will be used).
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 252: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xE4 0x6E 0x64 0x73 in /home/dragonfl/public_html/resourcez/PackageParser/index.php on line 450
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: $txt['ui_font'] = 'Typsnitt <div class="smalltext">Det tyspnitt som anv�nds i an in /home/dragonfl/public_html/resourcez/PackageParser/index.php on line 450
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/dragonfl/public_html/resourcez/PackageParser/index.php on line 450
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/dragonfl/public_html/resourcez/PackageParser/index.php:450 Stack trace: #0 /home/dragonfl/public_html/resourcez/PackageParser/index.php(450): SimpleXMLElement->__construct('<?xml version="...') #1 /home/dragonfl/public_html/resourcez/PackageParser/index.php(419): parseModificationXML('/tmp/install1.1...', Object(SimpleXMLElement), 'theme') #2 /home/dragonfl/public_html/resourcez/PackageParser/index.php(94): parsePackageInfoXML('/tmp/package-in...', 'install', 'theme') #3 /home/dragonfl/public_html/resourcez/PackageParser/index.php(777): parseArchive() #4 {main} thrown in /home/dragonfl/public_html/resourcez/PackageParser/index.php on line 450
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'] . '" title="' . $txt[62] . '">' . $row_board['modRealName'] . '</a>'
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'] . '" title="' . $txt[62] . '">' . generateUsernameImage($row_board['modRealName']) . '</a>'
'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] . '">' . $row_board['realName'] . '</a>' : $row_board['realName']) : $txt[470],
'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] . '">' . generateUsernameImage($row_board['realName']). '</a>' : $row_board['realName']) : $txt[470],
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . generateUsernameImage($row['realName']) . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . generateUsernameImage($row['realName']) . '</a>';
'username' => $row_board['posterName'] != '' ? $row_board['posterName'] : $txt[470],
'name' => $row_board['realName'],
'href' => !empty($row_board['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] : '',
'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] . '">' . $row_board['realName'] . '</a>' : $row_board['realName']) : $txt[470],
'username' => generateUsernameImage($row_board['posterName']) != '' ? generateUsernameImage($row_board['posterName']) : $txt[470],
'name' => generateUsernameImage($row_board['realName']),
'href' => !empty($row_board['ID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] : '',
'link' => $row_board['posterName'] != '' ? (!empty($row_board['ID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MEMBER'] . '">' . generateUsernameImage($row_board['realName']) . '</a>' : generateUsernameImage($row_board['realName'])) : $txt[470],
),
'name' => $row_board['modRealName'],
'href' => $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'] . '" title="' . $txt[62] . '">' . $row_board['modRealName'] . '</a>'
);
$context['boards'][$row_board['ID_BOARD']]['link_moderators'][] = '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'] . '" title="' . $txt[62] . '">' . $row_board['modRealName'] . '</a>';
'name' => generateUsernameImage($row_board['modRealName']),
'href' => $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'] . '" title="' . $txt[62] . '">' . generateUsernameImage($row_board['modRealName']) . '</a>'
);
$context['boards'][$row_board['ID_BOARD']]['link_moderators'][] = '<a href="' . $scripturl . '?action=profile;u=' . $row_board['ID_MODERATOR'] . '" title="' . $txt[62] . '">' . generateUsernameImage($row_board['modRealName']) . '</a>';
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . generateUsernameImage($row['realName']) . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . generateUsernameImage($row['realName']) . '</a>';
'username' => $row['memberName'],
'username' => generateUsernameImage($row['memberName']),
'member' => array(
'username' => $row['firstMemberName'],
'name' => $row['firstDisplayName'],
'id' => $row['firstID_MEMBER'],
'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '',
'link' => !empty($row['firstID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstDisplayName'] . '">' . $row['firstDisplayName'] . '</a>' : $row['firstDisplayName']
),
'member' => array(
'username' => generateUsernameImage($row['firstMemberName']),
'name' => generateUsernameImage($row['firstDisplayName']),
'id' => $row['firstID_MEMBER'],
'href' => !empty($row['firstID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] : '',
'link' => !empty($row['firstID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstDisplayName'] . '">' . generateUsernameImage($row['firstDisplayName']) . '</a>' : generateUsernameImage($row['firstDisplayName'])
),
'member' => array(
'username' => $row['lastMemberName'],
'name' => $row['lastDisplayName'],
'id' => $row['lastID_MEMBER'],
'href' => !empty($row['lastID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['lastID_MEMBER'] : '',
'link' => !empty($row['lastID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['lastID_MEMBER'] . '">' . $row['lastDisplayName'] . '</a>' : $row['lastDisplayName']
),
'member' => array(
'username' => generateUsernameImage($row['lastMemberName']),
'name' => generateUsernameImage($row['lastDisplayName']),
'id' => $row['lastID_MEMBER'],
'href' => !empty($row['lastID_MEMBER']) ? $scripturl . '?action=profile;u=' . $row['lastID_MEMBER'] : '',
'link' => !empty($row['lastID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['lastID_MEMBER'] . '">' . generateUsernameImage($row['lastDisplayName']) . '</a>' : generateUsernameImage($row['lastDisplayName'])
),
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '">' . $modSettings['latestRealName'] . '</a>',
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '">' . generateUsernameImage($modSettings['latestRealName']) . '</a>',
// Turn a regular username into an image (Username Image Mod by Nas)
function generateUsernameImage($username)
{
global $boardurl, $db_prefix, $modSettings;
$request = db_query("
SELECT nameColor
FROM {$db_prefix}members
WHERE realName = '$username'
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
return '<img src="' . $boardurl. '/generateUserImage.php?username=' . $username . ';color=' . $row['nameColor'] . '" alt="' . $username . '" border="0" />';
sleep(1);
}
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: ' . $row['onlineColor'] . ';">' . generateUsernameImage($row['realName']) . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . generateUsernameImage($row['realName']) . '</a>';
'name' => $row['realName'],
'name' => generateUsernameImage($row['realName']),
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>',
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . generateUsernameImage($profile['realName']) . '</a>',
'blurb' => &$profile['personalText'],
'nameColor' => &$profile['nameColor'],
mem.signature, mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.signature, mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.nameColor,
mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl,
mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.nameColor,
// Basic stuff, user languages, titles, flash, permissions...
// The Username Image modification by Nas.
array('select', 'ui_font', array(&$txt['ui_forgottb'], &$txt['ui_kimbalt'], &$txt['ui_screenge'], &$txt['ui_walshes'], &$txt['ui_venusris'])),
array('int', 'ui_fontsize'),
array('text', 'ui_defaultcolor'),
array('int', 'ui_width'),
array('int', 'ui_height'),
array('check', 'ui_useshadows'),
'',
'gender' => array('name' => empty($user_profile[$memID]['gender']) ? '' : ($user_profile[$memID]['gender'] == 2 ? 'f' : 'm')),
'nameColor' => empty($user_profile[$memID]['nameColor']) ? '' : $user_profile[$memID]['nameColor'],
'signature', 'personalText', 'avatar',
'signature', 'personalText', 'avatar', 'nameColor',
'blurb' => !isset($_POST['personalText']) ? '' : str_replace(array('<', '>', '&#039;'), array('<', '>', '''), stripslashes($_POST['personalText'])),
'nameColor' => !isset($_POST['nameColor']) ? '' : $_POST['nameColor'],
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', generateUsernameImage($context['user']['name']) , '</b></span>
', $txt['summary'], ' - ', $context['member']['name'], '
', $txt['summary'], ' - ', generateUsernameImage($context['member']['name']), '
<td>', $context['member']['name'], '</td>
<td>', generateUsernameImage($context['member']['name']), '</td>
// Personal text...
echo '
<tr>
<td width="40%"><b>', $txt[228], ': </b></td>
<td><input type="text" name="personalText" size="50" maxlength="50" value="', $context['member']['blurb'], '" /></td>
</tr>
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';
// Personal text...
echo '
<tr>
<td width="40%"><b>', $txt[228], ': </b></td>
<td><input type="text" name="personalText" size="50" maxlength="50" value="', $context['member']['blurb'], '" /></td>
</tr>';
// Let them choose their username color.
echo '
<tr>
<td width="40%"><b>', $txt['ui_namecolor'], ': </b><div class="smalltext">', $txt['ui_namecolor_desc'], '</div></td>
<td><input type="text" name="nameColor" size="6" maxlength="6" value="', $context['member']['nameColor'], '" /></td>
</tr>
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>';
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '">' . generateUsernameImage($member['name']) . '</a>', '</span>';
<b>', $txt['hello_guest'], ' ', $context['user']['name'], '!</b>
<b>', $txt['hello_guest'], ' ', generateUsernameImage($context['user']['name']), '</b>
// Username Images modification by Nas
//Admin settings
$txt['ui_font'] = 'Font <div class="smalltext">The font used in the username images. The fonts listed are the default fonts in SMF.</div>';
$txt['ui_width'] = 'Image width <div class="smalltext">The width of the username images.</div>';
$txt['ui_height'] = 'Image height <div class="smalltext">The height of the username images.</div>';
$txt['ui_fontsize'] = 'Font size <div class="smalltext">The font size used in the username images.</div>';
$txt['ui_useshadows'] = 'Use shadows <div class="smalltext">Enable this to add a shadow to each username image.</div>';
$txt['ui_defaultcolor'] = 'Default color <div class="smalltext">This color will be used if an user has not set any color themself. (Hex color code, <b>without leading <i>#</i></b>)</div>';
// Fonts
$txt['ui_forgottb'] = 'Forgottb';
$txt['ui_kimbalt'] = 'Kimbalt';
$txt['ui_screenge'] = 'Screenge';
$txt['ui_walshes'] = 'Walshes';
$txt['ui_venusris'] = 'Venusris';
// Others
$txt['ui_namecolor'] = 'Username color';
$txt['ui_namecolor_desc'] = 'Your username image will have this color. Leave empty for default. (Hex color code, <b>without leading <i>#</i></b>)';
// Username Images modification by Nas
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_board['id_moderator'] . '" title="' . $txt['board_moderator'] . '">' . $row_board['mod_real_name'] . '</a>'
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_board['id_moderator'] . '" title="' . $txt['board_moderator'] . '">' . generateUsernameImage($row_board['mod_real_name']) . '</a>'
'link' => $row_board['poster_name'] != '' ? (!empty($row_board['id_member']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row_board['id_member'] . '">' . $row_board['real_name'] . '</a>' : $row_board['real_name']) : $txt['not_applicable'],
'link' => $row_board['poster_name'] != '' ? (!empty($row_board['id_member']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row_board['id_member'] . '">' . generateUsernameImage($row_board['real_name']) . '</a>' : generateUsernameImage($row_board['real_name'])) : $txt['not_applicable'],
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . generateUsernameImage($row['real_name']) . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . generateUsernameImage($row['real_name']) . '</a>';
$context['view_members'][$row['log_time'] . $row['member_name']] = array(
'id' => $row['id_member'],
'username' => $row['member_name'],
'name' => $row['real_name'],
$context['view_members'][$row['log_time'] . $row['member_name']] = array(
'id' => $row['id_member'],
'username' => generateUsernameImage($row['member_name']),
'name' => generateUsernameImage($row['real_name']),
'member' => array(
'username' => $row['first_member_name'],
'name' => $row['first_display_name'],
'id' => $row['first_id_member'],
'href' => !empty($row['first_id_member']) ? $scripturl . '?action=profile;u=' . $row['first_id_member'] : '',
'link' => !empty($row['first_id_member']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['first_id_member'] . '" title="' . $txt['profile_of'] . ' ' . $row['first_display_name'] . '">' . $row['first_display_name'] . '</a>' : $row['first_display_name']
),
'member' => array(
'username' => generateUsernameImage($row['first_member_name']),
'name' => generateUsernameImage($row['first_display_name']),
'id' => $row['first_id_member'],
'href' => !empty($row['first_id_member']) ? $scripturl . '?action=profile;u=' . $row['first_id_member'] : '',
'link' => !empty($row['first_id_member']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['first_id_member'] . '" title="' . $txt['profile_of'] . ' ' . $row['first_display_name'] . '">' . generateUsernameImage($row['first_display_name']) . '</a>' : generateUsernameImage($row['first_display_name'])
),
'member' => array(
'username' => $row['last_member_name'],
'name' => $row['last_display_name'],
'id' => $row['last_id_member'],
'href' => !empty($row['last_id_member']) ? $scripturl . '?action=profile;u=' . $row['last_id_member'] : '',
'link' => !empty($row['last_id_member']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['last_id_member'] . '">' . $row['last_display_name'] . '</a>' : $row['last_display_name']
),
'member' => array(
'username' => generateUsernameImage($row['last_member_name']),
'name' => generateUsernameImage($row['last_display_name']),
'id' => $row['last_id_member'],
'href' => !empty($row['last_id_member']) ? $scripturl . '?action=profile;u=' . $row['last_id_member'] : '',
'link' => !empty($row['last_id_member']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['last_id_member'] . '">' . generateUsernameImage($row['last_display_name']) . '</a>' : generateUsernameImage($row['last_display_name'])
),
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '">' . $modSettings['latestRealName'] . '</a>',
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '">' . generateUsernameImage($modSettings['latestRealName']) . '</a>',
// Turn a regular username into an image (Username Image Mod by Nas)
function generateUsernameImage($username)
{
global $boardurl, $db_prefix, $smcFunc, $modSettings;
$request = $smcFunc['db_query']('', '
SELECT nameColor
FROM {db_prefix}members
WHERE real_name = {string:username}',
array(
'username' => $username,
)
);
$row = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
return '<img src="' . $boardurl. '/generateUserImage.php?username=' . $username . ';color=' . $row['nameColor'] . '" alt="' . $username . '" border="0" />';
sleep(1);
}
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . generateUsernameImage($row['real_name']) . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . generateUsernameImage($row['real_name']) . '</a>';
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>',
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . generateUsernameImage($profile['real_name']) . '</a>',
'blurb' => $profile['personal_text'],
'blurb' => $profile['nameColor'],
mem.signature, mem.personal_text, mem.location, mem.gender, mem.avatar, mem.id_member, mem.member_name,
mem.signature, mem.personal_text, mem.location, mem.gender, mem.avatar, mem.id_member, mem.member_name, mem.nameColor,
mem.real_name, mem.email_address, mem.hide_email, mem.date_registered, mem.website_title, mem.website_url,
mem.real_name, mem.email_address, mem.hide_email, mem.date_registered, mem.website_title, mem.website_url, mem.nameColor,
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
// The Username Image modification by Nas.
array('select', 'ui_font', array(&$txt['ui_forgottb'], &$txt['ui_kimbalt'], &$txt['ui_screenge'], &$txt['ui_walshes'], &$txt['ui_venusris'])),
array('int', 'ui_fontsize'),
array('text', 'ui_defaultcolor'),
array('int', 'ui_width'),
array('int', 'ui_height'),
array('check', 'ui_useshadows'),
'',
'avatar_choice', 'personal_text', 'hr',
'avatar_choice', 'personal_text', 'hr', 'nameColor',
'personal_text' => array(
'type' => 'text',
'label' => $txt['personal_text'],
'log_change' => true,
'input_attr' => array('maxlength="50"'),
'size' => 50,
'permission' => 'profile_extra',
),
'nameColor' => array(
'type' => 'text',
'label' => $txt['ui_namecolor'],
'subtext' => $txt['ui_namecolor_desc'],
'log_change' => false,
'input_attr' => array('maxlength="6"'),
'size' => 6,
'permission' => 'profile_extra',
),
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . generateUsernameImage($row['real_name']). '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . generateUsernameImage($row['real_name']) . '</a>';
<li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em></li>';
<li id="name">', $txt['hello_member_ndt'], ' <em>', generateUsernameImage($context['user']['name']), '</em></li>';
<h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
<h4>', generateUsernameImage($context['member']['name']), ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>';
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . generateUsernameImage($member['name']) . '</a>', '</span>';
<b>', $txt['hello_guest'], ' ', $context['user']['name'], '!</b>
<b>', $txt['hello_guest'], ' ', generateUsernameImage($context['user']['name']), '</b>
<b>', $txt['hello_guest'], ' ', $context['user']['name'], '!</b>
<b>', $txt['hello_guest'], ' ', generateUsernameImage($context['user']['name']), '</b>
// Username Images modification by Nas
//Admin settings
$txt['ui_font'] = 'Font <div class="smalltext">The font used in the username images. The fonts listed are the default fonts in SMF.</div>';
$txt['ui_width'] = 'Image width <div class="smalltext">The width of the username images.</div>';
$txt['ui_height'] = 'Image height <div class="smalltext">The height of the username images.</div>';
$txt['ui_fontsize'] = 'Font size <div class="smalltext">The font size used in the username images.</div>';
$txt['ui_useshadows'] = 'Use shadows <div class="smalltext">Enable this to add a shadow to each username image.</div>';
$txt['ui_defaultcolor'] = 'Default color <div class="smalltext">This color will be used if an user has not set any color themself. (Hex color code, <b>without leading <i>#</i></b>)</div>';
// Fonts
$txt['ui_forgottb'] = 'Forgottb';
$txt['ui_kimbalt'] = 'Kimbalt';
$txt['ui_screenge'] = 'Screenge';
$txt['ui_walshes'] = 'Walshes';
$txt['ui_venusris'] = 'Venusris';
// Others
$txt['ui_namecolor'] = 'Username color';
$txt['ui_namecolor_desc'] = 'Your username image will have this color. Leave empty for default. (Hex color code, <b>without leading <i>#</i></b>)';
// Username Images modification by Nas
Username Images 1.0 Beta 2 Replaces usernames around the forum with a automaticly generated text image. Link to Mod (http://www.simplemachines.org/community/index.php?topic=325248.0) | Development topic (http://www.simplemachines.org/community/index.php?topic=325248.0) | Bugreports / Feature requests (http://www.forentadatorerna.se/) | Author: Nas (http://custom.simplemachines.org/mods/index.php?action=profile;u=143954) Type: New feature (http://custom.simplemachines.org/mods/index.php?action=search;type=1) Available since: July 26 2009 Latest version: 1.0 Beta 2 Compatible with: 1.1.x, 2.0 RC1.2 Available languages: (https://www.simplemachines.org/site_images/lang/english.gif) (https://www.simplemachines.org/site_images/lang/swedish.gif) (https://www.simplemachines.org/site_images/lang/portuguese_brazilian.gif) |
Changelog legend + New feature - Feature removal ! Bugfix > New language < Removed language * New version support $ Initial release / Big update | Versionnames Format: $.o.x.! Example: 3.2.4.1 $ New version o New features added x Bugfix ! Small bugfix / New version support | Passed versions of this mod 1.0 Beta 1.1 1.0 Beta 1 |
Quote from: t2noob on July 29, 2009, 12:26:38 PM
Is there a way to add a font style to the mod?
array('select', 'ui_font', array(&$txt['ui_forgottb'], &$txt['ui_kimbalt'], &$txt['ui_screenge'], &$txt['ui_walshes'], &$txt['ui_venusris'])),
array('select', 'ui_font', array(&$txt['ui_forgottb'], &$txt['ui_kimbalt'], &$txt['ui_screenge'], &$txt['ui_walshes'], &$txt['ui_venusris'], &$txt['ui_myfont'])),
$txt['ui_myfont'] = 'Myfont';
// The available fonts. (These are the default SMF fonts)
$fonts = array(
'0' => $txt['ui_forgottb'],
'1' => $txt['ui_kimbalt'],
'2' => $txt['ui_screenge'],
'3' => $txt['ui_walshes'],
'4' => $txt['ui_venusris'],
);
// The available fonts. (These are the default SMF fonts)
$fonts = array(
'0' => $txt['ui_forgottb'],
'1' => $txt['ui_kimbalt'],
'2' => $txt['ui_screenge'],
'3' => $txt['ui_walshes'],
'4' => $txt['ui_venusris'],
'5' => $txt['ui_myfont'],
);
Quote from: Nas on November 01, 2009, 04:26:59 AM
You can't really generate images as that, which I told you a few weeks ago.
You'd have to make one yourself for each member and assign it to them, which would be useless IMO.
Quote from: Didds on October 31, 2009, 07:27:42 PMI can't help make a mod for that, but I believe you can accomplish it with ImageMagick.
I really appreciate the work Nas put into this, but it wasn't exactly what I was looking for, so if anyone else thinks they could make a mod that converts your name from text to a simple image such as (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi422.photobucket.com%2Falbums%2Fpp309%2Fdidds_bucket%2FRevampedBanner-1.png&hash=ad6035d90d241f4ecd655e4624446cccaab6c61a) or (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi422.photobucket.com%2Falbums%2Fpp309%2Fdidds_bucket%2FAndrewName.png&hash=07d67313b90d1f2f5cab4ed0640ae3d574ac3218) it would be greatly appreciated :)
convert -size 460×85 xc:transparent -font Bookman-Demi -pointsize 72 -draw "text 25,60 'TuxTweaks'" -channel RGBA -gaussian 0×6 -fill black -stroke blue -draw "text 20,55 'TuxTweaks'" fuzzy-tweaks.png
Quote from: Nas on December 25, 2009, 04:08:47 PM
Hello sid2varum.
Best way to find out would be backuping your forum and applying the modification. Chances are it will indeed work, perhaps with a few edits requiring change. However, if big edits are required to make it work, I'm afraid I won't help. I've left this mod to its faith.