X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=inc%2Fsmarty%2Fnode_methodz%2Ffunction.gnodes.php;fp=inc%2Fsmarty%2Fnode_methodz%2Ffunction.gnodes.php;h=89d70afecac58fb1688865e8085a05670ddf57d4;hb=b42b2bf946332ad8544d53f610be9cb05e80bf56;hp=0000000000000000000000000000000000000000;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/inc/smarty/node_methodz/function.gnodes.php b/inc/smarty/node_methodz/function.gnodes.php new file mode 100644 index 0000000..89d70af --- /dev/null +++ b/inc/smarty/node_methodz/function.gnodes.php @@ -0,0 +1,23 @@ +function smarty_function_get_nodes_by_external_link($params,&$smarty) { + +if ($params['orderby']=='desc') $orderby="desc"; else $orderby="asc"; +echo 'xxxxxxxxxxxxxxxx'; +$external_link=$params['external_link']; +if ($params['listing_amount']=='all') +$listing_amount='23232323232323323'; +else $listing_amount=$params['listing_amount']; + +if (empty($params['offset'])) $offset=0; +else $offset=$params['offset']; + +global $db,$node; + +$q="select users.*,nodes.*,node_content.* from nodes left join +node_content on (node_content.node_id=nodes.node_id) left +join users on users.user_id=nodes.node_creator where external_link like '$external_link%' order by node_created $orderby LIMIT $offset,$listing_amount"; + +$set=$db->query($q); +while ($set->next()) $pole[]=$set->getRecord(); +$smarty->assign('get_nodes_by_external_link',$pole); +} +?> \ No newline at end of file