Six Cool Community Forum home page Fresh style free version download _php tips

Source: Internet
Author: User
Tags current time
All are made using DIV+CSS, call the use of direct read database, fast, automatic generation of static HTML pages. Color can be controlled through the CSS, and your forum with the color to come! You can also use the accompanying home program to make your favorite style home page! As long as willing to do, many rich and colorful forum home can be made!
===========================================================================
Design and production: This is also true
Contact Way: qq:11881448
Professional website design, forum home production design, style design.
Support community: six cool communities
URL: http://www.6co.cn
Download this file
===========================================================================
Please use this style of retention style copyright, thank you. If you don't mind, give us a link, too. Oh! ~
Second Floor update

There are problems to be
http://www.6co.cn/forumdisplay.php?fid=129
Proposed

Please support our community.

Six Cool Community http://www.6co.cn

Often patronize our community, I will not regularly in the Community style plugin release some plug-ins, style and style color!

================================================

Style Modification Method

1, the template modification
Modify the templates/default/cohome.htm file on the line

---------------------------------------------

2, Slide picture Add method:
Open the Topview.js file for the picture catalog,
The Var pics= is followed by a picture address, separated by commas.
var links= is followed by a link address
var texts= is followed by the file to display
Pictures, links, names are one by one corresponding.

---------------------------------------------

3, scrolling pictures added according to law:
Use DW to open the root directory of the pichome.htm file modification on the line.

---------------------------------------------

Forum Content calls:
modifying home.php files in the root directory
=========================================

4, Small plate call Description:
Copy Code code as follows:

