Do not remember me!
/ / / How Hide image short_story

How Hide image short_story

Goods,

I need you help to Hide the images in tag { short_story }, i try with { short_story limit="x" }, but bbcode style is lost.

Thanks for you time,

GuilleOz Added by: in PHP Questions on
if you use short-story limit then it will completely remove all html tags so you can "hide" images instead of remove it since you can't psychically remove it unless you edit article one by one...so you can do it in a few ways...
1) use css to hide image using display:none, for example wrap css around shortstory like
<div class="my-short">{short-story} </div>
then add css in one of your css file
.my-short img{display:none}

2) using jquery to add remove() function to your shortstory block, for example
<div class="my-short">{short-story} </div>
then add this css in one of your js file like this
$('.my-short > img').remove();
if not working then try
$(document).ready(function(){
$('.my-short > img').remove();
});
if still not working then try to add this before in your theme main.tpl
<script type="text/javascript">
$(document).ready(function(){
$('.my-short > img').remove();
});
</script>
Answered by: yorismith



0

Comments 2

  1. yorismith
    +1
    yorismith Currently Offline → 12 June 2015 13:16

    if you use short-story limit then it will completely remove all html tags so you can "hide" images instead of remove it since you can't psychically remove it unless you edit article one by one...so you can do it in a few ways...
    1) use css to hide image using display:none, for example wrap css around shortstory like
    <div class="my-short">{short-story} </div>
    then add css in one of your css file
    .my-short img{display:none}

    2) using jquery to add remove() function to your shortstory block, for example
    <div class="my-short">{short-story} </div>
    then add this css in one of your js file like this
    $('.my-short > img').remove();
    if not working then try
    $(document).ready(function(){
    $('.my-short > img').remove();
    });
    if still not working then try to add this before < /body> in your theme main.tpl
    <script type="text/javascript">
    $(document).ready(function(){
    $('.my-short > img').remove();
    });
    </script>
     N/A |  45
  2. GuilleOz
    0
    GuilleOz Currently Offline → 12 June 2015 16:48

    Quote: yorismith
    .my-short img{display:none}


    I try with:
    <div class="my-short">{short-story} </div>

    And add in my css style:
    .my-short img{display:none}


    And working perfectly!!

    Thanks!
     1 |  1

Information

Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.