Home four cells, home five grid For6.0 (GBK) (UTF-8) [12 combinations] [9-18] [Moderator installation test passed]

Source: Internet
Author: User

Download the home page four, home page five grid For6.0 (GBK) (UTF-8) [12 combinations] [9-18] [Moderator installation test passed]
Reference:
This plug-in was developed by the moderator sakurakawaii at on May 25, September 8.
In Windows XP Discuz! 6.0.0 standard template IE6 Mysql4.1 test installation error
This test only indicates that this plug-in is installed correctly, and does not include reference to problems that may occur in future use:
Disclaimer: This program references part of the 5.0 code. If the source code author has any comments, please send me a text message and delete and release it!
After a lot of modifications and flash settings, a lot of custom settings have been added. This plug-in can be said to be the most comprehensive and beautiful! Celebrate that this plug-in has passed the moderator test!

Update list and plug-in advantages:

9-18: At the request of a friend, add the home page six cells (Figure + new post + reply + popular this week + essence of this month + ranking today). Please download at the bottom of the attachment package
9-15: Updated. A few friends' servers are not supported. <? = $ Show?> The image is not displayed. (Download the package directly and overwrite pic. php)
9-13! (For the demo, see the bottom of the attachment)
9-10: Join the altar few UTF-8 version of the four and five, please download to use! (See the bottom of the attachment)
9-9 update:
Reference:
Fixed the problem of line feed of the post title when the screen resolution is small or the column sharding is enabled in all combinations!
9-8
A friend asked me to change the four-cell style. There are currently seven calling methods (see the attachment ).
The following two new combinations (released) should be added as required)
1. images, new posts, latest replies, hot news this week, top posts today (five on the homepage)
2. New posts, latest replies, popular this week, excellent posts
9-7: solved the problem that sensitive words are still displayed in four cells after filtering!
9-6: Breakthrough: Changing the flash style, changing the unsatisfactory text in the background, and solving the problem of flash calling by many friends! Now the speed is fast, and you can customize the buttons, text, background color and background transparency in flash. Truly user-friendly, meeting the needs of your forum style!
9-6: Special update: When the theme recycle bin is activated for the Forum, there will be no more posts that will still be displayed in four tabs on the homepage after they are placed in the theme recycle bin!

Comments on various parameters that can be set by yourself (since many friends do not know the setting method, all the content that can be set is written below for your use)
1/3: In pic. phpCopy codeThe Code is as follows: $ shownums = 5; // The number of demos is less than 6
$ Searchnums = 50; // total number of searches.
$ Cachelife = 1800; // cache time.
$ Orderby = 'dateline '; // search order: By date dateline. by browsing times downloads. Random rand.
$ Cachename = 'showpic '; // cache name. If any plug-in conflicts with the cache name, modify the name so that no conflict will affect the usage.
$ Searchfid = ''; // search for the fid range. Do not leave it blank. Use commas to separate them, for example, '1, 2, 3 '.

Var config = '5 | 0xffffff | 0x0099ff | 50 | 0xffffff | 0x0099ff | 0x000000'
// -- Config parameter -- automatic playback time (seconds) | text color | text background transparency | key digital color | current key color | normal Key Color
Var swf_width = 255 set the flash width
Var swf_height = 175 set the flash height to 2/3

Index. phpCopy codeThe Code is as follows:

$ Hack_cut_str = 26; // number of words in the title
Desc limit 0, 10 "// set the number of display entries

If you do not want to call a post of a certain version, a certain area, or a certain version, you can leave it in index. php for your location: (three in total)
And f. fid not in (0)
Added:
And f. fid not in (123, 3) Where is the fid that you do not want to call,
Or you just want to call 1 2 3 and change it to: and f. fid in (3/3, 3): discuz.htm reference:
If you want to direct the latest retrieval link to the latest retrieval link, you only need to set the following in discuz.htm:Copy codeThe Code is as follows: <a href = "viewthread. php? Tid = $ rthread [tid]"

Changed:Copy codeThe Code is as follows: <a href = "redirect. php? Tid = $ rthread [tid] & goto = lastpost # lastpost"

As the official team shows, Please rewrite the scalability click-through function in discuz.htm (five-level, if four-level, according to Copy codeThe Code is as follows: <td align = "center" style = "padding: 0 0 0 1px"> </Tr>
</Thead>
<Tr>

Is:Copy codeThe Code is as follows: <span class = "headactions">

</Span>
<H3> post today </Td>
</Tr>
</Thead>
<Tr id = "toplist">

Demo diagram: (according to the requirements of the new style, make the six official styles more comprehensive ...)

To use this plug-in, you need to add the following files:

Pic. php // call the Forum image data,
List.gif and listbg.gif // images under the title
Focus.swf // call the image flash. [This swf is very different from the previous one. I personally think it is better.]
The files to be modified include:

Index. php
Discuz.htm
==================================== Start adding and modifying ==================== ====================
Step: four steps

Upload pic. php/list.gif/listbg.gif/focus.swf to the FTP (website) based on the attachment structure downloaded)
Where: pic. php is in the Forum root directory
List.gif/listbg.gif/focus.swf in the images folder
Open index. php
Search:Copy codeThe Code is as follows: $ rsshead = $ rssstatus

Add:Copy codeThe Code is as follows: // ---- the four-cell code on the homepage begins.
$ Colorarray = array ('', 'red', 'Orange ', 'yellow', 'green', 'cyany', 'blue', 'purple ', 'Gray ');
// New post
$ Hack_cut_str = 26; // number of words in the title
$ 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 _ subobject'] = cutstr ($ nthread ['subobject'], $ hack_cut_str );
$ Nthread ['view _ author'] = cutstr ($ nthread ['author'], $ hack_cut_strauthor );
$ Nthread ['date'] = gmdate ("$ dateformat $ timeformat", $ nthread ['dateline '] + $ timeoffset x 3600 );
$ Nthread ['lasttime'] = 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;
}
// New reply
$ Hack_cut_str = 26; // number of words in the title
$ 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 _ subobject'] = cutstr ($ rthread ['subobject'], $ hack_cut_str );
$ Rthread ['view _ lastposter'] = cutstr ($ rthread ['lastposter'], $ hack_cut_strauthor );
$ Rthread ['date'] = gmdate ("$ dateformat $ timeformat", $ rthread ['dateline '] + $ timeoffset x 3600 );
$ Rthread ['lasttime'] = 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;
}
// Hot posts
$ Hack_cut_str = 26; // number of words in the title
$ Hack_cut_strauthor = 9;
$ New_hot_threadlist = array ();
$ Mthread = array ();
$ Ctime = $ timestamp-3600 * 24*7; // last 7 is days for this week
$ 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 _ subobject'] = cutstr ($ mthread ['subobject'], $ hack_cut_str );
$ Mthread ['view _ lastposter'] = cutstr ($ mthread ['lastposter'], $ hack_cut_strauthor );
$ Mthread ['date'] = gmdate ("$ dateformat $ timeformat", $ mthread ['dateline '] + $ timeoffset x 3600 );
$ Mthread ['lasttime'] = 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;
}
// ---- The code of the four cells on the homepage ends.

Open templates/default/discuz.htm
Search:Copy codeThe Code is as follows: <div id = "ad_text"> </div>

