*

Recent

Author Topic: Game Description  (Read 2425 times)

am-fs

  • Owner
  • Developer
  • Full Member
  • ******
  • Posts: 228
  • Force: +1/-0
    • Great Flash Games
Game Description
« on: October 23, 2011, 03:27:05 PM »
Like to shorting the description on the games on home page

Code: [Select]
<td valign=\'top\' class=\'content\'>'.browsedesclimit($in['description']).'</td>
where is the browsedesclimit setting at?

Also like to add a full screen link on the play game page
how can i do that?
Code: [Select]
<a href=\''.$playlink.'\' class=\'playlink\'><b>Full Screen</b></a>

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Game Description
« Reply #1 on: October 23, 2011, 05:36:47 PM »
its in /includes/functions.php ...

look for it..
Code: [Select]
function browsedesclimit($str, $n =30, $end_char = '&#8230;')
{
if (strlen($str) < $n){
return $str;
}
$words = explode(' ', preg_replace("/\s+/", ' ', preg_replace("/(\r\n|\r|\n)/", " ", $str)));
if (count($words) <= $n){
return $str;
}
$str = '';
for ($i = 0; $i < $n; $i++){
$str .= $words[$i].' ';
}
return trim($str).$end_char;
}

fullscreen..
Code: [Select]
<script language="javascript" type="text/javascript">
function popitup(url) {
newwindow=window.open(url,'name','height=100%,width=100%');
if (window.focus) {newwindow.focus()}
return false;
}
</script>
__________________
<a href="#" onclick="return popitup('URL_TO_GAME_FILE')">Full screen!</a>