Adding comment boxs to my results page

How would i go about adding comments from the sites module pages to all the links in my search engine here is part of my updated script for searchkeywords.php

<?php foreach ($infos as $info) { ?>

    <div class="info"><?php e($info); ?></div>
<?php } ?>

 <div class="disignBoxFirst bx-def-margin-top bx-def-border" id="search_block_1">
 
    <div class="boxFirstHeader bx-def-bh-margin">
   
        <div class="dbTitle">Search Results</div>
        <div class="clear_both"></div>
       
    </div>
   
    <div class="boxContent">
    <div class="bx-def-bc-margin">
    <div class="result_block">
   
<?php foreach ($links as $link) { ?>

<?php
   
        $linksav = mysql_connect($db['host'], $db['user'], $db['passwd']);
        $mysqldb = mysql_select_db('yousearc_YouSearch');
       
        if (!$linksav) {
       
              die('Could not connect: ' . mysql_error());
             
        }
       
        if (!$mysqldb) {
       
              die('Could not connect: ' . mysql_error());
             
        }
       
        $sqlk = "SELECT url FROM bx_sites_main WHERE url = '{$link['link']}'";
        $duprow = mysql_query($sqlk);
       

    if(!$duprow)    {
              echo mysql_error();
        }
        elseif (mysql_num_rows($dubrow)) {
       
              echo "already exists DB";
             
        }
        else {
       
    $html = file_get_contents_curl($link['link']);

    //parsing begins here:
    $doc = new DOMDocument();
    @$doc->loadHTML($html);
    $nodes = $doc->getElementsByTagName('title');

    //get and display what you need:
    $title = $nodes->item(0)->nodeValue;

    $metas = $doc->getElementsByTagName('meta');

    for ($i = 0; $i < $metas->length; $i++)
    {
        $meta = $metas->item($i);
       
        if($meta->getAttribute('name') == 'description')
            $description = $meta->getAttribute('content');
        if($meta->getAttribute('name') == 'keywords')
            $keywords = $meta->getAttribute('content');
    }    
        $timeex = date('Y-m-d');
        $ulr = $title . $timeex;
              $sql = "INSERT INTO bx_sites_main (url, title, entryUri, description, date, allowView, allowComments, allowRate, tags) VALUES ('{$link['link']}', '$title', '$ulr', '$description', '$timeex', '3', '3', '3', '$keywords')";
            $addlink = mysql_query($sql);
            $pager = "SELECT entryUri FROM bx_sites_main WHERE url = '{$link['link']}'";
            $pagercall= mysql_query($sqlk);
            $review = "http://yousearch.mobi/m/sites/view/";
            $commentlink = $review.$pagercall;
           
           
           
          
       
            }
           
        mysql_close($linksav);
    ?>

    <div class="link">
        <BLOCKQUOTE>
       
        <img BORDER="1" ALIGN="Left" HSPACE=10 src="<?php e("http://images.shrinktheweb.com/xino.php?stwembed=1&stwaccesskeyid=f1355aa7c2ecb1c&stwsize=sm&stwurl=".$link['link'])?>" />
       
        <a href="<?php e($link['link']); ?>" target="_blank"><b><?php e($link['title']); ?></b></a><br />
       
            <a style="color: #008000" href="<?php e($link['link']); ?>"><?php e($link['link']); ?></a>
       
        <p align="justify"><?php e($link['description']); ?></p> <br />
        <?php echo $commentlink; ?>
        <a href="<?php $commentlink; ?>">Comment</a></p>
    <?php
        bx_import ('BxTemplCmtsView');
        $o = new BxTemplCmtsView ('value of ObjectName field', $iYourEntryId);
        if ($o->isEnabled())
            echo $o->getCommentsFirst ();
        ?>
       
        </BLOCKQUOTE>
    </div>
<?php } ?>
<div class="clear_both"></div>
</div>
</div>
<div class="clear_both"></div>
</div>
</div>
   
<?php

PageCode();

Quote · 17 Sep 2013

I used Facebook comments this is a simple code that i built to make this work!


<!DOCTYPE html>

<html>
        <head>
   
        <script>
           <!--\/this is the fuction that the comment button calls\/-->
            function ShowComment() {
               
                document.getElementById("commentsfbys").style.display = "";
                document.getElementById("button").style.display = 'none';
            document.getElementById("hidebutton").style.display = "";
               
            }
           
            <!--\/this is the fuction that the comment button calls\/-->
            function HideComment() {
               
                document.getElementById("commentsfbys").style.display = 'none';
                document.getElementById("button").style.display = "";
                document.getElementById("hidebutton").style.display = "none";
           
            }
           
        </script>
           
      </head>
        <body>
        <!--\/this is the facebook sdk needs to be at the top of the body\/-->   
        <div id="fb-root"></div>       
    <script>     
    (function(d, s, id) {         
      var js, fjs = d.getElementsByTagName(s)[0];         
      if (d.getElementById(id)) return;     
      js = d.createElement(s); js.id = id;   
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=Add Your facebook app id here";    
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
    </script>
    <!--/\this needs to be at the top of the body/\-->   
   
    <!--this adds the button-->   
    <button name="comment" id="button" onClick="ShowComment()"> <STRONG>Comment</STRONG> </button>
    <!--this adds the button-->   
    <button name="hide" id="hidebutton" onClick="HideComment()" style="display:none"> <STRONG>Hide</STRONG> </button>
    <br>


    <!--this line makes the comment box appear-->
    <div class="fb-comments" data-href="http://yousearch.mobi" data-width="470" id="commentsfbys" style="display:none"></div>
    <!--this line makes the comment box appear-->
       
        </body>
</html>


Quote · 24 Sep 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.