Всплывающее уведомление при копировании материала с сайта.
Приделал у себя такую штуку. Отписываю о результатах тут, может кому нить и пригодится.
Читать дальше →
Читать дальше →
{if $aCauses}
<div class="editdate">
{foreach from=$aCauses item=aCause name=c key=k}
Отредактировал {$aCause.user_login} - {date_format date=$aCause.date}
Причина: {$aCause.text}
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="#" onclick="deleteCause('{$iTopicId}', '{$k}', this); return false;" class="delete">{$aLang.topic_delete}</a>
{/if}<br /><br />
{/foreach}
</div>
{/if}
<p>
<label for="topic_cause_edit">{$aLang.plugin.causeedit.cause_title}:</label>
<input type="text" id="topic_cause_edit" name="topic_cause_edit" value="{$_aRequest.topic_cause_edit}" class="input-text input-width-full" />
</p>
{assign var="aCauses" value=$oTopic->getCauseArray()}
{if $aCauses}
<br />
<div class="editdate">
{foreach from=$aCauses item=aCause name=c key=k}
Отредактировал {$aCause.user_login} - {date_format date=$aCause.date}
Причина: {$aCause.text}
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="#" onclick="deleteCause('{$iTopicId}', '{$k}', this); return false;" class="delete">{$aLang.topic_delete}</a>
{/if}<br /><br />
{/foreach}
</div>
{/if}
.editdate {
color: #84AE1B;
font-style: italic;
font-size: 0.9em;
text-align: right;
padding-right: 24px;
background: url("../images/editdate.png") no-repeat 100% 0;
margin-bottom: 15px;
}
.editdate .delete { color: red; }
static public function KeyReplace($cfg,$sInstance=self::DEFAULT_CONFIG_INSTANCE) {
if(is_array($cfg)) {
foreach($cfg as $k=>$v) {
$k_replaced = self::KeyReplace($k, $sInstance);
if($k==$k_replaced) {
$cfg[$k] = self::KeyReplace($v,$sInstance);
} else {
$cfg[$k_replaced] = self::KeyReplace($v,$sInstance);
unset($cfg[$k]);
}
}
} else {
if(preg_match('~___([\S|\.|]+)___~Ui',$cfg))
$cfg = preg_replace_callback(
'~___([\S|\.]+)___~Ui',
create_function('$value','return Config::Get($value[1],"'.$sInstance.'");'),
$cfg
);
}
return $cfg;
}