gcomment.com widget de commentaires gratuit ! Comments management widget
easy, fun, free;)
home     |     how to     |     features     |     faq     |     signup    |    connect     |     about     |     passer en Francais    switch to English    passar en Espanol

 

  • Signup on the site
    Once you signed up on the site, you will receive a Key which will allow you to use the gcomment widget on your website. You can use the key as much as you like, on any number of pages you want as long as it is on the same domain.

    If you want to use the widget on another website, you have to create another key on your management page
  • Code to insert
    In the top of your page, insert :
    <script language="javascript" src="http://www.gcomment.com/distant/gcomment.js"></script>

    Then, where you want the widget to appear :
    <script language="javascript">buildGCom("abcdefghijklm");</script>

    NB: Replace abcdefghijjkl" with the key you received when you signed up, or generated a key.
  • For example :
    If you want more than one discussion on one page, or the same comments on different pages of your site, you should pass an identifier to the function.
    <script language="javascript">buildGCom("abcdefghijklm","discussion_demo1");</script>

    and further in the same page :
    <script language="javascript">buildGCom("abcdefghijklm","discussion_demo2");</script>

    Please Note that these discussion identifiers are unique for your whole site !
  • Customisation
    To customise the theme, colors and other widget options, go to your admin interface
  • Advanced use
    The gcomment widget has a micro API that permit to alter the way the widget works.
    First of all, get the gcomment object from the call to buildGcom.
    var mygcom = buildGCom("abcdefghijklm");
    then you can modify dynamicaly :
    1) the language of the widget
    mygcom.lang='FR'
    mygcom.lang='EN'

    Please, be aware that changing the language this way does not separate discussions by language. If you wish to separate the discussions, you need to create identifiers, and call the fonction with one of them.
    EXAMPLE of PHP code :
    here, english and french posts are in the same thread (are visible in the same time)
    <?php echo "var mygcom = buildGCom('abcdefghijklm')"; if ($_SESSION["lang"] == "FR") echo "mygcom.lang='FR'"; else echo "mygcom.lang='EN'"; ?>

    here, english and french posts are NOT in the same thread, and the widget is in the language defined in the admin interface. You can combine both methods.
    <?php if ($_SESSION["lang"] == "FR") echo "buildGCom('abcdefghijklm', 'discuss_fr')"; else echo "buildGCom('abcdefghijklm', 'discuss_en');"; ?>

    2) the nick of the poster
    mygcom.nick = 'machin'

    if, for example, the user is already logged on your site.
    Note that you can hide the field 'nick' in your admin interface.
    3) the mail or the website of the poster
    mygcom.email = 'adresse@truc.com'; mygcom.website = 'www.monsite.com';