*

russia

  • **
  • 15 posts
feedback_list = infinity on page
« on: October 01, 2017, 08:01:31 AM »
hello,

feedback_list is is becoming very large, can't scroll,
<?php echo show_feedback_list(); ?>

how will i ,  stop that,     

how to show 1,2,3   just like that option,  if feedback list is becoming very large,,


Feedback given to user russia

*

MB Themes

Re: feedback_list = infinity on page
« Reply #1 on: October 01, 2017, 03:03:16 PM »
You can limit height of box with feedbacks and set scroll here.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ivanko

  • *****
  • 388 posts
Re: feedback_list = infinity on page
« Reply #2 on: October 05, 2017, 09:37:16 AM »
hello,

feedback_list is is becoming very large, can't scroll,
<?php echo show_feedback_list(); ?>

how will i ,  stop that,     

how to show 1,2,3   just like that option,  if feedback list is becoming very large,,


Feedback given to user russia


1. model/ModelFP.php ->add $limit=5 + dao limit

find:
Code: [Select]
<?php
public function getFeedbackByUserId($user_id$active) {
$this->dao->select('s.*, u.s_name as user_name');
$this->dao->from$this->getTable_UserBO() . ' s, ' $this->getTable_User() . ' u' );
$this->dao->where's.user_id = u.pk_i_id' );
$this->dao->where's.active'$active );

if(
$user_id <> '' and $user_id <> 0) {
$this->dao->where's.user_id'$user_id );
}
$this->dao->orderBy('s.pub_date DESC');
$result $this->dao->get();
if( !
$result ) { return array(); }

$prepare $result->result();
return 
$prepare;
}
?>



replace with:
Code: [Select]
<?php
public function getFeedbackByUserId($user_id$active$limit 5) {
$this->dao->select('s.*, u.s_name as user_name');
$this->dao->from$this->getTable_UserBO() . ' s, ' $this->getTable_User() . ' u' );
$this->dao->where's.user_id = u.pk_i_id' );
$this->dao->where's.active'$active );

if(
$user_id <> '' and $user_id <> 0) {
$this->dao->where's.user_id'$user_id );
}
$this->dao->orderBy('s.pub_date DESC');

$this->dao->limit$limit );

$result $this->dao->get();
if( !
$result ) { return array(); }

$prepare $result->result();
return 
$prepare;
}
?>


2. form/form_feedback_list.php add $limit

find:
Code: [Select]
<?php 
$feedback 
ModelFB::newInstance()->getFeedbackByUserId($user_id1);
?>


replace with:
Code: [Select]
<?php 
$feedback 
ModelFB::newInstance()->getFeedbackByUserId($user_id1$limit );
?>


3. function/feedback.php add $limit = 5

find:
Code: [Select]
<?php 
function show_feedback_list () {
include_once 
ABS_PATH 'oc-content/plugins/backoffice_manager/form/form_feedback_list.php';
}
?>


replace with:
Code: [Select]
<?php 
function show_feedback_list ($limit 5) {
include_once 
ABS_PATH 'oc-content/plugins/backoffice_manager/form/form_feedback_list.php';
}
?>



4. NOW in item.php
Code: [Select]
<?php echo show_feedback_list(); ?> now = 5

or
Code: [Select]
<?php echo show_feedback_list(3); ?>now = 3

etc...

@frosticek
may be suggestion for next update ?
« Last Edit: October 05, 2017, 09:50:53 AM by Ivanko »

*

MB Themes

Re: feedback_list = infinity on page
« Reply #3 on: October 05, 2017, 11:05:01 AM »
Look nice
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots