User Tools

Site Tools


doc:tips:entry_views_in_the_lastentries_plugin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:tips:entry_views_in_the_lastentries_plugin [2023/02/23 00:56] โ€“ [Procedure] fraenkimandoc: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://www.igorkromin.net | Igor Kromin]] Taken over from [[https://www.igorkromin.net | Igor Kromin]]
  
-===== 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 //[[https://github.com/flatpressblog/flatpress/blob/master/fp-plugins/lastentries/plugin.lastentries.php | fp-plugins/lastentries/plugin.lastentries.php]]// as follows: Changed the file //[[https://github.com/flatpressblog/flatpress/blob/master/fp-plugins/lastentries/plugin.lastentries.php | fp-plugins/lastentries/plugin.lastentries.php]]// as follows:
  
Line 17: Line 17:
  $dir = entry_dir($id);  $dir = entry_dir($id);
  if (!$dir) return;  if (!$dir) return;
- $f = $dir . '/view_counter' .EXT;+ $f = $dir . '/view_counter' . EXT;
  $v = io_load_file($f);  $v = io_load_file($f);
  if ($v === false){  if ($v === false){
doc/tips/entry_views_in_the_lastentries_plugin.1677110166.txt.gz ยท Last modified: by fraenkiman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki