А можем вызвать [ Edit Item ] галлеры стоя на ней в браузере https://domain.com/galleries/slug.html , при условии, что мы залогинены в браузере в админку естественно. По аналогии Wordpress - Edit post.
Может кого-то еще интересует
[ Thumbs Stats ]
[ Gallery Edit ]
Меня интересует именно [ Edit Item ] - /admin/?operation=rot_edit&redir=true&gallery_id=12345 текстовка, группы, теги, модели.
Сейчас нужно по признакам искать ее в /admin/?operation=rotation&sub=rot_list& ,
В принципе (Source) бы не помешал.
Gallery Edit [ Edit Item ]
Re: Gallery Edit [ Edit Item ]
можно добавить в темплейт галеры
/admin/?operation=rot_edit&redir=true&gallery_id=<!--GALLERY_ID--> и получится нужная ссылка
я верно понял задачу?
/admin/?operation=rot_edit&redir=true&gallery_id=<!--GALLERY_ID--> и получится нужная ссылка
я верно понял задачу?
Don't forget to run script update
Re: Gallery Edit [ Edit Item ]
Я что то не могу до конца сформулировать чату ЖПТ задачу,
нужно всего лишь, чтоб пункт меню:
выводился при условии, что я залогинен в браузере )
Хелп )
Code: Select all
<?php
session_start();
$is_admin = false;
if (isset($_SESSION['user']) && $_SESSION['user'] === 'admin') {
$is_admin = true;
}
if (isset($_COOKIE['admin_logged_in']) && $_COOKIE['admin_logged_in'] === '1') {
$is_admin = true;
}
if ($is_admin): ?>
<a class='menu-link' href='/admin/?operation=rot_edit&redir=true&gallery_id=<!--GALLERY_ID-->'>[ Edit Item ]</a>
<?php endif; ?>
Code: Select all
<a class='menu-link' href='/admin/?operation=rot_edit&redir=true&gallery_id=<!--GALLERY_ID-->'>[ Edit Item ]</a>Хелп )
Re: Gallery Edit [ Edit Item ]
авторизация в админке есть только внутри scj/admin (htaccess ее делает )
на рендомном урле этого нет
но из того что есть немного кривой вариант но одной строкой
if ($_COOKIE['recreate_cache']) {
выводим что надо
}
recreate_cache ставится в rotation - special
Recreate visited pages
Script will set a secret cookie to your browser
each page that you visit on your site will be created (&skip_cache= analogue)
Active for 10 hours, your can deactivate it any time.
на рендомном урле этого нет
но из того что есть немного кривой вариант но одной строкой
if ($_COOKIE['recreate_cache']) {
выводим что надо
}
recreate_cache ставится в rotation - special
Recreate visited pages
Script will set a secret cookie to your browser
each page that you visit on your site will be created (&skip_cache= analogue)
Active for 10 hours, your can deactivate it any time.
Don't forget to run script update
Re: Gallery Edit [ Edit Item ]
Кому надо рабочая движуха:
Code: Select all
<?php
if ($_COOKIE['recreate_cache']) {
echo "<a
href='/scj/admin/?operation=rot_edit&redir=true&gallery_id=<!--GALLERY_ID-->'
onclick=\"window.open(this.href, '_blank', 'width=800,height=600'); return false;\">
[ Edit Item ]
</a>
";
}
?>






