Pages: [1]
Author Topic: Frontgame limit description  (Read 607 times)
Customers
Full Member
*

Karma: 0
Posts: 32


on: Jan 31, 10, 01:08 PM

Hello,

How i can limit frontgame description ? to 200caracters ?

Thks
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #1 on: Feb 01, 10, 05:43 AM

in the content-blocks folder find the "block_gamelist.php" file, find the line
Code:
"DESCRIPTION" => $resGames[$nCurGame]["description"]
inside it and replace it by
Code:
"DESCRIPTION" => substr($resGames[$nCurGame]["description"], 0, 200)
Logged
Customers
Full Member
*

Karma: 0
Posts: 43


Reply #2 on: Feb 02, 10, 05:51 AM

you should also consider appending ."..." Smiley so the user knows the text continues Smiley
Logged
Customers
Full Member
*

Karma: 0
Posts: 32


Reply #3 on: Feb 05, 10, 03:44 PM

Thanks now its ok  Grin
Logged
Customers
Newbie
*

Karma: 0
Posts: 3


Email
Reply #4 on: Feb 21, 10, 08:57 PM

Sorry for the newbie question but how exactly do I add the append. I added the description limit but simply adding 2 periods after description messes up the site.

Thanks for the help
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #5 on: Feb 22, 10, 02:04 AM

that's simple:
Code:
"DESCRIPTION" => substr($resGames[$nCurGame]["description"], 0, 200).'your string here'
Logged
Customers
Full Member
*

Karma: 0
Posts: 43


Reply #6 on: Feb 23, 10, 02:52 PM

but this method cuts it in 200 characters no matter where ... =/ even in the middle of word
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #7 on: Feb 24, 10, 12:16 AM

that's right. The code which doesn't cut the words would be a bit longer, and I bet you can write it yourself Smiley
Logged
Newbie
*

Karma: 0
Posts: 3


Email
Reply #8 on: Jul 07, 11, 08:23 PM

+1 to Sergey for posting this. I searched all day trying to find that line of code. I would ahve had to post for an answer anyway but I was really happy to find it here.
Thanx, BW
Logged
Pages: [1]
 
Jump to: