ReadMore Download 5.1

This component/theme works with latest OSSN version.
German Arsalan Shah 2 weeks 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
Pashto / Pushto Abd ishtaya Replied 3 days 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 3 days 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 3 days ago

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

German ~Z~ Man Replied 5 days ago

James,
are there any news regarding your issue?

German ~Z~ Man Replied 5 days 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.

Pashto / Pushto Abd ishtaya Replied 6 days ago

for comment in any post read more just append this data in components\ReadMore\plugins\default\js
eadmore.php

Ossn.RegisterStartupFunction(function(){
$(document).ajaxComplete(function(event, xhr, settings) {
var $url = window.location.href;
$pagehandler = $url.replace(Ossn.site_url, '');
$tocheck = ['home', 'user'];
if($tocheck.includes($pagehandler)){
$('.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 7 days ago

Why not work for comments

gb JAMES PACKER Replied 2 weeks ago

scrap that its still doing it, i have messaged you on softlab24

gb JAMES PACKER Replied 2 weeks ago

ok i have it working now, not sure what the problem was over all, but i did have code in the top bar for sharing buttons. i took that off . now it works fine. i do have a further issue which i think i will mention on softlab24 to you .thanks

German Arsalan Shah Replied 2 weeks ago

@James i tried to test on social theme using firefox and i don't see any reload/refresh. You may send me a video capture to our email.

Component

Developer: Arsalan
License ossnv3
Type: Tools
Minimum Requirement: 5.2
Latest Version: 5.1
Last Updated 7 days ago
Repository Url View Repository

Versions