สำหรับ SMF 2.0.xxแก้ไขไฟล์:file $themedir/Post.template.php
ค้นหา -->>
[ // Finally, the submit buttons.
echo '
แก้เป็น -->>
// SimpleImageShack v3.1.3 - SimpleTweaks.info
if (empty($modSettings['sis_addops']))
{
global $boardurl;
$sisframe_width = $modSettings['sis_width'];
$sisframe_height = $modSettings['sis_height'];
if (!empty($modSettings['sis_permis']))
{
if (!empty($modSettings['sis_enable']) && AllowedTo('sis_view'))
{
echo '
<div>
<iframe src="' . $boardurl . '/sis/SISiframe.php" scrolling="auto" frameborder="0" width="' . $sisframe_width . '" height="' . $sisframe_height . '" allowtransparency="true"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
</div>
';
}
}
else
{
if (!empty($modSettings['sis_enable']))
{
echo '
<div>
<iframe src="' . $boardurl . '/sis/SISiframe.php" scrolling="auto" frameborder="0" width="' . $sisframe_width . '" height="' . $sisframe_height . '" allowtransparency="true"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
</div>
';
}
}
}
// SimpleImageShack v3.1.3 - SimpleTweaks.info
// Finally, the submit buttons.
echo '
ค้นหา -->>
</div>';
// If this post already has attachments on it - give information about them.
แก้เป็น -->>
';
// SimpleImageShack v3.1.3 - SimpleTweaks.info
if (!empty($modSettings['sis_addops']))
{
global $boardurl;
$sisframe_width = $modSettings['sis_width'];
$sisframe_height = $modSettings['sis_height'];
if (!empty($modSettings['sis_permis']))
{
if (!empty($modSettings['sis_enable']) && AllowedTo('sis_view'))
{
echo '
<div>
<iframe src="' . $boardurl . '/sis/SISiframe.php" scrolling="auto" frameborder="0" width="' . $sisframe_width . '" height="' . $sisframe_height . '" allowtransparency="true"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
</div>
';
}
}
else
{
if (!empty($modSettings['sis_enable']))
{
echo '
<div>
<iframe src="' . $boardurl . '/sis/SISiframe.php" scrolling="auto" frameborder="0" width="' . $sisframe_width . '" height="' . $sisframe_height . '" allowtransparency="true"> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
</div>
';;
}
}
}
// SimpleImageShack v3.1.3 - SimpleTweaks.info
echo '
file $sourcedir/ManageSettings.php
ค้นหา -->>
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.
เพิ่มไว้หลัง -->>
'sis' => 'ModifySisModSettings',
ค้นหา -->>
'description' => $txt['modification_settings_desc'],
'tabs' => array(
'general' => array(
),
เพิ่มไว้หลัง -->>
'sis' => array(
'label' => 'Simple ImageShack',
),
ค้นหา -->>
// If you have a general mod setting to add stick it here.
เพิ่มไว้หลัง -->>
// Simple ImageShack v3.1.3
function ModifySisModSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc, $modSettings;
$config_vars = array(
array('check', 'sis_enable'),
array('text', 'sis_cookie', 36),
'',
array('check', 'sis_permis'),
array('check', 'sis_addops'),
array('check', 'sis_forumtag'),
array('text', 'sis_tags', 36),
'',
array('check', 'sis_imagelink'),
array('check', 'sis_imagelink_bbcode'),
array('check', 'sis_thumblink_bbcode'),
array('check', 'sis_thumblink_click'),
array('check', 'sis_rembar'),
'',
array('int', 'sis_width'),
array('int', 'sis_height'),
array('text', 'sis_color'),
array('select', 'sis_loader', array('0' => &$txt['sis_loader_0'], '1' => &$txt['sis_loader_1'], '2' => &$txt['sis_loader_2'], '3' => &$txt['sis_loader_3'], '4' => &$txt['sis_loader_4'])),
);
if ($return_config)
return $config_vars;
$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=sis';
$context['settings_title'] = 'Simple ImageShack';
// No removing this line you, dirty unwashed mod authors. :p
if (empty($config_vars))
{
$context['settings_save_dont_show'] = true;
$context['settings_message'] = '<div class="centertext">' . $txt['modification_no_misc_settings'] . '</div>';
return prepareDBSettingContext($config_vars);
}
// Saving?
if (isset($_GET['save']))
{
checkSession();
$save_vars = $config_vars;
// This line is to help mod authors do a search/add after if you want to add something here. Keyword: SIS Rocks!
saveDBSettings($save_vars);
// This line is to help mod authors do a search/add after if you want to add something here. Keyword: Keep IT Simple!
redirectexit('action=admin;area=modsettings;sa=sis');
}
// This line is to help mod authors do a search/add after if you want to add something here. Keyword: Friendly Froggy!
prepareDBSettingContext($config_vars);
}
// Simple ImageShack v3.1.3
file $sourcedir/Admin.php
ค้นหา -->>
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
เพิ่มไว้ก่อน -->>
'sis' => array('Simple ImageShack'),
file $sourcedir/ManagePermissions.php
ค้นหา -->>
'post_attachment' => array(false, 'attachment', 'attach'),
เพิ่มไว้หลัง -->>
'sis_view' => array(false, 'sis', 'sis'),
file $languagedir/Modifications.thai-utf8.php
เพิ่ม -->>
// Simple ImageShack v3.1.3
$txt['sis_enable'] = 'Enable Simple ImageShack';
$txt['sis_cookie'] = 'Your ImageShack.us registration code<br /><small><a href="http://profile.imageshack.us/prefs/index.php" target="_blank">click here to retrieve your reg code</a></small>';
$txt['sis_addops'] = 'Display inside additional options';
$txt['sis_permis'] = 'Use smf permission-system';
$txt['sis_forumtag'] = 'Add forumtag';
$txt['sis_tags'] = 'Add Personaltag(s) to image<br /><small>use commas between multiple tags</small>';
$txt['sis_loader'] = 'Select loader image';
$txt['sis_loader_0'] = 'off';
$txt['sis_loader_1'] = 'classic';
$txt['sis_loader_2'] = 'modern blue';
$txt['sis_loader_3'] = 'modern green';
$txt['sis_loader_4'] = 'froggy';
$txt['sis_rembar'] = 'Remove information bar from thumbnail';
$txt['sis_imagelink'] = 'Show direct link to image';
$txt['sis_imagelink_bbcode'] = 'Show bbcode image';
$txt['sis_thumblink_bbcode'] = 'Show bbcode thumbnail';
$txt['sis_thumblink_click'] = 'Show bbcode clickable thumbnail';
$txt['sis_width'] = 'Simple ImageShack iframe width';
$txt['sis_height'] = 'Simple ImageShack iframe height';
$txt['sis_color'] = 'Simple ImageShack text color (hex)';
$txt['permissiongroup_sis'] = 'Simple ImageShack mod';
$txt['permissiongroup_simple_sis'] = 'Use Simple ImageShack mod';
$txt['permissionname_sis_view'] = 'Use the Simple ImageShack mod';
$txt['permissionhelp_sis_view'] = 'Enabling this permission adds an ImageShack.us upload field to the post template';
// Simple ImageShack v3.1.3
file $languagedir/Help.thai-utf8.php
เพิ่ม -->>
// Simple ImageShack v3.1.3
$helptxt['sis_enable'] = 'This will turn on the Simple ImageShack mod.';
$helptxt['sis_cookie'] = 'This option allows you to load the image into your ImageShack account.<br />
<small>Leave blank if you don\'t have an ImagShack account.</small><br />
<br /><br />
<b>How to get your registration code</b><br />
- Register at ImageShack<br /> <a href="http://profile.imageshack.us/registration/" target="_blank">http://profile.imageshack.us/registration/</a> and log in<br /><br />
- When logged-in go to<br /> <a href="http://profile.imageshack.us/prefs/index.php" target="blank">http://profile.imageshack.us/prefs/index.php</a><br /><br />
- Copy and Paste your ImageShack Registration Code
';
$helptxt['sis_addops'] = 'This option allows you to put the mod inside the Additional Options.';
$helptxt['sis_permis'] = 'This option allows you to turn on or off the use of the SMF permission system with the Simple ImageShack mod.';
$helptxt['sis_forumtag'] = 'This option adds a tag with forum+user info to the image';
$helptxt['sis_tags'] = 'This option allows you to add one or more Personaltags to the image.<br />
<small>Use commas between multiple tags</small>
';
$helptxt['sis_loader'] = 'This option allows you to select the loader image.<br />
<table border="1" bordercolor="LightSteelBlue" rules="rows" frame="hsides" cellpadding="3" cellspacing="1">
<tr><td>classic</td><td><img src="./sis/img/sis-loader_1.gif" alt=""></td>
</tr>
<tr><td>modern blue</td><td><img src="./sis/img/sis-loader_2.gif" alt=""></td>
</tr>
<tr><td>modern green</td><td><img src="./sis/img/sis-loader_3.gif" alt=""></td>
</tr>
<tr><td>froggy</td><td><img src="./sis/img/sis-loader_4.gif" alt=""></td>
</tr>
</table>
';
$helptxt['sis_rembar'] = 'This option allows you to remove the information bar from thumbnails.';
$helptxt['sis_imagelink'] = 'Enable to show a direct link to the image.';
$helptxt['sis_imagelink_bbcode'] = 'Enable to show the bbcode for direct link.';
$helptxt['sis_thumblink_bbcode'] = 'Enable to show the bbcode for thumbnail.';
$helptxt['sis_thumblink_click'] = 'Enable to show the bbcode for clickable thumbnail.';
$helptxt['sis_width'] = 'This option allows you to set the width of the Simple ImageShack iframe.';
$helptxt['sis_height'] = 'This option allows you to set the height of the Simple ImageShack iframe.';
$helptxt['sis_color'] = 'This option allows you to set the text-color of Simple ImageShack.';
// Simple ImageShack v3.1.3
สร้างไฟล์: SISv313_add-settings.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url/$boarddir/SISv313_add-settings.php -->> Enter เสร็จแล้วลบทิ้ง
<?php
/*******************************
* Name : Simple ImageShack
* Version : 3.1.3
*******************************/
// 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.');
// Add mod setting to the database
global $modSettings;
if(!isset($modSettings['sis_enable']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_enable", "1")',
array()
);
if(!isset($modSettings['sis_cookie']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_cookie", "Your ImageShack Registration Code")',
array()
);
if(!isset($modSettings['sis_permis']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_permis", "0")',
array()
);
if(!isset($modSettings['sis_addops']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_addops", "1")',
array()
);
if(!isset($modSettings['sis_forumtag']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_forumtag", "1")',
array()
);
if(!isset($modSettings['sis_tags']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_tags", "SIS313,www.SimpleTweaks.info")',
array()
);
if(!isset($modSettings['sis_imagelink']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_imagelink", "1")',
array()
);
if(!isset($modSettings['sis_imagelink_bbcode']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_imagelink_bbcode", "1")',
array()
);
if(!isset($modSettings['sis_thumblink_bbcode']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_thumblink_bbcode", "1")',
array()
);
if(!isset($modSettings['sis_thumblink_click']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_thumblink_click", "1")',
array()
);
if(!isset($modSettings['sis_rembar']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_rembar", "0")',
array()
);
if(!isset($modSettings['sis_width']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_width", "660")',
array()
);
if(!isset($modSettings['sis_height']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_height", "240")',
array()
);
if(!isset($modSettings['sis_color']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_color", "7A7A7A")',
array()
);
if(!isset($modSettings['sis_loader']))
$smcFunc['db_query']('', '
INSERT INTO {db_prefix}settings
VALUES ("sis_loader", "2")',
array()
);
?>
ดาวน์โหลด: sis.rar แตกไฟล์แล้วอัพโหลดไปไว้ใน $boarddir CHMOD=777
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Comลิงค์หัวข้อ:
http://dexmore.com/topic/1386