Esempio n. 1
0
function dsq_comments_template($value)
{
    global $EMBED;
    global $post;
    global $comments;
    if (!(is_singular() && (have_comments() || 'open' == $post->comment_status))) {
        return;
    }
    if (!dsq_is_installed() || !dsq_can_replace()) {
        return $value;
    }
    // TODO: If a disqus-comments.php is found in the current template's
    // path, use that instead of the default bundled comments.php
    //return TEMPLATEPATH . '/disqus-comments.php';
    $EMBED = true;
    if (dcl_check_shortcode('js-disqus') || 'open' !== $post->comment_status) {
        return dirname(__FILE__) . '/../public/dcl-empty.php';
    } else {
        return dirname(__FILE__) . '/../public/dcl-comments.php';
    }
}
/admin/moderate/<?php 
        echo get_option('disqus_forum_url');
        ?>
/?template=wordpress" style="width: 100%; height: 800px"></iframe>
		</div>
<?php 
}
?>
	</div>

<?php 
$dsq_replace = get_option('disqus_replace');
$dsq_forum_url = strtolower(get_option('disqus_forum_url'));
$dsq_api_key = get_option('disqus_api_key');
$dsq_cc_fix = get_option('disqus_cc_fix');
if (dsq_is_installed()) {
    $dsq_last_import_id = get_option('disqus_last_import_id');
    $dsq_import_status = $dsq_api->get_import_status($dsq_last_import_id);
}
?>
	<!-- Advanced options -->
	<div id="dsq-advanced" class="dsq-content" style="display:none;">
		<h2>Advanced Options</h2>
		Version: <?php 
echo $dsq_version;
if (function_exists('curl_init')) {
    echo ' (Using cURL libraries.)';
} else {
    if (ini_get('allow_url_fopen') && function_exists('stream_get_contents')) {
        echo ' (Using fopen.)';
    } else {
    $dsq_user_api_key = $dsq_api->get_user_api_key($_POST['dsq_username'], $_POST['dsq_password']);
    if (!$dsq_user_api_key) {
        $step = 1;
        dsq_manage_dialog($dsq_api->get_last_error(), true);
    }
    $dsq_sites = $dsq_api->get_forum_list($dsq_user_api_key);
    if ($dsq_sites < 0) {
        $step = 1;
        dsq_manage_dialog($dsq_api->get_last_error(), true);
    }
}
?>
<div class="wrap" id="dsq-wrap">
	<ul id="dsq-tabs">
		<li class="selected" id="dsq-tab-main" rel="dsq-main"><?php 
echo dsq_is_installed() ? 'Manage' : 'Install';
?>
</li>
		<li id="dsq-tab-advanced" rel="dsq-advanced"><?php 
echo dsq_i('Advanced Options');
?>
</li>
	</ul>

	<div id="dsq-main" class="dsq-content">
<?php 
switch ($step) {
    case 2:
        ?>
		<div id="dsq-step-2" class="dsq-main">
			<h2><?php 
Esempio n. 4
0
    $theme = wp_get_theme();
    echo esc_html($theme->Name . ' ' . $theme->Version);
}
?>

URLOpen Method: <?php 
echo esc_html(dsq_url_method());
?>

Plugin Version: <?php 
echo esc_html(DISQUS_VERSION);
?>

Settings:
dsq_is_installed: <?php 
echo esc_html(dsq_is_installed() . '\\n');
foreach (dsq_options() as $opt) {
    echo esc_html($opt . ': ' . get_option($opt) . '\\n');
}
?>

Plugins:
<?php 
foreach (get_plugins() as $key => $plugin) {
    $isactive = '';
    if (is_plugin_active($key)) {
        $isactive = '(active)';
    }
    echo esc_html($plugin['Name'] . ' ' . $plugin['Version'] . ' ' . $isactive . '\\n');
}
?>
function dsq_plugin_action_links($links, $file)
{
    $plugin_file = basename(__FILE__);
    if (basename($file) == $plugin_file) {
        if (!dsq_is_installed()) {
            $settings_link = '<a href="edit-comments.php?page=disqus">' . dsq_i('Configure') . '</a>';
        } else {
            $settings_link = '<a href="edit-comments.php?page=disqus#adv">' . dsq_i('Settings') . '</a>';
        }
        array_unshift($links, $settings_link);
    }
    return $links;
}
Esempio n. 6
0
    $theme = wp_get_theme();
    echo esc_html($theme->Name . ' ' . $theme->Version);
}
?>

