[EDK4] eve-kill DISQUS comments

Discuss/Upload mods to the EVE-Dev Killboard.
Strucker
Noob
Posts: 9
Joined: Mon Jul 16, 2012 22:26

Re: [EDK4] eve-kill DISQUS comments

Post by Strucker » Sun Jul 29, 2012 10:01

xCausxn wrote:Sorry if this is a bit stupid but how do i get this to work:
Comments unavailable until we sync to EvE-kill
Do you have easy urls enabled in admin?
This mod does not support it and you should disable it. ( not saying it shouldn't support it ;) )

xCausxn
Greenhorn
Posts: 11
Joined: Sat Jul 28, 2012 14:44

Re: [EDK4] eve-kill DISQUS comments

Post by xCausxn » Sun Jul 29, 2012 11:30

Thanks mate

idun
Developer
Posts: 152
Joined: Tue Mar 16, 2010 06:30

Re: [EDK4] eve-kill DISQUS comments

Post by idun » Wed Aug 08, 2012 03:27

This is interesting but I'd much rather have it display Evekill comments with the disqus login in addition to local comments instead of replacing regular password-based commenting. I'm mostly done modifying this to accomplish:
  • Enable both local and EVE-Kill comments (also list both counts on the kill list)
  • Remove the evekill cronfeed requirement
  • Can comment on any kill no matter what the posting source (evekill kill ids are queried on the fly)
For vovaatom's idea, there's just two places to change the disqus_shortname for a disqus forum other than evekill.

MrWhitei
Apprentice
Posts: 64
Joined: Wed Dec 07, 2011 15:25

Re: [EDK4] eve-kill DISQUS comments

Post by MrWhitei » Wed Aug 08, 2012 20:43

idun wrote:This is interesting but I'd much rather have it display Evekill comments with the disqus login in addition to local comments instead of replacing regular password-based commenting. I'm mostly done modifying this to accomplish:
  • Enable both local and EVE-Kill comments (also list both counts on the kill list)
  • Remove the evekill cronfeed requirement
  • Can comment on any kill no matter what the posting source (evekill kill ids are queried on the fly)
For vovaatom's idea, there's just two places to change the disqus_shortname for a disqus forum other than evekill.
I actually cant wait to see what you have come up with for removing the cron.
That was the main thing i hated about this mod.

as for vovaatom's idea sorry i missed that post. Would be simple to add an option to the settings page to enter in a disqus shortname and assign it to the template

idun
Developer
Posts: 152
Joined: Tue Mar 16, 2010 06:30

Re: [EDK4] eve-kill DISQUS comments

Post by idun » Thu Aug 09, 2012 15:44

idun wrote:This is interesting but I'd much rather have it display Evekill comments with the disqus login in addition to local comments instead of replacing regular password-based commenting. I'm mostly done modifying this to accomplish:
  • Enable both local and EVE-Kill comments (also list both counts on the kill list)
  • Remove the evekill cronfeed requirement
  • Can comment on any kill no matter what the posting source (evekill kill ids are queried on the fly)
Done.

Essentially what this does is lookup evekill's internal kill id when the user visits the kill detail page or when fetching a mail that has it's externalID set. It will be unsuccessful if evekill doesn't have the kill or it is not API verified (we need the external CCP ID from the API verification process to perform the lookup). In that case it will simply display an error message and subsequent page loads will reattempt.
killdetail.png
killdetail.png (13.61 KiB) Viewed 4862 times
There's one potential performance problem: If evekill goes down, our kill detail page will block for the timeout period (currently 5 seconds). So will whatever page that's fetching the mail with it's externalID set (cron_feed.php, admin_idfeedsyndication.php, etc). Some asynchronous callback work could be done there. Note that the server actually has to be down for this to happen. If their webserver is still running, but just not returning useful data, there will be no delay on our part.
killlist.png
killlist.png (7.94 KiB) Viewed 4862 times
As you can see I'm running an older kill list layout. The attached source code doesn't actually render like the above picture, but I just wanted to illustrate that both comment counts are displayed. The attached code uses the little envelope icons. The dash means comments haven't been loaded yet (in the attached source it's the link 'Load Comments' instead).

