(2016-12-26, 11:35 PM)Krados Wrote: Anyways for the FA plugin, are you willing by anyway to release/sell it?
Basic implementation with this plugin is fairly easy without very many edits..., though seeing as this plugin does not deal with on/off states..., you would have to do alot more edits to get that to function properly with this plugin and FA... of which I am clearly no going to cover in this simple basic DIY implementation
But if you want really basic implementation "DIY", here is what you do:
In myforumicons.php
in:
myforumicons_activate
Find:
find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote("id=\"mark_read_{\$forum['fid']}\"></span>")."#i", "id=\"mark_read_{\$forum['fid']}\" {\$forum['myforumicon_override']}></span>{\$forum['myforumicon']}");
Add after:
find_replace_templatesets("headerinclude", '#{\$stylesheets}(\r?)\n#', "{\$stylesheets}\n<link href=\"{\$mybb->asset_url}/inc/plugins/myforumicons/font-awesome/css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\">\n");
In myforumicons.php
in:
myforumicons_deactivate
find:
find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote(" {\$forum['myforumicon_override']}></span>{\$forum['myforumicon']}")."#i", "></span>");
add after:
find_replace_templatesets("headerinclude", '#<link href=\"{\$mybb->asset_url}/inc/plugins/myforumicons/font-awesome/css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\">(\r?)\n#', "", 0);
Still in In myforumicons.php
In:
myforumicons_display_icons
find:
$forum['myforumicon'] = "<img src=\"{$icon_path}\" alt=\"{$forum['name']}\" />";
replace with something like:
$forum['myforumicon'] = "<i style=\"font-size: 30px; display: inline-block !important;line-height: 50px !important;\" class=\"forum_{$forum['fid']} fa {$icon_path}\" aria-hidden=\"true\" alt=\"{$forum['name']}\" title=\"{$forum['name']}\"></i>";
To produce something like this:
In forum_management_myforumicons.lang.php
find:
$l['forum_icons'] = "Custom Forum Icon";
$l['forum_icons_desc'] = "The path to the custom icon to use for this forum. If you want to use different icons for different themes, please use <strong>{theme}</strong> to represent the image directory of each theme.";
Replace with:
$l['forum_icons'] = "Font Awesome Icon";
$l['forum_icons_desc'] = "The CSS name for the font awesome icon. For example: fa-comments";
to produce this:
So that it is no reliant on an external font-awesome link this included font-awesome within the plugin so...
now in inc/plugins folder
create a folder called myforumicons and place font-awesome folder with font-awesome files within it
ie:
inc/plugins/myforumicons/font-awesome
MyForumIcons_Basic_FA.zip (Size: 576.39 KB / Downloads: 162)
I actually have a fully functioning non basic version that I will release shortly though due to my laptop battery power needing to be charged I have yet to finish up the last few things:
On/off works, subforum icons etc all work via the forums management
Update: as promised..., here is the initial implementation of the fully functioning non basic version..., I have not had much time to spend on it further t the moment due to lack of battery on my laptop..., but it gets the job done as is...
Examples:
MyFontAwesomeIcons
Lets you implement custom Font-Awesome icons for your forums.
Created by Ethan DeLong & Vintagedaddyo
This is a highly modified version of the plugin: MyForumIcons - Custom Forum Icons by Ethan DeLong
Specifically modified by Vintagedaddyo for Font-Awesome implementation after several user requests for something of the sort.
This will allow you to add custom Font-Awesome icons for your forums.
You can specify a css name to your forum's custom font-awesome icon by going to the ACP => Forum Management => Edit Forum.
MyFontAwesomeIcons.zip (Size: 578.16 KB / Downloads: 144)