Copy codeThe Code is as follows: <! -- Four cells of code on the homepage -->
<Div class = "mainbox forumlist" style = "padding: 0;">
<Table cellspacing = "0" cellpadding = "0">
<Thead class = "category">
<Tr>
<Td align = "center" style = "padding: 0 1px 0 0"> <Td align = "center" style = "padding: 0"> <Td align = "center" style = "padding: 0 1px 0 1px"> <Td align = "center" style = "padding: 0"> </Tr>
</Thead>
<Tr>
& Lt; td width = "25%" & gt;
<Script type = "text/javascript" src = "pic. php"> </script>
</Td>
& Lt; td width = "25%" & gt;
<Table border = "0" cellpadding = "0" cellspacing = "0" width = "100%">
<Tr valign = "top">
<Td width = "24" style = "padding: 0; border-top: 0px; "> </td>
<Td background = "images/listbg.gif" style = "line-height: 20px; padding: 0; border-top: 0px; background-repeat: repeat-y "width =" 100% ">
<! -- {Loop $ new_post_threadlist $ nthread} -->
<! -- {If $ nthread [replies]} -->
<Div style = "overflow: hidden; height: 20px; width: 100%;"> <a href = "viewthread. php? Tid = $ nthread [tid] "$ nthread ['highlight'] title = 'latest post {LF}'s Forum: $ nthread [forumname] {LF} subject title: $ nthread [subject] {LF} topic author: $ nthread [author] {LF} posting time: $ nthread [date] {LF} browsing times: $ nthread [views] {LF} reply times: $ nthread [replies] {LF} last reply: $ nthread [lastreplytime] {LF} {lang lastpost }: $ nthread [lastposter] '> $ nthread [view_subject] </a> </div>
<! -- {Else} -->
<Div style = "overflow: hidden; height: 20px; width: 100%;"> <a href = "viewthread. php? Tid = $ nthread [tid] "$ nthread ['highlight'] title = 'latest post {LF}'s Forum: $ nthread [forumname] {LF} subject title: $ nthread [subject] {LF} topic author: $ nthread [author] {LF} posting time: $ nthread [date] {LF} browsing times: $ nthread [views] {LF} replies: $ nthread [replies] {LF} Last replies: no reply '> $ nthread [view_subject] </a> </div>
<! -- {/If} -->
<! -- {/Loop} -->
</Td>
</Tr>
</Table>
</Td>
& Lt; td width = "25%" & gt;
<Table border = "0" cellpadding = "0" cellspacing = "0" width = "100%">
<Tr valign = "top">
<Td width = "24" style = "padding: 0; border-top: 0px; "> </td>
<Td background = "images/listbg.gif" style = "line-height: 20px; padding: 0; border-top: 0px; background-repeat: repeat-y "width =" 100% ">
<! -- {Loop $ new_reply_threadlist $ rthread} -->
<Div style = "overflow: hidden; height: 20px; width: 100%;"> <a href = "viewthread. php? Tid = $ rthread [tid] "$ rthread ['highlight'] title = 'latest reply {LF} Forum: $ rthread [forumname] {LF} topic title: $ rthread [subject] {LF} topic author: $ rthread [author] {LF} posting time: $ rthread [date] {LF} browsing times: $ rthread [views] {LF} reply times: $ rthread [replies] times {LF} last reply: $ rthread [lastreplytime] {LF} {lang lastpost }: $ rthread [lastposter] '> $ rthread [view_subject] </a> </div>
<! -- {/Loop} -->
</Td>
</Tr>
</Table>
</Td>
& Lt; td width = "25%" & gt;
<Table border = "0" cellpadding = "0" cellspacing = "0" width = "100%">
<Tr valign = "top">
<Td width = "24" style = "padding: 0; border-top: 0px; "> </td>
<Td background = "images/listbg.gif" style = "line-height: 20px; padding: 0; border-top: 0px; background-repeat: repeat-y "width =" 100% ">
<! -- {Loop $ new_hot_threadlist $ mthread} -->
<Div style = "overflow: hidden; height: 20px; width: 100%;"> <a href = "viewthread. php? Tid = $ mthread [tid] "$ mthread ['highlight'] title = 'This week's hot {LF} Forum: $ mthread [forumname] {LF} topic title: $ mthread [subject] {LF} topic author: $ mthread [author] {LF} published on: $ mthread [date] {LF} browsing times: $ mthread [views] {LF} reply times: $ mthread [replies] {LF} last reply: $ mthread [lastreplytime] {LF} {lang lastpost }: $ mthread [lastposter] '> $ mthread [view_subject] </a> </div>
<! -- {/Loop} -->
</Td>
</Tr>
</Table>
</Td>
</Tr>
</Table>
</Div>
<! -- The four-cell code on the home page ends -->

Upload the modified index. php and discuz.htm
========================================================== ========================================
If you have not modified these two files, you can download the attachment (Note: 0904 latest 6.0.0 official version) and directly overwrite it!
========================================================== ========================================
Each package in the attachment is independent. Please download and directly upload the package based on your preferences and versions without any database settings!
Finally, please remember to update the cache every time you overwrite or rewrite the file!

Please support another original plug-in: Broadcast of all the songs in the Forum music area [Image]
Please leave your website address with a friend installed! Please rate it! Thank you!
Hope you like it!
Dizzy. After the update, I deleted the number of downloads. It already exists for about 5000 times!
Package all files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.