[Solved] fontawesome-icons for file-fields

More
7 years 10 months ago - 7 years 10 months ago #61637 by kath
hi there,

here's how you can have fontawesome-icons in your flexicontent-file-fields instead of the default file-type-images.
This method is update-save and hack-free.
  1. copy file "value_InlineBoxes.php"
    from /plugins/flexicontent_fields/file/tmpl/value_InlineBoxes.php
    to /templates/<mytemplate>/html/flexicontent_fields/file/value_InlineBoxes.php
  2. edit the copied file in /templates/... .
  3. near line 60, replace
    Code:
    $icon = JHTML::image($file_data->icon, $file_data->ext, 'class="fcicon-mime hasTooltip" title="'.JHtml::tooltipText($_tooltip_title, $_tooltip_content, 1, 0).'"'); $icon = '<span class="fcfile_mime">'.$icon.'</span>';
    with
    Code:
    $aFileTypes = array( 'pdf' => 'pdf-o', 'xls' => 'excel-o', 'xlsx' => 'excel-o', 'ods' => 'excel-o', 'ppt' => 'powerpoint-o', 'pptx' => 'powerpoint-o', 'doc' => 'word-o', 'docx' => 'word-o', 'default' => 'file-o', ); $sFileType = (isset($aFileTypes[$file_data->ext])) ? $aFileTypes[$file_data->ext] : $aFileTypes['default']; $icon = '<i class="fa fa-file-'.$sFileType.'"></i>';
  4. tweak as you like, enjoy fontawsome-icons
Last edit: 7 years 10 months ago by kath.

Please Log in or Create an account to join the conversation.

More
7 years 10 months ago #61648 by ggppdk
Hello

i am thinking we can buy a developer license and use font-awesome for FLEXIcontent default icons


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.264 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline