วิธีเรียกicon(ไอค่อน) ตัวสแตนดาร์ด joomlaจูมล่า วิธีแก้ปัญหาIcon(ไอค่อนไม่มา)

คู่มือ แชร์วิธีใช้งาน Joomla ทุกเวอร์ชั่น ตั้งแต่ การติดต้้งและใช้งานต่างๆ

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
pond
PHP Super Hero Member
PHP Super Hero Member
โพสต์: 571
ลงทะเบียนเมื่อ: 25/05/2016 9:44 am

วิธีเรียกicon(ไอค่อน) ตัวสแตนดาร์ด joomlaจูมล่า วิธีแก้ปัญหาIcon(ไอค่อนไม่มา)

โพสต์โดย pond » 15/07/2016 7:14 pm

ซึ่งถ้าหากว่าท่านอยากสร้างเทมเพลตขึ้นมาใช้เองหรือทำขาย ซึ่งอาจจะติดปัญหา ตัวคอมโพเน้นท์ โมดูล หรือ ปลักอิน ต่างๆ ที่เป็นตัวตัวสแตนดาร์ด ของJoomlaจูมล่านั้น Icon(ไอค่อน)ไม่ยอมแสดง วันนี้เราเลยจะมาสอนวิธีแก้ไขหรือเรียกใช้งานดังนี้
icon.png
icon.png (28.77 KiB) เปิดดู 249 ครั้ง


ให้สร้างไฟล์ less ที่ชื่อว่า icomoon.less โดยมี code แบบข้างล่างนี้ เอาไปไว้ที่โฟลเดอร์ fonts

โค้ด: เลือกทั้งหมด

@font-face {
   font-family: 'IcoMoon';
   src: url('../../../media/jui/fonts/IcoMoon.eot');
   src: url('../../../media/jui/fonts/IcoMoon.eot?#iefix') format('embedded-opentype'),
   url('../../../media/jui/fonts/IcoMoon.woff') format('woff'),
   url('../../../media/jui/fonts/IcoMoon.ttf') format('truetype'),
   url('../../../media/jui/fonts/IcoMoon.svg#IcoMoon') format('svg');
   font-weight: normal;
   font-style: normal;
}
@import "../../../media/jui/less/icomoon.less";


เอา code ข้างล่างนี้ไปวางไว้ในไฟล์ css ของเราบนสุด

โค้ด: เลือกทั้งหมด

@import url(../fonts/icomoon.less);


นำ code ข้างล่างนี้ไปวางไว้ในไฟล์ css ของเรา

โค้ด: เลือกทั้งหมด

