This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
ru:plugins:tips [2013/10/15 10:54] vladislav [Обход отсутствия хука Page-Delete в 2.03] |
ru:plugins:tips [2013/10/15 10:56] vladislav [Working around the broken sitewide cookies in GS 3.0] |
||
---|---|---|---|
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') { |