Six Cool Community Forum home page fresh style free Download _php tutorial

Source: Internet
Author: User
All are made with DIV+CSS, call the direct read database, fast, automatic generation of static HTML pages. Color can be controlled by CSS, bring up the color with your forum to match! You can also make your favorite style home page through the accompanying home program! As long as Ken hands, multi-colored Forum home page can be made!
===========================================================================
Design and production: So is the edge
Contact information: qq:11881448
Professional website design, forum home production design, style design.
Support community: six cool communities
Website: http://www.6co.cn
Download this file
===========================================================================
Please use this style of retention style copyright, thank you. If you don't mind, make us a link. Oh! ~
Second Floor update

There's a problem.
http://www.6co.cn/forumdisplay.php?fid=129
Proposed

Please support our community.

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

Frequent visits to our community, I will not regularly in the Community style plug-in section of the release of some plug-ins, style and style color!

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

Style Modification Method

1, the modification of the template
Just modify the templates/default/cohome.htm file.

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

2. How to add a slideshow image:
Open the Topview.js file for the picture catalog,
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 be displayed
Pictures, links, names are all one by one corresponding.

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

3, scroll the picture to add according to law:
Use DW to open the root directory of the pichome.htm file to modify the line.

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

Forum Content invocation:
Modify the root directory's home.php file
=========================================

4, small section call Description:
Copy CodeThe code is 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}forums 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. = "
$SHIPINGTP [Subject]
";
}

$SHIPINGTP [subject] This front of the $SHIPINGTP is the variable name, each invocation of the variable names can not be the same, when changing the code in this section of the variable names to be the same, there is a difference can not be called out.
FID =1 The number behind this is the FID value of the section.
DESC LIMIT 0, 16 "); The following 16 is the number of call bars
($SHIPINGTP [subject],26); 26 is the number of words displayed.
After setting the appropriate position in the template, just insert the $ variable name +main Example: $shipingtpmain
Call out the effect: it's bad enough! Feng Xiaogang Xu fan early passion couple

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

5, Classification call Description:
Code:


Copy CodeThe code is 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}forums 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. = "
"$itshuoma [name]" $itshuoma [subject]
";
}
$itshuoma [subject] This front of the $itshuoma is the variable name, each invocation of the variable names can not be the same, when changing the code in this section of the variable names to be the same, there is a difference can not be called out.
Fup =21, the number behind this is the FID value of the big section.
DESC LIMIT 0, 10 "); The following 10 is the number of call bars
($itshuoma [subject],30); 30 is the number of words displayed.
After setting the appropriate position in the template, just insert the $ variable name +main Example: $itshuomamain
Call out the effect: "Computer virus" 2006 the world's latest anti-virus software rankings
If you do not want to "computer viruses" such as the title of the section before the "$itshuoma [name]" This sentence to delete the line

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

6, member posts ranking call:
Code
Total posts Rank
Copy CodeThe code is as follows:
$hotmember 1 = ";
$query = $db->query ("Select Username, uid, posts from {$tablepre}members ORDER by posts DESC LIMIT 0, 10");
while ($member = $db->fetch_array ($query)) {
$hotmember 1.= "

$member [Username] $member [Posts]
";
}
$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 CodeThe code is as follows:
Community Essence Top
$jingthreads = ";
$query = $db->query ("select * from {$tablepre}threads T left JOIN {$tablepre}forums F on 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. = "
• $thread [Subject]
" ;
}
$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, the latest forum posted call:
Code

Copy CodeThe code is as follows:
Latest Articles
$replythreads = ";
$query = $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. = "
  • $thread [Subject]
    ";
    }

    $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, Friendship Link call
    Code

    Copy CodeThe code is 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. = "Target=\" _blank\ "class= ' Mainlink1 ' >[name]\" alt=\ "$flink [content]\" > ";
    } else {
    $tightlink _text. = "Target=\" _blank\ "class= ' Mainlink1 ' >[$flink [name]]";
    }
    }
    }
    if ($tightlink _logo | | $tightlink _text) {
    $tightlink _logo. = $tightlink _logo? '
    ' : '';
    $data [] = Array (' type ' = 3, ' content ' =
    $tightlink _logo. $tightlink _text);
    }
    Description
    $flink [content] is the logo link call variable
    $flink [content] is a text link call variable
    Two must have both.

    ---------------------------------------------
    12. How to generate static HTML pages
    Open main.php
    Find:
    Copy CodeThe code is 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 ();
    The file modification time and the current time difference, the direct direction of the HTML file, 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 CodeThe code is as follows:
    Include template (' Bbs_all ');
    Replace all of the following code (excluding this sentence) with the


    Copy CodeThe code is as follows:
    Add Ob_end_clean () at the end and output this page to a variable
    $temp =ob_get_contents ();
    Ob_end_clean ();

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

    http://www.bkjia.com/PHPjc/317841.html www.bkjia.com true http://www.bkjia.com/PHPjc/317841.html techarticle all are made with DIV+CSS, call the direct read database, fast, automatic generation of static HTML pages. Color can be controlled by CSS, bring up the color with your forum to match! Also ...

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