Skip to content

Instantly share code, notes, and snippets.

@nikescar
Last active December 18, 2015 20:59
Show Gist options
  • Save nikescar/5844419 to your computer and use it in GitHub Desktop.
Save nikescar/5844419 to your computer and use it in GitHub Desktop.
# put multiple field_types forlder and run patch
# defalt dir for firesal 1.2 multiple field type is
# (pyrocms modules dir)firesale/field_types/multiple
--- field.multiple.php 2013-06-23 18:31:19.131858247 +0900
+++ field.multiple.php 2013-06-23 18:29:51.122152446 +0900
@@ -230,7 +230,19 @@
*/
public function event()
{
- $this->CI->type->add_css('multiple', 'multiple.css');
+ #$this->CI->type->add_css('/addcss/', 'multiple.css');
+ $site_address = site_url();
+ $site_domain = explode('/',$site_address);
+ array_pop($site_domain);
+ $full_domain='';
+ foreach($site_domain as $elem)
+ $full_domain = $full_domain.$elem."/";
+
+ $css_full_path = $full_domain."addons/default/modules/firesale/field_types/multiple/css/multiple.css";
+ #$this->CI->type->add_custom_css($css_full_path);
+ $html = '<link href="'.$css_full_path.'" type="text/css" rel="stylesheet" />';
+ $this->CI->template->append_metadata($html);
+ $this->assets[] = $html;
}
/**
--- ./views/sort_table.php 2013-06-23 18:31:42.629919531 +0900
+++ ./views/sort_table.php 2013-06-23 17:52:18.614408903 +0900
@@ -7,8 +7,14 @@
} else {
$streams = 'streams';
}
+ $site_address = site_url();
+ $site_domain = explode('/',$site_address);
+ array_pop($site_domain);
+ $full_domain='';
+ foreach($site_domain as $elem)
+ $full_domain = $full_domain.$elem."/";
- echo '<script type="text/javascript" src="'.site_url($streams . '/field_asset/js/multiple/multiple_drag.js').'"></script>';
+ echo '<script type="text/javascript" src="'.$full_domain.'addons/default/modules/firesale/field_types/multiple/js/multiple_drag.js'.'"></script>';
define('PYROSTREAMS_MULT_JS_LOADED', TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment