Support for SMF Tricks Themes & Mods

0 Members and 1 Guest are viewing this topic.

*
fortitude
Sniffer
Redsy - change node icons to font awesome?
June 07, 2015, 11:54:38 AM
I'd like to change icons for on/off/redirect to a font awesome icons.
Could you help me with that? I see that fontawesome is already included, which is super sweet.

Also 2.nd question
Do you maybe know how could I add font awesome icons in posts, like this one?
« Last Edit: June 07, 2015, 01:37:51 PM by fortitude »






*
fortitude
#1
Sniffer
bump! :(
*
Daniel
#2
Webmaster
1 question
BoardIndex.template.php
Search:
Code: [Select]
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
Replace with:
Code: [Select]
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<i class="fa fa-comment fa-3x" style="color:#222;"></i>';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<i class="fa fa-chain fa-3x" style="color:#222;"></i>';
// No new posts at all! The agony!!
else
echo '
<i class="fa fa-comment fa-3x" style="color:#ddd;"></i>';
MessageIndex.template.php
Search:
Code: [Select]
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
Replace with:
Code: [Select]
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<i class="fa fa-comment fa-3x" style="color:#222;"></i>';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<i class="fa fa-chain fa-3x" style="color:#222;"></i>';
// No new posts at all! The agony!!
else
echo '
<i class="fa fa-comment fa-3x" style="color:#ddd;"></i>';

2 question
What icons on posts you mean?
*
fortitude
#3
Sniffer
Muchas gracias, Daniel  :)

2nd. I meant in posts.

Like, if I could write here, in post <i class="fa fa-diamond></i> and it would automatically display diamond in my post message.

*
Diego Andrés
#4
Webmaster
There's a mod that does exactly that thing.
It wasn't approved, but I have just pm'd the author to see if he wants to update the mod to get it approved.

Regards
*
Diego Andrés
#5
Webmaster