51ff3226 |
1 | function smarty_function_get_nodes_by_external_link($params,&$smarty) { |
2 | |
3 | if ($params['orderby']=='desc') $orderby="desc"; else $orderby="asc"; |
4 | echo 'xxxxxxxxxxxxxxxx'; |
5 | $external_link=$params['external_link']; |
6 | if ($params['listing_amount']=='all') |
7 | $listing_amount='23232323232323323'; |
8 | else $listing_amount=$params['listing_amount']; |
9 | |
10 | if (empty($params['offset'])) $offset=0; |
11 | else $offset=$params['offset']; |
12 | |
13 | global $db,$node; |
14 | |
15 | $q="select users.*,nodes.*,node_content.* from nodes left join |
16 | node_content on (node_content.node_id=nodes.node_id) left |
17 | join users on users.user_id=nodes.node_creator where external_link like '$external_link%' order by node_created $orderby LIMIT $offset,$listing_amount"; |
18 | |
19 | $set=$db->query($q); |
20 | while ($set->next()) $pole[]=$set->getRecord(); |
21 | $smarty->assign('get_nodes_by_external_link',$pole); |
22 | } |
23 | ?> |