Боевой курс новичка или "всем новеньким - сюда", часть 2
Продолжение FAQ для новичков, первую часть можно прочесть здесь.
Читать дальше →
protected $aRelations = array(
'resources' => array(self::RELATION_TYPE_MANY_TO_MANY,'ModuleResource_EntityResource', 'resource_id', 'db.table.resource_to_entry', 'entry_id')
);
$colEntries = $this->Entry_GetEntryItemsByFilter(array(
'status'=>'published',
'#with' => array(),
'#order'=>array('date_begin' => 'asc'),
'#page' => array($page,$perpage)
));
$oEntry->getResources(array('resource_type'=>'IMAGE_THUMB_ENTRY_TYPE1','deleted'=>0)
cd /etc/apache2/mods-enabled
ln -s ../mods-available/rewrite.load ./rewrite.load
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|ico|swf)$
RewriteCond %{REQUEST_FILENAME} !{SERVER_NAME}\/uploads.$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php
Fatal error: Uncaught exception 'Exception' with message 'Can not find the template: actions/ActionSettings/abc.tpl' in лалала
{if $oTopic and $oTopic->getUrl() == 'http://site.ru/blog/auto/1.html'}
Fatal error: Smarty error: unable to write to $compile_dir '/var/www/user/data/www/site.ru/templates/compiled/whitelite'. Be sure $compile_dir is writable by the web server user. in /var/www/user/data/www/site.ru/engine/lib/external/Smarty-2.6.19/libs/Smarty.class.php on line 1092
<!-- Banners -->
<div id="banners">
{if условие-1}
<a href="/banner-1"><img src="/banner-1"></a>
{else}
{if условие-2}
<a href="/banner-2"><img src="/banner-3"></a>
{else}
........{if условие-n}
<a href="/banner-n"><img src="/banner-n"></a>
{else}
<a href="/banner-(n+1)"><img src="/banner-(n+1)"></a>
{/if}
{/if}
{/if}
</div>
<!-- /Banners -->