Needs review
Project:
Context Add Assets
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
15 Sep 2010 at 20:35 UTC
Updated:
17 Aug 2011 at 14:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
electblake commentedI see the following options:
* On an administration page (sites > config > context add assets) there is an option to manually add paths for context_addassets to index to be shown on the "Add Theme CSS" section, or possibly another reaction entitled "Add Module CSS" or simply "Add CSS" ?
* On an administration page (sites > config > context add assets) there is a list of all modules recognized by the system, which you can click enable/disable inclusion into the Add Assets index, and the renaming conventions for the reaction (from above point) still apply.
Remarks?
Comment #2
milos.kroulik commentedI vote for another reaction to keep things clean as possible and accessible in the Context interface.
Comment #3
electblake commentedOk - so I'm going to create an admin interface for selecting module(s) to be added to a "Add Module CSS" reaction and another for entering in arbitrary paths, and an "Add Generic CSS" reaction (or maybe different language there, any suggestions?)
Comment #4
milos.kroulik commentedMaybe "Add custom CSS"? But I am OK with anything.
Comment #5
electblake commentedSo I've added 2 more ways of finding Assets, both of which are access at: admin/build/context/addassets
See screenshot for full list of all reactions now.
commit #423304
Comment #6
electblake commentedonce this feat. has been tested going to issue a release for 1.0-beta1
Comment #7
ebeyrent commentedI cannot seem to get this to work.
My modules directory uses a structure of
- sites/all/modules/contrib
- sites/all/modules/custom
All of my custom modules that provide a css file do so in a css directory within the module.
My themes directory uses the same structure.
Regarding the themes, I have a custom base theme which is a subtheme of Fusion, and sub-themes of the custom base theme.
After configuring the module with my custom modules and a custom path, I am unable to add any css via the Context UI interface. I add the reaction and get the message "No Assets Found".
Comment #8
ebeyrent commentedAs it turns out, if I change
$files_raw[$name] = file_scan_directory($dir, $mask);to
$files_raw[$name] = file_scan_directory($theme['path'], $mask);it works for the themes. In the paths and modules cases, this works for me:
$files_raw[$path] = file_scan_directory($path, $mask);Comment #9
electblake commentedinteresting - I'll take another look at this :)
Comment #10
macaronibros commentedHi, similar issue here.
We have a site installed in a subdir of the webserver root (like www.example.com/site).
At line 335 this instruction
$dir = realpath('.') . base_path() . $theme['path'];result in a double inclusion of /site, since it's already
included in realpath('.') and then taken again by base_path().
We solved by patching like 338 like that
$files_raw[$name] = file_scan_directory($theme['path'], $mask);Comment #11
eynie commentedSimilarily, in case of File Paths, while working on Windows workstation (as in development environment) in the indexed path the site directory is repeated and directory separators are getting mixed.
Example:
C:\WWW\server_root\site_directory/site_directory/sites/all/themes/my_theme/custom-css-dirReplacing
$dir = realpath('.') . base_path() . $path;with
$dir = $path;works for me, but i think it should be resolved more proper way.