| View previous topic :: View next topic |
| Author |
Message |
crownin
Joined: 26 Dec 2010 Posts: 48
|
Posted: Jan 12, 2011 3:09 pm Post subject: How to set max length for file names ? |
|
|
How to set max length for file names ?
Thanks. |
|
| Back to top |
|
 |
admin Site Admin

Joined: 22 Mar 2006 Posts: 1283
|
Posted: Jan 13, 2011 8:59 am Post subject: |
|
|
| There's no such functionality. |
|
| Back to top |
|
 |
ankurs
Joined: 10 Mar 2009 Posts: 605
|
Posted: Jan 13, 2011 10:03 am Post subject: |
|
|
| admin wrote: | | There's no such functionality. |
can this be added in future version ?
or can characters be limited while displaying on download page |
|
| Back to top |
|
 |
crownin
Joined: 26 Dec 2010 Posts: 48
|
Posted: Jan 13, 2011 12:26 pm Post subject: |
|
|
| isn't there any simple code for it ? because it is a must that you can limit characters.. it looks really unprofessional at download pages.. |
|
| Back to top |
|
 |
nyan
Joined: 28 Oct 2010 Posts: 121
|
|
| Back to top |
|
 |
crownin
Joined: 26 Dec 2010 Posts: 48
|
Posted: Jan 15, 2011 12:50 pm Post subject: |
|
|
Could you please tell me where to put the code exactly ? Because I can't find it by myself... i'm noob ..
Last edited by crownin on Feb 05, 2011 11:07 am; edited 1 time in total |
|
| Back to top |
|
 |
crownin
Joined: 26 Dec 2010 Posts: 48
|
Posted: Feb 05, 2011 11:07 am Post subject: |
|
|
| Bump... still no answers... |
|
| Back to top |
|
 |
krazyloads
Joined: 05 Oct 2010 Posts: 27
|
Posted: Feb 06, 2011 11:18 am Post subject: |
|
|
Hi,
If you need to display a limited number of characters it can be done using Jquery
| Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>untitled</title>
<style type="text/css" media="screen">
.hide{
display: none;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
var $elem = $('p'); // The element or elements with the text to hide
var $limit = 10; // The number of characters to show
var $str = $elem.html(); // Getting the text
var $strtemp = $str.substr(0,$limit); // Get the visible part of the string
$str = $strtemp + '<span class="hide">' + $str.substr($limit,$str.length) + '</span>'; // Recompose the string with the span tag wrapped around the hidden part of it
$elem.html($str); // Write the string to the DOM
})
</script>
</head>
<body>
<p>Some random line........</p>
</body>
</html>
|
|
|
| Back to top |
|
 |
crownin
Joined: 26 Dec 2010 Posts: 48
|
Posted: Feb 06, 2011 6:06 pm Post subject: |
|
|
| krazyloads wrote: | Hi,
If you need to display a limited number of characters it can be done using Jquery
| Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>untitled</title>
<style type="text/css" media="screen">
.hide{
display: none;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
var $elem = $('p'); // The element or elements with the text to hide
var $limit = 10; // The number of characters to show
var $str = $elem.html(); // Getting the text
var $strtemp = $str.substr(0,$limit); // Get the visible part of the string
$str = $strtemp + '<span class="hide">' + $str.substr($limit,$str.length) + '</span>'; // Recompose the string with the span tag wrapped around the hidden part of it
$elem.html($str); // Write the string to the DOM
})
</script>
</head>
<body>
<p>Some random line........</p>
</body>
</html>
|
|
hi krazyloads thanks for helping me on this mate
I have tried to put this code into download0.html but nothing happens :
| Quote: | <style type="text/css" media="screen">
.hide{
display: none;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
var $elem = $('p'); // The element or elements with the text to hide
var $limit = 10; // The number of characters to show
var $str = $elem.html(); // Getting the text
var $strtemp = $str.substr(0,$limit); // Get the visible part of the string
$str = $strtemp + '<span class="hide">' + $str.substr($limit,$str.length) + '</span>'; // Recompose the string with the span tag wrapped around the hidden part of it
$elem.html($str); // Write the string to the DOM
})
</script> |
Im sorry i'm a newbie at this, Could you please explain me step by step what to do or could I maybe have your email so I could contact you on messenger, That would be way easier. Thanks !  |
|
| Back to top |
|
 |
|