Tâm trạng hàng ngày | Hạnh phúc 2-7-2025 09:43 PM |
|---|
Đã viết: 13 ngày [LV.3]Spam 3
|
Mời bạn đăng ký để giao lưu kết bạn nhé <3
Bạn phải đăng nhập để xem được nội dung, nếu bạn chưa có tài khoản? hãy Đăng ký
x
Ứng dụng này cho phép thành viên hỏi, trả lời, khi hỏi mất điểm và trả lời đc thêm điểm. Nó giống như A&Q của Yahoo và gần giống vật giá.
1) Upload vào thư mục UCH
2)import SQL:- DROP TABLE IF EXISTS `uchome_app_ask`;
- CREATE TABLE IF NOT EXISTS `uchome_app_ask` (
- `id` int(11) NOT NULL auto_increment,
- `title` varchar(255) NOT NULL default '',
- `typeid` smallint(4) NOT NULL default '0',
- `topid` smallint(4) NOT NULL default '0',
- `uid` int(11) NOT NULL default '0',
- `username` varchar(50) NOT NULL default '',
- `content` text,
- `tag` varchar(250) default NULL,
- `dateline` int(11) NOT NULL default '0',
- `score` smallint(4) NOT NULL default '0',
- `view_count` int(11) NOT NULL default '0',
- `reply_count` int(11) NOT NULL default '0',
- `status` smallint(1) NOT NULL default '0',
- `msg` text,
- PRIMARY KEY (`id`),
- KEY `typeid` (`typeid`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Sao chép mã- DROP TABLE IF EXISTS `uchome_app_ask_reply`;
- CREATE TABLE IF NOT EXISTS `uchome_app_ask_reply` (
- `id` int(11) NOT NULL auto_increment,
- `ask_id` int(11) NOT NULL default '0',
- `content` text NOT NULL,
- `uid` int(11) NOT NULL default '0',
- `username` varchar(50) NOT NULL default '',
- `score` smallint(4) NOT NULL default '0',
- `dateline` int(11) NOT NULL default '0',
- PRIMARY KEY (`id`),
- KEY `ask_id` (`ask_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
- DROP TABLE IF EXISTS `uchome_app_ask_type`;
- CREATE TABLE IF NOT EXISTS `uchome_app_ask_type` (
- `id` smallint(4) NOT NULL auto_increment,
- `topid` smallint(4) NOT NULL default '0',
- `type` char(255) NOT NULL,
- `displayorder` tinyint(3) NOT NULL default '0',
- PRIMARY KEY (`id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Sao chép mã 3) add empty function in youruch/source/function_common.php
//empty function
function window_set($title, $url, $icon='') {
}
4)open youruch/template/default/header.htm
find
<li><img src="image/app/share.gif"><a href="space.php?do=share">Share</a></li>
add codes blow it:
<li><img src="image/icon/app.gif"><a href="ask.php?do=ask">Ask</a><em><a href="ask.php?do=ask&ac=post">Ask</a></em></li>
5)open youruch/ask.php, to configure ask:
//categories, modify 'em upon your needs
$gEumsType = array(2=>'Tech', 3=>'Art', 4=>'Digital', 5=>'$', 6=>'Love', 7=>'Windows', 8=>'Linux', 9=>'People', 1 => 'Other' );
//maximum score
$gMaxScore = 200;
//admin ID
define("ADMIN_ID","1");
6) Update cache,
7) refresh
8) go to http://youruch/ask.php
Download |
|