URLOpen Method: <?php 
echo esc_html(dsq_url_method());
?>

Plugin Version: <?php 
echo esc_html(DISQUS_VERSION);
?>

Settings:
dsq_is_installed: <?php 
echo esc_html(dsq_is_installed());
foreach (dsq_options() as $opt) {
    echo esc_html($opt . ': ' . get_option($opt) . "\n");
}
?>

Plugins:
<?php 
foreach (get_plugins() as $key => $plugin) {
    $isactive = "";
    if (is_plugin_active($key)) {
        $isactive = "(active)";
    }
    echo esc_html($plugin['Name'] . ' ' . $plugin['Version'] . ' ' . $isactive . "\n");
}
?>
Esempio n. 7
0
Active Theme: <?php 
$theme = get_theme(get_current_theme());
echo $theme['Name'] . ' ' . $theme['Version'];
?>
URLOpen Method: <?php 
echo dsq_url_method();
?>

Plugin Version: <?php 
echo DISQUS_VERSION;
?>

Settings:

dsq_is_installed: <?php 
echo dsq_is_installed();
?>

<?php 
foreach (dsq_options() as $opt) {
    echo $opt . ': ' . get_option($opt) . "\n";
}
?>

Plugins:

<?php 
foreach (get_plugins() as $key => $plugin) {
    $isactive = "";
    if (is_plugin_active($key)) {
        $isactive = "(active)";
 function tc_disqus_comments_enabled()
 {
     return function_exists('dsq_is_installed') && function_exists('dsq_can_replace') && dsq_is_installed() && dsq_can_replace();
 }
Esempio n. 9
0
function dsq_warning()
{
    if (!get_option('disqus_forum_url') && !isset($_POST['forum_url']) && isset($_POST['page']) && $_GET['page'] != 'disqus') {
        dsq_manage_dialog('You must <a href="edit-comments.php?page=disqus">configure the plugin</a> to enable Disqus Comments.', true);
    }
    if (!dsq_is_installed() && isset($_POST['page']) && $_GET['page'] == 'disqus') {
        dsq_manage_dialog('Disqus Comments has not yet been configured. (<a href="edit-comments.php?page=disqus">Click here to configure</a>)');
    }
}
Esempio n. 10
0
 /**
  * Custom Plugin Action Link.
  *
  * Function to add a quick link to DCL, when being listed on your
  * plugins list view.
  *
  * @since    1.0.0
  * @return	$links		Links to display.
  * @author	Joel James
  */
 public function dcl_plugin_action_links($links, $file)
 {
     $plugin_file = basename('disqus-conditional-load.php');
     if (basename($file) == $plugin_file) {
         if (!dsq_is_installed()) {
             $settings_link = '<a href="edit-comments.php?page=disqus">' . dsq_i('Configure') . '</a>';
         } else {
             $settings_link = '<a href="admin.php?page=dcl-settings">' . dsq_i('Settings') . '</a>';
         }
         array_unshift($links, $settings_link);
     }
     return $links;
 }
Esempio n. 11
0
<?php
if ( !function_exists('wp_get_theme') ) {
    $theme = get_theme(get_current_theme());
    echo esc_html( $theme['Name'] . ' ' . $theme['Version'] );
} else {
    $theme = wp_get_theme();
    echo esc_html( $theme->Name . ' ' . $theme->Version );
}
?>

URLOpen Method: <?php echo esc_html( dsq_url_method() ); ?>

Plugin Version: <?php echo esc_html( DISQUS_VERSION ); ?>

Settings:
dsq_is_installed: <?php echo esc_html( dsq_is_installed() ); ?>
<?php foreach (dsq_options() as $opt) {
    echo esc_html( $opt.': '.get_option($opt)."\n" );
} 
?>

Plugins:
<?php
foreach (get_plugins() as $key => $plugin) {
    $isactive = "";
    if (is_plugin_active($key)) {
        $isactive = "(active)";
    }
    echo esc_html( $plugin['Name'].' '.$plugin['Version'].' '.$isactive."\n" );
}
?>