about related posts

Need some help with the script?

about related posts

Postby hadisaadeh » Tue May 19, 2009 7:54 am

i have this code
<?


if ($id and $ucat){
$static['template'] = 'titles';
$static['number'] = 5;
$static['category'] = $ucat;
include $cutepath.'/show_news.php';
}?>



how to show only the older posts than one shown in details ...
only older related posts
hadisaadeh
 
Posts: 121
Joined: Sat Sep 29, 2007 2:50 pm

Re: about related posts

Postby Mania » Tue May 19, 2009 10:44 am

hadisaadeh wrote:i have this code
<?


if ($id and $ucat){
$static['template'] = 'titles';
$static['number'] = 5;
$static['category'] = $ucat;
include $cutepath.'/show_news.php';
}?>



how to show only the older posts than one shown in details ...
only older related posts

what is related Post?
User avatar
Mania
 
Posts: 178
Joined: Sat Feb 03, 2007 1:12 pm

Postby hadisaadeh » Tue May 19, 2009 10:53 am

see http://www.arraid.info/ar/index.php?pag ... 171&butt=5

bellow there are 5 posts which are related to the topic 171

i need them to be the older ones from 171
not newer than 171
hadisaadeh
 
Posts: 121
Joined: Sat Sep 29, 2007 2:50 pm

help?

Postby hadisaadeh » Wed May 27, 2009 4:29 pm

help?
hadisaadeh
 
Posts: 121
Joined: Sat Sep 29, 2007 2:50 pm

Postby Partyism » Wed May 27, 2009 5:41 pm

i dont know exactly what you mean but try in your include code skip="1" ?
Partyism
 
Posts: 399
Joined: Tue Sep 25, 2007 6:24 pm

i am trying

Postby hadisaadeh » Wed May 27, 2009 5:50 pm

i am trying
please the issue is very easy

i need to show the older posts (or articles) from the current one
hadisaadeh
 
Posts: 121
Joined: Sat Sep 29, 2007 2:50 pm

Postby FI-DD » Sat Jun 06, 2009 10:31 pm

Try this:

1. Change your include code to this:
Code: Select all
<?
if ($id and $ucat){
$static['template'] = 'titles';
$static['number'] = 5;
$static['category'] = $ucat;
$only_older = true;
include $cutepath.'/show_news.php';
$only_older = false;
}
?>


2. In inc/show.news.php find this:
Code: Select all
foreach ($query as $bg => $row){


and add below:
Code: Select all
if($only_older and $row['id'] >= $id) continue;
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

good - good

Postby hadisaadeh » Sat Jun 06, 2009 11:13 pm

many thanks
really great
please i have a question , i need to put the previous polls in the script
please see the poll used
http://www.arraid.info/en/index.php?pagess=home&butt=1
see the left corner
hadisaadeh
 
Posts: 121
Joined: Sat Sep 29, 2007 2:50 pm


Return to Help



Who is online

Users browsing this forum: No registered users and 2 guests

cron