11
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 17:05

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


No problem Mithrandir :)

I've solved my "More" problem by changing

Quote:
$morelink .= sprintf(_NW_BYTESMORE,$totalcount);


into
Quote:
$morelink .= sprintf(_NW_BYTESMORE,$fullcount);


I'm pleased with that, cos, like I say, im no coding person

cheers!



12
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 17:00

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


I guess having "X words in total" will have to do for me.

Thank you very much for pointing me in the right direction, I really do appreciate it.



13
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 16:58

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


OK So I've got it to display "352 words more".

But, as you say this is the total count, but that's not what "more" means. It should say how many MORE words there are in the rest of the post, not counting the ones in the intro. so it should say "250 more" as there are about 100 words in the intro text.

I'm just getting annoying now aren't I?

I guess I could just change the text to "X words total"

That would make sense



14
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 16:45

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


If that post just sounded ungrateful, im sorry, it wasnt supposed to be. I just find this code editing a bit scary and so need someone to hold my hand and talk me through it step by step. I really do apprectiate the help, but telling me it's obvious just makes me feel stupid.

Anyway, thanks for replying, I am impressed with the speed of replies on this forum, and people's willingness to help.



15
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 16:42

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


I appreciate the help, although, no it isn't obvious. Having never done ANY php or coding before, I was just looking for someone to take me through some easy steps to get it to display the word count, I'm a new user, just trying to get a site set up, and I was hoping there would be just an option or dropdown list to choose "word count, character count, byte count"!

I didn't realise I would have to edit all this stuff, and no, to a non coder it's not very clear what I'm editing, sorry for being stupid.



16
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 13:39

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


when i changed it, it displayed "880 bytes more" when previously it had been "1998 bytes more" on one of my posts
the word count for the post is about 350



17
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 13:36

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


I found this:

Quote:
$introcount = strlen($story['text']);
$fullcount = strlen($this->bodytext());
$totalcount = $introcount + $fullcount;


In the class.newsstory.php file

changing it like you said to

Quote:
$introcount = strlen($story['text']);
$fullcount = substr_count(trim($this->bodytext()), ' ');
$totalcount = $introcount + $fullcount;


I think it does something to the number (reduces it) but it doesnt seem to be either the word count or the character count



18
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 13:25

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


Goodness, you are fast!
I'll just go try that and report back!

Thanks!



19
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 13:22

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


Thanks for the help so far.
What file of the module will I find that line in?

(Also I'm using News 1.2.1)



20
chaymation
Re: having "words more" not "bytes more" in news items
  • 2005/1/9 12:07

  • chaymation

  • Just popping in

  • Posts: 27

  • Since: 2005/1/9 0


"Characters more" might be easier, but also more geeky than I'd want.

When writing an essay in word, i never say to myself "oh look it's 10,000 characters long" I only care that the word count is 1,800.

Users can judge word count more easily than character count and know whether the news item is a couple of paragraphs, a mid sized rant or a massive essay!

I'd like it to do what word does, count the words in the extended text then have "350 words more". "bytes more" would mean nothing to my audience, "characters more" wouldn't be much better.

I haven't a clue how you would do this though!




TopTop
« 1 (2) 3 »



Login

Who's Online

241 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 241


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits