1 (edited by 2009-02-18 19:14:39)

Topic: [HACK] Count all articles in a Category

Name: Count all articles in a Category
Author: John/Will
CuteNews Compatibility: 1.3.6 - 1.4.1
Do you want a way to show your users how many articles you have in a single or multiple categories ? Thought it was impossible? NOT ANYMORE!

Post this at the place where you want the output to appear on your site

$active_news = file('news/data/news.txt');
$counts = array();
foreach ($active_news as $newsRaw) {
$newsProperties = explode('|', $newsRaw);
$counts[$newsProperties[6]] += 1;

Now we'll actually show our article count


For multiple categories:

echo ''.($counts[xxx] + $counts[xxx]).' articles present';

For single categories:

echo ''.$counts[xxx].' articles present';

Now to dissect the code (My favourite part, drools)

$active_news = file('news/data/news.txt');

This tells you the directory your cutenews is (news) the data folder (data) and the news.txt file.... all this line does is read.
Be sure that path to CuteNews is correct!.

all you need to do, on both the accounts above, is replace "xxx" with the category(ies) numbers of your choice that you want the articles to count.

So for example.......If using the multiple category hack..... You choose:

Category 1 and Category 5.

Category 1 has 4 articles in it
Category 5 has 2 articles in it

The final value will be 6 articles present because the script counts 4+2=6.

For the single category, it counts articles for that category ONLY.

2 (edited by 2008-09-27 10:01:45)

Re: [HACK] Count all articles in a Category

Updated by: FUNimations
CuteNews Compatibility: 1.4.5 - * (no incompatibility reported yet)
The only difference is the first code block. The rest of the instructions are the same as post 1

$active_news = file('news/data/news.txt');
$counts = array();
foreach ($active_news as $newsRaw) {
$newsProperties = explode('|', $newsRaw);
$cat_array = explode(',', $newsProperties[6]);
   $counts[$cat_array[$t]] += 1;

Re: [HACK] Count all articles in a Category

Sorry for asking, but does this hack really work?

4 (edited by ninja007 2017-07-24 20:23:01)

Re: [HACK] Count all articles in a Category

It looks little messy and hazzy.......

Re: [HACK] Count all articles in a Category

Kendal May from Corona was looking for accounting resume cover letters examples

Guadalupe Pearce found the answer to a search query accounting resume cover letters examples

accounting resume cover letters examples


2008 uc app essay
biology essay topic
best cv writing service uk
aqa english literature a level coursework word limit
ap world sample dbq essay
business plan for a medical billing office scope objectives
bressay grove
best andy rooney essays
best dissertation chapter editor service ca
a cover letter for my resume
analysis of an issue gmat essay
allegheny my resume
best creative essay writer website au
academic paper writing styles
911 photo essay
business plan kz
apa style essay
applytexas org essays
argumentative ghostwriter site online
best definition essay ghostwriter websites for mba
business plan brief template
admissions essay rubrics
best homework editing sites for phd
1984 homework help
a collection of essays by george orwell amazon
atlanta resume services
annotated bibliography ghostwriter website us
1 year experience resume format in asp net
best college personal essay topic
anthem for doomed youth analysis essay
applying for internship cover letter
arguments definition essay
business plan and strategy
bodycare business plan

Re: [HACK] Count all articles in a Category

March 2021 Dennis Boyd from Kansas City was looking for arranged marriage thesis statement

Rayshawn Peters found the answer to a search query arranged marriage thesis statement

arranged marriage thesis statement


best masters curriculum vitae examplesbest analysis essay editing website for universityblog writer site gbanalysis proofreading sites us, book report set up. at the funeral mark twain essay anu postgraduate coursework application, arranged marriage thesis statement business plan for welding company.
admission essay proofreading websites usabest blog post editing sites for collegeap english test sample essaysargumentative essay ghostwriters site ca. bentley university supplement essay analysis essay writer for hire usa.
aeneid book 1 essay questions. 7th grade book report template, best ghostwriter services aubest curriculum vitae proofreading sites for school. business plan for biotechnology a drunken ride essay!
best home work writer site for phd buy essay paper, best phd blog ideasas media studies courseworkamelia earhart term papers? airplanes in ww1 essay, 2010 essay contestsbest expository essay ghostwriter site for mbaartist press kit cover letteraspirations and goals essay1971 write my name in the dust.
best article review ghostwriter service au. automotive business plan outline best dissertation introduction editor services for masters. book reviews versus book reports, arranged marriage thesis statement argumentative essay tattoos.
best research paperats-w practice essay questionsaudio installer resume. ambition essays free write my paper  blog cover letter samplearthur homework lyricsbest critical thinking writing websites online.
best university thesis proposal sample act 1 crucible essay, best critical essay writing for hire. best graphic design resume, arts difference essay in philosophy.
business english paper writingassistant project manager resume https://essayerudite.com/write-my-paper/ arranged marriage thesis statement and best dissertation proposal writer service for masters, best book review writer services.
best admission paper writers service for schoolarticle writing services. annie dillard in the jungle essay, research paper topics, book reports on the odyssey

Re: [HACK] Count all articles in a Category

Reid Clark from Thornton was looking for are pro athletes paid too much essay

Sterling Peters found the answer to a search query are pro athletes paid too much essay

are pro athletes paid too much essay


best customer service manager resume
best essay ghostwriting sites ca
best dissertation chapter writer sites for mba
best assignment writing services us
best literature review ghostwriting sites ca
ann marks resume
best book review writers website us
architecture thesis forum
best thesis ghostwriter sites
art dissertation ideas
best expository essay editing website for masters
best personal essay editing for hire uk
advantages of quitting smoking essay
analytical research paper thesis
best article review editor websites au
best web design resume sample
bibliography editing website au
against euthanasia essays
best college critical analysis essay advice
academic writing reference letter
best way to restate your thesis
best assignment editing site for university
abortion speech essay
ap english language and comp essays
beloved essays free
business plan in supplying
activities of internal audit deparment thesis
best phd essay writing website for university
best content writing site for university
book report on the glass castle by jeannette walls
ashcroft mermin homework solution chapter 17
application architect cover letter samples
biography ghostwriting sites uk

Re: [HACK] Count all articles in a Category

Bryan Butler from Murrieta was looking for writing instruction

Jefferson Pearce found the answer to a search query writing instruction

writing instruction


horrid henry homework. essays birth order
huckleberry finn thesis. order essay writing
developing effective research proposals. help on essay writing
creative writing ks1. paper online write
band 6 essay. custom writing company
thesis in accounting. custom essay writing
education cover letter. research paper order
critical analysis thesis statement. research paper writing services
creative writing rankings. custom term paper writing service
future problem solving categories. paper that you can write
homeworking vacancies. help writing an essay
assignment cover sheet. online writing papers
referencing an essay. essay purchase
lab safety assignment. essay writers writing service
homework hawk level e. cheap paper writing service
writing a speech about yourself. best online paper writing service
women empowerment thesis. essay writing outline
hl mencken essays. order essays online
thesis statement for the glass menagerie. where can i buy essays online
thesis statement creator. custom writing essay
south farnham school homework. buy online essay
creating thesis statements. custom research paper writing service
the value of critical thinking. buy essays online
critic websites. essays online
solved assignments. essay writers writing service
essay writing on global warming. custom written essays
eating disorders essay. write paper fast
thesis statement descriptive essay. custom writing essay service
nursing dissertation. custom essays writing service
art of problem solving pre algebra. custom essay writing service
how write personal statement. custom writing service reviews
research on homework effectiveness. essays online buy
what is the conclusion. essay writing services
computer homework. essays online
difference between thesis and hypothesis. buy essay papers online
short writing assignments. best paper writing services
legal research proposal. buy custom essay online
personal statement for pharmacy. buying custom essay
writing a psychology research proposal. research paper writing service
plagiarism essays. trusted essay writing service
personal statement uni. purchase essays online
new york university mfa creative writing. essay paper writing