Danya Posted September 21, 2013 Report Share Posted September 21, 2013 1. добавляем поле в базу counter в таблице s_settings: ALTER TABLE `s_settings` ADD `counter` TEXT NOT NULL AFTER `name`2. в файле simpla/Settings.Admin.php добавляем строку: $this->settings->counter = $this->request->post('counter');3. в в файле simpla/design/html/settings.tpl добавляем код: <div class="block layer"> <h2>Счётчики</h2> <ul> <p><textarea style='width:930px;height:300px;' name=counter>{$settings->counter}</textarea></p> </ul> </div>4. в файле design/default/html/index.tpl выводим счётчики: {$settings->counter} Quote Link to post Share on other sites
Danya Posted September 21, 2013 Author Report Share Posted September 21, 2013 или просто в шаблоне прописать в index.tpl: {literal} ..... Ваш код счетчика ...... {/literal} Quote Link to post Share on other sites
Kosjak76 Posted September 21, 2013 Report Share Posted September 21, 2013 В принципе, в базу ничего добавлять НЕ НУЖНО. Строка добавится автоматически. Quote Link to post Share on other sites
Danya Posted September 21, 2013 Author Report Share Posted September 21, 2013 добавил запрос в базу Quote Link to post Share on other sites
ps-simpla Posted September 21, 2013 Report Share Posted September 21, 2013 а что за счетчик?? что то я не понял)) Quote Link to post Share on other sites
Jekas Posted October 11, 2013 Report Share Posted October 11, 2013 А если просто в шаблон добавить, работать не будет? :-) :-) :-) Quote Link to post Share on other sites
Danya Posted October 11, 2013 Author Report Share Posted October 11, 2013 будет работать, если код обернёте: {literal} ..... Ваш код счетчика ...... {/literal} Quote Link to post Share on other sites
vlad123 Posted July 4, 2014 Report Share Posted July 4, 2014 На симплу 2.1.0 станет? Quote Link to post Share on other sites
Danya Posted July 24, 2014 Author Report Share Posted July 24, 2014 станет Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.