[EDK4] API Verified Mod

Discuss/Upload mods to the EVE-Dev Killboard.
Post Reply
Khi3l
Apprentice
Posts: 63
Joined: Sat Jun 12, 2010 14:02

[EDK4] API Verified Mod

Post by Khi3l » Mon Dec 05, 2011 15:21

This mod is for EDK4.

It displays two small boxes on kill detail for API Verification.

Changelog :

11/12/11 - Version 1.2.1 :
- fix a small tpl issue
Attachments
apiverifiedmod.png
apiverifiedmod.png (7.8 KiB) Viewed 8728 times
api_verified_mod.zip
(30.63 KiB) Downloaded 1369 times
Last edited by Khi3l on Sun Dec 11, 2011 15:13, edited 1 time in total.

Sir Quentin
Someday Author
Posts: 92
Joined: Thu Feb 12, 2009 15:04

Re: [EDK4] API Verified Mod

Post by Sir Quentin » Tue Dec 06, 2011 00:48

Thanks, updated the original one :)

Khi3l
Apprentice
Posts: 63
Joined: Sat Jun 12, 2010 14:02

Re: [EDK4] API Verified Mod

Post by Khi3l » Sun Dec 11, 2011 15:13

This mod has been updated, see first post :)

TimeWatcher
Noob
Posts: 1
Joined: Thu Apr 16, 2009 03:41

Re: [EDK4] API Verified Mod

Post by TimeWatcher » Fri Sep 07, 2012 16:15

еh , good mod , please do autodelete nonapi mail for verify toolbar

anchorhead
Someday Author
Posts: 89
Joined: Thu May 16, 2013 12:48

Re: [EDK4] API Verified Mod

Post by anchorhead » Fri May 02, 2014 08:02

I don't know if anyone continue to use this mod but with edk 4.2, he's broken for me. All kill is API Verified...

But i find a solution : fetch function who verified API in mod Ship display Tools ^^. I know php not very well^^

I can post solution if anyone want.

User avatar
Salvoxia
Developer
Posts: 1515
Joined: Wed Feb 22, 2012 12:11

Re: [EDK4] API Verified Mod

Post by Salvoxia » Fri May 02, 2014 09:30

Hi,

I use it and it's working fine for me. Please note that all mails posted via CREST are "API Verified", as CREST provides the same leve of detailed information as the API does. That's the great thing about CREST. So if you allow only CREST links for manual posting, all these mails will show up as "manually posted", but "API verified".
That's intended.

I thought about extending the mod to expose a kill's CREST link, if it has been posted via CREST, but wanted to get in contact with the original author first.

How/what did you change?


Regards,
Salvoxia

anchorhead
Someday Author
Posts: 89
Joined: Thu May 16, 2013 12:48

Re: [EDK4] API Verified Mod

Post by anchorhead » Fri May 02, 2014 17:05

Old killmails who was not verified before are verified without modification.
For this modification we need Ship Display Mode. (i don't know if function is in original KB)
api_verified.tpl at line 6 i replace :

Code: Select all

{if $api_verified_status}
by :

Code: Select all

{if $extid != 0}

User avatar
Salvoxia
Developer
Posts: 1515
Joined: Wed Feb 22, 2012 12:11

Re: [EDK4] API Verified Mod

Post by Salvoxia » Fri May 02, 2014 19:48

I stand corrected. I'm actually not using THIS mod, but the one by SirQuentin (which is very very similar, but not exactly the same).

Lum
Greenhorn
Posts: 22
Joined: Wed Mar 16, 2011 16:13

Re: [EDK4] API Verified Mod

Post by Lum » Thu May 21, 2015 16:37

Sorry for kind of a necro but I'm investigating why some killmails which don't have an external ID set in the database are showing up as verified with this mod.

So I compared your version with the original version by Sir Quentin and among some others differences found this addition in mods\api_verified_mod\api_verified.php:

Code: Select all

$time = time();
$offset = 172800;
$timestamp = $kill->getTimeStamp();
if (strtotime($timestamp) < ($time-$offset))
{
	$verification = true;
}
This is not present in the original version and I am in fact a bit confused on the logic here. Why is some specific time difference (more specifically 172800 seconds / 48 hours / 2 days) a valid reason for labelling a killmail as verified?

I additionally found that there are cases in which the "Source" is not displayed. This is unrelated to the above and applies to both this version and the original version of the mod.
Without investigating too deeply I assume it happens when the kill doesn't have a corresponding row in the kb3_log table. This happens for example when the mail is imported via .txt files (through the Admin interface).

So to address such cases I made the following small addition into mods\api_verified_mod\api_verified.tpl

Code: Select all

{else if $type == ""}
    <td align="center" width="64"><b>Unknown</b></br>(File/Database import?)</td>
This is the before/after in case someone else finds it useful:
Image

User avatar
edp
Someday Author
Posts: 93
Joined: Fri Sep 25, 2009 19:10

Re: [EDK4] API Verified Mod

Post by edp » Tue Jun 06, 2017 09:20

The are php errors, expecially with php7. Non-static methods should not be called statically. The following changes to the init.php file fixes this. It also complies with the revised die method for security.

Code: Select all

<?php
	if(!defined('KB_SITE')) die ("Go Away!");
	
	$modInfo['api_verified_mod']['name'] = "Api verified Mod";
	$modInfo['api_verified_mod']['abstract'] = "Show if a kill is api verified or not and where its from.";
	$modInfo['api_verified_mod']['about'] = "by <a href=\"http://www.back-to-yarrr.de\" target=\"_blank\">Sir Quentin</a>";

	event::register("killDetail_context_assembling", "api_verified::add");

	class api_verified
	{
		public static function add($page)
	{
		$page->addBehind("points", "api_verified::show");
	}
  
  	public static function show(){
  	global $smarty;
 		include_once('mods/api_verified_mod/api_verified.php');
  	$html .= $smarty->fetch("../../../mods/api_verified_mod/api_verified.tpl");
    return $html;
  }
}
?>

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests