nukeSEO.com - PHPNuke SEO Search engine optimization, professional tools including nukeSEO, nukeSPAM, nukeFEED, nukePIE, nukeWYSIWYG and more

 

. Welcome to nukeSEO.com  ! 
.
.
.
Support nukeSEO
Make donations with PayPal!
September´s Goal: $100.00
Due Date:   Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Donations


Tag This

tag on del.icio.us digg this reddit this


.
nukeSEO.com: Forums


nukeSEO.com :: View topic - nukeCOMMENTS
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

nukeCOMMENTS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nukeSEO.com Forum Index -> General / Other Stuff
View previous topic :: View next topic  
Author Message
montego
webmaster


Joined: Dec 26, 2005
Posts: 256

PostPosted: Sat Jul 30, 2011 9:19 am    Post subject: Reply with quote

Ok.

Regarding Comments/Disqus. I have been wanting to create a nukeCOMMENTS(tm) system to where we could activate comments site-wide (wouldn't really apply to Forums though) or by selected modules. The *nuke commenting system has always been a thorn in our sides to maintain and I've just never really liked how it works.

Have there been any thoughts/discussions around this on the RN Team? Would make for a nice addition/option.
_________________
Where Do YOU Stand?
HTML Newsletter :: ShortLinks :: DynamicTitles :: Approved Membership Lite :: And more...
Back to top
View user's profile Send private message Visit poster's website
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 907

PostPosted: Sun Jul 31, 2011 2:08 pm    Post subject: Reply with quote

No thoughts yet, but Disqus might be able to provide that ability pretty easily, I think.
_________________
Back to top
View user's profile Send private message Visit poster's website
nuken
webmaster


Joined: Jan 02, 2009
Posts: 28

PostPosted: Mon Aug 01, 2011 10:29 am    Post subject: Reply with quote

SpasticDonkey has already created a Disqus class that can be implemented in any module. I will send him a pm and let him explain it better.
Back to top
View user's profile Send private message
spasticdonkey
webmaster


Joined: Oct 26, 2007
Posts: 69

PostPosted: Mon Aug 01, 2011 12:13 pm    Post subject: Reply with quote

Thanks for the heads up nuken, probably easiest to provide y'all with the files. Only problem we ran into was with the previous version of shortlinks (when it was disabled), and having some issues with amp. I believe this has been corrected in the latest version but have not had the opportunity to revisit this since it's release.

Note: For the system to function correctly the disqus url you provide must be shortlink aware. i.e. if it is enabled use the short url. We used:

Code:
if (defined('TNSL_USE_SHORTLINKS')){
$articleurl = $nukeurl . '/article' . $sid . '.html';
}else{
$articleurl = $nukeurl . '/modules.php?name=News&file=article&sid=' . $sid;
}


which requires us to hard code the shortened url. not ideal for those that may alter the default shortlinks, but an alternative may have to wait until someone comes up with a better method of retrieving a shortened url Smile

@ current both nuken and I are storing disqus settings within our modules, but I would like to modify the comments admin to store disqus related settings there. if time allows Wink We could also add a compatibility layer for other comment systems in the future, such as intense debate, etc..

Anyways, look forward to your feedback, ideas, improvements Wink

http://www.rtsforce.com/files/disqus.zip
Back to top
View user's profile Send private message Visit poster's website
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 907

PostPosted: Mon Aug 01, 2011 12:14 pm    Post subject: Reply with quote

That sounds GREAT, nuken. Thanks!
_________________
Back to top
View user's profile Send private message Visit poster's website
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 907

PostPosted: Mon Aug 01, 2011 12:21 pm    Post subject: Reply with quote

and thank YOU, spasticdonkey!
_________________
Back to top
View user's profile Send private message Visit poster's website
spasticdonkey
webmaster


Joined: Oct 26, 2007
Posts: 69

PostPosted: Mon Aug 01, 2011 12:55 pm    Post subject: Reply with quote

np, and i guess the files did not include an example of inserting the comment code itself, but it goes something like:
Code:
$ds = $shortname;
$did = $module_name.'-'.$sid;
include_once('includes/jquery/disqus.php');
echo disqus($ds, $did, $pageurl);


this is assuming you have previously determined your shortlink aware url ($pageurl) and valid disqus shortname ($shortname). For the disqus id we used $module_name.'-'.$id figuring we wouldn't need comments for categories... But you can use whatever you want as long as it is unique..
Back to top
View user's profile Send private message Visit poster's website
montego
webmaster


Joined: Dec 26, 2005
Posts: 256

PostPosted: Tue Aug 02, 2011 9:03 am    Post subject: Reply with quote

spasticdonkey,

What HTML code does the disqus() function produce? Are you able to post an example here? Because I wonder if we can, with jQuery, keep Disqus external JS calls from firing using jQuery and insert some code up front to re-write some DOM elements before it does fire? That might get around the issue of having to hard-code the URL.

If I can find some time today, I'll download the zip and take a look and report back.

Sorry kguske, I have taken this thread elsewhere...
_________________
Where Do YOU Stand?
HTML Newsletter :: ShortLinks :: DynamicTitles :: Approved Membership Lite :: And more...
Back to top
View user's profile Send private message Visit poster's website
montego
webmaster


Joined: Dec 26, 2005
Posts: 256

PostPosted: Tue Aug 02, 2011 9:19 am    Post subject: Reply with quote

BTW, I have felt for a long time that the new nukeSEO DH code/classes could be potentially extended and/or exploited for better control over ShortLinks! Ok, there, I've said it in public and let the cat out of the bag... Wink

We have in DH the up-front architecture for pulling key data elements from the database that is by module and by ID. I was going to extend this approach to also build more friendly keyword/title "rich" shortened links. This was going to be the basis for my 2.0 version (only in the "brainstorm" stage atm).

It stands to reason, then, that this same "extension" or DH already, could be leveraged for this Diqus need as well? Why not have a DH object that is a Singleton which can then be called upon anywhere within the RN/module/block code to get at these really nice content attributes... Wink

Hopefully this makes some sense.
_________________
Where Do YOU Stand?
HTML Newsletter :: ShortLinks :: DynamicTitles :: Approved Membership Lite :: And more...
Back to top
View user's profile Send private message Visit poster's website
spasticdonkey
webmaster


Joined: Oct 26, 2007
Posts: 69

PostPosted: Tue Aug 02, 2011 1:53 pm    Post subject: Reply with quote

Yes you are making sense, although some of what you have mentioned may be above my pay-grade Smile

The disqus code above doesn't do anything too fancy, in most cases just posts the needed JS code after you have passed the proper info to it. The comment counter code has logic to prevent loading twice so it can be used by modules and blocks without dual-inclusion. Also thought it was easier to place all the disqus code in one file instead of repeating it everywhere it was needed, in case of future disqus changes.

Anyone here is certainly willing to take this over or come up with another approach, if you feel inspired, as I have many irons in the fire atm.. A method to not hard-code the short url would be excellent. For the comment counter code to function correctly (without using proprietary non-valid html) the disqus id should be matched with only one disqus url and vice versa (pages that can be visited at more than one address, or perhaps a search engine link pointing to an untapped version of a page)

FYI, in some cases you may want to use the same disqus thread in more than one module. For instance, started on some preliminary work with Surveys and used some logic if the survey was attached to a news story, to use the disqus url/id of the news story.
Back to top
View user's profile Send private message Visit poster's website
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 907

PostPosted: Tue Aug 02, 2011 2:17 pm    Post subject: Reply with quote

I split this topic...

@montego: regarding evolving nukeSEO DH to support additional functions - that was exactly the intent and a huge benefit of using the class approach, though the initial intent was to only support the generation of sitemap...
_________________
Back to top
View user's profile Send private message Visit poster's website
montego
webmaster


Joined: Dec 26, 2005
Posts: 256

PostPosted: Tue Aug 02, 2011 2:18 pm    Post subject: Reply with quote

Thanks kguske for splitting this out. Shame on me for going off-topic. Just the way the mind works these days unfortunately. Sad

Spastic, completely forgot about surveys attached to news articles. Makes sense. Oh the tangled *nuke web that has been woven. Laughing
_________________
Where Do YOU Stand?
HTML Newsletter :: ShortLinks :: DynamicTitles :: Approved Membership Lite :: And more...
Back to top
View user's profile Send private message Visit poster's website
montego
webmaster


Joined: Dec 26, 2005
Posts: 256

PostPosted: Tue Aug 02, 2011 5:24 pm    Post subject: Reply with quote

spasticdonkey,

I don't really have a working Disqus/ShortLinks environment to test my theory, but was looking through the shortlinks.php code and I wonder if it would simply work by changing the following line of code here:

Code:

   $getNextGen = preg_replace_callback('#(href|action|src)(\s*=\s*[\'"])([a-zA-Z0-9/&;:=\#\?\._-]*)(["\'])#i', 'tnsl_fCleanLinksStub', $getNextGen);


To this (just added "disqus_url" to the regex:

Code:

   $getNextGen = preg_replace_callback('#(disqus_url|href|action|src)(\s*=\s*[\'"])([a-zA-Z0-9/&;:=\#\?\._-]*)(["\'])#i', 'tnsl_fCleanLinksStub', $getNextGen);


It might actually work without the hard coding.

*** Edited ***

But you would also have to do this along with the patch referenced in my Mantis issue in this thread also from today:

http://montegoscripts.com/ftopict-409.html

Wink
_________________
Where Do YOU Stand?
HTML Newsletter :: ShortLinks :: DynamicTitles :: Approved Membership Lite :: And more...
Back to top
View user's profile Send private message Visit poster's website
spasticdonkey
webmaster


Joined: Oct 26, 2007
Posts: 69

PostPosted: Tue Aug 02, 2011 9:52 pm    Post subject: Reply with quote

pure genius montego, worked like a charm... with one minor exception. You must have:
$tnsl_bAutoTapLinks = true;

the "could slow down your site" warning made me feel like it was an optional setting so I had been setting as false...

If it is set to false (and shortlinks are enabled), the link is untapped and that's when the mystery "&" also appear.

yoursite.com/modules.php?name=News&file=article&sid=161
becomes
yoursite.com/modules.php?name=News&file=article&sid=161

That would also explain why nuken and I were having some confusion over what was happening, as we probably had differing settings in our rnconfig.


Last edited by spasticdonkey on Tue Aug 02, 2011 9:58 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
montego
webmaster


Joined: Dec 26, 2005
Posts: 256

PostPosted: Tue Aug 02, 2011 9:58 pm    Post subject: Reply with quote

Ah, yes, good catch on the "Auto Tap". I had forgotten that it looks for the respective GT-<<>> file for the module only (well, and blocks), so that makes sense.

So, do you think then that I should handle this in the code or would it better through "extras" + docs?
_________________
Where Do YOU Stand?
HTML Newsletter :: ShortLinks :: DynamicTitles :: Approved Membership Lite :: And more...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nukeSEO.com Forum Index -> General / Other Stuff 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


nukeSEO™, nukeFEED™, nukeINFO™, nukeNAV™, nukePIE™, nukeREADER™, nukeSLIDER™, nukeSOCIAL™, nukeSPAM™, nukeTIDY™, nukeWYSIWYG™ are trademarks of nukeSEO.com.

RavenNuke™ CMS is distributed by Raven PHP Scripts
New code written and maintained by the RavenNuke™ TEAM


PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.26 Seconds