stom66

CMSMS Plugin FontAwesome

Nov 14th, 2017
153
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // A simple function to embed FontAwesome icons on the page
  3. // Simply outputs the appropriate <i> element and assumes you have already cinluded/linked
  4. //
  5. // Drafted by Calguy1000 in IRC
  6. // Place in /assets/plugins/function.fa.php
  7. // Use i param for shorthand
  8. // Use icon param for full/spaces
  9. // Examples:
  10. // {fa i=cube}
  11. // {fa icon="fa-cube fa-lg"}
  12.  
  13. function smarty_function_fa($params, &$smarty) {
  14. $icon = get_parameter_value($params,'i');
  15. $icon = get_parameter_value($params,'icon',"fa-".$icon);
  16. return "<i class=\"fa {$icon}\"></i>";
  17. }
  18. ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×