Skip to content

Commit

Permalink
Merge pull request #71 from tzi/pleineLune__plugin-reorganization
Browse files Browse the repository at this point in the history
Plugins reorganization
  • Loading branch information
halfdan committed May 8, 2013
2 parents df7bb48 + 7bce10a commit 20fd9a0
Show file tree
Hide file tree
Showing 624 changed files with 671 additions and 672 deletions.
10 changes: 5 additions & 5 deletions core/AssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ private static function sortCssFiles($cssFiles)
{
$priorityCssOrdered = array(
'libs/',
'plugins/Zeitgeist/theme/common.css',
'plugins/Zeitgeist/theme/',
'plugins/Zeitgeist/stylesheets/common.css',
'plugins/Zeitgeist/stylesheets/',
'plugins/',
);

Expand Down Expand Up @@ -284,9 +284,9 @@ private static function sortJsFiles($jsFiles)
'libs/jquery/jquery-ui.js',
'libs/jquery/jquery.browser.js',
'libs/',
'plugins/Zeitgeist/theme/common.js',
'plugins/Zeitgeist/theme/',
'plugins/CoreHome/templates/broadcast.js',
'plugins/Zeitgeist/javascripts/piwikHelper.js',
'plugins/Zeitgeist/javascripts/',
'plugins/CoreHome/javascripts/broadcast.js',
'plugins/',
);

