Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

total word in description

Quote Reply
total word in description
Its possible to count total words in description and print it like global?

for example: this description has 500 word.

guys, please help to write the global.
Quote Reply
Re: [hmc] total word in description In reply to
Hi,

Something like this will give a rough word count;

Code:
sub {
my @desc = split / /, $_[0];
$#desc ? return $#desc : return 0;
}

..and then call with <%global_name($Description)%>.

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Apr 27, 2005, 1:23 AM
Quote Reply
Re: [Andy] total word in description In reply to
I am also going to test this out..

Thank Andy (again)

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] total word in description In reply to
working!