Home Backend Development PHP Tutorial 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

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

Jul 21, 2016 pm 03:54 PM
gbk utf-8 download Install test of combination pass front page

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...
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Introduction to how to download and install the superpeople game Introduction to how to download and install the superpeople game Mar 30, 2024 pm 04:01 PM

The superpeople game can be downloaded through the steam client. The size of this game is about 28G. It usually takes one and a half hours to download and install. Here is a specific download and installation tutorial for you! New method to apply for global closed testing 1) Search for "SUPERPEOPLE" in the Steam store (steam client download) 2) Click "Request access to SUPERPEOPLE closed testing" at the bottom of the "SUPERPEOPLE" store page 3) After clicking the request access button, The "SUPERPEOPLECBT" game can be confirmed in the Steam library 4) Click the install button in "SUPERPEOPLECBT" and download

How to download Beilehu children's songs How to download Beilehu children's songs Mar 28, 2024 am 11:10 AM

As an indispensable accompaniment to children's growth, Beilehu's children's songs have won the love of countless parents and children with their cheerful melody, vivid pictures and entertaining and educational content. In order to allow babies to enjoy the joy brought by children's songs anytime and anywhere, many parents hope to download Beilehu's children's songs to their mobile phones or tablets so that they can listen to their children at any time, but how to save Beilehu's children's songs? On your mobile phone, this tutorial will bring you a detailed introduction. Users who don’t understand it yet can come and read along with this article to learn more. Beilehu Nursery Rhymes Download Children's Songs Multi-Picture Tutorial: Open the software and select a children's song you want to download. The editor takes "Classic Children's Songs" as an example. 2. Click the "Download" button below the children's song star.

Where to download files from Quark Network Disk_How to download Quark Network Disk to local area and share Where to download files from Quark Network Disk_How to download Quark Network Disk to local area and share Mar 21, 2024 pm 03:57 PM

As a convenient and practical network disk tool, Quark can help users easily obtain their favorite resources. What if you want to download a file locally? Let the editor tell you now, let’s learn it together! How to download Quark Network Disk to local sharing method 1. First open the Quark software, enter the homepage, and click the [Cloud Icon] on the lower right; 2. Then on the Quark Network Disk page, we click the [Document] function; 3. Then go to the document page, select the file you want to download, and click the [three-dot icon]; 4. After the final click, we click [Download] in the pop-up dialog box;

Detailed steps for downloading files from qq Detailed steps for downloading files from qq Mar 22, 2024 pm 09:10 PM

1. First we open file management. 2. Click Internal Storage. 3. Scroll down and sort to find Tencent (Tencent folder) starting with t. 4. Click to enter and find QQfile_recv, click to enter to view.

How to install Podman on Ubuntu 24.04 How to install Podman on Ubuntu 24.04 Mar 22, 2024 am 11:26 AM

If you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu24. To update the system, we first need to update the system and open the Terminal shell of Ubuntu24. During both installation and upgrade processes, we need to use the command line. a simple

How to download WPS cloud documents? Is it easy to download? How to download WPS cloud documents? Is it easy to download? Mar 20, 2024 am 09:31 AM

How to download WPS cloud documents: After selecting the file to be downloaded in the cloud window, select the file path to save and download the WPS cloud document. Nowadays, our office has long been inseparable from the operations of text editing, statistics of data tables, etc. on the computer, and WPS software is an office software that can meet the above various needs. It is also because WPS software has these powerful functions. With its functions, this software has now become a software that many people use in their office work. WPS software has its own cloud. Through this cloud, you can share the edited document to the cloud and upload it to others as a cloud document, so that others can download the cloud document locally from the cloud. So how should we download cloud documents to this computer through the cloud?

How to Install and Run the Ubuntu Notes App on Ubuntu 24.04 How to Install and Run the Ubuntu Notes App on Ubuntu 24.04 Mar 22, 2024 pm 04:40 PM

While studying in high school, some students take very clear and accurate notes, taking more notes than others in the same class. For some, note-taking is a hobby, while for others, it is a necessity when they easily forget small information about anything important. Microsoft's NTFS application is particularly useful for students who wish to save important notes beyond regular lectures. In this article, we will describe the installation of Ubuntu applications on Ubuntu24. Updating the Ubuntu System Before installing the Ubuntu installer, on Ubuntu24 we need to ensure that the newly configured system has been updated. We can use the most famous &quot;a&quot; in Ubuntu system

Detailed steps to install Go language on Win7 computer Detailed steps to install Go language on Win7 computer Mar 27, 2024 pm 02:00 PM

Detailed steps to install Go language on Win7 computer Go (also known as Golang) is an open source programming language developed by Google. It is simple, efficient and has excellent concurrency performance. It is suitable for the development of cloud services, network applications and back-end systems. . Installing the Go language on a Win7 computer allows you to quickly get started with the language and start writing Go programs. The following will introduce in detail the steps to install the Go language on a Win7 computer, and attach specific code examples. Step 1: Download the Go language installation package and visit the Go official website

See all articles