-
AuthorPosts
-
Saguaros Moderator
Saguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 13, 2010 at 8:34 am #340206Dear playconsole!
The hits only works on the Category List Layout,
April 13, 2010 at 3:52 pm #340251Hi thiench,
Clear answer 😉
Will search for a component or plugin…With regards
Playconsolecansay Friendcansay
- Join date:
- February 2010
- Posts:
- 183
- Downloads:
- 2
- Uploads:
- 32
- Thanks:
- 20
- Thanked:
- 19 times in 1 posts
April 18, 2010 at 10:45 pm #340714Maybe this mod can help ?
Im considering to use it my self, but want to know how you other guys solve this 🙂http://www.gjcwebdesign.com/joomla-article-layout-display-hits.html
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 19, 2010 at 4:45 am #340730Dear cansay!
Thanks for your anwser, it ‘s best solution 🙂
Thanks again
cansay Friendcansay
- Join date:
- February 2010
- Posts:
- 183
- Downloads:
- 2
- Uploads:
- 32
- Thanks:
- 20
- Thanked:
- 19 times in 1 posts
May 24, 2010 at 9:02 pm #344578<em>@tienhc 175048 wrote:</em><blockquote>Dear cansay!
Thanks for your anwser, it ‘s best solution 🙂
Thanks again</blockquote>
My site crashed when I tried 🙁
Seamed lik it was Ad_Agency from Ijoomla that did not like this change 🙁
DB function failed with error number 1
Can't create/write to file '/tmp/#sql_65b4_0.MYI' (Errcode: 12) SQL=SELECT t0.*, b.zone, b.approved, campaign_id, banner_id, FLOOR(RAND() * relative_weighting) as rw FROM octdk_ad_agency_campaign_banner LEFT OUTER JOIN octdk_ad_agency_banners as b ON b.id=banner_id LEFT JOIN octdk_ad_agency_campaign as t0 ON campaign_id=t0.id WHERE b.zone='114' AND b.approved='Y' AND ((t0.approved='Y') AND (t0.approved='Y' AND ('2010-05-24 22:53:10' > t0.start_date) AND ((t0.type IN ('cpm','pc') AND t0.quantity>0) OR (t0.type='fr' AND NOW() < t0.validity)))) AND t0.status='1' AND banner_id NOT IN (0) ORDER BY rw DESC LIMIT 1It sux that I have to use a specific component in order to count hits 🙁
I can see the hits in article manager but not on the frontend.My freind uses a module for this, but it is a comentary module and I already have this 🙁
http://www.vikingreviews.dk/nyheder/414-teenage-mutant-ninja-turtles-smash-up-tyvagtige-skildpaddercansay Friendcansay
- Join date:
- February 2010
- Posts:
- 183
- Downloads:
- 2
- Uploads:
- 32
- Thanks:
- 20
- Thanked:
- 19 times in 1 posts
May 24, 2010 at 9:17 pm #344579THIS ONE WORKS….
I tested it on my Local installation.
Now maybe somone has a sugestion as to how I can show it so it looks like it is integrated in the site ?
I cant show the Article hit count outside the article 🙁It should be next to Author name, Publishing date and so 😀
UHAHHAHAHHA This is ****ING NICE 😀
It makes everybody write more and readers like the feature 😀http://extensions.joomla.org/extensions/site-management/content-statistics/6719
-
Css Magician Friend
Css Magician
- Join date:
- October 2014
- Posts:
- 741
- Downloads:
- 43
- Uploads:
- 53
- Thanks:
- 114
- Thanked:
- 366 times in 263 posts
May 25, 2010 at 3:19 am #344612Hi all,
Show Hits at Joomla Category (Section) Pages with Each Item:
You want to show the hits for every article in category page too?
You need to add the following code in your category page:
<?php if ($this->params->get('show_hits')) : ?>
<span class="articlehits">
(Read : <?php echo $this->item->hits; ?> times)
</span>
<?php endif; ?>You can change the “Read…times: ” with anything you want…
Ideally your joomla template should have html override folder… i.e. you need to open this blog_item.php file, and add the above code where you want to display the hits.
your joomla template > html > com_content > category(section) > blog_item.php
This will work perfectly for you I am sure as we do this daily 🙂 If you do not know how to edit template or your current tempalte dont have the html override folder, let us know, and one of our coder will do implement this for you.
Show Hits at Frontpage (Main page) of Your Joomla Site:
Just add the above code in the frontpage item i.e.
<?php if ($this->params->get('show_hits')) : ?>
<span class="articlehits">
(Read : <?php echo $this->item->hits; ?> times)
</span>
<?php endif; ?>into the following file:
joomla template > html > com_content > frontpage > default_item.php
(Add this in the above file at the position where you want to show the hits)
But to make this code work you need to add one more little code at joomla page i.e.
Open components/com_content/models/frontpage.php
Search for this line at about 128th line:
$query = ' SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,' .
' a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.attribs, a.urls, a.metakey, a.metadesc, a.access,' .
' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug,'.
' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
' CHAR_LENGTH( a.`fulltext` ) AS readmore,' .
' u.name AS author, u.usertype, g.name AS groups, u.email as author_email, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering'.
$voting['select'] .
' FROM #__content AS a' .
' INNER JOIN #__content_frontpage AS f ON f.content_id = a.id' .
' LEFT JOIN #__categories AS cc ON cc.id = a.catid'.
' LEFT JOIN #__sections AS s ON s.id = a.sectionid'.
' LEFT JOIN #__users AS u ON u.id = a.created_by' .
' LEFT JOIN #__groups AS g ON a.access = g.id'.
$voting['join'].
$where
.$orderby
;you need to add this code (a.hits,) at the end before the “‘” i.e.
a.attribs, a.urls, a.metakey, a.metadesc, a.access,
becomes:
a.attribs, a.urls, a.metakey, a.metadesc, a.access, a.hits,
PS. If you want any customization, or this does not work in your situation. You can submit a support ticket at our desk and let one of our expert coder do this for you.
Show Hits at Joomla Article Pages:
You want to show the hits for every article page?
You need to add the following code in your article page:
<?php if ($this->params->get('show_hits')) : ?>
<span class="articlehits">
(Read : <?php echo $this->article->hits; ?> times)
</span>
<?php endif; ?>Ideally your joomla template should have html override folder… i.e. you need to open this default.php file, and add the above code where you want to display the hits.
your joomla template > html > com_content > article > default.php
1 user says Thank You to Css Magician for this useful post
cansay Friendcansay
- Join date:
- February 2010
- Posts:
- 183
- Downloads:
- 2
- Uploads:
- 32
- Thanks:
- 20
- Thanked:
- 19 times in 1 posts
May 26, 2010 at 11:24 am #344786<em>@duchh 179849 wrote:</em><blockquote>Hi all,
</blockquote>
VERY NICE SIR…. :p
I can make a guide for Joomlart.com so everybody knows how to do this….
Question: If I implement all these small changes, will it be possible to view the hit count here ?
If I wanted to have read amount of times displayes on the frontpage in the jasidenews module like this
Is that also one of the modifications you are telling us about 😀 ?
My site has Section layout for all the news articles like this.
http://www.octeamdenmark.com/news.html-
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)This topic contains 9 replies, has 4 voices, and was last updated by cansay 14 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum