The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
May 21, 2012, 08:34:08 PM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,604 Posts in 625 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto and iRealty v.2.x - 3.x
| |-+  General iAuto Discussions
| | |-+  Ad Details Page
« previous next »
Pages: [1] Print
Author Topic: Ad Details Page  (Read 1936 times)
makr1
Newbie
*

Karma: 0
Posts: 14


View Profile
« on: May 11, 2007, 01:53:56 AM »

Hello, I'm trying to find where the ad details page is?
The problem is that in Sellers Comments, a users can type forever with out pressing enter, and when you view the page, the whole details page widen to the length and make everything sloppy. and also the user can write a whole book in the seller comments field, which is not good. Ive been trying to locate the actual detail page so i can set a table size and maxlenght for the sellers comment box. if you can head me in the right location, so i can make these changes. Thanks
Logged
makr1
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #1 on: May 13, 2007, 12:07:07 AM »

any Help?      Huh
Logged
Smart Girl
Administrator
Full Member
*****

Karma: 5
Posts: 224


View Profile
« Reply #2 on: May 14, 2007, 04:18:29 PM »

We can propose you two ways out:

1. Using JavaScript: we may insert a JavaScript code to control number of symbols. A user will have no possibility to add more symbols that is limited by JS code.

2. Using PHP: A user will be able to add a million of symbols in the Description field, but after clicking the "Save" button and before the ad will be placed on the site, PHP code will cut off excess symbols. In this case you may write about symbol limitation in the header of the "Description" field.
Logged

makr1
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #3 on: May 15, 2007, 06:07:47 AM »

Hello, Thanks for the response
i would like to use the javascript code as thats was what i had in mind. i have a js code for character limit but i wasn't sure on where to implement it.. I'm sure your code might be better than the one i have. if you could please let me know the code and where to add it that would be great .. the other problem i had i figure out,  when using firefox browser when i type in the seller comments textarea i would test it out by entering mmmmmmmmmmmmmmmmm without any spaces and that would cause it not to line break at end of the text box, but if you type normal like mmm mmmmm   mmmm mmm with spaces everything is fine and it line breaks at the end when its suppose too. so this is not a problem because in reality people will type with spaces.
Thanks again
Logged
Smart Girl
Administrator
Full Member
*****

Karma: 5
Posts: 224


View Profile
« Reply #4 on: May 16, 2007, 06:00:27 PM »

makr1,

You need to add the following code to the \system\modules\classifieds\classes\type_declarations\7-textarea.php file before the function inputhtml_area($column) (line #36 approximately):

//added
echo "
<script>
function count_change( id )
{
Msg     = document.getElementById( id ).value;
Msglen  = Msg.length;
MaxLen  = 1000; /*Max symbols allowed*/

   if ( Msglen > MaxLen )
   {
         document.getElementById( id ).value = Msg.substring(0,MaxLen);
   }

}
</script>
";
//end added


and to replace the function inputhtml_area($column) with the following (lines #36-42 approximately):

function inputhtml_area($column)
{
   return "<TEXTAREA onkeyup=count_change('field_limited') onchange=count_change('field_limited') id=\"field_limited\" NAME=\"".$column['id']."_0\" WRAP=\"virtual\" COLS=\"22\" ROWS=\"15\" class=\"text\">"
       .htmlspecialchars(get_value($column,0))
   ."</TEXTAREA>";
}
Logged

makr1
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #5 on: May 17, 2007, 12:01:41 PM »

Hello, the code is giving me some problems,
after i added it, the code make all the pictures on the site not work correctly, (no pics) and when i try to login a user its say:
- Warning: Cannot modify header information - headers already sent by (output started at system/modules/classifieds/classes/type_declarations/7-textarea.php:52) in system/modules/classifieds/classes/misc.php' on line 200
- Warning: Cannot modify header information - headers already sent by (output started at system/modules/classifieds/classes/type_declarations/7-textarea.php:52) in system/modules/classifieds/classes/misc.php' on line 201
i also added the code when i was already login as a user and put some text in the textarea and it work buy stopping text at 1000 limit but all pictures were messed up and when you log out or go to another page i would get that error. so i really could not do much with the code in. let me know if you have a fix for this.
Thanks
Logged
vs
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #6 on: May 18, 2007, 06:05:16 PM »

Hi makr1
We have been mistaken, sorry.

Please, make the following changes in your code:

1. delete the javascript output from   system/modules/clasifieds/classes/type_declarations/7-textarea.php
2. insert into the file  system/modules/main/user/templates/blue/index.tpl    between the tags   <head></head>  the following code:

Code:
{literal}
<script>
function count_change( id )
{
Msg     = document.getElementById( id ).value;
Msglen  = Msg.length;
MaxLen  = 10; /*Max symbols allowed*/

if ( Msglen > MaxLen )
{
    document.getElementById( id ).value = Msg.substring(0,MaxLen);
}

}
</script>
{/literal}

do not forget to add {literal}{/literal} smarty tags, as in the code above!

Good luck.
« Last Edit: May 21, 2007, 03:46:24 PM by Support » Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!