Jump to content

Окно счётчиков в админке с выводом в шаблон


Recommended Posts

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}
Link to post
Share on other sites
  • 3 weeks later...
  • 8 months later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...