The Arcive of vBulletin Modifications Site. |
|
Event Views Counter Details »»
|
|||||||||||||||||||||||||
This addon allows you to display the number of hits/views a calendar event has received.
It also inserts the eventid into the user's session, so they cannot refresh multiple times to boost the view count. Thanks to tnguy3n with his post here STEP 1 - MySQL modification: Code:
ALTER TABLE event ADD hits INT(7) NOT NULL; FIND [line 134] PHP Code:
PHP Code:
STEP 3 - template modification edit template "calendar_showeventsbit" FIND: Code:
</td> </tr> </table> </form> </div> $spacer_close Code:
</td>
</tr>
<tr>
<td>
<!-- // Event Views Counter - by Robert_2004 -->
<!-- // https://vborg.vbsupport.ru/showthread.php?t=1067471 -->
<strong>Viewed</strong>: $eventinfo[hits] times
Code:
</td>
</tr>
<tr>
<td>
<strong>Viewed</strong>: $eventinfo[hits] times
</td>
</tr>
</table>
</form>
</div>
$spacer_close
if you use - please click INSTALL Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Can we see a screenshot or example?
Thanks... hugh |
|
#3
|
|||
|
|||
|
screenshot added to orginal post.
It doesn't help much - as my event listing template is modified a great deal. |
|
#4
|
|||
|
|||
|
Great have been looking for this for a long time..Can it be made conditional so only admin can see views ?
|
|
#5
|
|||
|
|||
|
Yes, to only allow certain usergroups, use the following code:
usergroups 6 and 5 are admin and super moderators, respectively. Code:
<if condition="is_member_of($bbuserinfo, 6, 5) OR $show['admincplink']"> <tr> <td> <strong>Viewed</strong>: $eventinfo[hits] times </td> </tr> </if> |
|
#6
|
|||
|
|||
|
The database function works on 4.1.3.
|
![]() |
|
|