Advertisement:

Author Topic: OSClass Wizzard  (Read 3959 times)

Batman90

  • Newbie
  • *
  • Posts: 16
OSClass Wizzard
« on: February 25, 2016, 03:47:00 pm »
Description is too long, also in main listing is problem. How to solve this?

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: OSClass Wizzard
« Reply #1 on: February 25, 2016, 04:28:54 pm »
i don't think that there exist a word which is so long... you can solve this, by adding blanks between the words

or take a look at this: Truncate text with text-overflow

Batman90

  • Newbie
  • *
  • Posts: 16
Re: OSClass Wizzard
« Reply #2 on: February 25, 2016, 07:20:22 pm »
So thgere is no normal solution for this?

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: OSClass Wizzard
« Reply #3 on: February 25, 2016, 07:55:46 pm »
you could try this...

go to ../oc-content/themes/osclasswizards/item.php

Line: ~115 and find
Code: [Select]
<p><?php echo osc_item_description(); ?></p>
replace with
Code: [Select]
<p><?php echo wordwrap(osc_item_description(), 75"<br />\n"true); ?></p>
the second parameter (75) is the given length of the string/word

Batman90

  • Newbie
  • *
  • Posts: 16
Re: OSClass Wizzard
« Reply #4 on: February 25, 2016, 09:47:56 pm »
not working

Code: [Select]
http://kupiprodaj.online/prodaja

luka93

  • Jr. Member
  • **
  • Posts: 82
Re: OSClass Wizzard
« Reply #5 on: February 25, 2016, 10:40:59 pm »
Replace
Code: [Select]
<p><?php echo osc_item_description(); ?></p>
With:
Code: [Select]
<p class="description"><?php echo osc_item_description(); ?></p>
And add this to your CSS file:
Code: [Select]
.description {
    word-break: break-all;
}

luka93

  • Jr. Member
  • **
  • Posts: 82
Re: OSClass Wizzard
« Reply #6 on: February 25, 2016, 10:42:48 pm »
Then it should be like this:

Batman90

  • Newbie
  • *
  • Posts: 16
Re: OSClass Wizzard
« Reply #7 on: February 25, 2016, 11:02:21 pm »
it wont work, i even clean firefox cache.

Batman90

  • Newbie
  • *
  • Posts: 16
Re: OSClass Wizzard
« Reply #8 on: February 25, 2016, 11:04:41 pm »
works when i click on item but on homepage is same.

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: OSClass Wizzard
« Reply #9 on: February 26, 2016, 01:38:40 am »
then edit item-list.php in your thee folder, there you can do the same

pecke

  • Full Member
  • ***
  • Posts: 169
Re: OSClass Wizzard
« Reply #10 on: February 26, 2016, 01:39:01 am »
Give me the code line for desription
Posalji mi deo koda za opis

pecke

  • Full Member
  • ***
  • Posts: 169
Re: OSClass Wizzard
« Reply #11 on: February 26, 2016, 01:43:50 am »
put this and see if that work
ubaci ovo za opis i vidi jel radi
Code: [Select]
<?php echo osc_highlightstrip_tagsosc_item_description() ), 60 ); ?>
this is for premium ads
ovo ti je za premijum oglase

Code: [Select]
<?php echo osc_highlightstrip_tagsosc_premium_description() ), 60 ); ?>

Batman90

  • Newbie
  • *
  • Posts: 16
Re: OSClass Wizzard
« Reply #12 on: February 26, 2016, 03:08:39 pm »
I replaced this
Code: [Select]
<p class="description"><?php echo osc_item_description(); ?></p>
with this
Code: [Select]
<?php echo osc_highlightstrip_tagsosc_item_description() ), 60 ); ?>
and when i click item i have some description 60 letters http://kupiprodaj.online/prodaja/art-collectibles/ewgwegewg_i3 and dots with is not good, also on homepage is still same problem.

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: OSClass Wizzard
« Reply #13 on: February 26, 2016, 03:19:03 pm »
Truncate text with text-overflow and osc_higlight() truncate the text to the given number of signs or width, this is actually not was you want.

the solutions
Code: [Select]
<p><?php echo wordwrap(osc_item_description(), 75"<br />\n"true); ?></p>or
Code: [Select]
<p class="description"><?php echo osc_item_description(); ?></p>
.description {
    word-break: break-all;
}

is that what you want

add this in item.php and loop-list.php this are the files, where the descriptions returned

Batman90

  • Newbie
  • *
  • Posts: 16
Re: OSClass Wizzard
« Reply #14 on: February 26, 2016, 03:28:55 pm »
works, thanks :)