.icon-joomla:before {
   content: "\e200";
}
.icon-chevron-up:before,
.icon-uparrow:before,
.icon-arrow-up:before {
   content: "\e005";
}
.icon-chevron-right:before,
.icon-rightarrow:before,
.icon-arrow-right:before {
   content: "\e006";
}
.icon-chevron-down:before,
.icon-downarrow:before,
.icon-arrow-down:before {
   content: "\e007";
}
.icon-chevron-left:before,
.icon-leftarrow:before,
.icon-arrow-left:before {
   content: "\e008";
}
.icon-arrow-first:before {
   content: "\e003";
}
.icon-arrow-last:before {
   content: "\e004";
}
.icon-arrow-up-2:before {
   content: "\e009";
}
.icon-arrow-right-2:before {
   content: "\e00a";
}
.icon-arrow-down-2:before {
   content: "\e00b";
}
.icon-arrow-left-2:before {
   content: "\e00c";
}
.icon-arrow-up-3:before {
   content: "\e00f";
}
.icon-arrow-right-3:before {
   content: "\e010";
}
.icon-arrow-down-3:before {
   content: "\e011";
}
.icon-arrow-left-3:before {
   content: "\e012";
}
.icon-menu-2:before {
   content: "\e00e";
}
.icon-arrow-up-4:before {
   content: "\e201";
}
.icon-arrow-right-4:before {
   content: "\e202";
}
.icon-arrow-down-4:before {
   content: "\e203";
}
.icon-arrow-left-4:before {
   content: "\e204";
}
.icon-share:before,
.icon-redo:before {
   content: "\27";
}
.icon-undo:before {
   content: "\28";
}
.icon-forward-2:before {
   content: "\e205";
}
.icon-backward-2:before,
.icon-reply:before {
   content: "\e206";
}
.icon-unblock:before,
.icon-refresh:before,
.icon-redo-2:before {
   content: "\6c";
}
.icon-undo-2:before {
   content: "\e207";
}
.icon-move:before {
   content: "\7a";
}
.icon-expand:before {
   content: "\66";
}
.icon-contract:before {
   content: "\67";
}
.icon-expand-2:before {
   content: "\68";
}
.icon-contract-2:before {
   content: "\69";
}
.icon-play:before {
   content: "\e208";
}
.icon-pause:before {
   content: "\e209";
}
.icon-stop:before {
   content: "\e210";
}
.icon-previous:before,
.icon-backward:before {
   content: "\7c";
}
.icon-next:before,
.icon-forward:before {
   content: "\7b";
}
.icon-first:before {
   content: "\7d";
}
.icon-last:before {
   content: "\e000";
}
.icon-play-circle:before {
   content: "\e00d";
}
.icon-pause-circle:before {
   content: "\e211";
}
.icon-stop-circle:before {
   content: "\e212";
}
.icon-backward-circle:before {
   content: "\e213";
}
.icon-forward-circle:before {
   content: "\e214";
}
.icon-loop:before {
   content: "\e001";
}
.icon-shuffle:before {
   content: "\e002";
}
.icon-search:before {
   content: "\53";
}
.icon-zoom-in:before {
   content: "\64";
}
.icon-zoom-out:before {
   content: "\65";
}
.icon-apply:before,
.icon-edit:before,
.icon-pencil:before {
   content: "\2b";
}
.icon-pencil-2:before {
   content: "\2c";
}
.icon-brush:before {
   content: "\3b";
}
.icon-save-new:before,
.icon-plus-2:before {
   content: "\5d";
}
.icon-minus-sign:before,
.icon-minus-2:before {
   content: "\5e";
}
.icon-delete:before,
.icon-remove:before,
.icon-cancel-2:before {
   content: "\49";
}
.icon-publish:before,
.icon-save:before,
.icon-ok:before,
.icon-checkmark:before {
   content: "\47";
}
.icon-new:before,
.icon-plus:before {
   content: "\2a";
}
.icon-plus-circle:before {
   content: "\e215";
}
.icon-minus:before,
.icon-not-ok:before {
   content: "\4b";
}
.icon-ban-circle:before,
.icon-minus-circle:before {
   content: "\e216";
}
.icon-unpublish:before,
.icon-cancel:before {
   content: "\4a";
}
.icon-cancel-circle:before {
   content: "\e217";
}
.icon-checkmark-2:before {
   content: "\e218";
}
.icon-checkmark-circle:before {
   content: "\e219";
}
.icon-info:before {
   content: "\e220";
}
.icon-info-2:before,
.icon-info-circle:before {
   content: "\e221";
}
.icon-question:before,
.icon-question-sign:before,
.icon-help:before {
   content: "\45";
}
.icon-question-2:before,
.icon-question-circle:before {
   content: "\e222";
}
.icon-notification:before {
   content: "\e223";
}
.icon-notification-2:before,
.icon-notification-circle:before {
   content: "\e224";
}
.icon-pending:before,
.icon-warning:before {
   content: "\48";
}
.icon-warning-2:before,
.icon-warning-circle:before {
   content: "\e225";
}
.icon-checkbox-unchecked:before {
   content: "\3d";
}
.icon-checkin:before,
.icon-checkbox:before,
.icon-checkbox-checked:before {
   content: "\3e";
}
.icon-checkbox-partial:before {
   content: "\3f";
}
.icon-square:before {
   content: "\e226";
}
.icon-radio-unchecked:before {
   content: "\e227";
}
.icon-radio-checked:before,
.icon-generic:before {
   content: "\e228";
}
.icon-circle:before {
   content: "\e229";
}
.icon-signup:before {
   content: "\e230";
}
.icon-grid:before,
.icon-grid-view:before {
   content: "\58";
}
.icon-grid-2:before,
.icon-grid-view-2:before {
   content: "\59";
}
.icon-menu:before {
   content: "\5a";
}
.icon-list:before,
.icon-list-view:before {
   content: "\31";
}
.icon-list-2:before {
   content: "\e231";
}
.icon-menu-3:before {
   content: "\e232";
}
.icon-folder-open:before,
.icon-folder:before {
   content: "\2d";
}
.icon-folder-close:before,
.icon-folder-2:before {
   content: "\2e";
}
.icon-folder-plus:before {
   content: "\e234";
}
.icon-folder-minus:before {
   content: "\e235";
}
.icon-folder-3:before {
   content: "\e236";
}
.icon-folder-plus-2:before {
   content: "\e237";
}
.icon-folder-remove:before {
   content: "\e238";
}
.icon-file:before {
   content: "\e016";
}
.icon-file-2:before {
   content: "\e239";
}
.icon-file-add:before,
.icon-file-plus:before {
   content: "\29";
}
.icon-file-minus:before {
   content: "\e017";
}
.icon-file-check:before {
   content: "\e240";
}
.icon-file-remove:before {
   content: "\e241";
}
.icon-save-copy:before,
.icon-copy:before {
   content: "\e018";
}
.icon-stack:before {
   content: "\e242";
}
.icon-tree:before {
   content: "\e243";
}
.icon-tree-2:before {
   content: "\e244";
}
.icon-paragraph-left:before {
   content: "\e246";
}
.icon-paragraph-center:before {
   content: "\e247";
}
.icon-paragraph-right:before {
   content: "\e248";
}
.icon-paragraph-justify:before {
   content: "\e249";
}
.icon-screen:before {
   content: "\e01c";
}
.icon-tablet:before {
   content: "\e01d";
}
.icon-mobile:before {
   content: "\e01e";
}
.icon-box-add:before {
   content: "\51";
}
.icon-box-remove:before {
   content: "\52";
}
.icon-download:before {
   content: "\e021";
}
.icon-upload:before {
   content: "\e022";
}
.icon-home:before {
   content: "\21";
}
.icon-home-2:before {
   content: "\e250";
}
.icon-out-2:before,
.icon-new-tab:before {
   content: "\e024";
}
.icon-out-3:before,
.icon-new-tab-2:before {
   content: "\e251";
}
.icon-link:before {
   content: "\e252";
}
.icon-picture:before,
.icon-image:before {
   content: "\2f";
}
.icon-pictures:before,
.icon-images:before {
   content: "\30";
}
.icon-palette:before,
.icon-color-palette:before {
   content: "\e014";
}
.icon-camera:before {
   content: "\55";
}
.icon-camera-2:before,
.icon-video:before {
   content: "\e015";
}
.icon-play-2:before,
.icon-video-2:before,
.icon-youtube:before {
   content: "\56";
}
.icon-music:before {
   content: "\57";
}
.icon-user:before {
   content: "\22";
}
.icon-users:before {
   content: "\e01f";
}
.icon-vcard:before {
   content: "\6d";
}
.icon-address:before {
   content: "\70";
}
.icon-share-alt:before,
.icon-out:before {
   content: "\26";
}
.icon-enter:before {
   content: "\e257";
}
.icon-exit:before {
   content: "\e258";
}
.icon-comment:before,
.icon-comments:before {
   content: "\24";
}
.icon-comments-2:before {
   content: "\25";
}
.icon-quote:before,
.icon-quotes-left:before {
   content: "\60";
}
.icon-quote-2:before,
.icon-quotes-right:before {
   content: "\61";
}
.icon-quote-3:before,
.icon-bubble-quote:before {
   content: "\e259";
}
.icon-phone:before {
   content: "\e260";
}
.icon-phone-2:before {
   content: "\e261";
}
.icon-envelope:before,
.icon-mail:before {
   content: "\4d";
}
.icon-envelope-opened:before,
.icon-mail-2:before {
   content: "\4e";
}
.icon-unarchive:before,
.icon-drawer:before {
   content: "\4f";
}
.icon-archive:before,
.icon-drawer-2:before {
   content: "\50";
}
.icon-briefcase:before {
   content: "\e020";
}
.icon-tag:before {
   content: "\e262";
}
.icon-tag-2:before {
   content: "\e263";
}
.icon-tags:before {
   content: "\e264";
}
.icon-tags-2:before {
   content: "\e265";
}
.icon-options:before,
.icon-cog:before {
   content: "\38";
}
.icon-cogs:before {
   content: "\37";
}
.icon-screwdriver:before,
.icon-tools:before {
   content: "\36";
}
.icon-wrench:before {
   content: "\3a";
}
.icon-equalizer:before {
   content: "\39";
}
.icon-dashboard:before {
   content: "\78";
}
.icon-switch:before {
   content: "\e266";
}
.icon-filter:before {
   content: "\54";
}
.icon-purge:before,
.icon-trash:before {
   content: "\4c";
}
.icon-checkedout:before,
.icon-lock:before,
.icon-locked:before {
   content: "\23";
}
.icon-unlock:before {
   content: "\e267";
}
.icon-key:before {
   content: "\5f";
}
.icon-support:before {
   content: "\46";
}
.icon-database:before {
   content: "\62";
}
.icon-scissors:before {
   content: "\e268";
}
.icon-health:before {
   content: "\6a";
}
.icon-wand:before {
   content: "\6b";
}
.icon-eye-open:before,
.icon-eye:before {
   content: "\3c";
}
.icon-eye-close:before,
.icon-eye-blocked:before,
.icon-eye-2:before {
   content: "\e269";
}
.icon-clock:before {
   content: "\6e";
}
.icon-compass:before {
   content: "\6f";
}
.icon-broadcast:before,
.icon-connection:before,
.icon-wifi:before {
   content: "\e01b";
}
.icon-book:before {
   content: "\e271";
}
.icon-lightning:before,
.icon-flash:before {
   content: "\79";
}
.icon-print:before,
.icon-printer:before {
   content: "\e013";
}
.icon-feed:before {
   content: "\71";
}
.icon-calendar:before {
   content: "\43";
}
.icon-calendar-2:before {
   content: "\44";
}
.icon-calendar-3:before {
   content: "\e273";
}
.icon-pie:before {
   content: "\77";
}
.icon-bars:before {
   content: "\76";
}
.icon-chart:before {
   content: "\75";
}
.icon-power-cord:before {
   content: "\32";
}
.icon-cube:before {
   content: "\33";
}
.icon-puzzle:before {
   content: "\34";
}
.icon-attachment:before,
.icon-paperclip:before,
.icon-flag-2:before {
   content: "\72";
}
.icon-lamp:before {
   content: "\74";
}
.icon-pin:before,
.icon-pushpin:before {
   content: "\73";
}
.icon-location:before {
   content: "\63";
}
.icon-shield:before {
   content: "\e274";
}
.icon-flag:before {
   content: "\35";
}
.icon-flag-3:before {
   content: "\e275";
}
.icon-bookmark:before {
   content: "\e023";
}
.icon-bookmark-2:before {
   content: "\e276";
}
.icon-heart:before {
   content: "\e277";
}
.icon-heart-2:before {
   content: "\e278";
}
.icon-thumbs-up:before {
   content: "\5b";
}
.icon-thumbs-down:before {
   content: "\5c";
}
.icon-unfeatured:before,
.icon-asterisk:before,
.icon-star-empty:before {
   content: "\40";
}
.icon-star-2:before {
   content: "\41";
}
.icon-featured:before,
.icon-default:before,
.icon-star:before {
   content: "\42";
}
.icon-smiley:before,
.icon-smiley-happy:before {
   content: "\e279";
}
.icon-smiley-2:before,
.icon-smiley-happy-2:before {
   content: "\e280";
}
.icon-smiley-sad:before {
   content: "\e281";
}
.icon-smiley-sad-2:before {
   content: "\e282";
}
.icon-smiley-neutral:before {
   content: "\e283";
}
.icon-smiley-neutral-2:before {
   content: "\e284";
}
.icon-cart:before {
   content: "\e019";
}
.icon-basket:before {
   content: "\e01a";
}
.icon-credit:before {
   content: "\e286";
}
.icon-credit-2:before {
   content: "\e287";
}
.icon-expired:before {
   content: "\4b";
}

