Login or sign up


USER:
PASS:

Welcome to e107hacks.org
Welcome to e107hacks.org, the home of hacking the e107 code base.

For those who have come looking for ways to hack into other e107 sites, we are sorry to disappoint, but that's not what we're about! We are here to provide ways to insert code into your own site to enhance your users' experience of your website.

We do not provide the simple to install plugins found at the excellent e107coders.org or at the new plugins.e107.org - instead we provide instructions of how to hack the core to make it do what you want it to.

We cannot stress enough however, that ALL of these hacks and changes are vulnerable to core upgrades and will be lost when you over-write files with newer versions. We will endeavour, where possible, to upgrade hacks for new versions, but when this is not possible we will not be able to provide new hacks.

There are currently no full time hackers working on this site, but the site has been taken over and kept open in the hope that things will be provided by the community as a whole, and that it's new owner will be able to provide a few things for you to play with on your own sites that you will find useful.
Upload: e107 news Views Counte Hack
e107 News Views Counter by -LINK-

Hi

by This Hack you can show number of news visits by users !

instructions :

1-

Query this statement in your database by phpmyadmin :


ALTER TABLE `e107_news` ADD `news_views` int(10) unsigned NOT NULL default '0' AFTER `news_sticky


this is for add news_views field.

2-add {NEWSVIEWS} shortcode in your theme.php on $newsstyle after Comments: 0

3-open news.php

find :


$ix- >render_newsitem($news, "extend");


add after :


news_incview($news[' news_id']);


save & close

4-open files/shortcode/batch/ news_shortcodes.php

add this shortcode :


SC_BEGIN NEWSVIEWS
$news_item = getcachedvars(' current_news_item');
$param = getcachedvars(' current_news_param');
if ($news_item[' news_extended'] && (strpos(e_QUERY, 'extend') === FALSE || $parm == "force")) {
return "Views:".$news_item[' news_views'];
}
else {
return "";
}
SC_END



save & close

5-open handlers/news_class.php

find :


if(!isset($news[' news_sticky'])) {$news['news_sticky'] = 0;}


add after :


{$news['news_views'] = -1;}


find :


news_sticky='" .intval($news[' news_sticky'])."'


replace with :


news_sticky='" .intval($news[' news_sticky'])."', news_views='" .intval($news[' news_views'])."'


find :



'".intval($news[' news_sticky'])."'


replace with :


'".intval($news[' news_sticky'])."', news_views='" .intval($news[' news_views'])."'


find :


?>


add before :


function news_incview($news)
{
$news['news_id'] = (int)$news['news_id'];
global $sql;
return $sql->db_Update("news", "news_views=news_views+1 WHERE news_id=".$news['news_id' ]);
}



or replace this files for 0.7.11 :

e107 news views counter Hack

http: e107.ir

Persian e107 Support
Submitted by Persian Support

e107 news Views Counte Hack



news news news   persian support   views news   middle border   stickythis   

Posted by: admin, Tuesday 19 August 2008 - 16:53:57 |

 
Upload: BBcode in the quick reply
Enable the BBcode and Smile in the quick reply for your forums !

install///
replice this file in the $plugin>>Forum . !

support :
-LINK-
-LINK-
-LINK-
Submitted by Persian E107/IR

BBcode in the quick reply



quick reply   bbcode   forum support   e107   persian   

Posted by: admin, Monday 21 July 2008 - 09:40:16 |

 
Go to page       >>  
News Archive
Render time: 0.0628 sec, 0.0042 of that for queries. DB queries: 29. Memory Usage: 1,825kb