22 พฤษภาคม 2555, 15:30:21
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: DownloadSystem ระบบอัพโหลด-ดาวน์โหลดไฟล์ใน SMF  (อ่าน 1452 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Download System
  • ผู้เขียน: vbgamer45
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Attachments
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 21 มิถุนายน 2553
  • ต้นฉบับ: Download System

รายละเอียด
      ชื่อมันเหมือนกับว่าใช้ดาวน์โหลดอย่างเดียวนะครับ แต่จริงๆ มันก็มีระบบอัพโหลดอยู่ด้วย ถึงแม้ว่ารุ่นนี้จะเป็นรุ่นให้ใช้ฟรีแต่ก็มีความสามารถไม่น้อย ส่วนรุ่นที่เขาขายนั้นจะมีความสามารถเพิ่มเติมอย่างไรไม่ทราบครับ ไม่มีเงินไปซื้อมาทดลอง ว่าจะแกล้งทำมึนไปขอเขามาทดลองใช้ดูไม่แน่ใจว่าเขาจะมึนให้มาหรือเปล่า เขาให้ใช้ฟรีๆ แค่นี้ก็ดีแล้วหล่ะถ้าใครต้องการจะทำบอร์ดอัพโหลด-ดาวน์โหลดโดยเฉพาะก็ลองไปซื้อมาดูนะครับ เรามาดูกันว่าความสามารถแค่นี้ของมันนั้นแค่ใหนกันแน่
  • มีลิงค์สำหรับอัพโหลด-ดาวน์โหลด
  • ตัวเลือกอนุมัติสำหรับไฟล์
  • รายงานไฟล์ไม่เหมาะสม
  • แสดงความคิดเห็นเกี่ยวกับไฟล์ได้
  • รองรับหมวดหมู่ย่อย
  • ให้คะแนนนิยมไฟล์ได้
  • ดูว่าใครกำลังดูไฟล์ หรือหมวดหมู่
  • ระดับการอนุญาตแต่ละหมวดหมู่กำหนดได้โดยกลุ่มสมาชิก
  • กำหนดพื้นในการอัพโหลดได้ในแต่ละกลุ่มสมาชิก
  • ตัวเลือกเพื่อควบคุมการตั้งค่าการแสดงหมวดหมู่
  • ตัวเลือกเพื่อควบคุมการดาวน์โหลดการตั้งค่าการแสดง
  • ตัวเลือกโค้ดลิงค์
  • บูรณาการณ์เข้ากับ SMF Shop
  • และอื่นๆ

ตัวอย่าง
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

$boarddir/index.php

ค้นหา -->>
โค๊ด: [Select]
'help' => array('Help.php', 'ShowHelp'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'downloads' => array('Downloads.php', 'DownloadsMain'),

file $themedir/index.template.php

ค้นหา -->>
โค๊ด: [Select]
$current_action = 'admin';
if (in_array($context['current_action'], array(

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'downloads',

ค้นหา -->>
โค๊ด: [Select]
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// the [Downloads System] button
if ($context['allow_downloads_view'])
echo ($current_action == 'downloads' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'downloads' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=downloads">' , $txt['downloads_menu']  , '</a>
</td>' , $current_action == 'downloads' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

file $sourcedir/Subs.php

ค้นหา -->>
โค๊ด: [Select]
'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'downloads_settings' => '<a href="' . $scripturl . '?action=downloads;sa=adminset;sesc=' . $sc . '">' . $txt['downloads_admin'] . '</a>',

ค้นหา -->>
โค๊ด: [Select]
$context['allow_calendar'] = allowedTo('calendar_view') && !empty($modSettings['cal_enabled']);

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['allow_downloads_view'] = allowedTo('downloads_view');

file $sourcedir/ManagePermissions.php

ค้นหา -->>
โค๊ด: [Select]
'pm' => array(
'pm_read' => false,
'pm_send' => false,
),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'downloads' => array(
'downloads_view' => false,
'downloads_add' => false,
'downloads_edit' => false,
'downloads_delete' => false,
'downloads_ratefile' => false,
'downloads_comment' => false,
'downloads_editcomment' => false,
'downloads_report' => false,
'downloads_autocomment' => false,
'downloads_autoapprove' => false,
'downloads_manage' => false,
),

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
// Begin Download System Text Strings
$txt['downloads_menu'] = 'Downloads';
$txt['downloads_admin'] = 'Downloads Configuration';

// Permissions
$txt['permissiongroup_downloads'] = 'Downloads System';

$txt['permissionname_downloads_view'] = 'View Downloads';
$txt['permissionhelp_downloads_view'] = 'Allows the user to view the Downloads';
$txt['cannot_downloads_view'] = 'You are not allowed to view the Downloads';

$txt['permissionname_downloads_add'] = 'Add Download';
$txt['permissionhelp_downloads_add'] = 'Allows the user to add a download.';
$txt['cannot_downloads_add'] = 'You are not allowed to add a download.';

$txt['permissionname_downloads_edit'] = 'Edit own Download';
$txt['permissionhelp_downloads_edit'] = 'Allows the user to edit their own download.';
$txt['cannot_downloads_edit'] = 'You are not allowed to edit that download';

$txt['permissionname_downloads_delete'] = 'Delete own Download';
$txt['permissionhelp_downloads_delete'] = 'Allows the user to delete their own download.';
$txt['cannot_downloads_delete'] = 'You are not allowed to delete that download.';

$txt['permissionname_downloads_ratefile'] = 'Rate Downloads';
$txt['permissionhelp_downloads_ratefile'] = 'Allows the user to rate a file.';
$txt['cannot_downloads_ratefile'] = 'You are not allowed to rate that file.';

$txt['permissionname_downloads_editcomment'] = 'Edit own Comment';
$txt['permissionhelp_downloads_editcomment'] = 'Allows the user to edit their own comments.';
$txt['cannot_downloads_editcomment'] = 'You are not allowed to edit that comment.';

$txt['permissionname_downloads_comment'] = 'Leave Comments';
$txt['permissionhelp_downloads_comment'] = 'Allows the user to leave comments on a download.';
$txt['cannot_downloads_comment'] = 'You are not allowed to leave comments.';

$txt['permissionname_downloads_report'] = 'Report Pictures/Comments';
$txt['permissionhelp_downloads_report'] = 'Allows the user to report downloads and comments.';
$txt['cannot_downloads_report'] = 'You are not allowed to report content.';

$txt['permissionname_downloads_autocomment'] = 'Auto Approve Comments';
$txt['permissionhelp_downloads_autocomment'] = 'Comments do not need to wait for approval.';

$txt['permissionname_downloads_autoapprove'] = 'Auto Approve Downloads';
$txt['permissionhelp_downloads_autoapprove'] = 'Downloads do not need to wait for approval.';


$txt['permissionname_downloads_manage'] = 'Admin Download System';
$txt['permissionhelp_downloads_manage'] = 'Allows the user to add/delete/edit all catagories. Delete Comments, Delete Downloads, Approve Downloads';
$txt['cannot_downloads_manage'] = 'You are not allowed to manage the downloads.';

// END Download System Text Strings

file $languagedir/Who.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
// Begin Download System
$txt['whoall_downloads'] = 'In the <a href="' . $scripturl . '?action=downloads">Downloads</a>';
// END Download System Strings

สร้างไฟล์: downloadsinstall.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/downloadsinstall.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php
/*
Download System
Version 1.1
by:vbgamer45
http://www.smfhacks.com
Copyright 2008-2010 SMFHacks.com

############################################
License Information:

Links to http://www.smfhacks.com must remain unless
branding free option is purchased.
#############################################
*/
// If SSI.php is in the same place as this file, and SMF isn't defined, this is being run standalone.
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
  require_once(
dirname(__FILE__) . '/SSI.php');
// Hmm... no SSI.php and no SMF?
elseif (!defined('SMF'))
  die(
'<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');

// Installs the Database tables for Download System

// File Table
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_file(
ID_FILE int(11) NOT NULL auto_increment,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
date int(10) unsigned NOT NULL default '0',
title VARCHAR(100),
description text,
views int(10) NOT NULL default '0',
totaldownloads int(10) NOT NULL default '0',
lastdownload int(10) unsigned NOT NULL default '0',
filesize int(10) NOT NULL default '0',
orginalfilename tinytext,
filename tinytext,
fileurl tinytext,
commenttotal int(10) NOT NULL default '0',
ID_CAT int(10) NOT NULL default '0',
approved tinyint(4) NOT NULL default '0',
allowcomments tinyint(4) NOT NULL default '0',
totalratings int(10) NOT NULL default '0',
rating int(10) NOT NULL default '0',
type tinyint(4) NOT NULL default '0',
sendemail tinyint(4) NOT NULL default '0',
ID_TOPIC mediumint(8) unsigned NOT NULL default '0',
keywords VARCHAR(100),
credits int(10) NOT NULL default '0',
PRIMARY KEY (ID_FILE))"
__FILE____LINE__);


// Download comments
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_comment(
ID_COMMENT int(11) NOT NULL auto_increment,
ID_FILE int(11) NOT NULL,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
approved tinyint(4) NOT NULL default '0',
comment text,
date int(10) unsigned NOT NULL default '0',
modified_ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
lastmodified int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (ID_COMMENT))"
__FILE____LINE__);

// Downloads Category
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_cat
(ID_CAT mediumint(8) NOT NULL auto_increment,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
title VARCHAR(100) NOT NULL,
description VARCHAR(255),
roworder mediumint(8) unsigned NOT NULL default '0',
image VARCHAR(255),
filename tinytext,
ID_BOARD smallint(5) unsigned NOT NULL default '0',
ID_PARENT smallint(5) unsigned NOT NULL default '0',
disablerating tinyint(4) NOT NULL default '0',
total int(11) NOT NULL default '0',
redirect tinyint(4) NOT NULL default '0',
locktopic tinyint(4) NOT NULL default '0',
showpostlink tinyint(4) NOT NULL default '0',
sortby tinytext,
orderby tinytext,
PRIMARY KEY  (ID_CAT))"
__FILE____LINE__);

// File Ratings
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_rating
(ID int(11) NOT NULL auto_increment,
ID_FILE int(11) NOT NULL,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
value tinyint(2) NOT NULL,
PRIMARY KEY  (ID))"
__FILE____LINE__);


// Reported Files
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_report
(ID int(11) NOT NULL auto_increment,
ID_FILE int(11) NOT NULL,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
comment text,
date int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (ID))"
__FILE____LINE__);

// Reported Comment
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_creport
(ID int(11) NOT NULL auto_increment,
ID_FILE int(11) NOT NULL,
ID_COMMENT int(11) NOT NULL,
ID_MEMBER mediumint(8) unsigned NOT NULL default '0',
comment text,
date int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (ID))"
__FILE____LINE__);

