[EDK4/EDK4.2] Cyno/Cloak Mod for the killlisttable

Discuss/Upload mods to the EVE-Dev Killboard.
PyroTech03
Someday Author
Posts: 78
Joined: Mon Jun 13, 2011 12:21

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by PyroTech03 » Fri Dec 16, 2011 23:22

Tyranero wrote:
Can you post your killlisttable.tpl? Maybe using http://pastebin.com/?
And did you checked the box in the modules page next to the mod? ;)
Yes, it's ticked....would you like a screenshot? :lol:

Here's a link to kbroot/mods/killlisttable.tpl

http://pastebin.com/DDGZTeZG
Image

tripstarrr
Greenhorn
Posts: 30
Joined: Mon Jul 11, 2011 13:14

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by tripstarrr » Sat Dec 17, 2011 02:37

mod is not working with simple urls turned on. nice mod though. fix this and well be sweet

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

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Khi3l » Sat Dec 17, 2011 11:30

I've found another way to display cyno/cloak on killlisttable without have any issue with templates or simple urls. See here : http://babylonknights.com/kb/

Tell me if you are interested.

Tyranero
Apprentice
Posts: 46
Joined: Sat Sep 10, 2011 14:41

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Tyranero » Sat Dec 17, 2011 12:23

Khi3l wrote:I've found another way to display cyno/cloak on killlisttable without have any issue with templates or simple urls. See here : http://babylonknights.com/kb/

Tell me if you are interested.
Yes, I'm interested. How did you do it without changing the template? Send me a pm if you like.

Tyranero
Apprentice
Posts: 46
Joined: Sat Sep 10, 2011 14:41

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Tyranero » Sat Dec 17, 2011 12:41

PyroTech03 wrote:
Tyranero wrote:
Can you post your killlisttable.tpl? Maybe using http://pastebin.com/?
And did you checked the box in the modules page next to the mod? ;)
Yes, it's ticked....would you like a screenshot? :lol:

Here's a link to kbroot/mods/killlisttable.tpl

http://pastebin.com/DDGZTeZG

Edit: Can you please update to v0.3? I've added some kind of debugging so I know at least if the mod is being loaded.

I'm fetching the data about fitted cyno/cloaks directly from the db, I'm not quite sure if there could be a problem with the dropped/destroyed item tables (as discussed here: http://eve-id.net/forum/viewtopic.php?f ... 210#p40581).
Last edited by Tyranero on Sat Dec 17, 2011 13:01, edited 1 time in total.

Tyranero
Apprentice
Posts: 46
Joined: Sat Sep 10, 2011 14:41

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Tyranero » Sat Dec 17, 2011 12:59

Okay, front page is updated, I've released v0.3 of the mod for added support for simplified urls.

As for you PyroTech03, I'd like to meet in irc for some live debugging. If the cyno/cloak arrays fetched from the db are empty, it won't display the icons, therefore it must be an issue with my sql statement. If the array contains actual ids, it's an issue with the kill id, so I recommend you update your killlisttable.tpl with the new one from v0.3.

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

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Khi3l » Sat Dec 17, 2011 13:10

Tyranero wrote:Yes, I'm interested. How did you do it without changing the template? Send me a pm if you like.
I have modified two files :

class.killlisttable.php :

add before function generate()

Code: Select all

	function getCynos()
	{
		$cynoq = new DBQuery();
		$cynosql = "select itd_kll_id from kb3_items_dropped where itd_itm_id = 21096 or itd_itm_id = 28646 and itd_itl_id = 1 union select itd_kll_id from kb3_items_destroyed where itd_itm_id = 21096 or itd_itm_id = 28646 and itd_itl_id = 1";
		$cynoq->execute($cynosql);
		while ($kill = $cynoq->getRow())
		{
			$cynos[] = $kill[itd_kll_id];
		}
		return $cynos;
	}

	function getCloaks()
	{
		$covertq = new DBQuery();
		$covertsql = "select itd_kll_id from kb3_items_dropped where (itd_itm_id = 11370 or itd_itm_id = 11577 or itd_itm_id = 11578 or itd_itm_id = 14234) and itd_itl_id = 1 union select itd_kll_id from kb3_items_destroyed where (itd_itm_id = 11370 or itd_itm_id = 11577 or itd_itm_id = 11578 or itd_itm_id = 14234) and itd_itl_id = 1";
		$covertq->execute($covertsql);

		while ($kill = $covertq->getRow())
		{
			$coverts[] = $kill[itd_kll_id];
		}
		return $coverts;
	}
Find :

Code: Select all

$kll['timestamp'] = $kill->getTimeStamp();
Insert After :

Code: Select all

			if (in_array((int) $kll['id'], $cloaks))
			{
				$kll['cloak'] = true;
			}
			else
			{
				$kll['cloak'] = false;
			}
			// Cyno ?
			if (in_array((int) $kll['id'], $cynos))
			{
				$kll['cyno'] = true;
			}
			else
			{
				$kll['cyno'] = false;
			}
Save and close

in killlisttable.tpl find :

Code: Select all

{$k.victimshipclass}
Just after add :

Code: Select all

{if $k.cloak}&nbsp;<img style="border: 0; vertical-align: -5px;" src="{$theme_url}/img/cloak.png" alt="CLOAK" />{/if}{if $k.cyno}&nbsp;<img style="border: 0; vertical-align: -5px;" src="{$theme_url}/img/cyno.png" alt="CYNO" />{/if}
save and close

Upload attached images to themes/your_template/img folder.

You're done.
Attachments
cyno.png
cyno.png (982 Bytes) Viewed 6493 times
cloak.png
cloak.png (861 Bytes) Viewed 6493 times

Tyranero
Apprentice
Posts: 46
Joined: Sat Sep 10, 2011 14:41

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Tyranero » Sat Dec 17, 2011 13:20

Khi3l wrote:--stuff--
Yeah, that's another approach, but I'm afraid it won't fix pyro's problem, since you only put my request into the kill list class. Therefore, the request is being issued on every kill list (like, every day), and not just once per pageload --> more load :shock: . AND it's hard coded :sadface:. If you want to code the mod hard into the classes, I'd change the kill class where the dropped/destroyed items are being calculated and hook into there, set a flag if cyno/cloak was fitted, connect it through to the killlist and read something like $k.hadCyno in the template - but the sql request from inside the mod, executed only once on page load, should be the best way.
On the other hand, your way to append the icons for cyno/cloak is nice, I guess I'll add a config option to select between td/inline images in the next version.

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

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by leecraven » Wed Dec 21, 2011 16:34

I can confirm there are CSS issues with alignment and such with the default theme with the top killers/scorers etc.

They overlap.

Tyranero
Apprentice
Posts: 46
Joined: Sat Sep 10, 2011 14:41

Re: [EDK4] Cyno/Cloak Mod for the killlisttable

Post by Tyranero » Fri Dec 23, 2011 17:43

Okay, I'm having kind of an issue with the my css file not being loaded on other pages than the front page. I load it via

Code: Select all

	public static function init(&$home) {
		// Load the css
		$home->addBehind("start", "cynoCloakMod::loadCSS");
		...
	}
public static function loadCSS($home) {
		$home->page->addHeader("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"mods/cynoCloakMod/cynoCloakMod.css\" />");
		}
It works on the front page, but not on any other kill lists, like the second page,... and the filtered kill list from the summary table. Can someone help with that?

Edit: It only happens with simple URL's turned on. Example page: http://kb.snuffboxcorp.com/index.php/?a=home&scl_id=15

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 16 guests