|
|
#1 |
![]() Join Date: Jun 2004
Posts: 10
![]() |
My site is a newsletter with articles written by many authors.
I pay them bi-weekly based on the word counts of their articles. Is there a way for me or someone with 'administrator' access to view word counts on articles? The ideal way would be a way to view all news items in a certain date range, with the author, title, and word count displayed. |
|
|
|
|
|
#2 |
![]() Join Date: Oct 2003
Location: Northampton, UK
Posts: 490
![]() |
Hi Cassinola,
I am trying to get my poor PHP skills upto scratch by doing small programming projects within Mambo, and this sounds like a small component/module/mosbot I could cut my teeth on. As far as I am aware there is nothing as yet that is available to do this, although I am open to being corrected on this. Don't worry, I won't charge for doing this. Where would you prefer to see the information, in the backend administrator screen or in the front-end? If it's in the front-end would you prefer it only viewable by Public/Registered/Only selected people? |
|
|
|
|
|
#3 | |
![]() Join Date: Jun 2004
Posts: 10
![]() |
Quote:
Very cool! Thanks for the offer! It would work either way, but I think the best way would be a front-end module that would look something like this: Date | Author | Article Title | Word Count 6 Jun 2004 | Mike | How To Build Widgets | 339 I think it should be front-end accessible so that the authors could verify what they are owed. edit I originally thought it should go backend, hence the title of this thread. But after you mentioned the possibility of frontend access, I think it's better. And yes, in answer to your second question, it should have the choices of Public, Registered, or Special. Last edited by Casinnola : June 19th, 2004 at 13:53. |
|
|
|
|
|
|
#4 |
![]() Join Date: Dec 2003
Location: Charlottesville, VA USA
Posts: 2,836
![]() |
Oh, this could so totally be done with a mosbot so that when the superadminstrator (or any backend user) logs in, they see that info in the content, but everyone else just sees the content. It would be a great mosbot project.
-Tony |
|
|
|
|
|
#5 |
![]() Join Date: Oct 2003
Location: Northampton, UK
Posts: 490
![]() |
that's the way I was thinking of it too... or a combination of component/mosbot.... I have already started parts of it already - I will keep you posted here on how I get on.
|
|
|
|
|
|
#6 |
![]() Join Date: Jun 2004
Posts: 10
![]() |
w00t
Thanks again, I look forward to seeing it. And just so you know... it will save me close to 45 minutes every week of copy/pasting content into MS Word so I can get the word count. |
|
|
|
|
|
#7 |
![]() Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
![]() |
Keep us posted on how you go troozers, cause now created a generic "code engine" for my mosbots, that allow me to customise and change it fairly quickly to show different output. So it would be fairly easy for me to reconfigure my mosbot to do this.
And I have already completed work on a Display - Author & Date mosbot (I am using it on my site www.stingrey.biz) Plus I already have code in my Display News modules, that counts either characters or words in the intro and/or full text of articles. It is used to power the limit_title, limit_intro & limit_full parameters.
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission Former Mambo Core Team Member July 2004 - August 2005 |
|
|
|
|
|
#8 |
![]() Join Date: Oct 2003
Location: Northampton, UK
Posts: 490
![]() |
Hi Cassinola & Stingrey,
So you can see what progress I am making, I have created the following --> http://www.troozers.net/The_News/Fun...hor_Statistics, which shows how I am getting on. It is currently a mambot still, but will be converted to a component once I have done some testing and finished a couple of items; * Allow user to enter date range. * Verify the word counting. There is a difference between what str_word_count( $row->text) and Microsoft Word say. I think the php function is counting special characters as well - so I am updating it to filter out these characters and also to strip out other mosbot calls such as {mosimage} and {mospagebreak} ANY feed back or constructive critiscism is absolutely welcome. |
|
|
|
|
|
#9 | |
![]() Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
![]() |
Thats looking pretty good troozers.
Quote:
PHP Code:
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission Former Mambo Core Team Member July 2004 - August 2005 Last edited by stingrey : June 20th, 2004 at 09:24. |
|
|
|
|
|
|
#10 |
![]() Join Date: Oct 2003
Location: Northampton, UK
Posts: 490
![]() |
excellent code tip there my stingrey, between your filters and mine I have gotten both Word and this component to report exactly the same figures per story.
The exception, and there are always some, is when the story contains a LOT of code fragments (which some of my stories do). For example I have an article called Mosviewonly & Events Component which has some coding tips on how to get mosviewonly working with Eric Lamette's Event component. This component reports 1077 and Word 761... I dont know how much of an issue this is, or who is more correct in this example. You can now choose the dates to query on, it will default the dates as; From: (today - 2 weeks), and To: (today) Unfortunately you need to be signed on to use the calendar picker as the function showCalendar is initiated within mambojavascripts.js - you can however still manually enter dates if you are not signed on. What do you think? I am moving some of the code over to a mosbot called {moswordcount} which can be included in an article to show how many words are in that article. Last edited by troozers : June 21st, 2004 at 06:05. |
|
|
|
|
|
#11 |
![]() Join Date: Jun 2004
Posts: 10
![]() |
troozers, it sounds awesome! i can't wait to give it a try on my site! thanks again for doing it
|
|
|
|
|
|
#12 |
![]() Join Date: Oct 2003
Location: Northampton, UK
Posts: 490
![]() |
OK,
I think it is time to send over to you now, cassinola, to test. I will create an installation script later on today. Can you send me a private message with your email address on so I can send it to you? |
|
|
|
|
|
#13 | ||
![]() Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
![]() |
Quote:
-------------------------------- Quote:
--------------------------------
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission Former Mambo Core Team Member July 2004 - August 2005 |
||
|
|
|
|
|
#14 |
![]() Join Date: Oct 2003
Location: Northampton, UK
Posts: 490
![]() |
no problem, below is the filter code..... it is none too sophisticated as I went with the general rule "why run it through one filter, when you can run it through many?"
I was hoping at least this way I should capture most of the little critters before they reach the end.... as a theory it seems to work PHP Code:
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| updated version -> Version 1-2 of Display News Modules | stingrey | Modules | 43 | August 22nd, 2005 21:11 |
| I want all the news categories / items on a single page | diehlr | General Questions | 5 | June 24th, 2005 09:16 |
| One thing I want | Johnboat | 4.5.1 | 0 | September 14th, 2004 12:30 |
| Dynamically pull news items into main menu | MamboKC | General Questions | 0 | August 10th, 2004 11:18 |
| updated version -> Version 1-2 of Display News Modules | stingrey | Open Source Products for Mambo | 0 | April 3rd, 2004 03:35 |