Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More work on sync plugins. Roster view now uses plugins to display sp…
…ecific things. Version changed to 0.6.3
- Loading branch information
Showing
9 changed files
with
136 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/*------------------------------------------------------------------------ | ||
# RaidPlanner Sync Plugin master class | ||
# com_raidplanner - RaidPlanner Component | ||
# ------------------------------------------------------------------------ | ||
# author Taracque | ||
# copyright Copyright (C) 2012 Taracque. All Rights Reserved. | ||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL | ||
# Website: http://www.taracque.hu/raidplanner | ||
-------------------------------------------------------------------------*/ | ||
// no direct access | ||
defined( '_JEXEC' ) or die( 'Restricted access' ); | ||
|
||
class RaidPlannerPlugin | ||
{ | ||
protected $params = array(); | ||
protected $guild_name = null; | ||
protected $guild_id = null; | ||
|
||
function __construct( $guild_id, $guild_name, $params) | ||
{ | ||
$this->params = $params; | ||
$this->guild_name = $guild_name; | ||
$this->guild_id = $guild_id; | ||
} | ||
|
||
public function needSync( $sync_interval = 4) | ||
{ | ||
$db = & JFactory::getDBO(); | ||
$query = "SELECT (DATE_ADD(lastSync, INTERVAL " . intval( $sync_interval ) . " HOUR)-NOW()) AS needSync FROM #__raidplanner_guild WHERE guild_id=" . intval($this->guild_id); | ||
$db->setQuery($query); | ||
if ( ($needsync = $db->loadResult()) && ( $needsync<0 ) ) | ||
{ | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
public function doSync( $showOkStatus = false ) | ||
{ | ||
return false; | ||
} | ||
|
||
public function characterLink() | ||
{ | ||
return "#"; | ||
} | ||
|
||
public function guildHeader() | ||
{ | ||
return "<h2>" . $this->guild_name . "</h2>"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters