Fork me on GitHub

Remove hits from Frontpage News!  Bottom

  • Hi all,
    Is there anyway that I can remove the hits from Frontpage News!

    There doesn't seem to be a direct code line to edit, none that I can find !!

    Any suggestions?

    Jens
  • Yes, the way the news articles look is dictated by your theme... In your theme.php under the themeindex() function, remove the part that says:

    Code

    $info[counter] "._READS."

    Usually the counter is repeated in the full article as well, so you might want to edit themearticle(), too...

    If you wanted to get fancy and just have the hits show when an someone authorized to edit the story is logged in, you could surround the reads info with:

    Code

    if (pnSecAuthAction(0, 'Stories::Story', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_EDIT)) {
         // echo code to display reads here
    }


    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Hi Nate,

    thanks for your solution but apparently this is not doable in AutoThemes. The info[counter] doesn't exist in these.

    The way to do it here is to quote out line 126 (or something) in commands.inc.php in the includes folder to look like this:

    //$command['[article-reads]'] = 'echo $info["counter"]." "._READS;';
  • Or, by inference, remove the [article-reads] command from your AutoTheme..... Of course it helps if you state that your using an AutoTheme when you post.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Yeah, that would help wink

    Lots of questions about this module. Perhaps AutoTheme should get it's own forum?

    Lotsa people using it - it's nice but seems a bit unnecessary xtra overhead, given that most people are coding the same left, right, center block types... I'm havin' fun goosing the legacy theme method for now, and can't wait for the next-gen integrated theming system comes along!

    P.S. Check out latest post with an extended "starter" theme for folks who like to do it "the ol' fashioned way":
    http://forums.postnu…&t=18447&highlight=
    It's got lots of little add-ins, like custom blocks, block title images, "proper" HTML and custom images and slogan headers for modules - all from an ordinary theme.php :)

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • AutoTheme does have its own forums.

    Why the percieved hate towards it?

    --
    Zikula Themes
  • Hi - I meant it's own forum on this bulletin board... wink

    That's a bit of a leap to think I "hate" AutoTheme, not at all. I merely said it's a bit of extra overhead (the Lite version that is, as it has no caching, the learning curve, etc...) when most folks seem to just do "regular" type themes with them... I've seen a couple good themes done with it, but most I've seen don't seem to stretch AutoTheme's potential.

    I think a lot of people use it 'cause they think regular theming is too hard or something. Some of the included themes with nuke unfortunately don't showcase good theming practices and may have scared some newbies off! Check out my link in the prior post and the one in my signature about "classic" theming - there's some good stuff there, I think.

    Anyhew, if/when PN gets it's own theming system in the future, I'll likely start learning that.

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • So I tried to figure this out for about an hour. I still can't get it.

    I'd like to "get fancy" and only allow admin and people with edit rights to view the number of reads. I tried to locate the "$info[counter] "._READS."" code in my theme.php under the themeindex() function but it is not there. I'm using an Imagic1 theme and running postnuke version .7.2.6 or something close to that.

    From what I can tell, there is an "articlebox.html" file in the Imagic1 folder. I tried editing that code, but it does not seem to have any effect though it did contain the "$info[counter] "._READS." code. I deleted it but nothing changed. What is the relationship between the .html file and the theme.php file in this folder?

    Anyway, the big question is how to I turn off number of reads unless the user is an admin or story editor?

This list is based on users active over the last 60 minutes.