PREMIUM VERSION Social 5.1 Slow load time with 10 Posts (mostly imbedded YouTube video)

Stewart Mitchell Posted in Technical Support 2 months ago

Hi,

Firstly, thank you very much for creating this platform, it's great!

My website takes about 6 seconds to load, hosted in AWS with Cloudlfare in front. I can only show 10 posts, I would like to show all posts without login and pagination after every three posts

Once logged in, the pagination works and shows all posts in a very fast manner.

Please can you help?
.

Replies
Thai Stewart Mitchell Replied 2 months ago

Hi Arsalan,

I cannot get pagination to work on the home screen without user logged in, regardless if I change:
/var/www/html/classes/OssnObject.php
/var/www/html/themes/social/plugins/default/pages/contents/index.php

I'm using the social theme, the site load so slow, people just won't wait for it.

I know your a busy guy, but the advice you gave did not help.

There is no pagination on the home page of Social theme.

Regards & thanks

Stewart

Thai Stewart Mitchell Replied 2 months ago

Many thanks for the quick reply, Im using 5.3 premium downloaded from softlab. Using the social 5.1 theme. No matter what I change I'm limited to only maximum of 10 post until I login. I cannot find what limits the number of posts on the front page without logging in.

I have tried changing ossnviewpagination & themes index.php wall = new OssnWall;
$posts = $wall->searchObject(array(
'type' => 'user',
'distinct' => true,
'subtype' => 'wall',
'limit' => 20,
'orderby' => 'o.guid DESC',
'entities
pairs' => array(
array(
'name' => 'access',
'value' => 2,

But im always limited to 10 posts.

Many thanks again for your help

Regards

Stewart

German Arsalan Shah Replied 2 months ago

That is because you are using 1 year old version. Two different version been released after that. Please update your network to 5.3.

To show pagination every three posts you need to edit the page_limit and also pass the limit to pagination.

https://www.opensource-socialnetwork.org/references/ossn_8lib_8views_8php.html#a781fc073a71d40fdf9002a692c8cc553

The second argument of ossn_view_pagination function takes the total items per page.

Other Questions