Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: comments_include.php

Parašė LeBro· 2008 Lie. 11 22:07:22
#1

ka reikia includint i comments_include.php faila, kad jame rodytu pavyzdziui kad ir kiek narys parases komentaru, kada uzsiregistraves ir pan.

tarkim is profile.php irasius koda, kuris rodo, kiek narys parases komentaru :

<tr><td class='small' width='30%'>".$locale['u042']."</td><td class='small2'>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."</td></tr>




komentaruose skaicius visur lygus 0 :|

Redagavo ramon· 2008 Lie. 11 23:07:05

Parašė ramon· 2008 Lie. 11 23:07:54
#2

Visu pirma isjunk smailus o antra tai reikia rasyti ne $data['user_id'] o $data['comment_name']
pvz:
echo number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['comment_name']."'"));




Kodel?

Pasiziurek i uzklausa:

   $result = dbquery(
      "SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );



Parašė LeBro· 2008 Lie. 11 23:07:08
#3

ramon, dekui :)