Historic campaigns
Historic campaigns
I've hacked our killboard to show previous campaigns that have passed their end date and are "closed"
I use campaigns to track our efficiency over the past 6 quarters and different periods in our corp's history. It's just fun to be able to look who was the topscorer when in a certain alliance or period in our past.
Every so often this functionality breaks when updating the killboard and my hack has other drawbacks. (like errors generated)
It would be awesome if each campaing had the option to be shown among the active campaings, even if it is past it's end date.
Example; http://www.demonic-retribution.com/
I use campaigns to track our efficiency over the past 6 quarters and different periods in our corp's history. It's just fun to be able to look who was the topscorer when in a certain alliance or period in our past.
Every so often this functionality breaks when updating the killboard and my hack has other drawbacks. (like errors generated)
It would be awesome if each campaing had the option to be shown among the active campaings, even if it is past it's end date.
Example; http://www.demonic-retribution.com/
Re: Historic campaigns
Hi,
I'm interested in how your hack looks at a code level. Would you care to post it?
Best Regards,
Salvoxia
I'm interested in how your hack looks at a code level. Would you care to post it?

Best Regards,
Salvoxia
-
- Someday Author
- Posts: 95
- Joined: Thu May 16, 2013 12:48
Re: Historic campaigns
Hello,
You have do others modifications, Salvoxia can you keep Shiptype close isk losse and colour also
? It could be an option.
You have do others modifications, Salvoxia can you keep Shiptype close isk losse and colour also

Re: Historic campaigns
I'm the worst at documenting my changes, every time my hacks break after an update, i have to reinvent my hack..
Anyway.. doing a compare between clean files and my files i find the following changes to get me my historic contract/campaign list:
In common\includes\class.contractlist.php:
change to:
So my contract are sorted by name (i use numbers in the name to get them ordered)
In common\home.php:
change to:
I think that should be it. Also, after modifying you sometimes need to clear your browser cache to see the effect.
The change/hack i did to display kill/loss isk values with a color based on it's value is a bit more extensive and maybe more suited for another topic if needed.
Anyway.. doing a compare between clean files and my files i find the following changes to get me my historic contract/campaign list:
In common\includes\class.contractlist.php:
Code: Select all
$sql .= " order by ctr_ended, ctr_started desc";
Code: Select all
$sql .= " order by ctr_name";
In common\home.php:
Code: Select all
// Display campaigns, if any.
if (Killboard::hasCampaigns(true) &&
$this->isCurrentPeriod()) {
$html = "<div class='kb-campaigns-header'>Active campaigns</div>";
$list = new ContractList();
$list->setActive("yes");
$list->setCampaigns(true);
$table = new ContractListTable($list);
$html .= $table->generate();
return $html;
Code: Select all
// Display campaigns, if any.
if (Killboard::hasCampaigns(true) &&
$this->isCurrentPeriod()) {
$html = "<div class='kb-campaigns-header'>Campaigns</div>";
$list = new ContractList();
$list->setCampaigns(true);
$table = new ContractListTable($list);
$html .= $table->generate();
return $html;
The change/hack i did to display kill/loss isk values with a color based on it's value is a bit more extensive and maybe more suited for another topic if needed.
Re: Historic campaigns
I do get about 10-15 of these errors (in cache/error.log) every day and I thought they are related to my campaign modificatation:
Could this be related?
Code: Select all
PHP 2016-03-31 02:43:52 512: SQL error (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by 3, 2, 1 -- get corps & alliances for contract' at line 1 in /root/common/includes/class.dbcachedquery.php on line 377
PHP 2016-03-31 05:25:11 512: SQL error (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by 3, 2, 1 -- get corps & alliances for contract' at line 1 in /root/common/includes/class.dbcachedquery.php on line 377
PHP 2016-03-31 07:35:03 512: SQL error (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by 3, 2, 1 -- get corps & alliances for contract' at line 1 in /root/common/includes/class.dbcachedquery.php on line 377
Re: Historic campaigns
Hi,
I took a look at the code and I'm really not sure how this error could occur. Do you somtimes see that error when browsing the killboard as well?
Best Regards,
Salvoxia
I took a look at the code and I'm really not sure how this error could occur. Do you somtimes see that error when browsing the killboard as well?
Best Regards,
Salvoxia
Re: Historic campaigns
My KB had all kinds of permission issues due to wrong file owner/group that I've now solved. Since then a lot of errors have disappeared, along with this one.
I guess it was not related after all
I guess it was not related after all
Re: Historic campaigns
I've just been troubleshooting something else and it turns out my change to home.php gives me a problem with the page counter??
Im being haunted by a "[ Page: 1 2 ]" page counter, where it should count up to 16 for this month:
http://www.demonic-retribution.com/?a=home
If I click "Kills, Losses or All Kills" in the Navigation menu, a 2nd page counter appears that seems to be correct.
Any idea why removing "$list->setActive("yes");" from home.php gives me a 2nd page counter that actually doesn't seem to do anything?
Also, kinda offtopic; why not make the page counter for "All Kills" appear on the default start page? (if combined kills and losses is on)
Im being haunted by a "[ Page: 1 2 ]" page counter, where it should count up to 16 for this month:
http://www.demonic-retribution.com/?a=home
If I click "Kills, Losses or All Kills" in the Navigation menu, a 2nd page counter appears that seems to be correct.
Any idea why removing "$list->setActive("yes");" from home.php gives me a 2nd page counter that actually doesn't seem to do anything?
Also, kinda offtopic; why not make the page counter for "All Kills" appear on the default start page? (if combined kills and losses is on)
Re: Historic campaigns
By removing the filter for showing active campaigns only, the table holding the campaigns grows to more than 10 entries. The table creates the paginator itself, if it has more than 10 entries (see common/includes/class.contractlisttable.php, line 272).
This of course only works correctly in the campaigns view and not on the home page.
This of course only works correctly in the campaigns view and not on the home page.
Re: Historic campaigns
Ahhhh.. that makes alot of sense.
Changed the value to 16 and now my pagesplitter is gone.. Thx alot!
Changed the value to 16 and now my pagesplitter is gone.. Thx alot!