// Member Quota Information
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_userquota
(ID_MEMBER mediumint(8) unsigned NOT NULL,
totalfilesize int(12) NOT NULL default '0',
PRIMARY KEY  (ID_MEMBER))"
__FILE____LINE__);

// Group Quota limit
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_groupquota
(ID_GROUP smallint(5) unsigned NOT NULL default '0',
totalfilesize int(12) NOT NULL default '0',
PRIMARY KEY (ID_GROUP))"
__FILE____LINE__);


db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_catperm
(ID mediumint(8) NOT NULL auto_increment,
ID_GROUP mediumint(8) NOT NULL default '0',
ID_CAT mediumint(8) unsigned NOT NULL default '0',
view tinyint(4) NOT NULL default '0',
addfile tinyint(4) NOT NULL default '0',
editfile tinyint(4) NOT NULL default '0',
delfile tinyint(4) NOT NULL default '0',
ratefile tinyint(4) NOT NULL default '0',
addcomment tinyint(4) NOT NULL default '0',
editcomment tinyint(4) NOT NULL default '0',
report tinyint(4) NOT NULL default '0',
PRIMARY KEY  (ID))"
__FILE____LINE__);

// Insert the settings
db_query("INSERT IGNORE INTO {$db_prefix}settings
(variable, value)
VALUES
('down_max_filesize', '5000000'),
('down_who_viewing', '0'),
('down_set_commentsnewest', '1'),
('down_commentchoice', '0'),
('down_set_count_child', '1'),
('down_show_ratings', '1'),
('down_index_recent', '1'),
('down_index_mostviewed', '1'),
('down_index_toprated', '0'),
('down_index_mostcomments', '0'),
('downloads_index_mostdownloaded', '0'),
('down_set_files_per_page', '20'),
('down_set_t_views', '1'),
('down_set_t_downloads', '1'),
('down_set_t_filesize', '1'),
('down_set_t_date', '1'),
('down_set_t_comment', '1'),
('down_set_t_username', '1'),
('down_set_t_rating', '1'),
('down_set_t_title', '1'),
('down_index_showtop', '0'),
('down_set_cat_width', '120'),
('down_set_cat_height', '120'),
('down_set_show_quickreply', '0'),
('down_set_file_prevnext', '1'),
('down_set_file_desc', '1'),
('down_set_file_title', '1'),
('down_set_file_views', '1'),
('down_set_file_downloads','1'),
('down_set_file_lastdownload','1'),
('down_set_file_poster', '1'),
('down_set_file_date', '1'),
('down_set_file_showfilesize', '1'),
('down_set_file_showrating', '1'),
('down_set_file_keywords', '1'),
('down_shop_commentadd', '0'),
('down_shop_fileadd', '0'),
('down_set_showcode_directlink', '0'),
('down_set_showcode_htmllink', '0'),
('down_set_enable_multifolder', '0'),
('down_folder_id', '0')
"
__FILE____LINE__);


