Facebook Comment box for Category say id 30

ClassiBase classifieds script Forums General help Facebook Comment box for Category say id 30

This topic contains 3 replies, has 2 voices, and was last updated by  Elite Tan 3 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1148 Reply

    Elite Tan
    Participant

    dear Support, for the ad.php file what code to add for all ad listing that
    belong to category car, say the cat id for car is 30, what code do I need to add to match category car id 30, and upon match I want to display fb comment box under all car ad listing for catergory car id 30, I already got the fb comment below to add, I like to find out in ad.php what code to add to match category id 30 for car, and for all car ad listing upon match cat id 30, I want to display fb comment box as below, please advice and to hear from you, Thanks alot 🙂

    —————————fb comment script
    <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=159507650805232″;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));</script>
    —————————fb comment to display
    <div class=”fb-comments” data-href=”http://example.com/comments” data-colorscheme=”The color scheme used in the plugin” data-numposts=”5″ data-width=”The pixel width of the plugin”></div>

    #1150 Reply

    ClassiBase
    Keymaster

    It seems like facebook comment box will display comments by data-href="http://example.com/comments" value. So to display comments by category you have to provide category url there. To generate category url on ad.php file then use this function.

    data-href="<?php echo Category::url($ad->Category);?>"

    if you want to display comments by category and location then use following code:

    data-href="<?php echo Category::url($ad->Category,$ad->Location);?>"

    #1151 Reply

    Elite Tan
    Participant

    Thanks Support, I want to display comment for all ads under say category cars, category id example assuming is cat id 30, and under category cars, there are 10 ads which mean there are 10x html generated by ad.php question is how to display comment
    for each of the ad html? I want to allow public to be able to post comment for the ad .html hence is not really to display comment for category, but rather for the ads under the category, the ad are html file, so what code shall we add to ad.php file? appreciate your advice and to hear from you again, Many Thanks……………

    #1152 Reply

    Elite Tan
    Participant

    For example, in osclass for this ad, there is a comment box at the bottom of the ad
    this url http://tuffclassified.com/online-earn-money-job_274424

    What code do we need to add to the ad.php so that the facebook comment box will appear
    for all the ads listing .html file under certain category say car category id 30, please advice, Many Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Facebook Comment box for Category say id 30
Your information: