Four grids on the homepage, five grids on the homepage For6.0 (GBK) (UTF-8) [12 combinations] [9-18] [Moderator installation test passed]_PHP tutorial

WBOY
Release: 2016-07-21 15:54:49
Original
1084 people have browsed it

Four-frame homepage, five-frame homepage downloaded 10,000 times For6.0 (GBK) (UTF-8) [12 combinations] [9-18] [Moderator installation test passed]
Quote:
This plug-in is provided by Moderator sakurakawaii tested the installation under Windows XP Discuz! 6.0.0 standard template IE6 Mysql4.1 at 15:30 on September 8, 2007.
This test only means that the plug-in is installed without errors. Including references to problems that may arise in long-term use in the future:
Statement: This program quotes part of the 5.0 four-frame code. If the source code author has any comments, please message me and I will delete it and publish it!
After extensive modifications and flash settings added With a lot of custom settings, this plug-in can be said to be the most comprehensive and beautiful one in the forum! Congratulations on this plug-in passing the moderator test!

Update list and plug-in advantages:

9-18: Add six grids to the homepage at the request of friends (pictures + new posts + replies + popular this week + highlights of this month + today’s rankings) please go to Download the attachment package at the bottom
9-15: Updated the problem that a few friends’ servers do not support , resulting in pictures not being displayed. (Just download the package directly and overwrite pic.php)
9-13: At the request of forum friends, we added a four-frame call combination with the number of days to build the website without pictures! (See the demo at the bottom of the attachment)
9-10: Add the UTF-8 version of four and five grids that is rare in the forum. Please download and use it! (See the bottom of the attachment)
9-9 8:00 Update:
Quote:
Fixed the problem of line wrapping of post titles in all combinations when the screen resolution is small or columns are turned on!
9-8 14:00
In response to requests from friends, the four-frame style has been newly changed. There are currently seven calling methods (see attachment).
In response to everyone's request, the following two combinations have been added (already released)
1. Pictures, new posts, latest replies, popular this week, ranking of today's posts (five boxes on the homepage)
2. New posts, Latest replies, hot topics this week, highlights
9-7: Solved the problem of sensitive words still being displayed in four boxes after filtering!
9-6: Breakthrough: Changed the previous flash style, changed the text below It is beautiful and solves the problem of picture card and flash calling raised by many friends! Now it is very fast, and you can customize the buttons, text, background color and background transparency in flash. It is truly user-friendly and meets your requirements for matching forum style and color!
9-6: Special update: When the forum opens the theme recycle bin, there will no longer be a situation where posts are still displayed in four spaces on the homepage after being placed in the theme recycle bin. !

Comments on various parameters that can be set by yourself (in view of the fact that many friends do not know the setting method, all the content that can be set is written below for everyone’s use)
1/3: pic .php

Copy code The code is as follows:
$shownums = 5;//The number of demonstrations is within 6
$searchnums = 50;//Total number of searches.
$cachelife = 1800;//Cache time.
$orderby = 'dateline';//Search order: by date dateline. By number of views downloads. Random rand.
$cachename = 'showpic';//Cache name. If it conflicts with any plug-in, please modify it. As long as there is no conflict, it will not affect the use.
$searchfid = '';//Search fid range. Leave blank without restriction. .Please separate them with commas, such as '1,2,3'.

var config='5|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'
//-- config parameters -- Auto play time (seconds)|Text color|Text background color|Text background transparency|Button number color|Current button color|Normal button color
var swf_width=255 Set flash width
var swf_height=175 Set flash height 2 /3

In index.php, copy the code

in
. The code is as follows:

$hack_cut_str = 26; //Number of title words
DESC LIMIT 0, 10" //Set the number of displayed items

If you don’t want to call a certain version or a certain area or a certain version of posts, you can Add the space reserved for everyone in index.php: (three places in total)
and f.fid not in (0)
is added to:
and f.fid not in (1,2,3 ) Among them, 123 is the fid that you don’t want to call,
or you just want to call 1 2 3. Change it to: and f.fid in (1,2,3)3/3: discuz.htm quoted:
If you want to When the link in the latest reply opens, it will point to the location of the last reply to this post. Just copy the code in discuz.htm:

