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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- Guite responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 05:53 PM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
- mesteele101 responded to »How to install Zikula for MSSQL ??? - Part II« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Remove hits from Frontpage News!
-
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
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... -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 37
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;'; -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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. -
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
Yeah, that would help
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... -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
-
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
Hi - I meant it's own forum on this bulletin board...
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... -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 31
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?
- Moderated by:
- Support
