-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Быстрый старт
- Loading branch information
Showing
9 changed files
with
100 additions
and
4 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
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
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
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
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
Empty file.
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,42 @@ | ||
<?php | ||
/** @var $this MyjbzoostatViewAutors */ | ||
defined( '_JEXEC' ) or die; // No direct access | ||
?> | ||
<?php | ||
|
||
require_once JPATH_ADMINISTRATOR . '/components/com_zoo/config.php'; | ||
require_once JPATH_ROOT . '/media/zoo/applications/jbuniversal/framework/jbzoo.php'; | ||
require_once JPATH_ROOT . '/media/zoo/applications/jbuniversal/framework/classes/jbmodulehelper.php'; | ||
require_once JPATH_ROOT . '/media/zoo/applications/jbuniversal/framework/classes/jbtemplate.php'; | ||
$app = App::getInstance('zoo'); | ||
|
||
//JUST DO IT $this->app ----> $app | ||
?> | ||
|
||
<div class="item-page"> | ||
|
||
<style>.tagsstat .zebra { display: inline-flex; flex-wrap: wrap; width: 98%; height: 500px; flex-direction: column; list-style: none; padding: 0;} .tagsstat .zebra li { padding: 5px; margin-right: 5px; } .tagsstat .zebra li:nth-child(odd) { background: #EFEFEF; } | ||
.tagsstat .zebra li:nth-child(even) { background: white; }</style> | ||
<div class="tagsstat"> | ||
<ul class="zebra"> | ||
<?php | ||
|
||
$db = JFactory::getDBO(); | ||
$appId = 1; | ||
$querycounttagalltags = $db->getQuery(true); | ||
|
||
$querycounttagalltags = "SELECT name FROM " . ZOO_TABLE_TAG ." ORDER BY name"; | ||
|
||
$tagsArraytagalltags = array_unique($app->table->tag->database->queryResultArray($querycounttagalltags)); | ||
|
||
foreach ($tagsArraytagalltags as $tag) { | ||
|
||
$querycounttagalltagss = "SELECT COUNT(name) FROM " . ZOO_TABLE_TAG ." WHERE name = '$tag'"; | ||
|
||
$tagsArraytagalltagss = array_unique($app->table->tag->database->queryResultArray($querycounttagalltagss)); | ||
|
||
echo '<li><a target="_blank" href="' . JRoute::_($app->route->tag($appId, $tag)) . '">' . $tag . '</a>' .' - '. $tagsArraytagalltagss[0].'</li> ';} | ||
?> | ||
</ul> | ||
</div> | ||
</div> |
Empty file.
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,42 @@ | ||
<?php | ||
defined( '_JEXEC' ) or die; // No direct access | ||
|
||
/** | ||
* View for current element | ||
* @author CB9TOIIIA | ||
*/ | ||
|
||
|
||
|
||
class MyjbzoostatViewAutors extends JViewLegacy | ||
{ | ||
|
||
public function display( $tpl = null ) | ||
{ | ||
$this->_setToolBar(); | ||
parent::display( $tpl ); | ||
} | ||
/** | ||
* Method to display the toolbar | ||
*/ | ||
protected function _setToolBar() | ||
{ | ||
JToolBarHelper::title( JText::_( 'Статистика тегов' ) ); | ||
JToolbarHelper::divider(); | ||
|
||
$bar = JToolBar::getInstance('toolbar'); //ссылка на объект JToolBar | ||
$title = JText::_('Статьи'); //Надпись на кнопке | ||
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=articles\" class=\"btn btn-small\"><i class=\"icon-list\" title=\"$title\"></i>$title</a>"; //HTML нашей кнопки | ||
$bar->appendButton('Custom', $dhtml, 'list');//давляем ее на тулбар | ||
|
||
JToolBarHelper::divider(); | ||
|
||
$bar = JToolBar::getInstance('toolbar'); //ссылка на объект JToolBar | ||
$title = JText::_('Авторы'); //Надпись на кнопке | ||
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=autors\" class=\"btn btn-small\"><i class=\"icon-tags\" title=\"$title\"></i>$title</a>"; //HTML нашей кнопки | ||
$bar->appendButton('Custom', $dhtml, 'list');//давляем ее на тулбар | ||
|
||
|
||
} | ||
|
||
} |