diff --git a/.gitattributes b/.gitattributes index d53ea5e..158e873 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14,7 +14,15 @@ changed_full/451-453/out/azure/tpl/layout/sidebar.tpl -text changed_full/451-453/out/basic/de/d3_usersonline_lang.php -text changed_full/451-453/out/basic/tpl/_left.tpl -text changed_full/451-453/out/basic/tpl/inc/d3usersonline.tpl -text +changed_full/461/out/admin/de/d3_usersonline_lang.php -text +changed_full/461/out/azure/tpl/inc/d3usersonline.tpl -text +changed_full/461/out/azure/tpl/layout/sidebar.tpl -text +changed_full/461/out/basic/tpl/_left.tpl -text +changed_full/461/out/basic/tpl/inc/d3usersonline.tpl -text +changed_full/461/out/de/d3_usersonline_lang.php -text copy_this/core/d3usersonline.php -text +copy_this/modules/d3usersonline/metadata.php -text +copy_this/modules/d3usersonline/picture.png -text copy_this/modules/d3usersonline/views/d3_oxcmp_utils_usersonline.php -text setup+doku/Installation.pdf -text setup+doku/install.sql -text diff --git a/changed_full/451-453/out/azure/tpl/layout/sidebar.tpl b/changed_full/451-453/out/azure/tpl/layout/sidebar.tpl index 83bda17..69eab76 100644 --- a/changed_full/451-453/out/azure/tpl/layout/sidebar.tpl +++ b/changed_full/451-453/out/azure/tpl/layout/sidebar.tpl @@ -17,7 +17,7 @@ [{*** D3 Modul "UsersOnline" START ***}] [{include file="inc/d3usersonline.tpl"}] -[{*** D3 Modul "UsersOnline" END ***}] +{{*** D3 Modul "UsersOnline" END ***}] [{block name="sidebar_trustedshopsratings"}] [{if $oView->getClassName() eq "start"}] diff --git a/changed_full/461/out/admin/de/d3_usersonline_lang.php b/changed_full/461/out/admin/de/d3_usersonline_lang.php new file mode 100644 index 0000000..38e1ddb --- /dev/null +++ b/changed_full/461/out/admin/de/d3_usersonline_lang.php @@ -0,0 +1,31 @@ + 'ISO-8859-15', + 'D3_USERONLINE_METADATA_TITLE' => 'D³ User Online', + 'D3_USERONLINE_METADATA_DESC' => 'Lassen Sie sich anonym im Shop anzeigen, wie viele Benutzer zur Zeit Ihren Shop besuchen und welche Seiten angezeigt werden. Das Modul speichert nicht die IP-Adresse oder sonstige Daten des Nutzers. Damit genügen Sie auch dem deutschen Recht.', + +); + +/* +[{ oxmultilang ident='ACTIONS_MAIN_YOUWANTTODELETE' }] +*/ \ No newline at end of file diff --git a/changed_full/461/out/azure/tpl/inc/d3usersonline.tpl b/changed_full/461/out/azure/tpl/inc/d3usersonline.tpl new file mode 100644 index 0000000..215e0b8 --- /dev/null +++ b/changed_full/461/out/azure/tpl/inc/d3usersonline.tpl @@ -0,0 +1,45 @@ +[{if $oxcmp_user && $oxcmp_user->oxuser__oxrights->value == 'malladmin'}] +
+

[{oxmultilang ident="D3_USERSONLINE_USERSONLINE"}]

