Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • playconsole Friend
    #150316

    Hi all,

    Small issue, in the MAIN-MENU Home the setting parameters (Component), the Hits has been set to show!
    But on every articel on our page, hits is not visable?

    What to do?:confused:

    Saguaros Moderator
    #340206

    Dear playconsole!

    The hits only works on the Category List Layout,

    playconsole Friend
    #340251

    Hi thiench,

    Clear answer 😉
    Will search for a component or plugin…

    With regards
    Playconsole

    cansay Friend
    #340714

    Maybe 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 Moderator
    #340730

    Dear cansay!

    Thanks for your anwser, it ‘s best solution 🙂

    Thanks again

    cansay Friend
    #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 1

    It 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-skildpadder

    cansay Friend
    #344579

    THIS 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


    1. SHOW-HITS
    2. SHOW-HITS-Placement
    Css Magician Friend
    #344612

    Hi 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

    cansay Friend
    #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


    1. Read_X_Amount_Joomla
    2. Read_X_Amount_Joomlav2
Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 4 voices, and was last updated by  cansay 13 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum