add 4.5.X items
This commit is contained in:
bovenliggende
0dab33beae
commit
b39bbbc01f
10
.gitattributes
vendored
10
.gitattributes
vendored
@ -1,6 +1,10 @@
|
||||
* text=auto !eol
|
||||
copy_this/core/d3ce_online_users.php -text
|
||||
copy_this/modules/d3ce_usersonline/views/d3ce_oxcmp_utils_usersonline.php -text
|
||||
copy_this/out/basic/tpl/inc/d3ce_usersonline.tpl -text
|
||||
changed_full/XE451-XE453/out/azure/tpl/inc/d3usersonline.tpl -text
|
||||
changed_full/XE451-XE453/out/azure/tpl/layout/sidebar.tpl -text
|
||||
changed_full/XE451-XE453/out/basic/tpl/_left.tpl -text
|
||||
changed_full/XE451-XE453/out/basic/tpl/inc/d3usersonline.tpl -text
|
||||
copy_this/core/d3usersonline.php -text
|
||||
copy_this/modules/d3usersonline/views/d3_oxcmp_utils_usersonline.php -text
|
||||
setup+doku/readme_de.txt -text
|
||||
setup+doku/readme_en.txt -text
|
||||
source/UsersOnline-Installation.docx -text
|
||||
|
@ -0,0 +1,6 @@
|
||||
<div class="box">
|
||||
<h3>Online</h3>
|
||||
<div class="content">
|
||||
[{$usersonline }] User(s)
|
||||
</div>
|
||||
</div>
|
76
changed_full/XE451-XE453/out/azure/tpl/layout/sidebar.tpl
Normal file
76
changed_full/XE451-XE453/out/azure/tpl/layout/sidebar.tpl
Normal file
@ -0,0 +1,76 @@
|
||||
[{foreach from=$oxidBlock_sidebar item="_block"}]
|
||||
[{$_block}]
|
||||
[{/foreach}]
|
||||
|
||||
[{block name="sidebar"}]
|
||||
[{block name="sidebar_adminbanner"}]
|
||||
[{if $oView->isDemoShop()}]
|
||||
[{ include file="widget/sidebar/adminbanner.tpl" }]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_categoriestree"}]
|
||||
[{if $oxcmp_categories }]
|
||||
[{include file="widget/sidebar/categoriestree.tpl" categories=$oxcmp_categories->getClickRoot() act=$oxcmp_categories->getClickCat() deepLevel=0}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{*** D3 Modul "UsersOnline" START ***}]
|
||||
[{if $oxcmp_user && $oxcmp_user->oxuser__oxrights->value == 'malladmin'}]
|
||||
[{include file="inc/d3usersonline.tpl"}]
|
||||
[{/if}]
|
||||
[{*** D3 Modul "UsersOnline" END ***}]
|
||||
|
||||
[{block name="sidebar_trustedshopsratings"}]
|
||||
[{if $oView->getClassName() eq "start"}]
|
||||
[{if $oViewConf->showTs("WIDGET")}]
|
||||
[{include file="widget/trustedshops/ratings.tpl" }]
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_partners"}]
|
||||
[{if $oView->getClassName() eq "start"}]
|
||||
[{include file="widget/sidebar/partners.tpl" }]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_boxproducts"}]
|
||||
[{if $oView->getClassName() eq "start" && $oView->getTop5ArticleList()}]
|
||||
[{include file="widget/product/boxproducts.tpl" _boxId="topBox" _oBoxProducts=$oView->getTop5ArticleList() _sHeaderIdent="BOX_TOPOFTHESHOP_HEADER"}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_recommendation"}]
|
||||
[{if $oViewConf->getShowListmania() }]
|
||||
[{include file="widget/sidebar/recommendation.tpl"}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_tags"}]
|
||||
[{if $oView->showTags() && $oView->getClassName() ne "details" && $oView->getClassName() ne "alist" && $oView->getClassName() ne "tags"}]
|
||||
[{if $oView->getTagCloudManager() }]
|
||||
[{include file="widget/sidebar/tags.tpl" oTagsManager=$oView->getTagCloudManager()}]
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_news"}]
|
||||
[{if $oxcmp_news|count }]
|
||||
[{include file="widget/sidebar/news.tpl" oNews=$oxcmp_news}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_facebookfacepile"}]
|
||||
[{if $oView->isActive('FbFacepile') && $oView->isConnectedWithFb()}]
|
||||
[{include file="widget/facebook/facepile.tpl"}]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
|
||||
[{block name="sidebar_shopluperatings"}]
|
||||
[{if $oView->getClassName() eq "start"}]
|
||||
[{include file="widget/shoplupe/ratings.tpl" }]
|
||||
[{/if}]
|
||||
[{/block}]
|
||||
[{/block}]
|
||||
|
81
changed_full/XE451-XE453/out/basic/tpl/_left.tpl
Normal file
81
changed_full/XE451-XE453/out/basic/tpl/_left.tpl
Normal file
@ -0,0 +1,81 @@
|
||||
[{if $oView->showSearch() }]
|
||||
<strong class="h2 search">[{ oxmultilang ident="INC_LEFTITEM_PRODUCTSEARCH" }]</strong>
|
||||
<form action="[{ $oViewConf->getSelfActionLink() }]" method="get" name="search" class="search" id="f.search">
|
||||
<p>
|
||||
[{ $oViewConf->getHiddenSid() }]
|
||||
<input type="hidden" name="cl" value="search">
|
||||
<input type="text" name="searchparam" value="[{$oView->getSearchParamForHtml()}]" size="21" id="f.search.param" class="txt">
|
||||
|
||||
[{if $oView->getSearchCatTree() }]
|
||||
<select id="test_searchCategorySelect" class="search_input" name="searchcnid" [{if $oViewConf->isAutoSearchOnCat() }]onchange="oxid.search('f.search','f.search.param');"[{/if}]>
|
||||
<option value=""> [{ oxmultilang ident="INC_SEARCHLEFTITEM_ALLCATEGORIES" }] </option>
|
||||
[{include file="inc/category_options.tpl" tree=$oView->getSearchCatTree() sSpacer=""}]
|
||||
</select>
|
||||
[{/if}]
|
||||
|
||||
[{if $oView->getVendorlist() }]
|
||||
<select id="test_searchVendorSelect" class="search_input" name="searchvendor">
|
||||
<option value=""> [{ oxmultilang ident="INC_SEARCHLEFTITEM_ALLDISTRIBUTORS" }] </option>
|
||||
[{foreach from=$oView->getVendorlist() item=oVendorlistentry}]
|
||||
<option value="[{$oVendorlistentry->oxvendor__oxid->value}]"[{if $oView->getSearchVendor() == $oVendorlistentry->oxvendor__oxid->value}] selected[{/if}]>[{ $oVendorlistentry->oxvendor__oxtitle->value }][{ if $oVendorlistentry->getNrOfArticles() > 0 }] ([{$oVendorlistentry->getNrOfArticles()}])[{/if}]</option>
|
||||
[{/foreach}]
|
||||
</select>
|
||||
[{/if}]
|
||||
|
||||
[{if $oView->getManufacturerlist() }]
|
||||
<select id="test_searchManufacturerSelect" class="search_input" name="searchmanufacturer">
|
||||
<option value=""> [{ oxmultilang ident="INC_SEARCHLEFTITEM_ALLMANUFACTURERS" }] </option>
|
||||
[{foreach from=$oView->getManufacturerlist() item=oManufacturerlistentry}]
|
||||
<option value="[{$oManufacturerlistentry->oxmanufacturers__oxid->value}]"[{if $oView->getSearchManufacturer() == $oManufacturerlistentry->oxmanufacturers__oxid->value}] selected[{/if}]>[{ $oManufacturerlistentry->oxmanufacturers__oxtitle->value }][{ if $oManufacturerlistentry->getNrOfArticles() > 0 }] ([{$oManufacturerlistentry->getNrOfArticles()}])[{/if}]</option>
|
||||
[{/foreach}]
|
||||
</select>
|
||||
[{/if}]
|
||||
|
||||
<span class="btn"><input id="test_searchGo" type="submit" class="btn" value="GO!"></span>
|
||||
</p>
|
||||
</form>
|
||||
[{/if}]
|
||||
[{if $oxcmp_categories }]
|
||||
[{if $oView->showTopCatNavigation()}]
|
||||
[{include file="inc/category_tree.tpl" tree=$oxcmp_categories->getClickRoot() act=$oxcmp_categories->getClickCat() class="tree"}]
|
||||
[{else}]
|
||||
[{include file="inc/category_tree.tpl" tree=$oxcmp_categories act=$oxcmp_categories->getClickCat() class="tree"}]
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{if $oView->loadVendorTree() && $oView->getVendorlist()}]
|
||||
[{include file="inc/vendor_tree.tpl" tree=$oView->getVendorlist() class="tree"}]
|
||||
[{/if}]
|
||||
|
||||
[{if $oView->loadManufacturerTree() && $oView->getManufacturerlist()}]
|
||||
[{include file="inc/manufacturer_tree.tpl" tree=$oView->getManufacturerlist() class="tree"}]
|
||||
[{/if}]
|
||||
|
||||
[{*** D3 Modul "UsersOnline" START ***}]
|
||||
[{if $oxcmp_user && $oxcmp_user->oxuser__oxrights->value == 'malladmin'}]
|
||||
[{include file="inc/d3usersonline.tpl"}]
|
||||
[{/if}]
|
||||
[{*** D3 Modul "UsersOnline" END ***}]
|
||||
|
||||
[{if $oView->showLeftBasket()}]
|
||||
[{oxid_include_dynamic file="dyn/mini_basket.tpl" type="basket" testid="LeftBasket"}]
|
||||
[{/if}]
|
||||
|
||||
[{include file="inc/infobox.tpl"}]
|
||||
|
||||
[{if $oxcmp_news && count($oxcmp_news) > 0}]
|
||||
[{include file="inc/cmp_news.tpl"}]
|
||||
[{/if}]
|
||||
|
||||
<strong class="h2" id="test_LeftSidePartnersHeader">[{ oxmultilang ident="INC_LEFTITEM_PARTNERANDSEAL" }]</strong>
|
||||
<div class="partners">
|
||||
<div class="logo">
|
||||
[{include file="inc/trustedshops_item.tpl"}]
|
||||
</div>
|
||||
<div class="logo">
|
||||
<a href="http://www.zend.com" id="link.zendSite"><img src="[{$oViewConf->getImageUrl()}]zend_logo.gif" alt=""></a>
|
||||
[{oxscript add="oxid.blank('link.zendSite');"}]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -16,55 +16,55 @@
|
||||
* @author Aggrosoft, D³ Data Development
|
||||
*/
|
||||
|
||||
class d3ce_online_users extends oxI18n
|
||||
class d3usersonline extends oxI18n
|
||||
{
|
||||
/**
|
||||
* Object core table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_sCoreTbl = 'd3ce_online_users';
|
||||
protected $_sCoreTbl = 'd3usersonline';
|
||||
|
||||
/**
|
||||
* Current class name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_sClassName = 'd3ce_online_users';
|
||||
protected $_sClassName = 'd3usersonline';
|
||||
|
||||
public function __construct($aParams = null)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->init( 'd3ce_online_users' );
|
||||
$this->init( 'd3usersonline' );
|
||||
}
|
||||
|
||||
public function clearOldItems($iExpTime)
|
||||
{
|
||||
$exptime = time() - $iExpTime;
|
||||
oxDb::getDb()->Execute("delete from ".$this->_sCoreTbl." where timevisit < $exptime");
|
||||
oxDb::getDb()->Execute("delete from ".$this->getViewName()." where timevisit < $exptime");
|
||||
}
|
||||
|
||||
public function getActUserItem($sUserIPHash)
|
||||
{
|
||||
$sSelect = "select count(*) from $this->_sCoreTbl where visitor='".$sUserIPHash."'";
|
||||
$sSelect = "select count(*) from ".$this->getViewName()." where visitor= ".oxDb::getDb()->quote($sUserIPHash);
|
||||
return oxDb::getDb()->getOne( $sSelect );
|
||||
}
|
||||
|
||||
public function getUserCount()
|
||||
{
|
||||
$sSelect = "select count(*) from ".$this->_sCoreTbl." order by timevisit desc";
|
||||
$sSelect = "select count(*) from ".$this->getViewName()." order by timevisit desc";
|
||||
$iCount = oxDb::getDb()->getOne($sSelect);
|
||||
return $iCount;
|
||||
}
|
||||
|
||||
public function setActTimeVisit($sUserIpHash)
|
||||
{
|
||||
oxDb::getDb()->Execute("update ".$this->_sCoreTbl." set timevisit='".time()."', oxclass = '".$this->getConfig()->getActiveView()->getClassName()."' where visitor='".$sUserIpHash."'");
|
||||
oxDb::getDb()->Execute("update ".$this->getViewName()." set timevisit= ".oxDb::getDb()->quote(time()).", oxclass = ".oxDb::getDb()->quote($this->getConfig()->getActiveView()->getClassName())." where visitor= ".oxDb::getDb()->quote($sUserIpHash));
|
||||
}
|
||||
|
||||
public function insertActUser($sUserIpHash)
|
||||
{
|
||||
oxDb::getDb()->Execute("insert into ".$this->_sCoreTbl." (visitor,timevisit,oxclass) values ('".$sUserIpHash."','".time()."', '".$this->getConfig()->getActiveView()->getClassName()."')");
|
||||
oxDb::getDb()->Execute("insert into ".$this->getViewName()." (visitor,timevisit,oxclass) values (".oxDb::getDb()->quote($sUserIpHash).", ".oxDb::getDb()->quote(time()).", ".oxDb::getDb()->quote($this->getConfig()->getActiveView()->getClassName()).")");
|
||||
}
|
||||
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
* @author Aggrosoft, D³ Data Development
|
||||
*/
|
||||
|
||||
class d3ce_oxcmp_utils_usersonline extends d3ce_oxcmp_utils_usersonline_parent
|
||||
class d3_oxcmp_utils_usersonline extends d3_oxcmp_utils_usersonline_parent
|
||||
{
|
||||
protected $_iExpTime = 600; // (in seconds)
|
||||
protected $_sUserIpHash = null;
|
||||
@ -46,7 +46,7 @@ class d3ce_oxcmp_utils_usersonline extends d3ce_oxcmp_utils_usersonline_parent
|
||||
$this->_sUserIpHash = md5($this->_getTrueIP());
|
||||
$this->utime = time();
|
||||
|
||||
$oUserOnline = &oxNew('d3ce_online_users');
|
||||
$oUserOnline = oxNew('d3usersonline');
|
||||
$oUserOnline->clearOldItems($this->_iExpTime);
|
||||
$iUserExist = $oUserOnline->getActUserItem($this->_sUserIpHash);
|
||||
|
||||
@ -136,9 +136,5 @@ class d3ce_oxcmp_utils_usersonline extends d3ce_oxcmp_utils_usersonline_parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -21,17 +21,17 @@ Kopieren Sie die Inhalte des "copy_this"-Ordner in Ihr Shop-Verzeichnis,
|
||||
|
||||
Führen Sie folgendes Script in Ihrer Datenbank aus:
|
||||
|
||||
CREATE TABLE d3ce_online_users (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`visitor` varchar(100) default NULL,
|
||||
`timevisit` int(11) NOT NULL default '0',
|
||||
`oxclass` varchar(32) collate latin1_general_ci NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
CREATE TABLE d3usersonline (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`visitor` varchar(100) default NULL,
|
||||
`timevisit` int(11) NOT NULL default '0',
|
||||
`oxclass` varchar(32) collate latin1_general_ci NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
Fügen Sie nun das Modul zu Ihrem Shop hinzu:
|
||||
|
||||
oxcmp_utils => d3ce_usersonline/views/d3ce_oxcmp_utils_usersonline
|
||||
oxcmp_utils => d3usersonline/views/d3_oxcmp_utils_usersonline
|
||||
|
||||
Sie können den counter nun in eines Ihrer Templates einbauen (evtl. _left.tpl)
|
||||
Hierfür benötigen Sie lediglich folgende Zeile:
|
||||
|
BIN
source/UsersOnline-Installation.docx
Normal file
BIN
source/UsersOnline-Installation.docx
Normal file
Binair bestand niet weergegeven.
Laden…
x
Verwijs in nieuw issue
Block a user