-
Notifications
You must be signed in to change notification settings - Fork 22
Ghi chú phát triển module download 4.0.30
Tan Dung Phan edited this page Sep 15, 2016
·
3 revisions
INSERT INTO `nv4_vi_download_config` (`config_name`, `config_value`) VALUES ('shareport', 'none'), ('addthis_pubid', '');
Nếu giao diện sử dụng có module download thì:
Nếu tồn tại file themes/ten-theme/modules/download/theme.php
, mở nó, tìm vị trí hàm view_file
. Bên trong hàm thêm vào vị trí thích hợp đoạn
if ($download_config['shareport'] == 'addthis') {
$xtpl->assign('ADDTHIS_PUBID', $download_config['addthis_pubid']);
$xtpl->parse('main.addthis');
}
Nếu tồn tại file themes/ten-theme/modules/download/viewfile.tpl
, mở nó tìm
<h2 class="m-bottom">{ROW.title}</h2>
Hoặc tương đương thêm vào sau
<!-- BEGIN: addthis -->
<div class="m-bottom clearfix">
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={ADDTHIS_PUBID}"></script>
<div class="addthis_sharing_toolbox"></div>
</div>
<!-- END: addthis -->
INSERT INTO `nv4_vi_download_config` (`config_name`, `config_value`) VALUES ('pdf_handler', 'filetmp');
Hai giá trị:
- filetmp
- base64