Forum Replies Created

Viewing 15 posts - 811 through 825 (of 1,871 total)
  • Author
    Posts
  • in reply to: strip_desc for Chinese and Korean languages

    It will trim the desciption by characters and not by words.

    in reply to: strip_desc for Chinese and Korean languages

    Your posts are caught as spam. Thats the reason.

    Anyways, you can try the change below.

    In feed.php, find and replace

    $desc = wp_trim_words( $desc, $strip_desc );

    with this

    $desc = mb_substr( $desc, 0, $strip_desc, "utf-8" );

    Thanks,
    Aakash

    in reply to: strip_desc for Chinese and Korean languages

    Hi Ed,

    As you have mentioned in the comments below

    It’s not working with these languages. In these examples there is no spaces or a few of them. That’s why the plugin counts it as 1 word:
    你是否注意过每天在我们城市工作的环卫工人?他们几点钟起床,几点钟下班?一个环卫工人每天需要捡多少垃圾?这个视频带你体验环卫工人一天的日常

    Thai language: 2 spaces, and 3 words as your plugin counts it.
    บทสัมภาษณ์ระหว่างนักแสดงชายที่พึ่งสูญเสียเพื่อน กับหนึ่งในอาสมัครจากองค์กรสะมาริตันส์ที่ให้บริการทางด้านให้การปรึกษา และเชื่อว่าการฟังด้วยใจจะช่วยทั้งตนเองและผู้อื่น

    It’s better to trim by characters and add this ability in the shortcode.

    As I understand, in your case if strip desc is set to 50 then the content is more right ? You want it to be shorter as in some languages 1 word is longer.

    In that case, can you please set strip desc to 3 or 4 ? so that the description length is smaller.

    Please correct me if I misunderstood.

    Thanks,
    Aakash

    in reply to: strip_desc for Chinese and Korean languages

    Hi Ed,

    Super RSS Reader already uses wp_trim_words to trim text of any language. Please see link below.

    https://plugins.trac.wordpress.org/browser/super-rss-reader/trunk/includes/feed.php#L180

    wp_trim_words trims even if the language uses single character as a word. See description below.

    This function is localized. For languages that count ‘words’ by the individual character (such as East Asian languages), the $num_words argument will apply to the number of individual characters.

    I do not understand east asian languages. Please give an example on what your are expecting. That would be helpful.

    Thanks,
    Aakash

    in reply to: Change the thumbnail tag

    Cheers !

    in reply to: Change the thumbnail tag

    Instead of this
    $a = explode('KB', $desc);

    use this
    $a = preg_split('/ (KB|MB) /', $desc);

    in reply to: Change the thumbnail tag

    Revert back the change I last asked.

    Now, paste these lines

    $a = explode('KB', $desc);
    if(count($a) > 1){
    	$desc = $a[1];
    }else{
    	$desc = $a[0];
    }

    after this line

    $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );

    in reply to: Change the thumbnail tag

    Please hold on..

    in reply to: Change the thumbnail tag

    Can you please try the suggestion I have mentioned earlier ?

    in reply to: Change the thumbnail tag

    Is it possible to remove it in the RSS feed itself ?

    RSS reader will display the description as is. The plugin has no idea about the text.

    Other suggestion I can think of is in feed.php search for below line

    $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );

    and replace it with below

    $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ), '<span>' ) ) );

    Then use the CSS .informations{display: none}

    Thanks,
    Aakash

    in reply to: Change the thumbnail tag

    Hi @Ed,

    Sorry I was not aware that you used the PRO version.

    Good that you were able to change the 3 lines yourself.

    Regarding the additional text, that is coming from the RSS feed.
    You can use CSS to hide it.

    Can you please share me the page where it is used ?

    I’ll suggest CSS to hide them.

    in reply to: Change the thumbnail tag

    You’ve made the change incorrectly.
    Please copy full file from here – https://pastebin.com/vv0BcFD2

    in reply to: Change the thumbnail tag

    Ok.. you have to edit the code a bit. I haven’t tested, but you can give a try.

    Replace lines 275, 276 and 277 like below in
    https://plugins.trac.wordpress.org/browser/super-rss-reader/trunk/includes/feed.php#L275

    275	        if( !empty( $urls ) && isset( $urls[1] ) ){
    276	            return $urls[1];
    277	        }

    Here you can change 1 to n-1th image you would like to pick. i.e if 2nd image then 1. if 3rd then 2.

    Please disable the plugin before making any modification.

    Thanks,
    Aakash

    in reply to: Change the thumbnail tag

    Hi,

    If image is not found in the first 3 locations then the image will be picked from the tag present in the description.

    Please do try the RSS feed and see if you are getting the expected image.

    Thanks,
    Aakash

    Cheers !

Viewing 15 posts - 811 through 825 (of 1,871 total)

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter