[Add-on] Word Count Button on posting 0.4.0

Stand-alone scripts designed for a specific function, but not neccessarily part of normal forum browsing.
Forum rules
Image Please feel free to download any Scripts here, support for each Script is located it's own thread.

To post your own Script, please first read the MOD / Script Guidelines

How would you rate this mod?

Awesome!
2
40%
Very Good
2
40%
Good
1
20%
Fair
0
No votes
Poor
0
No votes
 
Total votes : 5

[Add-on] Word Count Button on posting 0.4.0

Postby nedka » 23 Aug 2006, 21:46

Classification: Add-on
phpBB Part: Forum

MOD Name: Word Count Button on posting
MOD Version: 0.4.0
Author: nedka
MOD Description: This MOD will add a "word count" button in posting form for your phpBB

Works with:
  • phpBB 3.0 BETA2
  • Every CVS version between BETA2 and snapshot from 2006-08-xx.

Features:
  • Count words in posting form
  • Count characters in posting form
  • With languages as Vietnamese, this MOD don't count correct total words Scratch

Language: English/Vietnamese

Licence: GNU General Public License v2

Screenshots:
word_count_button.gif
Screenshot


Installation Level: Easy
Installation Time: 5 Minutes
Format: MOD
Download: http://www.wonasti.com/viewtopic.php?f=4&t=26
Attachments
Word_Count_Button_on_posting_0.1.0.zip
(24.24 KiB) Downloaded 200 times
Last edited by nedka on 10 Nov 2006, 22:01, edited 5 times in total.
User avatar
nedka
MOD Author
MOD Author
 
Posts: 47
Joined: 17 Aug 2006, 18:59
Location: Viet Nam
Gender: Male


Re: [Add-on] Word Count Button on posting 0.1.0

Postby Highway of Life » 23 Aug 2006, 22:36

* With languages as Vietnamese content, this MOD count don't correct total words Scratch
What mean you? Confused
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [Add-on] Word Count Button on posting 0.1.0

Postby nedka » 24 Aug 2006, 01:45

Highway of Life wrote:
* With languages as Vietnamese content, this MOD count don't correct total words Scratch
What mean you? Confused


Sorry about my english :p
Because in Vietnamese, it have many special characters, so this MOD count 1 word in Vietnamese into 2 words in its result Black Eye
User avatar
nedka
MOD Author
MOD Author
 
Posts: 47
Joined: 17 Aug 2006, 18:59
Location: Viet Nam
Gender: Male

Re: [Add-on] Word Count Button on posting 0.1.0

Postby Highway of Life » 24 Aug 2006, 10:37

Ah! okay, thanks...
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [Add-on] Word Count Button on posting 0.1.0

Postby LEW21 » 30 Aug 2006, 08:20

Not very usefull mod. Code - bad. To improve it:

1. Delete
Spoiler:
Code: Select all
#
#-----[ COPY ]------------------------------------------
#
root/language/en/mods/word_count.php to language/en/mods/word_count.php
root/language/vn/mods/word_count.php to language/vn/mods/word_count.php
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
// Start assigning vars for main posting page ...
$template->assign_vars(array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$user->add_lang('mods/word_count');
#
#-----[ FIND ]------------------------------------------
#
   'U_PROGRESS_BAR'      => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup"),
   'UA_PROGRESS_BAR'      => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup", false),

#
#-----[ AFTER, ADD ]------------------------------------------
#

   'L_WORD_COUNT'             => $user->lang['WORD_COUNT'],
   'L_WORD_COUNT_RESULT'       => $user->lang['WORD_COUNT_RESULT'],
   'L_CHARACTER_COUNT_RESULT'    => $user->lang['CHARACTER_COUNT_RESULT'],
   'L_WORD'                => $user->lang['WORD'],
   'L_WORDS'                => $user->lang['WORDS'],
   'L_CHARACTER'             => $user->lang['CHARACTER'],
   'L_CHARACTERS'             => $user->lang['CHARACTERS'],

2. Replace
Spoiler:
Code: Select all
         <input class="btnlite" type="button" tabindex="5" name="word_count" value="{L_WORD_COUNT}" onclick ="CountWords(message, true, true);"/>      
with
Spoiler:
Code: Select all
         <input class="btnlite" type="button" tabindex="5" name="word_count" value="{L_WORD_COUNT}" onclick="CountWords(message, true, true);" />      

3. Move language variables to language/*/posting.php
phpBB3.PL - User-friendly Polish phpBB 3.0 support
LEW21    
Translator
Translator
 
Posts: 901
Joined: 01 Jun 2006, 03:51
Location: Warsaw, Poland
Gender: Male
phpBB Knowledge: 10

Re: [Add-on] Word Count Button on posting 0.1.0

Postby Handyman » 24 Oct 2006, 16:03

Moved to Unapproved mods until Nedka provides a new link or attaches the mod.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7454
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: [Add-on] Word Count Button on posting 0.1.0

Postby LEW21 » 26 Oct 2006, 12:19

Download from my server added.
phpBB3.PL - User-friendly Polish phpBB 3.0 support
LEW21    
Translator
Translator
 
Posts: 901
Joined: 01 Jun 2006, 03:51
Location: Warsaw, Poland
Gender: Male
phpBB Knowledge: 10

Re: [Add-on] Word Count Button on posting 0.1.0

Postby Handyman » 26 Oct 2006, 14:27

Moved back to Mod Database
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7454
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: [Add-on] Word Count Button on posting 0.4.0

Postby Acemprol » 22 Dec 2006, 14:54

O que isso faz?
Acemprol
Crewman
Crewman
 
Posts: 8
Joined: 22 Dec 2006, 14:03
Gender: Male

Re: [Add-on] Word Count Button on posting 0.4.0

Postby Highway of Life » 22 Dec 2006, 16:43

Confused Confused Confused
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Next

Return to Scripts

Who is online

Users browsing this forum: No registered users and 4 guests