+
+ + + + + + + [{foreach from=$aUsersOnline.classes item="aClassUser"}] + + + + + + [{/foreach}] +
+ [{oxmultilang ident="D3_USERSONLINE_ALL"}] + + [{$aUsersOnline.all }] + + [{if $aUsersOnline.all == 1}] + [{oxmultilang ident="D3_USERSONLINE_USER"}] + [{else}] + [{oxmultilang ident="D3_USERSONLINE_USERS"}] + [{/if}] +
+ [{if $aClassUser->classname}] + [{$aClassUser->classname|ucfirst}]: + [{else}] + undefined: + [{/if}] + + [{$aClassUser->counter}] + + [{if $aClassUser->counter == 1}] + [{oxmultilang ident="D3_USERSONLINE_USER"}] + [{else}] + [{oxmultilang ident="D3_USERSONLINE_USERS"}] + [{/if}] +
+
+
+[{/if}] \ No newline at end of file diff --git a/changed_full/461/out/azure/tpl/layout/sidebar.tpl b/changed_full/461/out/azure/tpl/layout/sidebar.tpl new file mode 100644 index 0000000..d0e2df3 --- /dev/null +++ b/changed_full/461/out/azure/tpl/layout/sidebar.tpl @@ -0,0 +1,74 @@ +[{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 ***}] + [{include file="inc/d3usersonline.tpl"}] + [{*** 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}] + diff --git a/changed_full/461/out/basic/tpl/_left.tpl b/changed_full/461/out/basic/tpl/_left.tpl new file mode 100644 index 0000000..9b17045 --- /dev/null +++ b/changed_full/461/out/basic/tpl/_left.tpl @@ -0,0 +1,79 @@ +[{if $oView->showSearch() }] + [{ oxmultilang ident="INC_LEFTITEM_PRODUCTSEARCH" }] + +[{/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 ***}] + [{include file="inc/d3usersonline.tpl"}] +[{*** 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}] + +[{ oxmultilang ident="INC_LEFTITEM_PARTNERANDSEAL" }] +
+ + +
+ + diff --git a/changed_full/461/out/basic/tpl/inc/d3usersonline.tpl b/changed_full/461/out/basic/tpl/inc/d3usersonline.tpl new file mode 100644 index 0000000..58b70df --- /dev/null +++ b/changed_full/461/out/basic/tpl/inc/d3usersonline.tpl @@ -0,0 +1,43 @@ +[{if $oxcmp_user && $oxcmp_user->oxuser__oxrights->value == 'malladmin'}] + [{oxmultilang ident="D3_USERSONLINE_USERSONLINE"}] +
+ + + + + + + [{foreach from=$aUsersOnline.classes item="aClassUser"}] + + + + + + [{/foreach}] +
+ [{oxmultilang ident="D3_USERSONLINE_ALL"}] + + [{$aUsersOnline.all }] + + [{if $aUsersOnline.all == 1}] + [{oxmultilang ident="D3_USERSONLINE_USER"}] + [{else}] + [{oxmultilang ident="D3_USERSONLINE_USERS"}] + [{/if}] +
+ [{if $aClassUser->classname}] + [{$aClassUser->classname|ucfirst}]: + [{else}] + undefined: + [{/if}] + + [{$aClassUser->counter}] + + [{if $aClassUser->counter == 1}] + [{oxmultilang ident="D3_USERSONLINE_USER"}] + [{else}] + [{oxmultilang ident="D3_USERSONLINE_USERS"}] + [{/if}] +
+
+[{/if}] \ No newline at end of file diff --git a/changed_full/461/out/de/d3_usersonline_lang.php b/changed_full/461/out/de/d3_usersonline_lang.php new file mode 100644 index 0000000..74c4592 --- /dev/null +++ b/changed_full/461/out/de/d3_usersonline_lang.php @@ -0,0 +1,33 @@ + 'ISO-8859-15', + 'D3_USERSONLINE_USERSONLINE' => 'Benutzer online', + 'D3_USERSONLINE_USER' => 'Benutzer', + 'D3_USERSONLINE_USERS' => 'Benutzer', + 'D3_USERSONLINE_ALL' => 'gesamt', + +); + +/* +[{ oxmultilang ident='ACTIONS_MAIN_YOUWANTTODELETE' }] +*/ \ No newline at end of file diff --git a/copy_this/modules/d3usersonline/metadata.php b/copy_this/modules/d3usersonline/metadata.php new file mode 100644 index 0000000..14d4ee0 --- /dev/null +++ b/copy_this/modules/d3usersonline/metadata.php @@ -0,0 +1,18 @@ + 'd3useronline', + 'title' => oxLang::getInstance()->translateString('D3_USERONLINE_METADATA_TITLE'), + 'description' => oxLang::getInstance()->translateString('D3_USERONLINE_METADATA_DESC'), + 'thumbnail' => 'picture.png', + 'version' => '1.2.1', + 'author' => oxLang::getInstance()->translateString('D3_MOD_LIB_METADATA_AUTHOR'), + 'email' => 'support@shopmodule.com', + 'url' => 'http://www.oxidmodule.com/', + 'extend' => array( + 'oxcmp_utils' => 'd3usersonline/views/d3_oxcmp_utils_usersonline' + ) +); \ No newline at end of file diff --git a/copy_this/modules/d3usersonline/picture.png b/copy_this/modules/d3usersonline/picture.png new file mode 100644 index 0000000..d1502fe Binary files /dev/null and b/copy_this/modules/d3usersonline/picture.png differ diff --git a/copy_this/modules/d3usersonline/views/d3_oxcmp_utils_usersonline.php b/copy_this/modules/d3usersonline/views/d3_oxcmp_utils_usersonline.php index 8f9edc8..ae7e8f3 100644 --- a/copy_this/modules/d3usersonline/views/d3_oxcmp_utils_usersonline.php +++ b/copy_this/modules/d3usersonline/views/d3_oxcmp_utils_usersonline.php @@ -50,20 +50,20 @@ class d3_oxcmp_utils_usersonline extends d3_oxcmp_utils_usersonline_parent $oUserOnline->clearOldItems($this->_iExpTime); $iUserExist = $oUserOnline->getActUserItem($this->_sUserIpHash); - if ($iUserExist > 0) { + if ($iUserExist > 0) { $oUserOnline->setActTimeVisit($this->_sUserIpHash); - } else { + } else { $oUserOnline->insertActUser($this->_sUserIpHash); - } + } - $this->_oParent->_aViewData['aUsersOnline'] = $oUserOnline->getUserCount(); + $this->getParent()->addTplParam('aUsersOnline', $oUserOnline->getUserCount()); return $ret; } private function _getIpData($sTargetVarName, $sDataName) { - if (empty($this->{$sTargetVarName})) + if (empty($this->{$sTargetVarName})) { if (!empty($_SERVER) && isset($_SERVER[$sDataName])) $this->{$sTargetVarName} = $_SERVER[$sDataName]; @@ -76,15 +76,15 @@ class d3_oxcmp_utils_usersonline extends d3_oxcmp_utils_usersonline_parent private function _getTrueIP() { - $this->_getIpData('_remoteAddr','REMOTE_ADDR'); - $this->_getIpData('_httpClientIp','HTTP_CLIENT_IP'); - $this->_getIpData('_httpXForwardedFor','HTTP_X_FORWARDED_FOR'); - $this->_getIpData('_httpXForwarded','HTTP_X_FORWARDED'); - $this->_getIpData('_httpForwardedFor','HTTP_FORWARDED_FOR'); - $this->_getIpData('_httpForwarded','HTTP_FORWARDED'); - $this->_getIpData('_httpVia','HTTP_VIA'); - $this->_getIpData('_httpXComingFrom','HTTP_X_COMING_FROM'); - $this->_getIpData('_httpComingFrom','HTTP_COMING_FROM'); + $this->_getIpData('_remoteAddr', 'REMOTE_ADDR'); + $this->_getIpData('_httpClientIp', 'HTTP_CLIENT_IP'); + $this->_getIpData('_httpXForwardedFor', 'HTTP_X_FORWARDED_FOR'); + $this->_getIpData('_httpXForwarded', 'HTTP_X_FORWARDED'); + $this->_getIpData('_httpForwardedFor', 'HTTP_FORWARDED_FOR'); + $this->_getIpData('_httpForwarded', 'HTTP_FORWARDED'); + $this->_getIpData('_httpVia', 'HTTP_VIA'); + $this->_getIpData('_httpXComingFrom', 'HTTP_X_COMING_FROM'); + $this->_getIpData('_httpComingFrom', 'HTTP_COMING_FROM'); // Gets the default ip sent by the user if (!empty($this->_remoteAddr)) @@ -107,29 +107,29 @@ class d3_oxcmp_utils_usersonline extends d3_oxcmp_utils_usersonline_parent $this->_proxyIp = $this->_httpComingFrom; // Returns the true IP if it has been found, else ... - if (empty($this->_proxyIp)) + if (empty($this->_proxyIp)) { // True IP without proxy return $this->_directIp; - } - else + } + else { - $is_ip = ereg('^([0-9]{1,3}.){3,3}[0-9]{1,3}', $this->_proxyIp, $regs); + $isIp = ereg('^([0-9]{1,3}.){3,3}[0-9]{1,3}', $this->_proxyIp, $regs); - if ($is_ip && (count($regs) > 0)) + if ($isIp && (count($regs) > 0)) { // True IP behind a proxy return $regs[0]; - } - else + } + else { - if (empty($this->_httpClientIp)) + if (empty($this->_httpClientIp)) { // Can't define IP: there is a proxy but we don't have // information about the true IP return "(unbekannt) " . $this->_proxyIp; - } - else + } + else { // better than nothing return $this->_httpClientIp; diff --git a/setup+doku/Installation.pdf b/setup+doku/Installation.pdf index 111cb0f..dd17df2 100644 Binary files a/setup+doku/Installation.pdf and b/setup+doku/Installation.pdf differ diff --git a/source/UsersOnline-Installation.docx b/source/UsersOnline-Installation.docx index 675b6d3..1c2101c 100644 Binary files a/source/UsersOnline-Installation.docx and b/source/UsersOnline-Installation.docx differ