ReadMore Download 5.1

This component/theme works with latest OSSN version.
German ~Z~ Man 6 months ago

This will make the lengthy contents in newsfeed smaller and ads button to show more text. (posts contents only).

This is a fork of existing component readmore (by Sathish Kumar ) which was marked not working. Please delete old readmore before using this one.

This component is updated to make it work with 5.x , doesn't change the effects on images as someusers complained they see a large images in newsfeed page, so to keep this point i didn't touched the images part.

v5.1
- Disable auto close of old readmore when new posts loaded.

Comments
German ~Z~ Man Replied 3 weeks ago

@ALL who are waiting for a working localization:

A ReadMore update with a complete set of language files will be available as soon as Ossn 5.3 has been released.

German Homer Simpson Replied 3 months ago

it doesn't also translate into German.
Maybe, you could intall translations with the next update. As any users also have written, you'll see the words "read more" and "close" also in the German translation.
The German words have to be "Weiterlesen" and "beenden"

Breton William Silva Replied 4 months ago

Hello,
I can't translate into Portuguese

gb SzSocial Media Replied 4 months ago

Hi, is it possible to get the component to at like Facebook does when it only shortens posts when a post contains over a certain amount of text? Thanks

German Holger A. Replied 5 months ago

Hi, the component doesn't work in German, althouhgh there's a German language file available. Only the English words (Read more / close) will be shown in the German OSSN, but not the German translation "Mehr anzeigen" / "weniger".

Pashto / Pushto Abd ishtaya Replied 6 months ago

..

Ossn.RegisterStartupFunction(function(){
        $(document).ajaxComplete(function(event, xhr, settings) {

                    $('.post-contents:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                    $('.blog-body:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                    $('.blog-title:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                    $('.blog-item:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                    $('.message-box-sent:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                    $('.message-box-recieved:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                    $('.comment-text:not([aria-expanded])').readmore({startOpen: false, speed: 100});



        });
        $(document).ready(function(){
                $('.post-contents').readmore({startOpen: false, speed: 100});
                $('.blog-body').readmore({startOpen: false, speed: 100});         
                $('.blog-title').readmore({startOpen: false, speed: 100});
                $('.blog-item').readmore({startOpen: false, speed: 100});
                $('.message-box-sent').readmore({startOpen: false, speed: 100});
                $('.message-box-recieved').readmore({startOpen: false, speed: 100});
                $('.comment-text').readmore({startOpen: false, speed: 100});

        });
    });

..

Pashto / Pushto Abd ishtaya Replied 6 months ago

~Z~ Man
look at this

Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {

                        $('.post-contents:not([aria-expanded])').readmore({startOpen: false, speed: 100});

    });
    $(document).ready(function(){
        $('.post-contents').readmore({startOpen: false, speed: 100});
    });
});  
Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {

                        $('.blog-body:not([aria-expanded])').readmore({startOpen: false, speed: 100});

    });
    $(document).ready(function(){
        $('.blog-body').readmore({startOpen: false, speed: 100});
    });
});  
Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {

                        $('.blog-title:not([aria-expanded])').readmore({startOpen: false, speed: 100});

    });
    $(document).ready(function(){
        $('.blog-title').readmore({startOpen: false, speed: 100});
    });
}); 
Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {

                        $('.blog-item:not([aria-expanded])').readmore({startOpen: false, speed: 100});

    });
    $(document).ready(function(){
        $('.blog-item').readmore({startOpen: false, speed: 100});
    });
}); 
Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {

                        $('.message-box-sent:not([aria-expanded])').readmore({startOpen: false, speed: 100});

    });
    $(document).ready(function(){
        $('.message-box-sent').readmore({startOpen: false, speed: 100});
    });
}); 
Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {

                        $('.message-box-recieved:not([aria-expanded])').readmore({startOpen: false, speed: 100});

    });
    $(document).ready(function(){
        $('.message-box-recieved').readmore({startOpen: false, speed: 100});
    });
}); 




Ossn.RegisterStartupFunction(function(){
$(document).ajaxComplete(function(event, xhr, settings) {

    $('.comment-text:not([aria-expanded])').readmore({startOpen: false, speed: 100});

});
$(document).ready(function(){
$('.comment-text').readmore({startOpen: false, speed: 100});
});
});

..

Pashto / Pushto Abd ishtaya Replied 6 months ago

Can you create a script ( read more) on the blog for title and content ???

German ~Z~ Man Replied 6 months ago

James,
are there any news regarding your issue?

German ~Z~ Man Replied 6 months ago

Good idea Abd ishtaya!
Thanks for contributing.
To simplify things, we can add your 2 extra lines into the old code like:

 Ossn.RegisterStartupFunction(function(){
    $(document).ajaxComplete(function(event, xhr, settings) {
            var $url = window.location.href;
            $pagehandler = $url.replace(Ossn.site_url, '') + '/';
            if($pagehandler.includes('home/') || $pagehandler.includes('u/') || $pagehandler.includes('group/')){
                 $('.post-contents:not([aria-expanded])').readmore({startOpen: false, speed: 100});
                        $('.comment-text:not([aria-expanded])').readmore({startOpen: false, speed: 100});
            }
    });
 $(document).ready(function(){
 $('.post-contents').readmore({startOpen: false, speed: 100});
        $('.comment-text').readmore({startOpen: false, speed: 100});
 });
 }); 

Aside from that I changed the pagehandler code a bit to make Readmore work on Profile and Group pages.

Component

Developer: ~Z~
License ossnv3
Type: Tools
Minimum Requirement: 5.2
Latest Version: 5.1
Last Updated 6 months ago
Repository Url View Repository

Versions