// Update Intial Totals set them to negative -1
db_query("UPDATE {$db_prefix}down_cat SET total = -1"__FILE____LINE__);


// Custom Fields table
db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_custom_field
(ID_CUSTOM mediumint(8) NOT NULL auto_increment,
ID_CAT int(10) NOT NULL,
roworder mediumint(8) unsigned NOT NULL default '0',
title tinytext,
defaultvalue tinytext,
is_required tinyint(4) NOT NULL default '0',
showoncatlist tinyint(4) NOT NULL default '0',
PRIMARY KEY  (ID_CUSTOM))
TYPE=MyISAM"
__FILE____LINE__);

db_query("CREATE TABLE IF NOT EXISTS {$db_prefix}down_custom_field_data
(
ID_CUSTOM mediumint(8) NOT NULL,
ID_FILE int(11) NOT NULL default '0',
value tinytext)
TYPE=MyISAM"
__FILE____LINE__);


// Add Package Servers
db_query("DELETE FROM {$db_prefix}package_servers WHERE url = 'http://www.smfhacks.com'"__FILE____LINE__);
db_query("REPLACE INTO {$db_prefix}package_servers (name,url) VALUES ('SMFHacks.com Modification Site', 'http://www.smfhacks.com')"__FILE____LINE__);


// Recount Totals
echo 'Recounting Download Totals...<br />';
$dbresult db_query("SELECT ID_CAT FROM {$db_prefix}down_cat"__FILE____LINE__);
while(
$row mysql_fetch_assoc($dbresult))
{
UpdateCategoryTotals($row['ID_CAT']);
}
mysql_free_result($dbresult);

function 
UpdateCategoryTotals($ID_CAT)
{
global $db_prefix;

$dbresult db_query("
SELECT
COUNT(*) AS total
FROM {$db_prefix}down_file
WHERE ID_CAT = $ID_CAT AND approved = 1"
__FILE____LINE__);
$row mysql_fetch_assoc($dbresult);
$total $row['total'];
mysql_free_result($dbresult);

// Update the count
$dbresult db_query("UPDATE {$db_prefix}down_cat SET total = $total WHERE ID_CAT = $ID_CAT LIMIT 1"__FILE____LINE__);

}

// Permissions array
$permissions = array(
'downloads_view' => array(-102), // ALL
);

addPermissions($permissions);

function 
addPermissions($permissions)
{
global $db_prefix;

foreach ($permissions as $permission => $default)
{
$result db_query("
SELECT COUNT(*)
FROM {$db_prefix}permissions
WHERE permission = '$permission'"
__FILE____LINE__);

list ($num) = mysql_free_result($result);

if ($num == 0)
{
foreach ($default as $ID_GROUP)
{
db_query("
INSERT IGNORE INTO {$db_prefix}permissions
(id_group, permission)
VALUES ('$ID_GROUP', '$permission')"
__FILE____LINE__);

}

}
}



}




?>

ดาวนโหลด: DownloadSystem.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com
แตกไฟล์แล้วอัพโหลดไปไว้ที่
folder downloads -->> $boarddir CHMOD=777
file Downloads.php -->> $sourcedir
file Downloads.template.php -->> $themesdir/default
file Downloads.thai-utf8.php -->> $languagedir

การตั้งค่า: ผู้ดูแล -->> แก้ไขการอนุญาต -->> [กลุ่มสมาชิก] ขั้นสูง


ลิงค์หัวข้อ: http://dexmore.com/topic/1899
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 10 มิถุนายน 2553, 20:01:24
สำหรับ SMF 2.0.xx

file $boarddir/index.php

