Plugin Directory

Changeset 2542043


Ignore:
Timestamp:
06/03/2021 02:07:34 PM (5 years ago)
Author:
graphcomment
Message:

change script integration graphlogin

Location:
graphcomment-comment-system/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • graphcomment-comment-system/trunk/comments.php

    r2277045 r2542043  
    8787<!-- <?php $pluginData = get_plugin_data(dirname(__FILE__) . '/graphcomment.php'); echo $pluginData['Version']; ?> -->
    8888<script type="text/javascript">
    89   /* * * CONFIGURATION VARIABLES: * * */
    90   window.gc_params = {
    91     page_title:       '<?php echo GcParamsService::getInstance()->graphcommentIdenfitierGetPostTitle(get_post()); ?>',
    92     identifier:       '<?php echo GcParamsService::getInstance()->graphcommentIdentifierGenerate(get_post()); ?>',
    93     graphcomment_id:  '<?php echo $gc_public_key; ?>',
    94     guid: '<?php echo GcParamsService::getInstance()->graphcommentGuid(get_post()); ?>',
    95     uid: '<?php echo GcParamsService::getInstance()->graphcommentUid(get_post()); ?>',
    96     readonly: <?php echo $readonly ? 'true' : 'false'; ?>,
    97     fixed_header_height: <?php echo $fixedHeaderHeight; ?>,
    98     <?php if ($overlayActivated) { ?>
    99     overlay: {
    100       visible: <?php echo get_option('gc_overlay_visible') ? 'true' : 'false'; ?>,
    101       width: <?php echo get_option('gc_overlay_width', '400'); ?>,
    102       button: {
    103         label: '<?php echo get_option('gc_overlay_button_label'); ?>',
    104         color: '<?php echo get_option('gc_overlay_button_color'); ?>',
    105         background: '<?php echo get_option('gc_overlay_button_background'); ?>',
    106       },
    107       bubble: <?php echo get_option('gc_overlay_bubble') ? 'true' : 'false'; ?>,
    108     },
     89  (function() {
     90    var __semio__token;
     91    var __semio__callback;
     92
     93    var __semio__params = {
     94      graphcommentId:  '<?php echo $gc_public_key; ?>',
     95      behaviour: {
     96        uid: '<?php echo GcParamsService::getInstance()->graphcommentUid(get_post()); ?>',
     97        readonly: <?php echo $readonly ? 'true' : 'false'; ?>,
     98      },
     99      integration: {
     100        fixedHeaderHeight: <?php echo $fixedHeaderHeight; ?>,
     101      },
     102      <?php if ($overlayActivated) { ?>
     103      sidePanel: {
     104        visible: <?php echo get_option('gc_overlay_visible') ? 'true' : 'false'; ?>,
     105        width: <?php echo get_option('gc_overlay_width', '400'); ?>,
     106        button: {
     107          label: '<?php echo get_option('gc_overlay_button_label'); ?>',
     108          color: '<?php echo get_option('gc_overlay_button_color'); ?>',
     109          background: '<?php echo get_option('gc_overlay_button_background'); ?>',
     110        },
     111        bubble: <?php echo get_option('gc_overlay_bubble') ? 'true' : 'false'; ?>,
     112      },
     113      <?php } else { ?>
     114      sidePanel: false,
     115      <?php } ?>
     116      statistics: {
     117        pageTitle: '<?php echo GcParamsService::getInstance()->graphcommentIdenfitierGetPostTitle(get_post()); ?>',
     118      },
     119      wordpress: {
     120        guid: '<?php echo GcParamsService::getInstance()->graphcommentGuid(get_post()); ?>',
     121        identifier: '<?php echo GcParamsService::getInstance()->graphcommentIdentifierGenerate(get_post()); ?>',
     122      }
     123      <?php if ($ssoActivated) { ?>
     124      ,auth: {
     125        login: function() {
     126          window.location.href = "<?php echo wp_login_url($_SERVER['REQUEST_URI']); ?>";
     127        },
     128        logout: function() {
     129          window.location.href = "<?php echo wp_logout_url($_SERVER['REQUEST_URI']); ?>";
     130        },
     131        signup: function() {
     132          window.location.href = "<?php echo wp_login_url($_SERVER['REQUEST_URI']); ?>";
     133        },
     134        subscribeToToken: function(cb) {
     135          if (__semio__token) {
     136            cb(__semio__token);
     137          }
     138          __semio__callback = cb;
     139        },
     140      }
     141      <?php } ?>
     142    };
     143
     144    <?php if ($ssoActivated) { ?>
     145      <?php if ($overlayActivated) { ?>
     146        var lib = 'gc_sidePanel';
     147      <?php } else { ?>
     148        var lib = 'gc';
     149      <?php } ?>
    109150    <?php } else { ?>
    110     overlay: false,
     151      <?php if ($overlayActivated) { ?>
     152        var lib = 'gc_sidePanel_graphlogin';
     153      <?php } else { ?>
     154        var lib = 'gc_graphlogin';
     155      <?php } ?>
    111156    <?php } ?>
     157
     158    function __semio__onload() {
     159      window['__semio__' + lib](__semio__params)
     160    }
     161
     162
     163    (function() {
     164      var gc = document.createElement('script');
     165      gc.type = 'text/javascript';
     166      gc.async = true;
     167      gc.onload = __semio__onload;
     168      gc.defer = true;
     169      gc.src = '<?php echo constant('INTEGRATION_URL'); ?>/' + lib + '.js';
     170      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
     171    })();
     172
     173
    112174    <?php if ($ssoActivated) { ?>
    113     sso_public_key: '<?php echo get_option("gc_api_public_key"); ?>',
    114     sso_data: '<?php echo isset($ssoData) ? $ssoData : ''; ?>',
     175      function __semio__onload__sso() {
     176        __semio__helpers_sso({
     177          graphcommentId: '<?php echo $gc_public_key; ?>',
     178          publicKey: '<?php echo get_option("gc_api_public_key"); ?>',
     179          data: '<?php echo isset($ssoData) ? $ssoData : ''; ?>',
     180          onSuccess: function(token) {
     181            if (__semio__callback) {
     182              __semio__callback(token)
     183            }
     184            __semio__token = token;
     185          }
     186        });
     187      };
     188
     189      (function() {
     190        var gc = document.createElement('script');
     191        gc.type = 'text/javascript';
     192        gc.async = true;
     193        gc.onload = __semio__onload__sso;
     194        gc.defer = true;
     195        gc.src = '<?php echo constant('INTEGRATION_URL'); ?>/helpers_sso.js';
     196        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
     197      })();
    115198    <?php } ?>
    116   };
    117 
    118   window.gcSsoAuth = function() {
    119     window.location.href = "<?php echo wp_login_url($_SERVER['REQUEST_URI']); ?>";
    120   };
    121 
    122   /* * * DON'T EDIT BELOW THIS LINE * * */
    123   (function () {
    124     var gc = document.createElement('script');
    125     gc.type = 'text/javascript';
    126     gc.async = true;
    127     gc.src = '<?php echo constant('GRAPHCOMMENT_URL'); ?>/js/integration.js';
    128     (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
    129   })();
     199
     200    function __semio__onload__counter() {
     201      __semio__helpers_counter('<?php echo $gc_public_key; ?>');
     202    };
     203
     204    (function() {
     205      var gc = document.createElement('script');
     206      gc.type = 'text/javascript';
     207      gc.async = true;
     208      gc.onload = __semio__onload__counter;
     209      gc.defer = true;
     210      gc.src = '<?php echo constant('INTEGRATION_URL'); ?>/helpers_counter.js';
     211      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
     212    })();
     213  })()
    130214</script>
  • graphcomment-comment-system/trunk/config.php

    r2104053 r2542043  
    22
    33define('GRAPHCOMMENT_URL', 'https://graphcomment.com');
     4define('INTEGRATION_URL', 'https://integration.graphcomment.com');
    45define('ADMIN_URL', constant('GRAPHCOMMENT_URL') . '/admin');
    56define('IMPORT_URL', 'https://import.graphcomment.com/api');
     
    78/*
    89define('GRAPHCOMMENT_URL', 'https://dev.graphcomment.com');
     10define('INTEGRATION_URL', 'https://devintegration.graphcomment.com');
    911define('ADMIN_URL', 'http://localhost:9004');
    1012define('IMPORT_URL', 'https://dev-import.graphcomment.com/api');
  • graphcomment-comment-system/trunk/graphcomment.php

    r2439804 r2542043  
    66 * Author: GraphComment <[email protected]>
    77 * Author URI: https://graphcomment.com/
    8  * Version: 3.1.5
     8 * Version: 3.5.0
    99 * License: GPL
    1010 * Text Domain: graphcomment-comment-system
     
    1212 */
    1313
    14 define('GRAPHCOMMENT_VERSION', '3.1.5');
     14define('GRAPHCOMMENT_VERSION', '3.5.0');
    1515
    1616defined('ABSPATH') or die("No script kiddies please!");
  • graphcomment-comment-system/trunk/readme.txt

    r2439804 r2542043  
    33Tags: comments system, social interactions, discussion plugin, threaded comments, community, comment widget, comment plugin, moderation tool, conversation, engagement, profile, social sharing, seo, wordpress comments, wordpress comments plugin, wordpress comment plugin, wordpress plugin, ajax comments, live comments, chat, realtime commenting, Lazy load comments, mobile commenting, disable comments, post comments, advanced comment, comments block, discuss, disqus, discuz, buddypress alternative, Disqus alternative, Facebook comments alternative, Livefyre alternative, Jetpack comments alternative, commenting, reply comments, better comments, best comments, comment notifications, comment template, comment author, comment system, first commenter, social login, boost comments, native comments, media embed, comment text formatting, discussion sharing, spam protection, import comments, comment themes, guest commenting, notifications, badges, word blacklist
    44Requires at least: 3.4
    5 Tested up to: 5.6.1
    6 Stable tag: 3.1.5
     5Tested up to: 5.7.2
     6Stable tag: 3.5.0
    77Donate link: https://graphcomment.com
    88License: GPL
     
    159159== Changelog ==
    160160
     161= 3.5.0 =
     162
     163* new version of script to optimize load graphcomment
     164* new implementation of login / register user
     165
    161166= 3.1.5 =
    162167
Note: See TracChangeset for help on using the changeset viewer.