โค้ด: เลือกทั้งหมด

[class^="icon-"]::before, [class*=" icon-"]::before {
    font-family: 'IcoMoon';
    font-style: normal;
    speak: none;
}
[class^="icon-"], [class*=" icon-"] {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: .25em;
    line-height: 14px;
}
.icon-bar{
    margin-top: 2px;
    margin-bottom: 2px;
}

เพียงเท่านี้คอมโพเน้นท์ โมดูล ปลักอิน ต่างๆ ที่เป็นตัวตัวสแตนดาร์ด ของJoomla (จูมล่า)ได้แล้ว
แก้ไขล่าสุดโดย pond เมื่อ 24/09/2016 4:01 pm, แก้ไขไปแล้ว 1 ครั้ง.

toonytoony2004
PHP Hero Member
PHP Hero Member
โพสต์: 102
ลงทะเบียนเมื่อ: 27/07/2013 9:29 am

Re: วิธีเรียกicon(ไอค่อน) ตัวสแตนดาร์ด joomla วิธีแก้ปัญหาIcon(ไอค่อนไม่มา)

โพสต์โดย toonytoony2004 » 18/07/2016 12:27 pm

ขอบคุณครับ ผมเคยหาทางแก้ไข แต่ทำไม่เป็น

ภาพประจำตัวสมาชิก
pond
PHP Super Hero Member
PHP Super Hero Member
โพสต์: 571
ลงทะเบียนเมื่อ: 25/05/2016 9:44 am

