Changeset 360
- Timestamp:
- 03/30/08 14:08:35 (5 years ago)
- Location:
- profile.lastvisitors
- Files:
-
- 3 modified
-
files/lib/page/MoreVisitorsPage.class.php (modified) (1 diff)
-
package.xml (modified) (2 diffs)
-
templates/moreVisitors.tpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
profile.lastvisitors/files/lib/page/MoreVisitorsPage.class.php
r358 r360 19 19 public function readParameters() { 20 20 parent::readParameters(); 21 21 22 22 if (isset($_GET['profileID'])) $this->profileID = intval($_GET['profileID']); 23 23 24 // hier werde die Daten von den Besuchern des Profils geladen 25 $sql = "SELECT * 26 FROM wcf".WCF_N."_profile_lastvisitors 27 WHERE profileID = ".$this->profileID." 28 ORDER BY time DESC 29 LIMIT 0 , ".SHOW_LASTVISITOR_MOREVISITORS_AMOUNT; 30 $result = WCF::getDB()->sendQuery($sql); 31 while ($row = WCF::getDB()->fetchArray($result)) { 32 $this->visitors[] = $row; 24 if ($this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS == 1 || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS != 1 && $this->user->userID == $profileID || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && $this->user->getPermission('admin.profile.lastvisitor.canseeboxes')){ 25 26 // hier werde die Daten von den Besuchern des Profils geladen 27 $sql = "SELECT * 28 FROM wcf".WCF_N."_profile_lastvisitors 29 WHERE profileID = ".$this->profileID." 30 ORDER BY time DESC 31 LIMIT 0 , ".SHOW_LASTVISITOR_MOREVISITORS_AMOUNT; 32 $result = WCF::getDB()->sendQuery($sql); 33 while ($row = WCF::getDB()->fetchArray($result)) { 34 $this->visitors[] = $row; 35 } 36 37 // hier wird der Username des Profilinhabers geladen. 38 $sql = "SELECT username 39 FROM wcf".WCF_N."_user 40 WHERE userID = ".$this->profileID; 41 $this->user = WCF::getDB()->getFirstRow($sql); 33 42 } 34 35 // hier wird der Username des Profilinhabers geladen. 36 $sql = "SELECT username 37 FROM wcf".WCF_N."_user 38 WHERE userID = ".$this->profileID; 39 $this->user = WCF::getDB()->getFirstRow($sql); 43 else { 44 require_once(WCF_DIR.'lib/system/exception/PermissionDeniedException.class.php'); 45 throw new PermissionDeniedException(); 46 } 40 47 } 41 48 -
profile.lastvisitors/package.xml
r358 r360 8 8 <packagedescription>Shows the last profile visitors in the user profile.</packagedescription> 9 9 <packagedescription language="de"><![CDATA[Mit diesem PlugIn werden die letzten Besucher im Profil angezeigt.]]></packagedescription> 10 <version>1.1. 0</version>10 <version>1.1.1</version> 11 11 <date>2008-03-30</date> 12 12 <plugin>com.woltlab.wcf</plugin> … … 35 35 <eventlistener>eventlistener.xml</eventlistener> 36 36 </instructions> 37 38 <instructions type="update" fromversion="1.1.0"> 39 <files>files.tar</files> 40 <templates>templates.tar</templates> 41 </instructions> 37 42 </package> -
profile.lastvisitors/templates/moreVisitors.tpl
r358 r360 7 7 </head> 8 8 <body> 9 {if $profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS == 1 || $profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS != 1 && $this->user->userID == $profileID || $profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && $this->user->getPermission('admin.profile.lastvisitor.canseeboxes')}10 9 <div id="main"> 11 10 <ul class="breadCrumbs"> … … 54 53 {@$largeButtons} 55 54 56 {else}57 <br/>58 <p class="error">{lang}wcf.global.error.permissionDenied{/lang}</p>59 {/if}60 61 55 {include file='footer' sandbox=false} 62 56 </body>
