Support Forums

Old 04-28-2006, 12:53 PM   #1
Junior Member
 
 
Join Date: Apr 2006
Posts: 13
Rep Power: 13
NJHomeGuide is on a distinguished road
Default Adding HTML to Short & Long Descriptions

Is there a way to add html to the short and long descriptions of an ad? When I add the html, the program strips all the tags.

Also, where can I modify the characters remaining for short and long descriptions. I can't seem to find it anywhere.

I'm using Developer 3.0.15
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer

Last edited by NJHomeGuide; 04-28-2006 at 12:59 PM.
NJHomeGuide is offline  
Old 04-28-2006, 01:00 PM   #2
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

You set the number of characters allowed in short and long description in the package itself.

In order to stop the stripping of html you will likely have to edit the actual scripts, do you have the developer edition?

On a side note, if your site allows anyone to register and place an ad allowing people to use HTML will give people the opportunity to potential abuse your site and what they put in the description could also ruin the layout for the page it is displayed on. The html markup will likely also count toward the character count when they are entering the descriptions. Just some things to consider.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline  
Old 04-28-2006, 01:20 PM   #3
Junior Member
 
 
Join Date: Apr 2006
Posts: 13
Rep Power: 13
NJHomeGuide is on a distinguished road
Default

I have looked everywhere in the package, but can't find it. It's not in user manual either.

I'm using Developer 3.0.15

I don't want users to add html - only me - perhaps just in the adminstration section. Can that be done?
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
NJHomeGuide is offline  
Old 04-28-2006, 01:25 PM   #4
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by NJHomeGuide
I have looked everywhere in the package, but can't find it. It's not in user manual either.

I'm using Developer 3.0.15

I don't want users to add html - only me - perhaps just in the adminstration section. Can that be done?
Open up one of your packages, its right under where you would enter renewal price, here is pic with it highlighted.
Attached Images
File Type: jpg charactercount.jpg (56.5 KB, 15 views)
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline  
Old 04-28-2006, 02:19 PM   #5
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Ok, if you want to be able to add html from within admin you can try this. I have not tested it so make sure you backup your file 1st.

backup and then Open /administration/modifylisting.php

around line 56 you should see the following..

PHP Code:
$shortdescription filterword($shortdescription);
$shortdescription strip_tags($shortdescription,'<br>');
$shortdescription=eregi_replace("<script[^>]*>.*</script>","",$shortdescription);
$shortdescription=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"," "$shortdescription);
$shortdescription ereg_replace("(\r\n|\n|\r)""<br />"$shortdescription);

$description filterword($description);
$description strip_tags($description,'<br>');
$description eregi_replace("<script[^>]*>.*</script>"," ",$description);
$description ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"," "$description);
$description ereg_replace("(\r\n|\n|\r)""<br />"$description); 
simply comment out the lines that strip tags etc so the above section will look like this when done. Save the file, clear your templates_c directory and see if it will let you add html from admin.

PHP Code:
$shortdescription filterword($shortdescription);
//$shortdescription = strip_tags($shortdescription,'<br>');
//$shortdescription = eregi_replace("<script[^>]*>.*</script>"," ",$shortdescription);
//$shortdescription = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"," ", //$shortdescription);
//$shortdescription = ereg_replace("(\r\n|\n|\r)", "<br />", $shortdescription);

$description filterword($description);
//$description = strip_tags($description,'<br>');
//$description = eregi_replace("<script[^>]*>.*</script>"," ",$description);
//$description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"," ", $description);
//$description = ereg_replace("(\r\n|\n|\r)", "<br />", $description); 
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline  
Old 04-28-2006, 02:51 PM   #6
Junior Member
 
 
Join Date: Apr 2006
Posts: 13
Rep Power: 13
NJHomeGuide is on a distinguished road
Default

Larry - It works. I hope it's ok, but I deleted the commented section.

Thank you for your help.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
NJHomeGuide is offline  
Old 04-28-2006, 02:58 PM   #7
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Glad it worked for ya. Deleting those lines is fine, I suggested commenting them out for the simple fact that if it didnt work it would be easier to restore things to their original form
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline  
Old 04-28-2006, 03:43 PM   #8
Junior Member
 
 
Join Date: Apr 2006
Posts: 13
Rep Power: 13
NJHomeGuide is on a distinguished road
Default

In case someone else wants to do this ... you can add html to the description in admin, however, if you modify in the other mode, the html tags will be stripped.

For me this is not an issue. It does exactly what I need it to do. Thanks again Larry.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
NJHomeGuide is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Feature Item Table to HTML Page art HTML, CSS, and Design Help 11 08-05-2006 03:10 AM
Adding Short Description To Search Results CB v3.1 Questions & Support 5 06-22-2006 04:52 PM
wrapping long descriptions in FF tables munky20 v3.0 Questions & Support 1 04-09-2006 09:04 AM


All times are GMT -4. The time now is 04:03 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0