SimpleAds de SMF 2.0 RC 4 para SMF 2.0
tem como editar este mod para instalar no smf 2.0 sem precisar adicionar manualmente ??
mods === >
SimpleAds SMF 2.0 RC 4instalação manual
SimpleAds - Installation Instructions for 2.0
Readme
SimpleAds
This mod allows you to display HTML code in various locations of forum. You can limit ads by time, click, impressions, membergroups or actions. You can also create custom ad positions.
The mod requires minimal template edits. If you are using a custom theme, make sure you install the mod for those custom themes as well, using the "Install in Other Themes" option during the installation.
This mod uses FamFamFam Silk icons licensed under Creative Commons Attribution 2.5 License.
./index.php
Find
// If $maintenance is set specifically to 2, then we're upgrading or something.
Replace With
require_once($sourcedir . '/Subs-Ads.php');// If $maintenance is set specifically to 2, then we're upgrading or something.
Find
// Do some logging, unless this is an attachment, avatar, toggle of editor buttons, theme option, XML feed etc.
Replace With
load_ads(); // Do some logging, unless this is an attachment, avatar, toggle of editor buttons, theme option, XML feed etc.
./Sources/Admin.php
Find
), 'maintenance' => array(
Replace With
), 'ads' => array( 'title' => $txt['sa_admin_cat_title'], 'permission' => array('admin_forum'), 'areas' => array( 'ads' => array( 'label' => $txt['sa_admin_title'], 'file' => 'ManageAds.php', 'function' => 'ManageAds', 'permission' => array('admin_forum'), 'icon' => 'ads.png', 'subsections' => array( 'ads' => array($txt['sa_ads_list_title']), 'addad' => array($txt['sa_ads_add_title']), 'positions' => array($txt['sa_positions_list_title']), 'addposition' => array($txt['sa_positions_add_title']), ), ), ), ), 'maintenance' => array(
./Sources/Subs.php
Find
if (!empty($settings['strict_doctype']))
Replace With
update_ad_impressions(); if (!empty($settings['strict_doctype']))
./Themes/default/BoardIndex.template.php
Find
template_info_center();
Replace With
echo '<br class="clear" />'; template_ad_position('above_info_center'); template_info_center();
./Themes/default/Display.template.php
Find
$message['body'], '</div>
Replace With
$message['id'] == $context['first_message'] ? template_ad_position('inside_first_post') : '', $message['body'], '</div>
Find
$ignoring = false;
Replace With
if (!isset($msg_counter)) $msg_counter = 0; if (++$msg_counter == 2) template_ad_position('after_first_post'); $ignoring = false;
Find
<a id="lastPost"></a>';
Replace With
<a id="lastPost"></a>'; template_ad_position('after_last_post');
./Themes/default/languages/Modifications.english.php
Find
?>
Add Before
// SimpleAds$txt['sa_admin_cat_title'] = 'SimpleAds';$txt['sa_admin_title'] = 'Advertisements';$txt['sa_admin_desc'] = 'You can manage advertisements and positions in this area.';$txt['sa_ads_list_title'] = 'Ad List';$txt['sa_ads_add_title'] = 'Add Ad';$txt['sa_ads_edit_title'] = 'Edit Ad';$txt['sa_positions_list_title'] = 'Position List';$txt['sa_positions_add_title'] = 'Add Position';$txt['sa_positions_edit_title'] = 'Edit Position';
./Themes/default/languages/Modifications.english-utf8.php
Find (at the end of the file):
?>
Add Before
// SimpleAds$txt['sa_admin_cat_title'] = 'SimpleAds';$txt['sa_admin_title'] = 'Advertisements';$txt['sa_admin_desc'] = 'You can manage advertisements and positions in this area.';$txt['sa_ads_list_title'] = 'Ad List';$txt['sa_ads_add_title'] = 'Add Ad';$txt['sa_ads_edit_title'] = 'Edit Ad';$txt['sa_positions_list_title'] = 'Position List';$txt['sa_positions_add_title'] = 'Add Position';$txt['sa_positions_edit_title'] = 'Edit Position';
This operation isn't vital to the installation of this mod.
Code
database.php
This file should be able to execute standalone.
File Operations
Move the included file "ManageAds.php" to "./Sources".
Move the included file "Subs-Ads.php" to "./Sources".
Move the included file "Subs-AdsAdmin.php" to "./Sources".
Move the included file "Ads.template.php" to "./Themes/default".
Move the included file "ManageAds.template.php" to "./Themes/default".
Move the included file "ManageAds.english.php" to "./Themes/default/languages".
Move the included file "manageads.css" to "./Themes/default/css".
Move the included file "ads.js" to "./Themes/default/scripts".
Move the included file "manageads.js" to "./Themes/default/scripts".
Move the included file "ads.png" to "./Themes/default/images/admin".
Move the included directory "sa" to "./Themes/default/images".