게시판 글쓰기 이모지 넣기 기능 정보
게시판 게시판 글쓰기 이모지 넣기 기능관련링크
첨부파일
테스트한 버전5.4.4
호환 가능 버전5.3 이상
본문
게시글에 이모지콘이 필요할때 만들어 보았습니다.
버전 5.4.18
config.php
기존
define('G5_DB_CHARSET', 'utf8');
변경
define('G5_DB_CHARSET', 'utf8mb4');
/adm/sql_write.sql
46라인
ENGINE=MyISAM DEFAULT CHARSET=utf8;
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
신규 게시판 생성후 write.skin.php 와 view.skin.php 에 적용
write.skin.php
<!-- Begin emoji-picker Stylesheets -->
<link href="./lib/css/emoji.css" rel="stylesheet">
<div class="bo_w_tit write_div">
<label for="wr_1" class="sound_only">이모지<strong>필수</strong></label>
<div id="autosave_wrapper" class="write_div">
<input type="text" data-emojiable="true" name="wr_1" value="<?php echo $wr_1 ?>" id="wr_1" required class="frm_input full_input required" size="50" maxlength="255" placeholder="이모지">
</div>
</div>
<!-- Begin emoji-picker JavaScript -->
<script src="./lib/js/config.min.js"></script>
<script src="./lib/js/util.min.js"></script>
<script src="./lib/js/jquery.emojiarea.min.js"></script>
<script src="./lib/js/emoji-picker.min.js"></script>
<!-- End emoji-picker JavaScript -->
<script>
$(function() {
// Initializes and creates emoji set from sprite sheet
window.emojiPicker = new EmojiPicker({
emojiable_selector: '[data-emojiable=true]',
assetsPath: './lib/img/',
popupButtonClasses: 'fa fa-smile-o'
});
// Finds all elements with `emojiable_selector` and converts them to rich emoji input fields
// You may want to delay this step if you have dynamically created input fields that appear later in the loading process
// It can be called as many times as necessary; previously converted input fields will not be converted again
window.emojiPicker.discover();
});
</script>
view.skin.php
<div><?php echo $view['wr_1'];?></div>
lib폴더를 /bbs/ 밑에 업로드 해주세요
!-->!-->!-->!-->
추천
8
8
댓글 전체
감사합니다^^
멋지네요 감사합니다.^^
감사 합니다.
감사합니다.
감사합니다.