More details can be found on the settings page once the mod is installed.

One thing I don't like about this is there's no easy way that I can think of to display a count of 0 for the evekill comments! It either shows a non-zero comment count, nothing (meaning there are no evekill comments), or that comments haven't been loaded yet.

And now for something completely different:
I looked into changing the shortname like we had both thought of for vovaatom, and it's not so simple. If you're not going to use evekill as the disqus forum, then you probably don't care about evekill's internal kill id. You probably would rather just use your internal kill id as the disqus article identifier, which means the extra table that this mod creates is useless, as is the function which looks up the evekill internal id using the CCP kill ID.

I was hoping to use EPIC to lookup the kill id without having to parse a bunch of xml that we don't need, but there's a problem with that method: https://forums.eveonline.com/default.as ... ost1761553
Attachments
ek_disqus_idun.zip
(4.87 KiB) Downloaded 198 times

MrWhitei
Apprentice
Posts: 64
Joined: Wed Dec 07, 2011 15:25

Re: [EDK4] eve-kill DISQUS comments

Post by MrWhitei » Fri Aug 10, 2012 23:20

Very nice indeed m8
idun wrote: I was hoping to use EPIC to lookup the kill id without having to parse a bunch of xml that we don't need, but there's a problem with that method: https://forums.eveonline.com/default.as ... ost1761553
I thought of a way to still use EPIC to look up the internal eve-kill ID.

You could take the pilotID, System Name, and time of Kill and ship class lost or you could take even more info to ensure the kill is deffinatly unique (altho that should be enuff info)
e.g.
http://eve-kill.net/epic/system:Amamake ... ate/mask:4

EDIT:
Also just remembered that the original EDK comments code used ajax to insert the comments into the killDetail page.
I think this was used so that new comments would display when the page was cached.
I havent checked your code to see if you kept that in.

Ill throw a link to your post from the OP anyway.

idun
Developer
Posts: 152
Joined: Tue Mar 16, 2010 06:30

Re: [EDK4] eve-kill DISQUS comments

Post by idun » Sat Aug 11, 2012 23:46

It should be fine if it's cached because just the javascript would be cached, which when executed would load the comments fresh from disqus every time. Or if you're talking about the regular old comments, that's unchanged.

Yeah, I had thought of doing a look up other than kill ID. That would solve the problem of having to be API verified on both ends, but I wasn't sure I could come up with bullet-proof uniqueness. Plus I was getting the impression that there might be some small problems here and there querying by date with epic. In practice having to be API verified is troublesome. Unless you have an API key for the corp that got the last blow, you can't API verify. And you can't use an API key for a different corp than the board owner without pulling in every single one of their kills, whether they involve the board owners or not (at least when manually pulling).

EDIT: One of us should look to change the lookup from CCP kill ID to system+char+timestamp as soon as karbo has decided whether or not he's changing his api call format per his eve-o thread. Then we can remove the silly api verified requirement.

Karbowiak
Greenhorn
Posts: 16
Joined: Thu Jul 19, 2012 20:52

Re: [EDK4] eve-kill DISQUS comments

Post by Karbowiak » Wed Aug 22, 2012 17:53

Aslong as you don't actually just use the evekill disqus id to post comments with, then i'm ok with it.

ie. local kb has id 1 on a mail, but there is no mail with id 1 on eve-kill with a comment
so you create a comment for id 1 on your local board.

If that happens, i'll have to tighten security on the eve-kill disqus stuff

leecraven
Greenhorn
Posts: 23
Joined: Sun Feb 06, 2011 10:26

Re: [EDK4] eve-kill DISQUS comments

Post by leecraven » Sat Sep 08, 2012 20:19

The mail icon doesn't display for me it just displays text saying "Load Comments"

nutbolt
Greenhorn
Posts: 14
Joined: Fri Feb 26, 2010 17:56

Re: [EDK4] eve-kill DISQUS comments

Post by nutbolt » Thu Nov 22, 2012 11:29

Since EVE-Kill moved to new hardware this plugin no longer seems to work and none of our kills on our board now have disqus comments, saying its waiting to sync to evekill. Is anyone else having this issue?

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 7 guests