Get support for jcubic/disqus-hashover-import

If you're new to LTH, please see our FAQ for more information on what it is we do.

Qualified Helpers
jcubic
owner From $50 / 30 mins
Get help from jcubic

jcubic/disqus-hashover-import

disqus-hashover-import

Code for importing Disqus comment in HashOver Next

Usage

This code require, for avatars to modify HashOver library here is diff:

diff --git a/hashover/backend/classes/commentparser.php b/hashover/backend/classes/commentparser.php
index 15b5a2b..bf13c06 100644
--- a/hashover/backend/classes/commentparser.php
+++ b/hashover/backend/classes/commentparser.php
@@ -106,10 +106,16 @@ class CommentParser
 
                // Get avatar icons
                if ($this->setup->iconMode !== 'none') {
+
                        if ($this->setup->iconMode === 'image') {
                                // Get MD5 hash for Gravatar
                                $hash = Misc::getArrayItem ($comment, 'email_hash') ?: '';
-                               $output['avatar'] = $this->avatars->getGravatar ($hash);
+                               $avatar = Misc::getArrayItem ($comment, 'avatar');
+                               if (!empty($avatar)) {
+                                       $output['avatar'] = $avatar;
+                               } else {
+                                       $output['avatar'] = $this->avatars->getGravatar ($hash);
+                               }
                        } else {
                                $output['avatar'] = end ($key_parts);

License

WTFPL Logo

Copyright 2018 Jakub Jankiewicz https://jcubic.pl/

Released Under WTFPL License

Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2024 © lth-dev incorporated

p-e622a1a2