The code is as follows:

changed to:

Copy code The code is as follows:


If you need to add the telescopic click function to each area like the official one, please rewrite it in discuz.htm (five boxes, if it is four boxes, please follow

≡ Popular this week ≡


Copy code The code is as follows:

< ;h3>Post today




is:
Copy code The code is as follows:


Collapse/Expand

Today’s post







Demonstration picture: (New style written according to requirements, making it more complete among the six official styles...)
Four grids on the homepage, five grids on the homepage For6.0 (GBK) (UTF-8) [12 combinations] [9-18] [Moderator installation test passed]_PHP tutorial
Use The files that need to be added to this plug-in are:

pic.php //Calling the forum image data,
list.gif and listbg.gif //The picture in the title
focus.swf / /Call the flash of the image [This swf is very different from the previous one, I personally think it is better]
The files that need to be modified are:

index.php
discuz.htm
======================= Start adding and modifying ======================= =====
Steps: 4 steps in total

Transfer pic.php / list.gif / listbg.gif / focus.swf to FTP (website) according to the downloaded attachment structure )
Among them: pic.php in the forum root directory
list.gif / listbg.gif / focus.swf in the images folder
Open index.php
Search:
Copy code The code is as follows:

$rsshead = $rssstatus

Add above:
Copy code The code is as follows:

//----首页四格代码开始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新贴
$hack_cut_str = 26; //标题字数
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
        $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
        $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
        $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
        $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
        if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $nthread['highlight'] .= '"';
        } else {
                $nthread['highlight'] = '';
        }
        $new_post_threadlist[] = $nthread;
}
//新回复
$hack_cut_str = 26; //标题字数
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid  AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
while($rthread = $db->fetch_array($query)) {
        $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
        $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
        $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
  $rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
        $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
        if($rthread['highlight']) {
                $string = sprintf('%02d', $rthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $rthread['highlight'] = 'style="';
                $rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $rthread['highlight'] .= '"';
        } else {
                $rthread['highlight'] = '';
        }
        $new_reply_threadlist[] = $rthread;
}
//热帖
$hack_cut_str = 26; //标题字数
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//最后7是天数为本周  
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid  AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
while($mthread = $db->fetch_array($query)) {
        $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
        $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
        $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
  $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
        $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
        if($mthread['highlight']) {
                $string = sprintf('%02d', $mthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $mthread['highlight'] = 'style="';
                $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $mthread['highlight'] .= '"';
        } else {
                $mthread['highlight'] = '';
        }
        $new_hot_threadlist[] = $mthread;
}
//----首页四格代码结束

打开 templates/default/discuz.htm 
查找:
复制代码 代码如下:



复制代码 代码如下:



Upload the index.php and discuz.htm you just modified
================================ ==========================================
If you have not modified These two files can be downloaded as attachments (please note: 0904 latest 6.0.0 official version) and can be overwritten directly!
====================== ================================================== ===
Each package in the attachment is independent. Please download it according to your favorites and versions and upload it directly to use. No database settings are required!
Finally: Please remember to overwrite or rewrite the file each time Be sure to update the cache later!

Please support another original plug-in of mine: all songs in the forum music area [picture]
Please install it and leave your website address! If you can, please rate it! Thank you!
I hope you all like it!
Wow, after the update, I deleted the number of downloads. It was originally about 5,000 times!
All files packaged

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318420.htmlTechArticleFour-frame home page, five-frame home page For6.0 (GBK) (UTF-8) [12 combination][9-18][moderator installation test passed] Quote: This plug-in was installed by moderator sakurakawaii on WindowsXP at 15:30 on September 8, 2007...
source:php.cn
Previous article:56.com video collection interface program (PHP)_PHP tutorial Next article:[PHP] Practical functions 2_PHP tutorial
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template