Expand Down
2 changes: 1 addition & 1 deletion core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ protected function getDefaultWebsiteId()
*/
protected function getDefaultDate()
{
// NOTE: a change in this function might mean a change in plugins/UsersManager/templates/userSettings.js as well
// NOTE: a change in this function might mean a change in plugins/UsersManager/javascripts/usersSettings.js as well
$userSettingsDate = Piwik_UsersManager_API::getInstance()->getUserPreference(Piwik::getCurrentUserLogin(), Piwik_UsersManager_API::PREFERENCE_DEFAULT_REPORT_DATE);
if ($userSettingsDate == 'yesterday') {
return $userSettingsDate;
Expand Down
4 changes: 2 additions & 2 deletions core/DataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* 'visitors' => 155,
* 'pages' => 214,
* 'bounce_rate' => 67)
* - metadata = array('logo' => '/img/browsers/FF.png')
* - metadata = array('logo' => '/plugins/UserSettings/images/browsers/FF.gif')
* - no sub DataTable
*
* A more complex example would be a DataTable_Row that is associated to a sub DataTable.
Expand All @@ -50,7 +50,7 @@
* 'visits' => 1550,
* 'visits_length' => 514214,
* 'returning_visits' => 77)
* - metadata = array( 'logo' => '/img/search/google.png',
* - metadata = array( 'logo' => '/plugins/Referers/images/searchEngines/google.com.png',
* 'url' => 'http://google.com')
* - DataTable = DataTable containing several DataTable_Row containing the keywords information for this search engine
* Example of one DataTable_Row
Expand Down
4 changes: 2 additions & 2 deletions core/Piwik.php
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ static public function exitWithErrorMessage($message)
{
$output = "<style>a{color:red;}</style>\n" .
"<div style='color:red;font-family:Georgia;font-size:120%'>" .
"<p><img src='themes/default/images/error_medium.png' style='vertical-align:middle; float:left;padding:20 20 20 20' />" .
"<p><img src='plugins/Zeitgeist/images/error_medium.png' style='vertical-align:middle; float:left;padding:20 20 20 20' />" .
$message .
"</p></div>";
print(Piwik_Log_Formatter_ScreenFormatter::getFormattedString($output));
Expand Down Expand Up @@ -1483,7 +1483,7 @@ static public function getPrettyNumber($value)
*/
static public function getJavascriptCode($idSite, $piwikUrl)
{
$jsCode = file_get_contents(PIWIK_INCLUDE_PATH . "/plugins/Zeitgeist/theme/javascriptCode.tpl");
$jsCode = file_get_contents(PIWIK_INCLUDE_PATH . "/plugins/Zeitgeist/templates/javascriptCode.tpl");
$jsCode = htmlentities($jsCode);
preg_match('~^(http|https)://(.*)$~D', $piwikUrl, $matches);
$piwikUrl = @$matches[2];
Expand Down
4 changes: 2 additions & 2 deletions core/Tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ function Piwik_Tracker_ExitWithException($e, $authenticated = false)

if (isset($GLOBALS['PIWIK_TRACKER_DEBUG']) && $GLOBALS['PIWIK_TRACKER_DEBUG']) {
$trailer = '<span style="color: #888888">Backtrace:<br /><pre>' . $e->getTraceAsString() . '</pre></span>';
$headerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/themes/default/simple_structure_header.tpl');
$footerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/themes/default/simple_structure_footer.tpl');
$headerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/Zeitgeist/templates/simple_structure_header.tpl');
$footerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/Zeitgeist/templates/simple_structure_footer.tpl');
$headerPage = str_replace('{$HTML_TITLE}', 'Piwik &rsaquo; Error', $headerPage);

echo $headerPage . '<p>' . Piwik_Tracker_GetErrorMessage($e) . '</p>' . $trailer . $footerPage;
Expand Down
2 changes: 1 addition & 1 deletion core/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function __construct($theme = self::DEFAULT_THEME)
private function getDefaultThemeLoader()
{
$themeLoader = new Twig_Loader_Filesystem(array(
sprintf("%s/plugins/%s/theme/", PIWIK_INCLUDE_PATH, self::DEFAULT_THEME)
sprintf("%s/plugins/%s/templates/", PIWIK_INCLUDE_PATH, self::DEFAULT_THEME)
));

return $themeLoader;
Expand Down
2 changes: 1 addition & 1 deletion core/ViewDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ abstract class Piwik_ViewDataTable
* Template file that will be loaded for this view.
* Usually set in the Piwik_ViewDataTable_*
*
* @var string eg. 'CoreHome/templates/cloud.tpl'
* @var string eg. 'CoreHome/templates/cloud.twig'
*/
protected $dataTableTemplate = null;

Expand Down
4 changes: 2 additions & 2 deletions core/testMinimumPhpVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function Piwik_ExitWithMessage($message, $optionalTrace = false, $optionalLinks
<li><a target="_blank" href="http://demo.piwik.org">Piwik Online Demo</a></li>
</ul>';
}
$headerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/theme/simple_structure_header.tpl');
$footerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/theme/simple_structure_footer.tpl');
$headerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/templates/simple_structure_header.tpl');
$footerPage = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Zeitgeist/templates/simple_structure_footer.tpl');

$headerPage = str_replace('{$HTML_TITLE}', 'Piwik &rsaquo; Error', $headerPage);
$content = '<p>' . $message . '</p>
Expand Down
8 changes: 4 additions & 4 deletions plugins/API/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getCssFiles($notification)
{
$cssFiles = & $notification->getNotificationObject();

$cssFiles[] = "plugins/API/css/styles.css";
$cssFiles[] = "plugins/API/stylesheets/listAllAPI.css";
}
}

Expand Down Expand Up @@ -444,7 +444,7 @@ private function sortSegments($row1, $row2)
*/
public function getLogoUrl($pathOnly = false)
{
$logo = 'themes/default/images/logo.png';
$logo = 'plugins/Zeitgeist/images/logo.png';
if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
&& file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo.png')
) {
Expand All @@ -464,7 +464,7 @@ public function getLogoUrl($pathOnly = false)
*/
public function getHeaderLogoUrl($pathOnly = false)
{
$logo = 'themes/default/images/logo-header.png';
$logo = 'plugins/Zeitgeist/images/logo-header.png';
if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
&& file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo-header.png')
) {
Expand All @@ -485,7 +485,7 @@ public function getHeaderLogoUrl($pathOnly = false)
*/
public function getSVGLogoUrl($pathOnly = false)
{
$logo = 'plugins/Zeitgeist/theme/images/logo.svg';
$logo = 'plugins/Zeitgeist/images/logo.svg';
if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
&& file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo.svg')
) {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions plugins/Annotations/Annotations.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getListHooksRegistered()
function getCssFiles($notification)
{
$cssFiles = & $notification->getNotificationObject();
$cssFiles[] = "plugins/Annotations/templates/styles.css";
$cssFiles[] = "plugins/Annotations/stylesheets/annotations.css";
}

/**
Expand All @@ -64,6 +64,6 @@ function getCssFiles($notification)
function getJsFiles($notification)
{
$jsFiles = & $notification->getNotificationObject();
$jsFiles[] = "plugins/Annotations/templates/annotations.js";
$jsFiles[] = "plugins/Annotations/javascripts/annotations.js";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@
// modify the starred count & make sure the correct image is used
var newStarCount = starredCount + starAmt;
if (newStarCount > 0) {
var newImg = 'themes/default/images/yellow_marker.png';
var newImg = 'plugins/Zeitgeist/images/yellow_marker.png';
} else {
var newImg = 'themes/default/images/grey_marker.png';
var newImg = 'plugins/Zeitgeist/images/grey_marker.png';
}
$(this).attr('data-starred', newStarCount).find('img').attr('src', newImg);

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions plugins/Annotations/templates/annotation.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<div class="annotation-star{% if annotation.canEditOrDelete %} annotation-star-changeable{% endif %}" data-starred="{{ annotation.starred }}"
{% if annotation.canEditOrDelete %}title="{{ 'Annotations_ClickToStarOrUnstar'|translate }}"{% endif %}>
{% if annotation.starred %}
<img src="plugins/Zeitgeist/theme/images/star.png"/>
<img src="plugins/Zeitgeist/images/star.png"/>
{% else %}
<img src="plugins/Zeitgeist/theme/images/star_empty.png"/>
<img src="plugins/Zeitgeist/images/star_empty.png"/>
{% endif %}
</div>
<div class="annotation-period {% if annotation.canEditOrDelete %}annotation-enter-edit-mode{% endif %}">({{ annotation.date }})</div>
Expand Down
2 changes: 1 addition & 1 deletion plugins/Annotations/templates/annotationManager.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="annotation-list">
{% include "@Annotations/annotations.twig" %}

<span class="loadingPiwik" style="display:none"><img src="plugins/Zeitgeist/theme/images/loading-blue.gif"/>{{ 'General_Loading_js'|translate }}</span>
<span class="loadingPiwik" style="display:none"><img src="plugins/Zeitgeist/images/loading-blue.gif"/>{{ 'General_Loading_js'|translate }}</span>

</div>

Expand Down
2 changes: 1 addition & 1 deletion plugins/Annotations/templates/evolutionAnnotations.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% if counts.count == 0 %}title="{{ 'Annotations_AddAnnotationsFor_js'|translate(date) }}"
{% elseif counts.count == 1 %}title="{{ 'Annotations_AnnotationOnDate'|translate(date,counts.note) }}{{ 'Annotations_ClickToEditOrAdd'|translate }}"
{% else %}}title="{{ 'Annotations_ViewAndAddAnnotations_js'|translate(date) }}"{% endif %}>
<img src="plugins/Zeitgeist/theme/images/{% if counts.starred > 0 %}yellow_marker.png{% else %}grey_marker.png{% endif %}" width="16" height="16"/>
<img src="plugins/Zeitgeist/images/{% if counts.starred > 0 %}yellow_marker.png{% else %}grey_marker.png{% endif %}" width="16" height="16"/>
</span>
{% endfor %}
</div>
18 changes: 9 additions & 9 deletions plugins/CoreAdminHome/CoreAdminHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ function getCssFiles($notification)
$cssFiles = & $notification->getNotificationObject();

$cssFiles[] = "libs/jquery/themes/base/jquery-ui.css";
$cssFiles[] = "plugins/CoreAdminHome/templates/menu.css";
$cssFiles[] = "themes/default/common.css";
$cssFiles[] = "plugins/CoreAdminHome/templates/styles.css";
$cssFiles[] = "plugins/CoreHome/templates/donate.css";
$cssFiles[] = "plugins/CoreAdminHome/stylesheets/menu.css";
$cssFiles[] = "plugins/Zeitgeist/stylesheets/common.css";
$cssFiles[] = "plugins/CoreAdminHome/stylesheets/generalSettings.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/donate.css";
}

/**
Expand All @@ -84,12 +84,12 @@ function getJsFiles($notification)
$jsFiles[] = "libs/jquery/jquery-ui.js";
$jsFiles[] = "libs/jquery/jquery.browser.js";
$jsFiles[] = "libs/javascript/sprintf.js";
$jsFiles[] = "themes/default/common.js";
$jsFiles[] = "themes/default/ajaxHelper.js";
$jsFiles[] = "plugins/Zeitgeist/javascripts/piwikHelper.js";
$jsFiles[] = "plugins/Zeitgeist/javascripts/ajaxHelper.js";
$jsFiles[] = "libs/jquery/jquery.history.js";
$jsFiles[] = "plugins/CoreHome/templates/broadcast.js";
$jsFiles[] = "plugins/CoreAdminHome/templates/generalSettings.js";
$jsFiles[] = "plugins/CoreHome/templates/donate.js";
$jsFiles[] = "plugins/CoreHome/javascripts/broadcast.js";
$jsFiles[] = "plugins/CoreAdminHome/javascripts/generalSettings.js";
$jsFiles[] = "plugins/CoreHome/javascripts/donate.js";
}

function addMenu()
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion plugins/CoreAdminHome/templates/generalSettings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
{% if isValidHost is defined and invalidHostMessage is defined and not isValidHost %}
<div class="ajaxSuccess">
<a style="float:right" href="http://piwik.org/faq/troubleshooting/#faq_171" target="_blank">
<img src="plugins/Zeitgeist/theme/images/help_grey.png"/>
<img src="plugins/Zeitgeist/images/help_grey.png"/>
</a>
<strong>{{ 'General_Warning'|translate }}:&nbsp;</strong>{{ invalidHostMessage }}
</div>
Expand Down
4 changes: 2 additions & 2 deletions plugins/CoreAdminHome/templates/jsTrackingGenerator.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

{% block head %}
{{ parent() }}
<link rel="stylesheet" href="plugins/CoreAdminHome/templates/jsTrackingGenerator.css"></link>
<script type="text/javascript" src="plugins/CoreAdminHome/templates/jsTrackingGenerator.js"></script>
<link rel="stylesheet" href="plugins/CoreAdminHome/stylesheets/jsTrackingGenerator.css"></link>
<script type="text/javascript" src="plugins/CoreAdminHome/javascripts/jsTrackingGenerator.js"></script>
{% endblock %}

{% block content %}
Expand Down
49 changes: 24 additions & 25 deletions plugins/CoreHome/CoreHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ function getCssFiles($notification)
$cssFiles = & $notification->getNotificationObject();

$cssFiles[] = "libs/jquery/themes/base/jquery-ui.css";
$cssFiles[] = "plugins/Zeitgeist/theme/common.css";
$cssFiles[] = "plugins/CoreHome/templates/styles.css";
$cssFiles[] = "plugins/CoreHome/templates/menu.css";
$cssFiles[] = "plugins/CoreHome/templates/datatable.css";
$cssFiles[] = "plugins/CoreHome/templates/cloud.css";
$cssFiles[] = "plugins/CoreHome/templates/jquery.ui.autocomplete.css";
$cssFiles[] = "plugins/CoreHome/templates/jqplot.css";
$cssFiles[] = "plugins/CoreHome/templates/donate.css";
$cssFiles[] = "plugins/Zeitgeist/stylesheets/common.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/corehome.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/menu.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/datatable.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/cloud.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/jqplot.css";
$cssFiles[] = "plugins/CoreHome/stylesheets/donate.css";
}

/**
Expand All @@ -76,23 +76,22 @@ function getJsFiles($notification)
$jsFiles[] = "libs/jquery/jquery.scrollTo.js";
$jsFiles[] = "libs/jquery/jquery.history.js";
$jsFiles[] = "libs/javascript/sprintf.js";
$jsFiles[] = "plugins/Zeitgeist/theme/common.js";
$jsFiles[] = "plugins/Zeitgeist/theme/ajaxHelper.js";
$jsFiles[] = "plugins/CoreHome/templates/datatable.js";
$jsFiles[] = "plugins/CoreHome/templates/datatable_rowactions.js";
$jsFiles[] = "plugins/CoreHome/templates/popover.js";
$jsFiles[] = "plugins/CoreHome/templates/broadcast.js";
$jsFiles[] = "plugins/CoreHome/templates/menu.js";
$jsFiles[] = "plugins/CoreHome/templates/menu_init.js";
$jsFiles[] = "plugins/CoreHome/templates/calendar.js";
$jsFiles[] = "plugins/CoreHome/templates/date.js";
$jsFiles[] = "plugins/CoreHome/templates/autocomplete.js";
$jsFiles[] = "plugins/CoreHome/templates/sparkline.js";
$jsFiles[] = "plugins/CoreHome/templates/misc.js";
$jsFiles[] = "plugins/CoreHome/templates/datatable_manager.js";
$jsFiles[] = "plugins/CoreHome/templates/donate.js";

$jsFiles[] = "plugins/CoreHome/templates/jqplot.js";
$jsFiles[] = "plugins/Zeitgeist/javascripts/piwikHelper.js";
$jsFiles[] = "plugins/Zeitgeist/javascripts/ajaxHelper.js";
$jsFiles[] = "plugins/CoreHome/javascripts/datatable.js";
$jsFiles[] = "plugins/CoreHome/javascripts/datatable_rowactions.js";
$jsFiles[] = "plugins/CoreHome/javascripts/popover.js";
$jsFiles[] = "plugins/CoreHome/javascripts/broadcast.js";
$jsFiles[] = "plugins/CoreHome/javascripts/menu.js";
$jsFiles[] = "plugins/CoreHome/javascripts/menu_init.js";
$jsFiles[] = "plugins/CoreHome/javascripts/calendar.js";
$jsFiles[] = "plugins/CoreHome/javascripts/date.js";
$jsFiles[] = "plugins/CoreHome/javascripts/autocomplete.js";
$jsFiles[] = "plugins/CoreHome/javascripts/sparkline.js";
$jsFiles[] = "plugins/CoreHome/javascripts/corehome.js";
$jsFiles[] = "plugins/CoreHome/javascripts/datatable_manager.js";
$jsFiles[] = "plugins/CoreHome/javascripts/donate.js";
$jsFiles[] = "plugins/CoreHome/javascripts/jqplot.js";
$jsFiles[] = "libs/jqplot/jqplot-custom.min.js";
}

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var broadcast = {
* 2. after calling $.history.load(); //look at broadcast.changeParameter();
* 3. after pushing "Go Back" button of a browser
*
* * Note: the method is manipulated in Overlay/templates/index.js - keep this in mind when making changes.
* * Note: the method is manipulated in Overlay/javascripts/Piwik_Overlay.js - keep this in mind when making changes.
*
* @param {string} hash to load page with
* @return {void}
Expand Down Expand Up @@ -372,7 +372,7 @@ var broadcast = {
/**
* Loads the given url with ajax and replaces the content
*
* Note: the method is replaced in Overlay/templates/index.js - keep this in mind when making changes.
* Note: the method is replaced in Overlay/javascripts/Piwik_Overlay.js - keep this in mind when making changes.
*
* @param {string} urlAjax url to load
* @return {Boolean}
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 20fd9a0

Please sign in to comment.