IconInformation

Blog Categories Migration (Recommended)
You can migrate your existing blog categories from the old location Blog to the new location Blog.Categories.

This update enhances permission control, improves category management, and eliminates naming conflicts between blog posts and categories.
Migrating ensures your blog continues to run smoothly and takes full advantage of these improvements.

Navigate to the Categories Location Migrator in order to start the migration process.

Wiki source code of Statistics Macros

Last modified by Administrator on 2007/11/27 07:23

Hide last authors
Administrator 1.1 1 #macro(printPageStats $stats)
2 $!xwiki.ssx.use('Stats.Style')
3 <table class="stats" cellspacing="0" cellpadding="0">
4 <thead>
5 <tr>
6 <th class="numeric" style="width:20%">$msg.get('xe.statistics.hits')</th>
7 <th style="width:40%">$msg.get('xe.statistics.page')</th>
8 <th style="width:40%">$msg.get('xe.statistics.space')</th>
9 </tr>
10
11 </thead>
12 <tbody>
13 #foreach($item in $stats)
14 #set($docStats = $xwiki.getDocument($item.name))
15 #if ($docStats)
16 <tr>
17 <td class="numeric">$item.pageViews</td>
18 <td><div class="ellipsis" title="$escapetool.xml($docStats.name)"><a href="$docStats.getURL()">$escapetool.xml($docStats.name)</a></div></td>
19 <td><div class="ellipsis" title="$escapetool.xml($docStats.space)"><a href="$xwiki.getURL("${docStats.space}.WebHome")">$escapetool.xml($docStats.space)</a></div></td>
20 </tr>
21 #end
22 #end
23 </tbody>
24 </table>
25 #end
26 #macro(printSpaceStats $stats)
27 $!xwiki.ssx.use('Stats.Style')
28 <table class="stats" cellspacing="0" cellpadding="0">
29 <thead>
30 <tr>
31 <th class="numeric" style="width:20%">$msg.get('xe.statistics.hits')</th>
32 <th style="width:80%">$msg.get('xe.statistics.space')</th>
33 </tr></thead>
34 <tbody>
35 #foreach($item in $stats)
36 <tr>
37 <td class="numeric">$item.pageViews</td>
38 <td><div class="ellipsis" title="$escapetool.xml($item.name)"><a href="$xwiki.getURL("${item.name}.WebHome")">$escapetool.xml($item.name)</a></div></td>
39 </tr>
40 #end
41 </tbody>
42 </table>
43 #end
44 #macro(printContributorStats $stats)
45 $!xwiki.ssx.use('Stats.Style')
46 <table class="stats" cellspacing="0" cellpadding="0">
47 <thead>
48 <tr>
49 <th class="numeric" style="width:20%">$msg.get('xe.statistics.changes')</th>
50 <th style="width:80%">$msg.get('xe.statistics.user')</th>
51 </tr>
52 </thead>
53 <tbody>
54 #foreach($item in $stats)
55 #set($userNameLink = $xwiki.getUserName($item.name))
56 #set($userName = $xwiki.getUserName($item.name, false))
57 #if($userNameLink)
58 <tr>
59 <td class="numeric">$item.pageSaves</td>
60 <td><div class="ellipsis" title="$userName">$userNameLink</div></td>
61 </tr>
62 #end
63 #end
64 </tbody>
65 </table>
66 #end
67 #macro(printRefererStats $stats)
68 $!xwiki.ssx.use('Stats.Style')
69 <table class="stats" cellspacing="0" cellpadding="0">
70 <thead>
71 <tr>
72 <th class="numeric" style="width:20%">$msg.get('xe.statistics.sources')</th>
73 <th style="width:80%">$msg.get('xe.statistics.referrer')</th>
74 </tr>
75 </thead>
76 <tbody>
77 #foreach($item in $stats)
78 <tr>
79 <td class="numeric">$item.pageViews</td>
80 <td><div class="ellipsis" title="$escapetool.xml($item.URL.host)"><a href="$escapetool.xml($item.referer)">$escapetool.xml($item.URL.host)</a></div></td>
81 </tr>
82 #end
83 </tbody>
84 </table>
85 #end
86 #macro(printNoStatisticsData)
87 #info($msg.get('xe.statistics.notrecorded'))
88 #end
89 #macro(printStatisticsDisabled)
90 #set($statsHome = "[$msg.get('xe.statistics.homepage')>Stats.WebHome].")
91 #warning($msg.get('xe.statistics.disabled', [$statsHome]))
92 #end