git clone --recursive https://gitee.com/hu60t/hu60wap6.git
git submodule init git submodule update
-
Complete Guide: Install Tiger Green Forest program in Android Termux terminal simulator -
a word or two: Install the Tiger Green Forest program in Android KSWeb (from the 38th floor to the 56th floor) -
a word or two: Install the Tiger Green Forest program in the Linux pagoda panel (from the 64th floor to the 67th floor)
-
hold src All files in the folder are placed in the root directory of the website. -
If you use Linux, you can replace the following two steps with the following command: # First cd to the root directory of the website php script/init.php If you use Windows, the above command may not work. Please copy the file manually according to the following two steps. -
Enter the root directory of the website config.inc.default.php Make a copy and change the name to config.inc.php 。 And then config All in folder xxx.default.php Copy one copy, rename it xxx.php, and remove .default 。 If you plan to use git for version control, it is recommended to copy rather than delete the original file or rename the original file directly. In other words, put config.inc.default.php Copy As config.inc.php , and then config/xxx.default.php Copy As config/xxx.php 。 -
get into config/tpl Folder, turn site_info.default.conf Make a copy and change the name to site_info.conf 。 In other words, put config/tpl/site_info.default.conf Copy As config/tpl/site_info.conf 。 -
modify config/db.php , fill in the mysql information. -
Import db/mysql.sql To the database. -
visit. -
In Windows, you may encounter such errors: Syntax error in config file 'conf:site.info' on line 1 '../../../../ config/tpl/site_info.conf' Or such error: Fatal error: Uncaught PageException: The configuration file "site. info" does not exist This is because the Windows decompressor or git tool you are using does not support symbolic links, so the source location of the link is saved as the text content in the target location. To solve this problem, you need to copy multiple files from the source location to the target location, which are: src/config/tpl/site_info.conf -> src/tpl/classic/html/site/info.conf (Note that the file name should be changed to info.conf ) src/config/tpl/site_info.conf -> src/tpl/jhin/html/site/info.conf (Note that the file name should be changed to info.conf ) -
There are more that cannot be listed, including various js files. Tiger Green Forest is increasingly relying on symbolic links, so please use the git clone Get the source code and be nice to yourself.
In addition, we also need to remind you that you should not submit these changes to the git repository, because we want to keep symbolic links instead of multiple copies of the same file. If you want to avoid these troubles, it is recommended to run it in WSL (Windows Subsystem of Linux) git clone To obtain the source code, the git in WSL can correctly create the symbolic connection. In addition, you can also run a web server in WSL. New version Git for Windows If relevant options are enabled, symbolic connection can also be created, but it is not applicable to this project. Because the source file of symbolic connection does not exist in clone project Git for Windows Only text files whose content is the source file location will be created as an alternative. For Android, please do not put the source code on the memory card or analog memory card( /sdcard perhaps /storage ), because neither of them supports symbolic links. If you don't have root permission, only the internal storage directory provided by the terminal emulator (such as Termux) supports symbolic links. Because the source code cannot be placed on the analog memory card, Tiger Greenwood is actually incompatible with the graphical interface web server on Android, and can only be run in the terminal simulator using the command line web server. -
Users with a uid of 1 will become administrator users of the system and can access the background (although the background only has the function of adding sections, the function of modifying sections will crash.) -
In order for the attachment upload function to take effect, it is not only necessary to correctly set the Qiniu Cloud AK/SK, modify the domain name in html, but also to correctly install the nonfree For sub module, refer to the section "Source code acquisition description". -
In order for the CC prevention function to take effect, PHP access is required for Linux /dev/shm Folder (this folder is a shared memory folder within Linux). For Apache, use the following configuration:
Php_admin_value open_basedir "web root: other path:/dev/shm/"
php_admin_value open_basedir "/var/www/hu60.cn/src/:/tmp/:/usr/share/phpmyadmin/:/usr/share/php/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/dev/shm/"
-
PHP 7 -
PHP 8
-
PHP 5
-
Download the source code and install it according to the above instructions. The root directory of the website is in the source code directory src Folder, so the following folder paths are omitted src 。 -
Visit the website and switch to Classic theme 。 because Classic theme It is easy to modify. -
get into tpl/classic/html/index Folder( Classic theme Folder), inside index.tpl It is the content of the home page. Change the html code according to your idea, but don't move any curly braces without understanding( {} )The content inside is the smart template tag. -
get into tpl/classic/css Folder default.css It is the default css, which can be modified as you like. night.css Is the corresponding night mode css. tpl/classic/img There are pictures in the folder, such as hulvlin2.gif Is the default logo. Inside face The folder contains the expression pack. For the file name naming rules of emoticon packs, see here 。 tpl/classic/html/bbs Inside are templates for various pages of the forum. Basically, open the file and you will know which page it is. Modify at will. tpl/classic/html/user Is the user center, tpl/classic/html/addin There are chat room templates, etc. -
If you want to modify the head and tail of the page tpl/classic/html/comm Inside, they are head.tpl and foot.tpl 。
-
Download the source code and install it according to the above instructions. The root directory of the website is in the source code directory src Folder, so the following folder paths are omitted src 。 -
get into tpl Folder, turn classic perhaps jhin Make a copy of the folder. Which copy depends on which basic theme you want to use for transformation. classic It is relatively simple, but the older template technology is used. jhin More complex and uses modularity( block )Substitution classic Of include 。 -
Next, open sub/reg_page_bid.php , add on the last line Page:: regTpl ('Name of your theme folder '); -
visit Http://Your domain name/q.php/link.tpl. Your theme folder name.html Switch to your theme. -
Start modifying your theme. Tpl/Subject Name The directory structure under is relatively simple. html The folder contains pages smarty Templates, placed on and url In the first part of the directory with the same name. such as Http://Your domain name/q.php/bbs.topic.xxx.html The corresponding PHP file is page/bbs/topic.php , which is loaded with tpl:topic This template corresponds to Tpl/topic name/html/bbs/topic.tpl 。 -
Smart's template separator is the default {} 。 -
Reference Template( {include file="here"} )The format of the template name filled in is as follows: Tpl: template file name or Tpl: directory name.template file name , such as tpl:topic perhaps tpl:bbs.topic , with Directory name The main purpose of is to access templates that are not in the same directory as the current file. Similarly, the configuration file under the topic( *.conf )You can also use similar names to refer to: Conf: configuration file name perhaps Conf: directory name. configuration file name 。 Tpl/subject name/html/comm In it are public templates, which can be used to place templates referenced by various pages, such as header, footer, etc. -
There are some global variables available in the template, such as: $CID The class id is the first part of the url, such as Http://Your domain name/q.php/bbs.topic.xxx.html In bbs $PID The page id is the second part of the url, such as Http://Your domain name/q.php/bbs.topic.xxx.html In topic $BID The feed id, which is the last part of the url, is equivalent to the extension, such as Http://Your domain name/q.php/bbs.topic.xxx.html In html $USER Current user object, class/user.php lower User Class. Note that the current user may not be logged in( $USER->islogin == false )As a result, some properties cannot be obtained. $PAGE Current page object, class/page.php lower Page Class. $PAGE The object can be used to obtain various other details in the current page URL, as well as the absolute path of some static resources (such as {$PAGE->getTplUrl("img/hulvlin2.gif")} , get Tpl/Subject name/img/hulvlin2.gif The absolute URL of this file).
-
PHP functions can be called directly in the template, such as {date('Y-m-d')} Or static class method {str::ago(time()-30)} 。 -
If you want to output the content written by the user, remember to call |code Decorator htmlspecialchars() Operation, such as: {$topic.content|code} 。