Dreamweaver Friendly Links There are three ways to call all friendship links, picture friendship links and text friendship links. We can add a function, the limit attribute, on the basis of the above three methods.

Limit attribute description:

Limit='start, end' indicates the limited record range. The row attribute must be equal to "end start". The limit statement of MySQL starts from 0. For example, "limit 0,5" means to take the first five records, and "limit 5,5" means to take the fifth record. Take the next five records. After using this attribute, the row attribute will be invalid.

Modification method:

Open the/include/taglib/link.lib.php file

find

$attlist="type|textall,row|24,titlelen|24,linktype|1,typeid|0";

Modify to

$attlist="type|textall,row|24,titlelen|24,linktype|1,typeid|0,limit|0,10";

find

$equery = "SELECT * FROM mubanpu_flink $wsql order by sortrank asc limit 0,$totalrow";

Modify to

if(!$limit){
$equery = "SELECT * FROM mubanpu_flink $wsql order by sortrank asc limit 0,$totalrow";
}else{
$equery = "SELECT * FROM mubanpu_flink $wsql order by sortrank asc limit $limit";
}

Call method:

{dede:flink limit='0,7' type='text' typeid="0"}[field:link /]{/dede:flink}
{dede:flink limit='7,7' type='text' typeid="0"}[field:link /]{/dede:flink}

Related content:

Post reply

Can't comment until