Problem: when user posts a long description, it will spam the main page and search results.
Let's trim it at two lines (about 190 characters).
Also, this will add strip_tag to main, which doesn't have it currently.
/oc-includes/osclass/helpers/hItems.php
After...
function osc_item_description($locale = "") {
if ($locale == "") $locale = osc_current_user_locale() ;
return osc_item_field("s_description", $locale) ;
}
Add...
function osc_item_description_extract($locale = "") {
if ($locale == "") $locale = osc_current_user_locale() ;
$extract = strip_tags(osc_item_field("s_description", $locale)) ;
if ( strlen($extract) > 193 )
$extract = substr($extract, 0, 190) . '...';
return $extract;
}
/oc-content/themes/modern/main.php
Around line 103, find...
<p><?php echo osc_item_description() ; ?></p>
Replace with...
<p><?php echo osc_item_description_extract(); ?></p>
/oc-content/themes/modern/search-list.php and
/oc-content/themes/modern/search-gallery.php
Around line 52, find...
<p><?php echo osc_highlight( strip_tags( osc_item_description() ) ); ?></p>
Replace with...
<p><?php echo osc_highlight( osc_item_description_extract() ); ?></p>
Now a long description will be trimmed at two lines instead of taking up the whole page.