ค้นหา -->>
โค๊ด: [Select]
'help' => array('Help.php', 'ShowHelp'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'downloads' => array('Downloads2.php', 'DownloadsMain'),

file $sourcedir/Admin.php

ค้นหา -->>
โค๊ด: [Select]
'layout' => array(
'title' => $txt['layout_controls'],

แก้เป็น -->>
โค๊ด: [Select]
'downloads' => array(
'title' => $txt['downloads_admin'],
'permission' => array('downloads_manage'),
'areas' => array(
'downloads' => array(
'label' => $txt['downloads_admin'],
'file' => 'Downloads2.php',
'function' => 'DownloadsMain',
'custom_url' => $scripturl . '?action=admin;area=downloads;sa=adminset;sesc=' . $sc,
'icon' => 'server.gif',
'subsections' => array(
'adminset' => array($txt['downloads_text_settings']),
'approvelist' => array($txt['downloads_form_approvedownloads']),
'reportlist' => array($txt['downloads_form_reportdownloads']),
'commentlist' => array($txt['downloads_form_approvecomments']),
'filespace' => array($txt['downloads_filespace']),
'catpermlist' => array($txt['downloads_text_catpermlist2']),
'import' => array($txt['downloads_txt_import']),
),
),),
),

'layout' => array(
'title' => $txt['layout_controls'],

file $sourcedir/Subs.php

ค้นหา -->>
โค๊ด: [Select]
$context['allow_calendar'] = allowedTo('calendar_view') && !empty($modSettings['cal_enabled']);

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['allow_downloads_view'] = allowedTo('downloads_view');

ค้นหา -->>
โค๊ด: [Select]
'mlist' => array(

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// [Downloads] button
'downloads' => array(
'title' => $txt['downloads_menu'],
'href' => $scripturl . '?action=downloads',
'show' => $context['allow_downloads_view'],
'icon' => '',
),

file $sourcedir/ManagePermissions.php

ค้นหา -->>
โค๊ด: [Select]
$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'downloads_view',
'downloads_add',
'downloads_edit',
'downloads_delete',
'downloads_ratefile',
'downloads_comment',
'downloads_editcomment',
'downloads_report',
'downloads_autocomment',
'downloads_autoapprove',
'downloads_manage',

ค้นหา -->>
โค๊ด: [Select]
$permissionList = array(
'membergroup' => array(

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'downloads_view' => array(false, 'downloads', 'downloads'),
'downloads_add' => array(false, 'downloads', 'downloads'),
'downloads_edit' => array(false, 'downloads', 'downloads'),
'downloads_delete' => array(false, 'downloads', 'downloads'),
'downloads_ratefile' => array(false, 'downloads', 'downloads'),
'downloads_comment' => array(false, 'downloads', 'downloads'),
'downloads_editcomment' => array(false, 'downloads', 'downloads'),
'downloads_report' => array(false, 'downloads', 'downloads'),
'downloads_autocomment' => array(false, 'downloads', 'downloads'),
'downloads_autoapprove' => array(false, 'downloads', 'downloads'),
'downloads_manage' => array(false, 'downloads', 'downloads'),

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
// Begin Download System Text Strings
$txt['downloads_menu'] = 'Downloads';
$txt['downloads_admin'] = 'Downloads Configuration';
$txt['downloads_text_settings'] = 'Settings';

$txt['downloads_form_approvedownloads'] = 'Approve Downloads';
$txt['downloads_form_reportdownloads'] = 'Reported Downloads';
$txt['downloads_form_approvecomments'] = 'Approve Comments';
$txt['downloads_filespace'] = 'File Space Manager';
$txt['downloads_text_catpermlist2'] = 'Category Permissions';
$txt['downloads_txt_import'] = 'Import';

// Permissions
$txt['permissiongroup_downloads'] = 'Downloads System';
$txt['permissiongroup_simple_downloads'] = 'Downloads System';

$txt['permissionname_downloads_view'] = 'View Downloads';
$txt['permissionhelp_downloads_view'] = 'Allows the user to view the Downloads';
$txt['cannot_downloads_view'] = 'You are not allowed to view the Downloads';

$txt['permissionname_downloads_add'] = 'Add Download';
$txt['permissionhelp_downloads_add'] = 'Allows the user to add a download.';
$txt['cannot_downloads_add'] = 'You are not allowed to add a download.';

$txt['permissionname_downloads_edit'] = 'Edit own Download';
$txt['permissionhelp_downloads_edit'] = 'Allows the user to edit their own download.';
$txt['cannot_downloads_edit'] = 'You are not allowed to edit that download';

$txt['permissionname_downloads_delete'] = 'Delete own Download';
$txt['permissionhelp_downloads_delete'] = 'Allows the user to delete their own download.';
$txt['cannot_downloads_delete'] = 'You are not allowed to delete that download.';

$txt['permissionname_downloads_ratefile'] = 'Rate Downloads';
$txt['permissionhelp_downloads_ratefile'] = 'Allows the user to rate a file.';
$txt['cannot_downloads_ratefile'] = 'You are not allowed to rate that file.';

$txt['permissionname_downloads_editcomment'] = 'Edit own Comment';
$txt['permissionhelp_downloads_editcomment'] = 'Allows the user to edit their own comments.';
$txt['cannot_downloads_editcomment'] = 'You are not allowed to edit that comment.';

$txt['permissionname_downloads_comment'] = 'Leave Comments';
$txt['permissionhelp_downloads_comment'] = 'Allows the user to leave comments on a download.';
$txt['cannot_downloads_comment'] = 'You are not allowed to leave comments.';

$txt['permissionname_downloads_report'] = 'Report Pictures/Comments';
$txt['permissionhelp_downloads_report'] = 'Allows the user to report downloads and comments.';
$txt['cannot_downloads_report'] = 'You are not allowed to report content.';

$txt['permissionname_downloads_autocomment'] = 'Auto Approve Comments';
$txt['permissionhelp_downloads_autocomment'] = 'Comments do not need to wait for approval.';

$txt['permissionname_downloads_autoapprove'] = 'Auto Approve Downloads';
$txt['permissionhelp_downloads_autoapprove'] = 'Downloads do not need to wait for approval.';


$txt['permissionname_downloads_manage'] = 'Admin Download System';
$txt['permissionhelp_downloads_manage'] = 'Allows the user to add/delete/edit all catagories. Delete Comments, Delete Downloads, Approve Downloads';
$txt['cannot_downloads_manage'] = 'You are not allowed to manage the downloads.';

// END Download System Text Strings

file $languagedir/Who.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
// Begin Download System
$txt['whoall_downloads'] = 'In the <a href="' . $scripturl . '?action=downloads">Downloads</a>';
// END Download System Strings

สร้างไฟล์: downloadsinstall2.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/downloadsinstall2.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php
/*
Download System
Version 1.1
by:vbgamer45
http://www.smfhacks.com
Copyright 2008-2010 SMFHacks.com

############################################
License Information:

Links to http://www.smfhacks.com must remain unless
branding free option is purchased.
#############################################
*/
// If SSI.php is in the same place as this file, and SMF isn't defined, this is being run standalone.
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
  require_once(
dirname(__FILE__) . '/SSI.php');
// Hmm... no SSI.php and no SMF?
elseif (!defined('SMF'))
  die(
'<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');

// Installs the Database tables for Download System

// File Table
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_file(
id_file int(11) NOT NULL auto_increment,
id_member mediumint(8) unsigned NOT NULL default '0',
date int(10) unsigned NOT NULL default '0',
title VARCHAR(100),
description text,
views int(10) NOT NULL default '0',
totaldownloads int(10) NOT NULL default '0',
lastdownload int(10) unsigned NOT NULL default '0',
filesize int(10) NOT NULL default '0',
orginalfilename tinytext,
filename tinytext,
fileurl tinytext,
commenttotal int(10) NOT NULL default '0',
id_cat int(10) NOT NULL default '0',
approved tinyint(4) NOT NULL default '0',
allowcomments tinyint(4) NOT NULL default '0',
totalratings int(10) NOT NULL default '0',
rating int(10) NOT NULL default '0',
type tinyint(4) NOT NULL default '0',
sendemail tinyint(4) NOT NULL default '0',
id_topic mediumint(8) unsigned NOT NULL default '0',
keywords VARCHAR(100),
credits int(10) NOT NULL default '0',
PRIMARY KEY (id_file))"
);


// Download comments
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_comment(
id_comment int(11) NOT NULL auto_increment,
id_file int(11) NOT NULL,
id_member mediumint(8) unsigned NOT NULL default '0',
approved tinyint(4) NOT NULL default '0',
comment text,
date int(10) unsigned NOT NULL default '0',
modified_id_member mediumint(8) unsigned NOT NULL default '0',
lastmodified int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (id_comment))"
);

// Downloads Category
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_cat
(id_cat mediumint(8) NOT NULL auto_increment,
id_member mediumint(8) unsigned NOT NULL default '0',
title VARCHAR(100) NOT NULL,
description VARCHAR(255),
roworder mediumint(8) unsigned NOT NULL default '0',
image VARCHAR(255),
filename tinytext,
id_board smallint(5) unsigned NOT NULL default '0',
id_parent smallint(5) unsigned NOT NULL default '0',
disablerating tinyint(4) NOT NULL default '0',
total int(11) NOT NULL default '0',
redirect tinyint(4) NOT NULL default '0',
locktopic tinyint(4) NOT NULL default '0',
showpostlink tinyint(4) NOT NULL default '0',
sortby tinytext,
orderby tinytext,
PRIMARY KEY  (id_cat))"
);

// File Ratings
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_rating
(id int(11) NOT NULL auto_increment,
id_file int(11) NOT NULL,
id_member mediumint(8) unsigned NOT NULL default '0',
value tinyint(2) NOT NULL,
PRIMARY KEY  (ID))"
);


// Reported Files
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_report
(id int(11) NOT NULL auto_increment,
id_file int(11) NOT NULL,
id_member mediumint(8) unsigned NOT NULL default '0',
comment text,
date int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (id))"
);

// Reported Comment
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_creport
(id int(11) NOT NULL auto_increment,
id_file int(11) NOT NULL,
id_comment int(11) NOT NULL,
id_member mediumint(8) unsigned NOT NULL default '0',
comment text,
date int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (id))"
);

// Member Quota Information
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_userquota
(id_member mediumint(8) unsigned NOT NULL,
totalfilesize int(12) NOT NULL default '0',
PRIMARY KEY  (id_member))"
);

// Group Quota limit
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_groupquota
(id_group smallint(5) unsigned NOT NULL default '0',
totalfilesize int(12) NOT NULL default '0',
PRIMARY KEY (id_group))"
);


$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_catperm
(id mediumint(8) NOT NULL auto_increment,
id_group mediumint(8) NOT NULL default '0',
id_cat mediumint(8) unsigned NOT NULL default '0',
view tinyint(4) NOT NULL default '0',
addfile tinyint(4) NOT NULL default '0',
editfile tinyint(4) NOT NULL default '0',
delfile tinyint(4) NOT NULL default '0',
ratefile tinyint(4) NOT NULL default '0',
addcomment tinyint(4) NOT NULL default '0',
editcomment tinyint(4) NOT NULL default '0',
report tinyint(4) NOT NULL default '0',
PRIMARY KEY  (id))"
);

// Insert the settings
$smcFunc['db_query'](''"INSERT IGNORE INTO {db_prefix}settings
(variable, value)
VALUES
('down_max_filesize', '5000000'),
('down_who_viewing', '0'),
('down_set_commentsnewest', '1'),
('down_commentchoice', '0'),
('down_set_count_child', '1'),
('down_show_ratings', '1'),
('down_index_recent', '1'),
('down_index_mostviewed', '1'),
('down_index_toprated', '0'),
('down_index_mostcomments', '0'),
('downloads_index_mostdownloaded', '0'),
('down_set_files_per_page', '20'),
('down_set_t_views', '1'),
('down_set_t_downloads', '1'),
('down_set_t_filesize', '1'),
('down_set_t_date', '1'),
('down_set_t_comment', '1'),
('down_set_t_username', '1'),
('down_set_t_rating', '1'),
('down_set_t_title', '1'),
('down_index_showtop', '0'),
('down_set_cat_width', '120'),
('down_set_cat_height', '120'),
('down_set_show_quickreply', '0'),
('down_set_file_prevnext', '1'),
('down_set_file_desc', '1'),
('down_set_file_title', '1'),
('down_set_file_views', '1'),
('down_set_file_downloads','1'),
('down_set_file_lastdownload','1'),
('down_set_file_poster', '1'),
('down_set_file_date', '1'),
('down_set_file_showfilesize', '1'),
('down_set_file_showrating', '1'),
('down_set_file_keywords', '1'),
('down_shop_commentadd', '0'),
('down_shop_fileadd', '0'),
('down_set_showcode_directlink', '0'),
('down_set_showcode_htmllink', '0'),
('down_set_enable_multifolder', '0'),
('down_folder_id', '0')
"
);


// Update Intial Totals set them to negative -1
$smcFunc['db_query'](''"UPDATE {db_prefix}down_cat SET total = -1");

// Custom Fields table
$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_custom_field
(id_custom mediumint(8) NOT NULL auto_increment,
id_cat int(10) NOT NULL,
roworder mediumint(8) unsigned NOT NULL default '0',
title tinytext,
defaultvalue tinytext,
is_required tinyint(4) NOT NULL default '0',
showoncatlist tinyint(4) NOT NULL default '0',
PRIMARY KEY  (id_custom))
TYPE=MyISAM"
);

$smcFunc['db_query'](''"CREATE TABLE IF NOT EXISTS {db_prefix}down_custom_field_data
(
id_custom mediumint(8) NOT NULL,
id_file int(11) NOT NULL default '0',
value tinytext)
TYPE=MyISAM"
);


// Add Package Servers
$smcFunc['db_query'](''"DELETE FROM {db_prefix}package_servers WHERE url = 'http://www.smfhacks.com'");
$smcFunc['db_query'](''"REPLACE INTO {db_prefix}package_servers (name,url) VALUES ('SMFHacks.com Modification Site', 'http://www.smfhacks.com')");


// Recount Totals
echo 'Recounting Download Totals...<br />';
$dbresult $smcFunc['db_query'](''"
SELECT
id_cat
FROM {db_prefix}down_cat"
);
while(
$row $smcFunc['db_fetch_assoc']($dbresult))
UpdateCategoryTotals($row['id_cat']);

