Follow Us:
Tricked Out Mods: Forums

Best Hosting
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to integrate Disqus in other modules
 Goto page 1, 2  Next
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> RavenNuke
View previous topic :: View next topic  
Author Message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Sat Feb 12, 2011 12:53 pm 
Post subject: How to integrate Disqus in other modules
Reply with quote

Thanks to SpasticDonkey, we now have a more standardised approach to integrating Disqus within RavenNuke. This will work only if you are using TON 2.6 which contains the needed disqus.php file.

Below is the basic code to use in other modules:
Code:
$ds = 'yourshortname';


         $did = $module_name.'-'.$content_identifier;

   $pageurl = $nukeurl.'/your_address_here';

   include_once('includes/jquery/disqus.php');

   echo disqus($ds, $did, $pageurl);


First this will be your ShortName.
The variable $ds needs to reflect your Disqus Short Name.

Next is the $content_identifier variable. This will depend on the module. Some use $id and others may use $pid. You will have to do some detective work to figure out what identifier you need to use for your module.

Finally, you will need to determine $pageurl. This will be determined by the modules link.

Below is an example from the News articles.php

Code:
$ds = $shortname;


   $did = $module_name.'-'.$sid;

   $pageurl = $nukeurl.'/article.html'.$sid.'';

   include_once('includes/jquery/disqus.php');

   echo disqus($ds, $did, $pageurl);

_________________
Tricked Out News
  
Back to top
View user's profile Send private message
nextgen
I might as well work here
I might as well work here


Joined: Jun 28, 2009
Posts: 79
Location: Maryland

PostPosted: Thu Feb 02, 2012 12:38 pm 
Post subject:
Reply with quote

OK buddy i love the comment setup. How did ya do it ? Have been drooling since i used it here.
_________________
Ravennuke is a state of mind.
  
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Thu Feb 02, 2012 1:43 pm 
Post subject:
Reply with quote

It's included in the latest RavenNuke 2.5. It can be set up in the News Config ACP.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Thu Feb 02, 2012 6:03 pm 
Post subject:
Reply with quote

is also possible with this module ! ?

I should like to know Embarassed
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Thu Feb 02, 2012 7:08 pm 
Post subject:
Reply with quote

Yes, the code would look something like this:
Code:


$ds = $shortname;

   $did = $module_name.'-'.$id;

   $pageurl = $nukeurl.'/modules.php?name='.$module_name.'&op=watch&id=='.$id.'';

   include_once('includes/jquery/disqus.php');

   echo disqus($ds, $did, $pageurl);


You would need to add your disqus shortname where it has $shortname and use this instead of the comments code.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Thu Feb 02, 2012 7:45 pm 
Post subject:
Reply with quote

I've changed. But I get only the link to the page (Comments powered by Disqus)
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Thu Feb 02, 2012 8:07 pm 
Post subject:
Reply with quote

The code looks correct, just make sure you replace the shortname correctly with the shortname disqus gives you like so:

$ds = $shortname;

should become

$ds = 'yourshortname';
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Thu Feb 02, 2012 8:32 pm 
Post subject:
Reply with quote

unfortunately not
Code:


$ds = 'http://amchum.disqus.com';

   $did = $module_name.'-'.$id;

   $pageurl = $nukeurl.'/modules.php?name='.$module_name.'&op=watch&id=='.$id.'';

   include_once('includes/jquery/disqus.php');

   echo disqus($ds, $did, $pageurl);
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Thu Feb 02, 2012 9:13 pm 
Post subject:
Reply with quote

Try this:
Code:


$ds = 'amchum';
   $did = $module_name.'-'.$id;
   $pageurl = $nukeurl.'/modules.php?name='.$module_name.'&op=watch&id=='.$id.'';
   include_once('includes/jquery/disqus.php');
   echo disqus($ds, $did, $pageurl);

_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Fri Feb 03, 2012 9:22 am 
Post subject:
Reply with quote

Sorry. if I'm buggin you. Embarassed But nothing. Crying or Very sad and you can see it here

http://www.amchum.de/video.html
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Fri Feb 03, 2012 10:53 am 
Post subject:
Reply with quote

Try this.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Fri Feb 03, 2012 5:01 pm 
Post subject:
Reply with quote

I think I can not make it. I've followed your instructions. but not make it
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Fri Feb 03, 2012 5:27 pm 
Post subject:
Reply with quote

Sorry. There must be some javascript conflict or some other hard to track down bug.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Fri Feb 03, 2012 5:34 pm 
Post subject:
Reply with quote

anyway, thanks for everything
  
Back to top
View user's profile Send private message
tauhid
I post a lot
I post a lot


Joined: Nov 19, 2009
Posts: 38


PostPosted: Mon Feb 06, 2012 6:59 pm 
Post subject:
Reply with quote

many thanks, I did it. I just had the ($nukeurl.) with my domain adress
  

Last edited by tauhid on Wed Feb 08, 2012 5:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> RavenNuke All times are GMT - 5 Hours
 Goto page 1, 2  Next
 Page 1 of 2
 
 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
Forums ©