Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: render_comments klaida

Parašė JaWa· 2012 Lie. 31 10:07:23
#1

Sveiki. Aš mėginu padaryti, kad video įrašus galerijoje galima butu pakuomentuoti atskirame lange. Pavyzdžiui: paspaudi ant nuorodos, iššoka atskiras langas su komentavimu, ten kuomentuoji, ir vėliau uždarai langą.

Aš sukuriau komentarai.php failą su tokiu turiniu, tačiau man išmeta klaidą.


<?php
require_once "maincore.php";
include INCLUDES."comments_include.php";
 
// Emulate register_globals on
if (!ini_get('register_globals')) {
    $superglobals = array($_SERVER, $_ENV,
        $_FILES, $_COOKIE, $_POST, $_GET);
    if (isset($_SESSION)) {
        array_unshift($superglobals, $_SESSION);
    }
    foreach ($superglobals as $superglobal) {
        extract($superglobal, EXTR_SKIP);
    }
    ini_set('register_globals', true);
}
 
 
$result = dbquery("SELECT * FROM ".$db_prefix."videos");
while ($data=dbarray($result)) {
 
$video_info = array("video_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='V' AND comment_item_id='".$data['video_id']."'"),);
 
echo "".$locale['999'].$poll_info['video_comments']."";
 
showcomments("V",DB_VIDEOS,"video_id",$video_id,FUSION_SELF."?video_id=$video_id");
}
 
//showcomments("V", DB_VIDEOS, "video_id", $_GET['video_id'], FUSION_SELF."?video_id=".$_GET['video_id']);
?>


Fatal error: Call to undefined function render_comments() in /usr/home/www1/ftp/illegal/includes/comments_include.php on line 171

Kažkaip reikia užrenderinti komentarus ... :/

Parašė minimukas· 2012 Rugp. 2 13:08:00
#2

jawa pamegink atisdaryti theme.php faila ir susirask:

function render_news($subject, $news, $info) {

virs jo dek:

function render_comments($c_data, $c_info){
    global $locale;
    opentable($locale['c100']);
    if (!empty($c_data)){
       echo "<div class='comments floatfix'>\n";
          $c_makepagenav = '';
          if ($c_info['c_makepagenav'] !== FALSE) { 
          echo $c_makepagenav = "<div style='text-align:center;margin-bottom:5px;'>".$c_info['c_makepagenav']."</div>\n"; 
       }
          foreach($c_data as $data) {
          echo "<div class='tbl2'>\n";
          if ($data['edit_dell'] !== FALSE) { 
             echo "<div style='float:right' class='comment_actions'>".$data['edit_dell']."\n</div>\n";
          }
          echo "<a href='".FUSION_REQUEST."#c".$data['comment_id']."' id='c".$data['comment_id']."' name='c".$data['comment_id']."'>#".$data['i']."</a> |\n";
          echo "<span class='comment-name'>".$data['comment_name']."</span>\n";
          echo "<span class='small'>".$data['comment_datestamp']."</span>\n";
          echo "</div>\n<div class='tbl1 comment_message'>".$data['comment_message']."</div>\n";
       }
       echo $c_makepagenav;
       if ($c_info['admin_link'] !== FALSE) {
          echo "<div style='float:right' class='comment_admin'>".$c_info['admin_link']."</div>\n";
       }
       echo "</div>\n";
    } else {
       echo $locale['c101']."\n";
    }
    closetable();   
 }

Parašė JaWa· 2012 Rugp. 3 15:08:33
#3

minimukas, theme.php faile pasmane jau yra ši funkcija .. :)

Parašė Žmogus· 2012 Rugp. 7 21:08:33
#4

Įdomiai, o kaip jeigu pabandytum su kokiom naujienom ar pnš irgi tą pati meta?