$shipingtpmain = ';
$query = $db->query ("Select T". FID, F. Fup, F. Name, T.author,t.views, T. Tid, T. Subject, T. Dateline from {$tablepre}threads T-left JOIN {$tablepre F on F. FID =t. FID where T. FID =1 ORDER by ' t '. ' Dateline ' DESC LIMIT 0, 16 ");
while ($SHIPINGTP = $db->fetch_array ($query)) {
$SHIPINGTP [Subject]=cutstr ($SHIPINGTP [subject],26);
$times =gmdate ("$dateformat", $SHIPINGTP [Dateline] + $timeoffset * 3600);
$shipingtpmain. = "<table width= ' 98% ' height= ' border= ' 0 ' align= ' center ' cellpadding= ' 0 ' cellspacing= ' 0 ' >< Tr><td><a href= ' viewthread.php?tid= $shipingtp [tid] ' target= ' _blank of ' title= '] Author: $shipingtp [author] View: $ Shipingtp[views] ' class= ' mainlink1 ' > $shipingtp [subject]</a></td>
</tr></table> ";
}

$SHIPINGTP [subject] Before the $SHIPINGTP is the variable name, each call variable names can not be the same, when the change in this section of the code variable names to be the same, there is a difference will not be called out.
FID =1 The following number is the FID value of the plates
DESC LIMIT 0, 16 "); The following 16 is the number of call bars
($SHIPINGTP [subject],26); This 26 is the number of words displayed
Set the appropriate position in the template as soon as you insert $ variable name +main Example: $shipingtpmain
Call out the effect: Really bad! Feng Xiaogang Xu fan early passionate couple

---------------------------------------------

5, Classification call Description:
Code:


Copy Code code as follows:

It digital
$itshuomamain = ';
$query = $db->query ("Select T". FID, F. Fup, F. Name, T.author,t.views, T. Tid, T. Subject, T. Dateline from {$tablepre}threads T-left JOIN {$tablepre F on F. FID =t. FID where F. Fup =21 ORDER by ' t '. ' Dateline ' DESC LIMIT 0, 10 ");
while ($itshuoma = $db->fetch_array ($query)) {
$itshuoma [Subject]=cutstr ($itshuoma [subject],30);
$itshuomamain. = "<table width= ' 98% ' height= ' border= ' 0 ' align= ' center ' cellpadding= ' 0 ' cellspacing= ' 0 ' >< Tr><td><a href= ' forumdisplay.php?fid= $itshuoma [fid] ' class= ' mainlink3 ' > ' $itshuoma [name] ' </a ><a href= ' viewthread.php?tid= $itshuoma [tid] target= ' _blank ' title= ' the author: $itshuoma [author] view: $itshuoma [views] ' class= ' Mainlink1 ' > $itshuoma [subject]</a></td></tr></table> ';
}
$itshuoma [subject] Before the $itshuoma is the variable name, each call variable names can not be the same, when the change in this section of the code variable names to be the same, there is a difference will not be called out.
Fup =21, the number behind this is the FID value of the big plate.
DESC LIMIT 0, 10 "); The following 10 is the number of call bars
($itshuoma [subject],30); This 30 is the number of words displayed
Set the appropriate position in the template as soon as you insert $ variable name +main Example: $itshuomamain
Call out the effect: "Computer virus" 2006 World's latest anti-virus software rankings
If you do not want a "computer virus" Such a section of the title in front as long as the <a href= ' forumdisplay.php?fid= $itshuoma [fid] ' class= ' mainlink3 ' > ' $itshuoma [name] </a> this sentence is deleted.

---------------------------------------------

6, member posts ranking call:
Code
Total posts
Copy Code code as follows:

$hotmember 1 = ';
$query = $db->query ("Select Username, uid, posts from {$tablepre}members order by posts DESC 0, 10");
while ($member = $db->fetch_array ($query)) {
$hotmember 1.= "<table width= ' 100% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 0 ' style= ' margin-top:4px ') ><tr &GT;&LT;TD width= ' 5% ' > </td>
&LT;TD width= ' 89% ' bgcolor= ' #FFFFFF ' ><table width= ' ' border= ' 0 ' align= ' center ' cellpadding= ' 0 ' cellspacing= ' 0 ' >
&LT;TR&GT;&LT;TD width= ' 75% ' valign= ' bottom ' ><a href= ' viewpro.php?uid= $member [uid] ' target= ' _blank ' class= ' Mainlink1 ' > $member [username]</a></td><td width= ' 25% ' ><div align= ' right ' > $member [Posts ]</div></td></tr></table></td></tr></table> ";
}
$hotmember 1 Call Variable name
DESC LIMIT 0, 10 "); The following 10 is the number of call bars

---------------------------------------------


7, Forum essence paste Call:
Code
Copy Code code as follows:

Community Elite Top
$jingthreads = ';
$query = $db->query ("select * from {$tablepre}threads T-left JOIN {$tablepre}forums F" f.) FID =t. FID where digest order by ' t '. ' Lastpost ' DESC LIMIT 0, 7 ");
while ($thread = $db->fetch_array ($query)) {
$thread [Subject] = Cutstr ($thread [subject], 35);
$jingthreads. = "<table width= ' 100% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 2 ' ><tr><td width= ' 85% ' ><a href= ' viewthread.php?tid= $thread [tid] ' target= ' _blank ' The title= ' the author: $thread [author]: $thread [name] ' class= ' Mainlink1 ' > $thread [subject] </a></td></tr></table>;
}
$jingthreads Call Variable Name
DESC LIMIT 0, 7 "); The following 7 is the number of call bars
($thread [subject], 35); The following 35 shows the number of characters

---------------------------------------------

8, Forum latest paste call:
Code

Copy Code code as follows:

//Latest articles  
$replythreads  =  '; 
$query  =& nbsp. $db->query ("select author, views, tid, subject, lastpost from {$ Tablepre}threads order by dateline desc limit 0, 10 "); 
while ($ thread =  $db->fetch_array ($query))  { 
          $thread [Subject] = cutstr ($thread [subject], 27); 
          $thread [Lastpost] = gmdate ("Y-m-j g:i",  $thread [lastpost] + $ timeoffset * 3600); 
         $replythreads. = "  <li><a href= ' viewthread.php?tid= $thread [tid] '  title= ' Author: $thread [author]  reply: $thread [ Lastpost] '  target=_blank> $thread [subject]</a><br /> '; 


$replythreads Call Variable Name
DESC LIMIT 0, 10 "); The following 10 is the number of call bars
($thread [subject], 27); The following 27 shows the number of characters

---------------------------------------------

9. Links call
Code

Copy Code code as follows:

$tightlink _text = $tightlink _logo = ';
$query = $db->query ("select * FROM {$tablepre}forumlinks order by Displayorder");
while ($flink = $db->fetch_array ($query)) {
if ($flink [' note ']) {
if ($flink [' logo ']) {
$forumlink [' type '] = 1;
$forumlink [' logo '] = $flink [' logo '];
} else {
$forumlink [' type '] = 2;
}
$data [] = $forumlink;
} else {
if ($flink [' logo ']) {
$tightlink _logo. = "<a href=\" $flink [url]\]
Target=\ "_blank\" class= ' mainlink1 ' >[name]\ "alt=\" $flink [content]\ "></a>";
} else {
$tightlink _text. = "<a href=\" $flink [url]\]
Target=\ "_blank\" class= ' Mainlink1 ' >[$flink [name]]</a> ";
}
}
}
if ($tightlink _logo | | $tightlink _text) {
$tightlink _logo. = $tightlink _logo? ' <br> ': ';
$data [] = Array (' type ' => 3, ' content ' =>
$tightlink _logo. $tightlink _text);
}
Description
$flink [content] is a logo link call variable
$flink [content] is a text link call variable
Two of them have to be at the same time

---------------------------------------------
12, the method of generating static HTML page
Open main.php
Find:
Copy Code code as follows:

/* $discuz _action = 1;
Replace all of the above code (excluding this sentence) with the

[Copy to Clipboard] [ - ] CODE:
?
if (file_exists ("main.html"))
{
$time =time ();
What is the difference between the file modification time and the current time? If you direct HTML files, otherwise regenerate HTML
if ($time-filemtime ("main.html") < 600)
{
Header ("Location:main.html");
}
}
Add Ob_start () at the beginning of your service;
Ob_start ();

Define (' Currscript ', ' main ');

Require './include/common.inc.php ';
Require Discuz_root. '. /include/forum.func.php ';
Find


Copy Code code as follows:

Include template (' Bbs_all ');
Replace all of the following code (excluding this sentence) with


Copy Code code as follows:

Add Ob_end_clean () at the end and output this page to a variable
$temp =ob_get_contents ();
Ob_end_clean ();

Write to File
$fp =fopen (' main.html ', ' W ');
Fwrite ($FP, $temp) or Die (' Write file error ');
echo "Generate HTML Finish!" ";
Header ("Location:main.html");
?>
Conversely, no static HTML pages are generated

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.