Re: วิธีเรียกicon(ไอค่อน) ตัวสแตนดาร์ด joomla วิธีแก้ปัญหาIcon(ไอค่อนไม่มา)

โพสต์โดย pond » 18/07/2016 2:21 pm

toonytoony2004 เขียน:ขอบคุณครับ ผมเคยหาทางแก้ไข แต่ทำไม่เป็น

ต้องเอาไฟล์ที่เป็นรูปภาพมาด้วยนะ เก็บไว้อยู่ในเทมเพลตพื้นฐาน joomla ที่ชื่อว่า protostar โฟลเดอร img

Chavantorn

Re: วิธีเรียกicon(ไอค่อน) ตัวสแตนดาร์ด joomla วิธีแก้ปัญหาIcon(ไอค่อนไม่มา)

โพสต์โดย Chavantorn » 19/07/2016 12:54 am

:roll: [quote="pond"][quote="toonytoony2004"]ขอบคุณครับ ผมเคยหาทางแก้ไข แต่ทำไม่เป็น[/quote]
ต้องเอาไฟล์ที่เป็นรูปภาพมาด้วยนะ เก็บไว้อยู่ในเทมเพลตพื้นฐาน joomla ที่ชื่อว่า protostar โฟลเดอร img[/quote]


ย้อนกลับไปยัง

ผู้ใช้งานขณะนี้

กำลังดูบอร์ดนี้: 1 และ บุคคลทั่วไป 0 ท่าน