doc:tips:entry_views_in_the_lastentries_plugin
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| doc:tips:entry_views_in_the_lastentries_plugin [2023/02/23 00:52] โ created fraenkiman | doc:tips:entry_views_in_the_lastentries_plugin [2023/02/26 01:42] (current) โ Headline style changed fraenkiman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Adding the number of views to the FlatPress LastEntries plugin | + | ===== Adding the number of views to the FlatPress LastEntries plugin ===== |
| Taken over from [[https:// | Taken over from [[https:// | ||
| - | ===== Description | + | ==== Description ==== |
| This tutorial shows you how to use the LastEntries plugin and the PostViews plugin to see at a glance how many views the entries have had. | This tutorial shows you how to use the LastEntries plugin and the PostViews plugin to see at a glance how many views the entries have had. | ||
| This hack requires the PostViews plugin to be enabled. | This hack requires the PostViews plugin to be enabled. | ||
| - | ===== Procedure | + | ==== Procedure ==== |
| Changed the file // | Changed the file // | ||
| + | |||
| Note that the first and last lines shown here are already in the file, so only the lines between the comments are relevant: | Note that the first and last lines shown here are already in the file, so only the lines between the comments are relevant: | ||
| <code php> | <code php> | ||
| Line 16: | Line 17: | ||
| $dir = entry_dir($id); | $dir = entry_dir($id); | ||
| if (!$dir) return; | if (!$dir) return; | ||
| - | $f = $dir . '/ | + | $f = $dir . '/ |
| $v = io_load_file($f); | $v = io_load_file($f); | ||
| if ($v === false){ | if ($v === false){ | ||
doc/tips/entry_views_in_the_lastentries_plugin.1677109973.txt.gz ยท Last modified: by fraenkiman