$smcFunc['db_free_result']($dbresult);

function 
UpdateCategoryTotals($ID_CAT)
{
global $smcFunc;

$dbresult $smcFunc['db_query'](''"
SELECT
COUNT(*) AS total
FROM {db_prefix}down_file
WHERE id_cat = $ID_CAT AND approved = 1"
);
$row $smcFunc['db_fetch_assoc']($dbresult);
$total $row['total'];
$smcFunc['db_free_result']($dbresult);

// Update the count
$dbresult $smcFunc['db_query'](''"UPDATE {db_prefix}down_cat SET total = $total WHERE ID_CAT = $ID_CAT LIMIT 1");

}

// Permissions array
$permissions = array(
'downloads_view' => array(-102), // ALL
);

addPermissions($permissions);

function 
addPermissions($permissions)
{
global $smcFunc;

$perm = array();

foreach ($permissions as $permission => $default)
{
$result $smcFunc['db_query']('''
SELECT COUNT(*)
FROM {db_prefix}permissions
WHERE permission = {string:permission}'
,
array(
'permission' => $permission
)
);

list ($num) = $smcFunc['db_fetch_row']($result);

if ($num == 0)
{
foreach ($default as $grp)
$perm[] = array($grp$permission);
}
}

if (empty($perm))
return;

$smcFunc['db_insert']('insert',
'{db_prefix}permissions',
array(
'id_group' => 'int',
'permission' => 'string'
),
$perm,
array()
);
}


?>

ดาวนโหลด: DownloadSystem2.rar
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
แตกไฟล์แล้วอัพโหลดไปไว้ที่
folder downloads -->> $boarddir CHMOD=777
file Downloads2.php -->> $sourcedir
file Downloads2.template.php -->> $themesdir/default
file Downloads.thai-utf8.php -->> $languagedir

ลิงค์หัวข้อ: http://dexmore.com/topic/1899
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 13 สิงหาคม 2553, 16:05:50
mod ตัวนี้สมารถอัพโหลดเพลงที่เป็น WMA ได้ไหมคับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1899
Windows XP    Chrome 5.0.375.126   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 13 สิงหาคม 2553, 16:10:24
ได้ทุกนามสกุลและขนาดที่โฮสต์อนุญาต ครับ

ค่ามาตรฐานของ PHP คือ 2 M

ลิงค์หัวข้อ: http://dexmore.com/topic/1899
Windows XP    Firefox 3.6.8   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 2 มีนาคม 2554, 00:51:54
เทพจังอ่ะ ....เขียน cms .  ใหม่เรย

คิคิ ... clap clap clap clap clap clap clap

ลิงค์หัวข้อ: http://dexmore.com/topic/1899
Windows XP    Chrome 9.0.597.98   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 20 พฤษภาคม 2555, 00:44:40

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla