<?php
/**
* 使用了var_export()函数(PHP 4 >= 4.2.0, PHP 5)
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied Powered by www.1314study.com ');
}
require_once DISCUZ_ROOT . './source/plugin/study_nge/source/class/func.class.php';
require_once DISCUZ_ROOT . './source/plugin/study_nge/source/class/mysql.class.php';
require_once libfile('function/cache');
class study_nge {
var $data_dir = null;
var $plugin_config = array();
function __construct() {
global $_G;
// 插件配置
$this->plugin_config = $_G['cache']['plugin']['study_nge'];
$this->plugin_config['timestamp'] = $_G['timestamp'];
$this->plugin_config['data_num'] = $this->plugin_config['data_num'] ? $this->plugin_config['data_num'] : '10';
// 判断Discuz版本,确定缓存目录
require_once DISCUZ_ROOT . './source/discuz_version.php';
$disucz_version = DISCUZ_VERSION;
if(in_array($disucz_version, array('X1.5', 'X2'))) {
$this->plugin_config['data_dir'] = 'cache';
}else {
$this->plugin_config['data_dir'] = 'sysdata';
}
// 根据是否缓存调用不同的函数
$this->plugin_config['cache_fun'] = $this->plugin_config['cache_radio'] ? '_cache':'_nocache';
}
/**
* ******************************图片信息START****************************
*/
/**
* 调用图片信息主函数
*/
function get_image() {
$func_name = 'get_image' . $this->plugin_config['cache_fun'];
return $this->$func_name();
}
/**
* 调用图片信息cache函数
*/
function get_image_cache() {
$pic_cache_time = intval($this->plugin_config['pic_cache_time']);
if($pic_cache_time) {
$cache_file = DISCUZ_ROOT . './data/' . $this->plugin_config['data_dir'] . '/cache_study_nge_pic_data.php';
if(($this->plugin_config['timestamp'] - @filemtime($cache_file)) > $pic_cache_time) {
$pic_array = $this->get_image_nocache();
$cache_content .= '
//This is NOT a freeware, use is subject to license terms
//Powered by www.1314study.com
if(!defined(\'IN_DISCUZ\')) {
exit(\'Access Denied Powered by www.1314study.com \');
}
$pic_array = ' . var_export($pic_array, true) . ";\n";
writetocache('study_nge_pic_data', $cache_content);
}else {
@include_once $cache_file;
}
}else {
$pic_array = $this->get_image_nocache();
}
return $pic_array;
}
/**
* 调用图片信息nocache函数
*/
function get_image_nocache() {
global $_G;
$pic_array = array();
if($this->plugin_config['pic_select'] == 3) { // 自定义图片
$threadimage_array['pic'] = explode("\n", str_replace("\r\n", "\n", $this->plugin_config['pic_zdy_pic']));
$threadimage_array['text'] = explode("\n", str_replace("\r\n", "\n", $this->plugin_config['pic_zdy_text']));
$threadimage_array['url'] = explode("\n", str_replace("\r\n", "\n", $this->plugin_config['pic_zdy_url']));
if($this->plugin_config['pic_thumb_radio']) {
if(!class_exists('image')) {
include libfile('class/image');
}
$thumb_param['w'] = $this->plugin_config['pic_thumb_w'] ? $this->plugin_config['pic_thumb_w'] : '300';
$thumb_param['h'] = $this->plugin_config['pic_thumb_h2'] ? $this->plugin_config['pic_thumb_h2'] : '250';
$thumb_param['thumbtype'] = 'fixwr';
// 缩略图质量
$_G['setting']['thumbquality'] = $this->plugin_config['pic_thumb_quality'] ? $this->plugin_config['pic_thumb_quality'] : '100';
$parse = parse_url($_G['setting']['attachurl']);
$thumb_param['attachurl'] = !isset($parse['host']) ? $_G['siteurl'] . $_G['setting']['attachurl'] : $_G['setting']['attachurl'];
$thumb_param['type'] = 'zdy';
foreach($threadimage_array['pic'] as $key => $filename) {
if($filename) {
$thumb_param['filename'] = $filename;
$pic_array['pic']['zdy_' . $key] = study_nge_func::image_thumb($thumb_param);
$pic_array['text']['zdy_' . $key] = study_nge_func::messagecutstr($threadimage_array['text'][$key], $this->plugin_config['pic_title_length']);;
$pic_array['url']['zdy_' . $key] = $threadimage_array['url'][$key];
}
}
}else {
foreach($threadimage_array['pic'] as $key => $filename) {
if($filename) {
$pic_array['pic']['zdy_' . $key] = $filename;
$pic_array['text']['zdy_' . $key] = study_nge_func::messagecutstr($threadimage_array['text'][$key], $this->plugin_config['pic_title_length']);;
$pic_array['url']['zdy_' . $key] = $threadimage_array['url'][$key];
}
}
}
}elseif($this->plugin_config['pic_select'] == 2) { // 论坛附件
$pic_num = $this->plugin_config['pic_num'] ? $this->plugin_config['pic_num'] : '5';
$pic_limit_day = $this->plugin_config['pic_limit_day'] ? $this->plugin_config['pic_limit_day'] : '1';
$limit_time = study_nge_func::get_date($pic_limit_day);
// get_image_info
if($this->plugin_config['pic_select_way'] == '1'){
$condition = " AND t.dateline >'$limit_time' AND t.isgroup=0 AND t.displayorder>=0 ";
$condition .= study_nge_func::get_where_fids($this->plugin_config['pic_fids'],' AND t.fid IN({fids})');
}else{
$condition = " AND dateline >'$limit_time' AND attachment ='2' AND isgroup='0' AND displayorder>='0' ";
$condition .= study_nge_func::get_where_fids($this->plugin_config['pic_fids']);
}
if($this->plugin_config['pic_thumb_radio']) {
if(!class_exists('image')) {
include libfile('class/image');
}
$thumb_param['w'] = $this->plugin_config['pic_thumb_w'] ? $this->plugin_config['pic_thumb_w'] : '300';
$thumb_param['h'] = $this->plugin_config['pic_thumb_h2'] ? $this->plugin_config['pic_thumb_h2'] : '250';
$thumb_param['thumbtype'] = 'fixwr';
// 缩略图质量
$_G['setting']['thumbquality'] = $this->plugin_config['pic_thumb_quality'] ? $this->plugin_config['pic_thumb_quality'] : '100';
$parse = parse_url($_G['setting']['attachurl']);
$thumb_param['attachurl'] = !isset($parse['host']) ? $_G['siteurl'] . $_G['setting']['attachurl'] : $_G['setting']['attachurl'];
$thumb_param['type'] = 'att';
// foreach(study_nge_db::get_image_info($condition,$pic_num) as $threadimage) {
foreach(study_nge_db::get_att_info($condition, $pic_num, $this->plugin_config['pic_select_way']) as $threadimage) {
if($threadimage['remote']) {
$thumb_param['filename'] = $_G['setting']['ftp']['attachurl'] . 'forum/' . $threadimage['attachment'];
}else {
$thumb_param['filename'] = $_G['setting']['attachurl'] . 'forum/' . $threadimage['attachment'];
}
$pic_array['pic']['att_' . $threadimage['tid']] = study_nge_func::image_thumb($thumb_param);
$pic_array['text']['att_' . $threadimage['tid']] = study_nge_func::messagecutstr($threadimage['subject'], $this->plugin_config['pic_title_length']);
$pic_array['url']['att_' . $threadimage['tid']] = 'forum.php?mod=viewthread&tid=' . $threadimage[tid];
}
}else {
// foreach(study_nge_db::get_image_info($condition,$pic_num) as $threadimage) {
foreach(study_
没有合适的资源?快使用搜索试试~ 我知道了~
1314学习网首页N格 V1.8.4商业高级版
共90个文件
gif:36个
php:17个
htm:16个
4星 · 超过85%的资源 需积分: 9 41 下载量 149 浏览量
2013-04-14
14:52:43
上传
评论 1
收藏 231KB RAR 举报
温馨提示
1314学习网首页N格 V1.8.4商业高级版 功能强大 可定制性强 discuzX 2.5论坛必备 内附插件和破解PHP文件 使用方法:将下载压缩包解压将里面的source文件直接拷贝到论坛根目录下覆盖 然后登陆后台 应用 插件 安装插件 最后开启就行。
资源推荐
资源详情
资源评论
收起资源包目录
1314学习网首页N格 V1.8.4商业高级版.rar (90个子文件)
1314学习网首页N格 V1.8.4商业高级版
source
plugin
study_nge
source
class
func.class.php 9KB
get_data.class.php 28KB
mysql.class.php 5KB
discuz_plugin_study_nge_TC_UTF8.xml 53KB
desktopshotcut.inc.php 436B
nge.class.php 9KB
images
list12.gif 2KB
list10.gif 2KB
list18.gif 3KB
list27.gif 4KB
list9.gif 2KB
list7.gif 2KB
op.png 607B
clock.swf 3KB
list4.gif 1KB
icon_search.png 1KB
list17.gif 3KB
list2.gif 709B
list5.gif 1KB
avatar2.jpg 2KB
list8.gif 2KB
list21.gif 3KB
title.js 3KB
poststar
2.gif 1KB
0.gif 1KB
1.gif 1KB
Thumbs.db 14KB
list30.gif 4KB
list24.gif 3KB
list16.gif 3KB
list13.gif 3KB
focus.swf 12KB
list22.gif 3KB
list11.gif 2KB
index.htm 1B
list23.gif 3KB
list20.gif 3KB
list3.gif 848B
Thumbs.db 71KB
listbg.gif 56B
list28.gif 4KB
avatar1.jpg 2KB
list26.gif 4KB
list29.gif 4KB
mood_input_btn.png 2KB
list14.gif 3KB
list19.gif 3KB
avatar0.jpg 1KB
list25.gif 3KB
list1.gif 349B
list6.gif 2KB
list15.gif 3KB
ngethread.inc.php 3KB
feedback.inc.php 845B
discuz_plugin_study_nge_SC_GBK.xml 48KB
admincp.inc.php 9KB
discuz_plugin_study_nge_SC_UTF8.xml 53KB
changelog.inc.php 847B
index.htm 29B
template
xshow
output.php 1KB
xshow.htm 23KB
config.php 419B
images
newshy.jpg 26KB
index.htm 0B
Thumbs.db 8KB
listbg.gif 82B
list.gif 3KB
js
index.htm 1B
common.js 5KB
css
nge.css 1KB
index.htm 1B
default
threads.htm 8KB
output.php 2KB
config.php 2KB
bottom_avatar.htm 3KB
js
index.htm 1B
common.js 6KB
thread_card.htm 3KB
nge.htm 6KB
pic.htm 4KB
member.htm 8KB
css
nge.css 2KB
index.htm 1B
index.htm 21B
phpwind
output.php 2KB
config.php 1KB
nge.htm 4KB
addon.inc.php 827B
discuz_plugin_study_nge_TC_BIG5.xml 48KB
function
function_cloudaddons.php 10KB
共 90 条
- 1
资源评论
- cyflyw2013-05-25不错~~不过不是最新版本的~~
- celestialwr2014-02-26这个不错,已经在用了,适合新手使用
u010292487
- 粉丝: 0
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功