Image to Post - view counter
This commit is contained in:
parent
4f48be8e15
commit
a8c39085cb
3 changed files with 5 additions and 5 deletions
|
@ -5,13 +5,13 @@ class ImageViewCounterInfo extends ExtensionInfo
|
||||||
public const KEY = "image_view_counter";
|
public const KEY = "image_view_counter";
|
||||||
|
|
||||||
public $key = self::KEY;
|
public $key = self::KEY;
|
||||||
public $name = "Image View Counter";
|
public $name = "Post View Counter";
|
||||||
public $url = "http://www.drudexsoftware.com/";
|
public $url = "http://www.drudexsoftware.com/";
|
||||||
public $authors = ["Drudex Software"=>"support@drudexsoftware.com"];
|
public $authors = ["Drudex Software"=>"support@drudexsoftware.com"];
|
||||||
public $license = self::LICENSE_GPLV2;
|
public $license = self::LICENSE_GPLV2;
|
||||||
public $description = "Tracks & displays how many times an image is viewed";
|
public $description = "Tracks & displays how many times a post is viewed";
|
||||||
public $documentation =
|
public $documentation =
|
||||||
"Whenever anyone views an image, a view will be added to that image.
|
"Whenever anyone views a post, a view will be added to that image.
|
||||||
This extension will also track any username & the IP address.
|
This extension will also track any username & the IP address.
|
||||||
This is done to prevent duplicate views.
|
This is done to prevent duplicate views.
|
||||||
A person can only count as a view again 1 hour after viewing the image initially.";
|
A person can only count as a view again 1 hour after viewing the image initially.";
|
||||||
|
|
|
@ -102,7 +102,7 @@ class ImageViewCounter extends Extension
|
||||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||||
{
|
{
|
||||||
if ($event->parent=="posts") {
|
if ($event->parent=="posts") {
|
||||||
$event->add_nav_link("sort_by_visits", new Link('popular_images'), "Popular Images");
|
$event->add_nav_link("sort_by_visits", new Link('popular_images'), "Popular Posts");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,6 @@ class ImageViewCounterTheme extends Themelet
|
||||||
|
|
||||||
public function get_help_html()
|
public function get_help_html()
|
||||||
{
|
{
|
||||||
return '<p>Search for images that have received views by users.</p>';
|
return '<p>Search for posts that have received views by users.</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue