файл стилей теперь сам подключается при установке модуля
This commit is contained in:
@@ -49,11 +49,4 @@ https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css
|
||||
```
|
||||
```
|
||||
https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css
|
||||
```
|
||||
|
||||
### Подготовленные стили для модуля:
|
||||
|
||||
#### Добавить в шаблон
|
||||
```
|
||||
<link rel="stylesheet" href="[tag:path]modules/comment/css/mod_comment_styles.css">
|
||||
```
|
||||
10
ReadMe.txt
10
ReadMe.txt
@@ -1,10 +0,0 @@
|
||||
Для AJAX работы модуля не забудьте подключить:
|
||||
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js
|
||||
https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js
|
||||
|
||||
Стили:
|
||||
https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css
|
||||
https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css
|
||||
|
||||
Добавить в шаблон <link rel="stylesheet" href="[tag:path]modules/comment/css/mod_comment_styles.css">
|
||||
@@ -252,6 +252,9 @@ function commentListShow($tpl_dir)
|
||||
$artpage = $_REQUEST['artpage'] ?? null;
|
||||
$apage = $_REQUEST['apage'] ?? null;
|
||||
$user_group = (int)(UGROUP ?? 0);
|
||||
|
||||
// 1. Подключаем CSS
|
||||
$GLOBALS['user_header']['comment_css'] = '<link rel="stylesheet" href="' . ABS_PATH . 'modules/comment/css/mod_comment_styles.css" type="text/css" />';
|
||||
|
||||
// --- ОПРЕДЕЛЯЕМ ТЕКУЩЕГО ПОЛЬЗОВАТЕЛЯ ---
|
||||
$current_user_id = (int)($_SESSION['user_id'] ?? 0);
|
||||
|
||||
Reference in New Issue
Block a user