SMF Tricks

SMF General (English) => Support for SMF Tricks Themes & Mods => Topic started by: fortitude on June 07, 2015, 11:54:38 AM

Title: Redsy - change node icons to font awesome?
Post by: fortitude on 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?
Title: Re: Redsy - change node icons to font awesome?
Post by: fortitude on June 10, 2015, 12:58:07 PM
bump! :(
Title: Re: Redsy - change node icons to font awesome?
Post by: Daniel on June 18, 2015, 05:11:50 PM
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?
Title: Re: Redsy - change node icons to font awesome?
Post by: fortitude on June 18, 2015, 06:01:36 PM
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.

Title: Re: Redsy - change node icons to font awesome?
Post by: Diego Andrés on June 25, 2015, 06:48:22 PM
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
Title: Re: Redsy - change node icons to font awesome?
Post by: Diego Andrés on July 08, 2015, 11:06:15 PM
The mod was released http://custom.simplemachines.org/mods/index.php?mod=3964