Loading content models and webscripts from specific directory in Alfresco - alfresco

By default, Alfresco load content models and webscripts from its directories, default places where we put our code(java, javascript) and our custom content models. I would like "to tell" Alfresco to load mi stuff from a different directory. For example, Alfresco is installed in /home/Alfresco and mi stuff is in /home/mistuff. I would prefer to load all webscripts and content models inside this directory, no matter nested folders. The idea would be to add a path to default places for loading of Alfresco.

Related

How to host GitHub repo on Nimbella

How can I host my github repo on Nimbella .
I have created a website using HTML,CSS,JS. which I have hosted on GitHub pages. but I want to host it on Nimbella.
https://nimbella.io/downloads/nim/nim.html#adding-static-web-content
Adding static web content
To add static web content to a project, add a directory called web as a peer of the directory called packages. This directory should contain files whose suffixes imply well-known mime types for web content, such as .html, .css, or .js.
Note: JavaScript files in static web content are not actions but are scripts intended to run in the browser.
The web directory can have subdirectories and can be built by website builders or other tools.
Like an action directory, the web directory may contain .include or .ignore to control what is actually considered web content, as opposed to build support or intermediate results. For more information about .include and .ignore, see Multifile actions created with autozip.
The web directory also supports integrated building, just like an action directory.
Here’s an example of a project with modest web content, populated by hand. For simplicity, the actions of the project are not shown.
example3/web/chatroom.html
example3/web/chatroom.css
example3/web/runner.js
example3/web/favicon.ico

How to reference a file (e.g. testaudio.mp3) from another file (e.g. index.html) in Alfresco

I have a mp3 file in a folder called "audio" in Alfresco. I would like to have a link that points to that file in my index.html file which resides in another folder.
For example: <a href="pathToTheFile>test song 1</a>
How would I reference that file? I tried with href="/share/proxy/alfresco/api/node/content/workspace/SpacesStore/xxx-xxx-xxxxx/testMP3.mp3" and it does not work. Or is it even possible with Alfresco? I am using the web interface.
My apologies for not making myself clear. I am using Alfresco Explorer Community Edition for management, and the website I'm working on is based on Spring MVC and pulls content from index.html files in Alfresco.
Currently I need to use <embed> tags to include a mp3 file to index.html, and the mp3 file is also stored within the Alfresco repository but in a different folder.
How would I reference the mp3 file from the index.html file? The referencing has to work when the index.html is deployed to the client website, and currently the client website is referencing files in Alfresco in the following manner: <img src=/asset/xxxxxx-xx-xxx/test.png>(There is no asset folder in the Alfresco repository, and somehow that works...). But this does not work for my mp3 file...
To access alfresco content using the RESTful api, you should be querying this webscript: /alfresco/d/<d|a>/<workspace>/<store>/<nodeId>/<filename>
where :
d and a refer to direct / attached mode
<workspace>, <store> and <nodeId> reference your content nodeRef
<filename> a file name of your choice
So your URL should look something like this http://<host>:<port>/alfresco/d/d/workspace/SpacesStore/8444ad61-4734-40e3-b2d4-b8b1c81347fd/test.mp3
Note : Depending on the permission set on your node, you might need to attach an alf_ticket to the URL for an authenticated alfresco user. Please check this for further insights.

Drupal6: I need to customize file upload links in node edit form

I am customizing the node/add and node/edit forms of a content type with a form_alter. In my content type, there is a file field that permits to upload files to the content.
What I would like to do is to customize the file box by changing the link to the file that is composed at runtime with Ajax. How can I do it without modifying Drupal core?
Your Private Files directory should not be in the docroot. Hiding it with a .htaccess rule will not work, as you point out in a comment.
Say you have Drupal in /var/www/sites/example.com/, then you should not store your private files under that directory; /var/www/sites/example.com/sites/default/private/files/ is just plain wrong.
You should, instead store the files where apache will not serve them, but can read them. E.g. in /var/www/files/example.com/. Then change the setting in Drupal to use that absolute path.
If you are running a large(r) site, you will probably want to store your files on a dedicated mount (drive, NFS etc.), say /media/nfs-example-com/.
Try Filefield Paths:
The FileField Paths module extends the default functionality of Drupals core Upload module, the FileField module and many other File Upload modules by adding the ability to use node tokens in destination paths and filenames.
http://drupal.org/project/filefield_paths

Source control strategy for specific folders within CMS-generated site

I have an ASP.NET website where most of the pages are generated and published via a CMS system. This includes static HTML, CSS, ASPX, ASP, images, etc.
However, we have some user controls and pages that are managed by a separate dev team. These files live under the same web root but are not managed in the CMS. These files are limited to a few files and folders under the web root:
/bin
/user-controls
/custom-aspx
/web.config
(everything else under "/" is CMS-generated)
We don't want to check in all the CMS-generated items into source control (TFS in our case), because those files are constantly changing and versioning is managed within the CMS.
How should we handle source control for the directories listed above? Should we just check those in separately?
I see 3 options:
Checkout your version controlled file tree to root and add an ignore parameter for all CMS generated files (assuming they have a set of extensions that make this feasible).
Checkout each of the directories (/bin, /user-control, ...) separately to sub-directories of root, and make sure that no CMS generated files are written to these directories.
Checkout your version controlled file tree to root and just don't run svn add on any of the CMS generated media.

How to store Blobs in Drupal?

I want to store PDF and Image files in Drupal. By default Drupal seems to store binary/uploaded files into the filesystem. I want to to be able to store files so that - I can have workflows, metadata, IP information and URL aliases?
Update, am still stuck at how to create URL aliases for files on the file system. Drupal only seems to allow creating URL aliases to node content.
The simplest solution for Drupal is to use the Upload module, which is in core. The upload module allows you attach files to nodes. As you note, they are stored in the filesystem.
If you want to get more complex, you can build your own content types through the web interface by using the CCK family of modules (such as the filefield module or the imagefield module). Your files are still stored on the filesystem.
You could use CCK to create the metadata field you want.
You could use the workflow or rules modules to implement workflow.
IP information is recorded automatically by Drupal's logging module (either the database logging module, which logs to the database, or the syslog module, which logs to syslog).
URL aliases for nodes are available in core Drupal by enabling the path module (or download the pathauto module for automatic creation of aliases).
I tried Drupal's Upload module, FileField as well as uploading files using FCKEditor - I prefer the last one - it is closer to my specific scenario.
Creating an alias to the file will likely require some custom code.
It's not possible to simply create an alias using the Administer > Site building > URL aliases screen. I tried inserting a record with
insert into url_alias (src, dst) values ('sites/default/files/ChipotleArt.JPG', 'here-is-the-file.jpg');
That still didn't work. So, you will really likely need to write some custom code.

Resources