User Tools

Site Tools


ru:plugins:tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
ru:plugins:tips [2013/10/15 10:53]
vladislav [Определение версии GetSimple]
ru:plugins:tips [2013/10/15 10:56]
vladislav [Working around the broken sitewide cookies in GS 3.0]
Line 22: Line 22:
 ===== Обход отсутствия хука Page-Delete в 2.03 ===== ===== Обход отсутствия хука Page-Delete в 2.03 =====
  
-To trigger a function ​myplugin_function ​on page deletes in GetSimple 2.03 and 3.0+ use the following code:+Для запуска функции вашего плагина ​myplugin_function ​при удалении страницы в GetSimple 2.03 и 3.0+ применяйте следующий код:
  
 <​code>​ <​code>​
Line 79: Line 79:
 </​code>​ </​code>​
  
-===== Working around the broken sitewide cookies in GS 3.0 =====+===== Обход ошибки при установке cookie на сайт в GS 3.0 =====
  
-The important ​cookie ​is only valid for path /admin. +Этот важнейший для сайта (sitewide) ​cookie-файл в GS 3.0 содержит корректную информацию только для пути ​/admin.
-There is no (easy?) way to correct the problem for the frontend. +
-However, if you need it for the backend, e.g. linking to a php somewhere in the plugins folder, you can add the following code to your plugin (e.g. directly after setting up the hooks):+
  
 +Способа (или простого способа?​) ​ исправить ситуацию для фронтенда не существует. Тем не менее, если вам для бэкенда требуется совершить какое-то действие,​ например,​ под-ключить какой-то php-файл из папки плагина,​ вы можете добавить следующий код к ва-шему плагину,​ например,​ сразу после установки хуков:
 <​code>​ <​code>​
 if (!myplugin_is_frontend() && myplugin_gsversion() == '​3.0'​) { if (!myplugin_is_frontend() && myplugin_gsversion() == '​3.0'​) {
ru/plugins/tips.txt · Last modified: 2013/10/18 09:51 by Arkady