-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Quasiocculti
committed
Jan 24, 2023
1 parent
2e79888
commit a29d43b
Showing
6 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* @package pagecount | ||
* @version 1.20 | ||
* @author Dmitri Beliavski | ||
* @copyright Copyright (c) seditio.by 2017-2023 | ||
*/ | ||
|
||
defined('COT_CODE') or die('Wrong URL'); | ||
|
||
function cot_pagecount ($condition = '', $mode = '', $cats = '', $subs = true, $decl = 'pages') { | ||
global $db, $db_pages, $Ls; | ||
require_once cot_langfile('page', 'module'); | ||
require_once cot_incfile('pagelist', 'plug'); | ||
|
||
$where_cat = cot_compilecats($mode, $cats, (bool)$subs); | ||
$condition = (empty($condition)) ? '' : 'AND '.$condition; | ||
|
||
$totalitems = $db->query(" | ||
SELECT COUNT(*) | ||
FROM $db_pages | ||
WHERE page_state='0' $where_cat $condition | ||
")->fetchColumn(); | ||
|
||
$totalitems = (empty($decl)) ? $totalitems : cot_declension($totalitems, $Ls[$decl]); | ||
|
||
return $totalitems; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* @package pagecount | ||
* @version 1.20 | ||
* @author Dmitri Beliavski | ||
* @copyright Copyright (c) seditio.by 2017-2023 | ||
*/ | ||
|
||
defined('COT_CODE') or die('Wrong URL'); | ||
|
||
/** | ||
* Plugin Info | ||
*/ | ||
|
||
$L['info_name'] = '[SEDBY] Pagecount'; | ||
$L['info_desc'] = 'Display amount of pages according to the specified parameters'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* @package pagecount | ||
* @version 1.20 | ||
* @author Dmitri Beliavski | ||
* @copyright Copyright (c) seditio.by 2017-2023 | ||
*/ | ||
|
||
defined('COT_CODE') or die('Wrong URL'); | ||
|
||
/** | ||
* Plugin Info | ||
*/ | ||
|
||
$L['info_name'] = '[SEDBY] Pagecount'; | ||
$L['info_desc'] = 'Отображение количества страниц в соответствии с указанными параметрами'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/* ==================== | ||
[BEGIN_COT_EXT] | ||
Hooks=global | ||
[END_COT_EXT] | ||
==================== */ | ||
|
||
/** | ||
* @package pagecount | ||
* @version 1.20 | ||
* @author Dmitri Beliavski | ||
* @copyright Copyright (c) seditio.by 2017-2023 | ||
*/ | ||
|
||
defined('COT_CODE') or die('Wrong URL'); | ||
|
||
require_once cot_incfile('pagecount', 'plug'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/* ==================== | ||
[BEGIN_COT_EXT] | ||
Code=pagecount | ||
Name=[SEDBY] Page Count | ||
Description=Displays amount of site pages accoding to specified parameters | ||
Version=1.20 | ||
Date=2017-06-27 | ||
Category=navigation-structure | ||
Author=Dmitri Beliavski | ||
Copyright=© 2017-2023 seditio.by | ||
Notes= | ||
Auth_guests=R | ||
Lock_guests=12345AW | ||
Auth_members=R | ||
Lock_members=12345AW | ||
Requires_plugins=pagelist | ||
[END_COT_EXT] | ||
[BEGIN_COT_EXT_CONFIG] | ||
[END_COT_EXT_CONFIG] | ||
==================== */ | ||
|
||
/** | ||
* @package pagecount | ||
* @version 1.20 | ||
* @author Dmitri Beliavski | ||
* @copyright Copyright (c) seditio.by 2017-2023 | ||
*/ | ||
|
||
defined('COT_CODE') or die('Wrong URL'); |