Replace icons profile, website, email address, and personal message

Started by sakis11111, October 14, 2016, 05:34:23 PM

Previous topic - Next topic

sakis11111

I have installed a font awesome mod and now I would like to use it!

So, I want to replace the icons on poster area (profile, website, email address, and personal message), with font awesome icons. But its not a work for me as I see it. So can someone help me to replace at least one of the icons? Then I will copy paste the procedure for the rest of the icons

Sir Osis of Liver

In default Curve, icons are here -

  /Themes/default/images/icons/profile_sm.gif
  /Themes/default/images/www_sm.gif
  /Themes/default/images/email_sm.gif
  /Themes/default/images/im_on.gif

May vary with theme.  Right click on each icon and view 'Properties'.  Upload new icons to same location with same filename.  You may have to clear your browser cache to see them.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dhayzon

replace on post  or profile page ?

on   display.template.php     it would be like this



// Show the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
echo '
<li class="profile">
<ul>';
// Don't show the profile button if you're not allowed to view the profile.
if ($message['member']['can_view_profile'])
echo '
<li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" />' : $txt['view_profile']), '</a></li>';

// Don't show an icon if they haven't specified a website.
if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website']))
echo '
<li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />' : $txt['www']), '</a></li>';

// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';

// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';

echo '
</ul>
</li>';
}



replace  img tag

example

find
<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $message['member']['website']['title'] . '" />


change to
<i class="icon_youricon"  title="' . $message['member']['website']['title'] . '"></i>


Excuse my English is not good

Sir Osis of Liver

Quote from: sakis11111 on October 14, 2016, 05:34:23 PM
I want to replace the icons on poster area (profile, website, email address, and personal message), with font awesome icons.

No reason to mess with the code, just replace the images.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dhayzon


sakis11111

Quote from: Sir Osis of Liver on October 14, 2016, 10:42:21 PM
In default Curve, icons are here -

  /Themes/default/images/icons/profile_sm.gif
  /Themes/default/images/www_sm.gif
  /Themes/default/images/email_sm.gif
  /Themes/default/images/im_on.gif

May vary with theme.  Right click on each icon and view 'Properties'.  Upload new icons to same location with same filename.  You may have to clear your browser cache to see them.

Thank you for your answer Sir and I have already replace a lot of pics like this but I dont think font awesome works that way :)

sakis11111

On post Dh, thank you for your answer. And be sure that my English are not better than yours lol.
Yes, I almost knew this was the way but I didnt know what to replace with what. But I did replace the row you told me with the row you suggest and it doesnt work. It seems that I do something wrong.

What I did was this: I put the "camera-retro" font awesome icon on the code you gave me, so now it looks like this:

<i class="icon_fa-camera-retro"  title="' . $message['member']['website']['title'] . '"></i>

And the website png disappeared !


ps......... The mod I have installed is this: font-awesome-4.6.3. I tested making a post with [fa]trophy[/fa] code and it works when posting






sakis11111

I think that I found it Dh. The right syntax seems its like this:

'<i class="fa fa-camera-retro"  title="' . $message['member']['website']['title'] . '"></i>'

Thank you again :)

Advertisement: