White screen
-
Hello!
The plugin is just perfect, but unfortunately I’m not good with php…
I put the code below and now I have a white screen and I can’t find manually where to take it off. I’m working on a local host. Please, help!
thank you!
SP
<?php
define(‘DISQUS_SECRET_KEY’, ‘<insert secret key here>’);
define(‘DISQUS_PUBLIC_KEY’, ‘<insert public key here>’);
$user = wp_get_current_user();
$data = array(
“id” => $user->data->ID,
“username” => $user->data->user_login,
“email” => $user->data->user_email
);function sb_dsq_hmacsha1($data, $key) {
$blocksize=64;
$hashfunc=’sha1′;
if (strlen($key)>$blocksize)
$key=pack(‘H*’, $hashfunc($key));
$key=str_pad($key,$blocksize,chr(0x00));
$ipad=str_repeat(chr(0x36),$blocksize);
$opad=str_repeat(chr(0x5c),$blocksize);
$hmac = pack(
‘H*’,$hashfunc(
($key^$opad).pack(
‘H*’,$hashfunc(
($key^$ipad).$data
)
)
)
);
return bin2hex($hmac);
}$message = base64_encode(json_encode($data));
$timestamp = time();
?>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/var disqus_config = function () {
this.page.url = ‘<?php the_permalink(); ?>’;
this.page.identifier = ‘<?php echo get_the_ID();?>’;
this.page.title = ‘<?php echo get_the_title(); ?>’;
this.page.remote_auth_s3 = “<?php echo sprintf(‘%s %s %s’, $message, sb_dsq_hmacsha1($message . ‘ ‘ . $timestamp, DISQUS_SECRET_KEY), $timestamp) ?>”;
this.page.api_key = “<?php echo DISQUS_PUBLIC_KEY; ?>”;
};(function () {
var dsq = document.createElement(‘script’); dsq.type = ‘text/javascript’; dsq.async = true;
dsq.src = ‘//{insert your forum here}.disqus.com/embed.js’;
(document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(dsq);
})();
</script>
The topic ‘White screen’ is closed to new replies.