Author Topic: Resouce Library Modal Icon images  (Read 668 times)

Offline dhigz

  • Newbie
  • *
  • Posts: 43
  • Karma: +16/-0
    • View Profile
    • My AbanteCart Site:
Resouce Library Modal Icon images
« on: September 13, 2020, 04:08:49 PM »
I am a  long term user of AbanteCart. It has always annoyed me that all icons how in the Resource Library Modal with the fa-code icon instead of the actual icon. Since my the issue has been corrected in the Media Manager and icons show as they truly are and my level of frustration reached a peak, I decided to fix the problem. Little did I know how easy it was.

A small edit to /admin/view/default/template/responses/common/resource_library.tpl is all it took.

On line 184 find:
Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<i class="fa fa-code fa-3"></i>
        </div>
<?php } else { ?>

Change it to:

Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<?php echo $rl['resource_code']; ?>
         </div>
<?php } else { ?>

Please consider making this change in future releases.

Don Higbee

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4899
  • Karma: +255/-2
    • View Profile
Re: Resouce Library Modal Icon images
« Reply #1 on: September 13, 2020, 10:31:28 PM »
Hello.
Thank you for the suggestion we will check your code.
One notice, to display font-awesome or other icons require additional CSS and font resources to be loaded in the admin.

Offline HADY

  • Full Member
  • ***
  • Posts: 225
  • Karma: +18/-4
    • View Profile
Re: Resouce Library Modal Icon images
« Reply #2 on: September 14, 2020, 05:22:20 AM »
I am a  long term user of AbanteCart. It has always annoyed me that all icons how in the Resource Library Modal with the fa-code icon instead of the actual icon. Since my the issue has been corrected in the Media Manager and icons show as they truly are and my level of frustration reached a peak, I decided to fix the problem. Little did I know how easy it was.

A small edit to /admin/view/default/template/responses/common/resource_library.tpl is all it took.

On line 184 find:
Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<i class="fa fa-code fa-3"></i>
        </div>
<?php } else { ?>

Change it to:

Code: [Select]
<?php if ($rl['resource_code']) { ?>
<div class="thmb-prev thmb-icon">
<?php echo $rl['resource_code']; ?>
         </div>
<?php } else { ?>

Please consider making this change in future releases.



good point...
Thanks...
-----------------------------
Regards
HADY

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1929
  • Karma: +294/-12
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Resouce Library Modal Icon images
« Reply #3 on: September 14, 2020, 08:29:20 AM »
not sure it's a good idea.
If you accidentally posted some wrong html-code as code of resource you cannot to change it back because whole page will be broken
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod