I'm a new user of phpmyfaq,i really like it. But i have a problem:
all of the numbers of "Records in this category" ,"Tags" ,"Sticky FAQs" are listed on artikel page. this makes the page much too long. How can i control the list number.
sorry for my poor english
how to control the list number ......
Moderator: Thorsten
Re: how to control the list number ......
Hi,
do you mean the number of entries?
bye
Thorsten
do you mean the number of entries?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: how to control the list number ......
I mean do not to display all records in "Records in this category"
Re: how to control the list number ......
May be here
function showAllRecordsWoPaging($category) {
global $sids, $PMF_CONF, $tree;
$now = date('YmdHis');
$query = '
SELECT
fd.id AS id,
fd.lang AS lang,
fd.thema AS thema,
fcr.category_id AS category_id,
fv.visits AS visits
FROM
'.SQLPREFIX.'faqdata fd
LEFT JOIN
'.SQLPREFIX.'faqcategoryrelations fcr
ON
fd.id = fcr.record_id
AND
fd.lang = fcr.record_lang
LEFT JOIN
'.SQLPREFIX.'faqvisits fv
ON
fd.id = fv.id
AND
fv.lang = fd.lang
LEFT JOIN
'.SQLPREFIX.'faqdata_group fdg
ON
fd.id = fdg.record_id
LEFT JOIN
'.SQLPREFIX.'faqdata_user fdu
ON
fd.id = fdu.record_id
WHERE
fd.date_start <= \''.$now.'\'
AND
fd.date_end >= \''.$now.'\'
AND
fd.active = \'yes\'
AND
fcr.category_id = '.$category.'
AND
fd.lang = \''.$this->language.'\'
ORDER BY
fd.id';
$result = $this->db->query($query);
$output = '<ul class="phpmyfaq_ul">';
while (($row = $this->db->fetch_object($result))) {
$title = $row->thema;
$url = sprintf('%saction=artikel&cat=%d&id=%d&artlang=%s',
$sids,
$row->category_id,
$row->id,
$row->lang);
$oLink = new PMF_Link(PMF_Link::getSystemRelativeUri().'?'.$url);
$oLink->itemTitle = $row->thema;
$oLink->text = $title;
$oLink->tooltip = $title;
$listItem = sprintf('<li>%s</li>', $oLink->toHtmlAnchor(), $this->pmf_lang['msgViews']);
$listItem = '<li>'.$oLink->toHtmlAnchor().'</li>';
$output .= $listItem;
}
$output .= '</ul>';
return $output;
}
how can i add a Parameter to control how many records list. For example i only want it to display 10 records.
function showAllRecordsWoPaging($category) {
global $sids, $PMF_CONF, $tree;
$now = date('YmdHis');
$query = '
SELECT
fd.id AS id,
fd.lang AS lang,
fd.thema AS thema,
fcr.category_id AS category_id,
fv.visits AS visits
FROM
'.SQLPREFIX.'faqdata fd
LEFT JOIN
'.SQLPREFIX.'faqcategoryrelations fcr
ON
fd.id = fcr.record_id
AND
fd.lang = fcr.record_lang
LEFT JOIN
'.SQLPREFIX.'faqvisits fv
ON
fd.id = fv.id
AND
fv.lang = fd.lang
LEFT JOIN
'.SQLPREFIX.'faqdata_group fdg
ON
fd.id = fdg.record_id
LEFT JOIN
'.SQLPREFIX.'faqdata_user fdu
ON
fd.id = fdu.record_id
WHERE
fd.date_start <= \''.$now.'\'
AND
fd.date_end >= \''.$now.'\'
AND
fd.active = \'yes\'
AND
fcr.category_id = '.$category.'
AND
fd.lang = \''.$this->language.'\'
ORDER BY
fd.id';
$result = $this->db->query($query);
$output = '<ul class="phpmyfaq_ul">';
while (($row = $this->db->fetch_object($result))) {
$title = $row->thema;
$url = sprintf('%saction=artikel&cat=%d&id=%d&artlang=%s',
$sids,
$row->category_id,
$row->id,
$row->lang);
$oLink = new PMF_Link(PMF_Link::getSystemRelativeUri().'?'.$url);
$oLink->itemTitle = $row->thema;
$oLink->text = $title;
$oLink->tooltip = $title;
$listItem = sprintf('<li>%s</li>', $oLink->toHtmlAnchor(), $this->pmf_lang['msgViews']);
$listItem = '<li>'.$oLink->toHtmlAnchor().'</li>';
$output .= $listItem;
}
$output .= '</ul>';
return $output;
}
how can i add a Parameter to control how many records list. For example i only want it to display 10 records.
Re: how to control the list number ......
问题已经解决了,感谢你们提供那么好的程序.
I've solved the problem.Thank you for providing such good program

I've solved the problem.Thank you for providing such good program