Skip to content

Instantly share code, notes, and snippets.

@totten
Last active July 17, 2017 19:55
Show Gist options
  • Save totten/8905ba6ca805d44efe8f8585eb34dcbc to your computer and use it in GitHub Desktop.
Save totten/8905ba6ca805d44efe8f8585eb34dcbc to your computer and use it in GitHub Desktop.
Example listing of hard-coded references to key dirs
$ svngrep packages/ CRM/ api Civi templates/
CRM/Contact/Form/Search.php: ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
CRM/Contact/Form/Search.php: ->addStyleFile('civicrm', 'packages/jquery/plugins/jstree/themes/default/style.css', 0, 'html-header');
CRM/Core/BAO/RecurringEntity.php:require_once 'packages/When/When.php';
CRM/Core/ClassLoader.php: $file = dirname(__FILE__) . '/../../packages/IDS/vendors/htmlpurifier/HTMLPurifier/Bootstrap.php';
CRM/Core/CodeGen/Util/Smarty.php: $smarty->plugins_dir = array("$base/packages/Smarty/plugins", "$base/CRM/Core/Smarty/plugins");
CRM/Core/IDS.php: filter_path = {$civicrm_root}/packages/IDS/default_filter.xml
CRM/Core/Resources.php: "packages/jquery/plugins/jquery.mousewheel.min.js",
CRM/Core/Resources.php: "packages/jquery/plugins/jquery.form.min.js",
CRM/Core/Resources.php: "packages/jquery/plugins/jquery.timeentry.min.js",
CRM/Core/Resources.php: "packages/jquery/plugins/jquery.blockUI.min.js",
CRM/Core/Resources.php: "packages/jquery/plugins/jquery.ui.datepicker.validation.min.js",
CRM/Core/Resources.php: $items[] = "packages/jquery/plugins/jquery.tableHeader.js";
CRM/Core/Resources.php: $items[] = "packages/jquery/plugins/jquery.menu.min.js";
CRM/Core/Resources.php: $items[] = "packages/jquery/plugins/jquery.notify.min.js";
CRM/Financial/Form/Search.php: ->addScriptFile('civicrm', 'packages/jquery/plugins/jquery.redirect.min.js', 0, 'html-header');
CRM/Mailing/Config.php: const OUTBOUND_OPTION_MOCK = 4; // seems to be the same as 2, but also calls Mail's pre/post hooks? - see packages/Mail
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone/json2.js', 100, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone/backbone.js', 120, 'html-header')
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone/backbone.marionette.js', 125, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone/backbone.collectionsubset.js', 125, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone-forms/distribution/backbone-forms.js', 130, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone-forms/distribution/adapters/backbone.bootstrap-modal.min.js', 140, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/backbone-forms/distribution/editors/list.min.js', 140, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addStyleFile('civicrm', 'packages/backbone-forms/distribution/templates/default.css', 140, 'html-header')
CRM/UF/Page/ProfileEditor.php: ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
CRM/UF/Page/ProfileEditor.php: ->addStyleFile('civicrm', 'packages/jquery/plugins/jstree/themes/default/style.css', 0, 'html-header')
CRM/Upgrade/Incremental/General.php: $ofcFile = "$civicrm_root/packages/OpenFlashChart/php-ofc-library/ofc_upload_image.php";
CRM/Utils/Check/Component/Security.php: "{$civicrm_root}/packages/dompdf/dompdf.php",
CRM/Utils/Check/Component/Security.php: "{$civicrm_root}/packages/vendor/dompdf/dompdf/dompdf.php",
CRM/Utils/Check/Component/Security.php: "{$civicrm_root}/packages/OpenFlashChart/php-ofc-library/ofc_upload_image.php",
CRM/Utils/Check/Component/Security.php: "{$civicrm_root}/packages/html2text/class.html2text.inc",
CRM/Utils/OpenFlashChart.php:require_once 'packages/OpenFlashChart/php-ofc-library/open-flash-chart.php';
CRM/Utils/PDF/Utils.php: require_once 'packages/snappy/src/autoload.php';
CRM/Utils/ReCAPTCHA.php: require_once 'packages/recaptcha/recaptchalib.php';
CRM/Utils/String.php: require_once 'packages/html2text/rcube_html2text.php';
templates/CRM/common/navigation.js.tpl:$('#civicrm-menu').menuBar({arrowSrc: CRM.config.resourceBase + 'packages/jquery/css/images/arrow.png'});
templates/CRM/common/openFlashChart.tpl:<script type="text/javascript" src="{$config->resourceBase}packages/OpenFlashChart/js/json/openflashchart.packed.js"></script>
templates/CRM/common/openFlashChart.tpl:<script type="text/javascript" src="{$config->resourceBase}packages/OpenFlashChart/js/swfobject.js"></script>
templates/CRM/common/openFlashChart.tpl: var flashFilePath = {/literal}"{$config->resourceBase}packages/OpenFlashChart/open-flash-chart.swf"{literal};
-- OK --
Civi/Core/Paths.php: 'path' => \Civi::paths()->getPath('[civicrm.root]/packages/'),
Civi/Core/Paths.php: 'url' => \Civi::paths()->getUrl('[civicrm.root]/packages/'),
$ svngrep vendor/ CRM/ api Civi templates/
CRM/Core/ClassLoader.php: require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php';
CRM/Core/ClassLoader.php: require_once "$civicrm_base_path/vendor/autoload.php";
CRM/Utils/Check/Component/Security.php: "{$civicrm_root}/packages/vendor/dompdf/dompdf/dompdf.php",
CRM/Utils/Check/Component/Security.php: "{$civicrm_root}/vendor/dompdf/dompdf/dompdf.php",
CRM/Utils/System/Drupal8.php: $autoloader = require_once $root . '/vendor/autoload.php';
-- OK --
Civi/Core/Paths.php: 'path' => \Civi::paths()->getPath('[civicrm.root]/vendor/'),
Civi/Core/Paths.php: 'url' => \Civi::paths()->getUrl('[civicrm.root]/vendor/'),
$ svngrep bower_components CRM/ api/ Civi templates/
CRM/Admin/Page/APIExplorer.php: ->addScriptFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.js', 99)
CRM/Admin/Page/APIExplorer.php: ->addStyleFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.css', 99)
CRM/Admin/Page/CKEditorConfig.php: ->addScriptFile('civicrm', 'bower_components/ckeditor/ckeditor.js', 0, 'page-header')
CRM/Admin/Page/CKEditorConfig.php: ->addScriptFile('civicrm', 'bower_components/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js', 1)
CRM/Admin/Page/CKEditorConfig.php: ->addScriptFile('civicrm', 'bower_components/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js', 2)
CRM/Admin/Page/CKEditorConfig.php: ->addScriptFile('civicrm', 'bower_components/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js', 3)
CRM/Admin/Page/CKEditorConfig.php: ->addStyleFile('civicrm', 'bower_components/ckeditor/samples/toolbarconfigurator/css/fontello.css')
CRM/Admin/Page/CKEditorConfig.php: ->addStyleFile('civicrm', 'bower_components/ckeditor/samples/css/samples.css')
CRM/Admin/Page/CKEditorConfig.php: $pluginDir = Civi::paths()->getPath('[civicrm.root]/bower_components/ckeditor/plugins');
CRM/Admin/Page/CKEditorConfig.php: $plugins[$name]['icon'] = "bower_components/ckeditor/plugins/$name/icons/$name.png";
CRM/Admin/Page/CKEditorConfig.php: $plugins[$name]['icon'] = "bower_components/ckeditor/plugins/$name/icons/" . substr($icon, strrpos($icon, '/') + 1);
CRM/Admin/Page/CKEditorConfig.php: $skinDir = Civi::paths()->getPath('[civicrm.root]/bower_components/ckeditor/skins');
CRM/Admin/Page/Navigation.php: ->addScriptFile('civicrm', 'bower_components/jstree/dist/jstree.min.js', 0, 'html-header')
CRM/Admin/Page/Navigation.php: ->addStyleFile('civicrm', 'bower_components/jstree/dist/themes/default/style.min.css');
CRM/Core/Page/QUnit.php: ->addScriptFile('civicrm', 'bower_components/qunit/qunit/qunit.js', 1, 'html-header')
CRM/Core/Page/QUnit.php: ->addStyleFile('civicrm', 'bower_components/qunit/qunit/qunit.css', 1, 'html-header');
CRM/Core/Resources.php: "bower_components/jquery/dist/jquery.min.js",
CRM/Core/Resources.php: "bower_components/jquery-ui/jquery-ui.min.js",
CRM/Core/Resources.php: "bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css",
CRM/Core/Resources.php: "bower_components/lodash-compat/lodash.min.js",
CRM/Core/Resources.php: "bower_components/select2/select2.min.js",
CRM/Core/Resources.php: "bower_components/select2/select2.min.css",
CRM/Core/Resources.php: "bower_components/font-awesome/css/font-awesome.min.css",
CRM/Core/Resources.php: "bower_components/datatables/media/js/jquery.dataTables.min.js",
CRM/Core/Resources.php: "bower_components/datatables/media/css/jquery.dataTables.min.css",
CRM/Core/Resources.php: "bower_components/jquery-validation/dist/jquery.validate.min.js",
CRM/Core/Resources.php: $path = "bower_components/jquery-ui/ui/i18n";
CRM/Tag/Page/Tag.php: ->addScriptFile('civicrm', 'bower_components/jstree/dist/jstree.min.js', 0, 'html-header')
CRM/Tag/Page/Tag.php: ->addStyleFile('civicrm', 'bower_components/jstree/dist/themes/default/style.min.css')
Civi/Angular/AngularLoader.php: $res->addScriptFile('civicrm', 'bower_components/angular/angular.min.js', 100, $this->getRegion(), FALSE);
templates/CRM/common/fatal.tpl: @import url({$config->resourceBase}bower_components/font-awesome/css/font-awesome.min.css);
templates/CRM/common/fatal.tpl: @import url({$config->resourceBase}bower_components/font-awesome/css/font-awesome.min.css);
templates/CRM/Tag/Form/Tag.tpl:{crmStyle file='bower_components/jstree/dist/themes/default/style.min.css'}
templates/CRM/Tag/Form/Tag.tpl: CRM.loadScript(CRM.config.resourceBase + 'bower_components/jstree/dist/jstree.min.js').done(function() {
templates/CRM/UF/Page/Group.hlp: <p>{ts}By changing the relative URLs included in the snippet to absolute URLs (e.g. change "/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=dXCgD" to "https://yourdomain.com/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=dXCgD") you will be able to use the snippet on any website.{/ts}</p>
totten@northprax:~/buildkit/build/dmaster/sites/all/modules/civicrm$
-- OK --
Civi/Core/Paths.php: 'path' => \Civi::paths()->getPath('[civicrm.root]/bower_components/'),
Civi/Core/Paths.php: 'url' => \Civi::paths()->getUrl('[civicrm.root]/bower_components/'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment