Advertisement:

Author Topic: (solved)How to make only two lines of AD's descreption ?  (Read 894 times)

falouche

  • Newbie
  • *
  • Posts: 38
(solved)How to make only two lines of AD's descreption ?
« on: March 14, 2015, 11:18:05 pm »
Hi

my problemme is that I want  to have only two lines in description of AD not four lines (look at the picture below)
so the Ad take only two lines.

Thanks for someone to help me.
« Last Edit: March 21, 2015, 06:40:26 am by falouche »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: How to make only two lines of AD's descreption ?
« Reply #1 on: March 15, 2015, 12:21:36 am »
Hi

Notice that ones have four lines while others only three. Problem is that characters have different width, so it's quite hard to PHP to know where to trim a text.

If you wantt instead 2 or 3 max. look inside your theme for

osc_highlight( osc_item_description() ,250)

and

osc_highlight( osc_premium_description(), 250 )

and change 250 to a minor value, experiment until you find a good balance.

There's is also a way to limit an element to exactly two lines using CSS, but i would be trickier and text might appear unnaturally cut (no ellipsis and, see here, use the Zoom of your browser -CTRL+mousewheel- to see how this might fail in some circumnstances)

Regards

falouche

  • Newbie
  • *
  • Posts: 38
Re: How to make only two lines of AD's descreption ?
« Reply #2 on: March 20, 2015, 04:14:20 am »
Hi

I looking for these two line of code

Code: [Select]
osc_highlight( osc_item_description() ,250)
and
Code: [Select]
osc_highlight( osc_premium_description(), 250 )
but unfortunally I didn't found theme in main.php
can you tell me where they are ?

thanks

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: How to make only two lines of AD's descreption ?
« Reply #3 on: March 20, 2015, 01:07:12 pm »
Hi,

Look only for osc_highlight( osc_item_description() inside bender/loop-single.php and osc_highlight( osc_premium_description() inside bender/loop-single-premium.php

Regards

falouche

  • Newbie
  • *
  • Posts: 38
solved How to make only two lines of AD's descreption ?
« Reply #4 on: March 21, 2015, 06:39:43 am »
thank you

Solved