Can I change files in the sharepoint \ LAYOUTS \ folder? - sharepoint

I know we shouldn't and I have never done this before, but something came up that I need to do, change a color in a .css file in the \ LAYOUTS \ folder and the context of the current solution does not allow me to change this color in a simple way otherwise not be messing with the color source file.
I believe it will not impact anything, but I am still looking for information about this change.
Can I go on with this?

I would not recommend it.
Of course it is fine to add some application page to _layouts folder to include a reusable page which might be used on any SP site or add some css or images or js which might be included in any SP site or masterpage used globally, but I think it is not ok to modify the OOTB files from _layouts folder, as we may not always be aware of all the places this particular script or css or other is used. So to sum up, it might be done, but as a last resort, but it is ok to include some new file and use it (best by proper SP project or mapped folder in the project).
My understanding is that this location store files (like js, css, images, or application pages) which may be used on any SP site by simply going to /_layouts/ path
For more information please check this link

Related

Express with PHP-Like Folders

Instead of just using Express for single-page-sites and web applications, I've recently been trying to use express to replace a php Intranet site, where the site has many different pages and some of those pages are just intended to be totally different from others on the same site.
As I develop web pages on Express, there's one aspect (and only one) of php I kind of miss and that is:
With php you could easily group all static-files related to a particular web page into one folder with the server-side-scripting.
For example, sometimes a page I create has static files and views that are not going to be needed by other pages in the entire site, and for pages like this, I like to just put all the images, client-side-javascripts, css, and server-side-scripting into a single folder. Later, if I need to edit this page, I can go right-click on that folder and open all related files (client-side and server-side) in my text-editor at once.
With Express, I have to create a route in one place, put static files in a folder some other place and create views in yet another place. Later when I want to open up all the files related to the page, I have to go to multiple places to get all those files tabbed into my text-editor.
With php, there was no need to create a route. By simply placing an index.php file into a folder the route was created. Then, placing all page-related resources into that same folder was no problem for php.
I am no fan of PHP; I've never liked it as a scripting language. Yet, every once in a while I miss certain aspects of it. This is one of those aspects.
Has anyone published an app.js file where, during first launch, it recursively scans the application's folders auto creating routes based on the fact that a folder contains an index.js file in it? Also, such a script would also have to make all other files in these folders static, except for server-side-resource files like views and server-side scripts.
I'm not even sure this is a good idea, but I'm curious if anyone has attempted to build something on top of express that acts similar to what I'm describing.

Creating a link to a downloadable file in Orchard CMS

I've spent several hours trying to figure this out; hopefully, it's an easy solution and the difficulty is simply because I'm brand new to Orchard CMS and no where near an expert web developer...
I've created a Products Download page and need to insert hyperlinks to files that exist on the file system.
the path to the file (on disk) is : c:\Orchard CMS\Downloads\ProductOne\File1.zip
in the page editor, I insert a hyperlink reference with the following URL: /Downloads/ProductOne/File1.zip
When I hover over the hyperlink, it looks correct: http://localhost:12345/Downloads/ProductOne/File1.zip
However, when I click the link, I receive the following exception:
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Any help would be extremely appreciated!
If you don't want to play with source code and web.config files you should use Orchard Media feature. It allows you to upload files into Orchard filesystem and manage those. Links to files uploaded this way look like http://www.myorchardsite.com/Media/[Media folder path]/YourFile.zip
If you are not an experienced developer, I'd strongly advise you to take this approach. The only drawback is that you'd have to reupload those files into Orchard. But this is not as bad as it looks - you can zip them and upload as a single file (Orchard will take care of unpacking the archive if you check the checkbox below upload field).
You need a web.config file that allows the files to be served. You can use one from one of the content directories that can be found in modules or themes.

SharePoint 2007 custom theme. where did this CSS file come from?

We set up the SharePoint 12 hive folder for a custom theme with a new xml entry and folder.
Is everything required for a custom theme living in the theme folder? I'm asking because we are seeing CSS files that appear to be dynamically named rendered on SharePoint pages in the folder that are not actually in the folder.
Will we have to use SPD and custom site changes to get a custom theme to work?
I've got a designer working only in the theme folder, but he is seeing rendered css that he can't get to. He is not using SPD
That 1011-65001 squence file is found nowhere? what is that an where can I find it. Any way to have my custom theme all hard fixed name css files in that folder without using SPD?
/_themes/MYNEWFOLDER/MYNEWTHEME1011-65001.css?rev=12%2E0%2E0%2E6421
===
Update: I just realzed that css is creatd when I apply the theme and so it's in my _themes site folder. But now, when I attempt to re-apply the theme, that was working before, now i get a write error on _themes.
I can answer your first query why its dyanamic name this is because themes which you installed are ghosted version and when you apply them an unghosted version is created for the specific site where it is applied. so a dyanamic naming is required and it cannot be hard coded in MOSS even if you try using SPD you can do it but you have to remove the theming then.
the same you have also have notified in update that the css name is changed only when you apply it.
regarding your second issue of reapplying it did you try applying another them and then back to first one and is giving error then please check the 12 hive logs it will give you cause of failure and if still you are not able to figure out the same plz share the relavent log here we will try to help you

Sharepoint: Where to store assets used in my custom master page?

I'm creating a custom master page for my SharePoint 2010 publishing site. There are images, css files and js files associated with this custom master page. Where should they be stored?
I'm using the SiteAssets library for now - is this a good choice?
Thanks.
Yeah that is a good choice, also make sure you Provision all these files using Feature, this way upate of Files becomes easier.
In my opinion, you should store everything under the site collection libraries, this way you get:
Easy recovery in the cases you need to re-install the server[s]
Versioning and permissions on resources
Separation of resources between site collection
Simple deployment between environments, as you do not need to copy the files manually or design and deploy a feature to do it for you
The preferred place is of course Style Library, this is what it is intended for.
If you are creating and deploying your files through code, you can also use the _layouts directory to store your files. This makes it simpler to share files between site collections. Visual Studio 2010 makes it really simple to add a reference to the Images folder and any files will then be deployed to the _layouts/Images URL.
The only advantage of this is that a site collection administrator cannot make changes to these files, only someone with access to the physical server. (Although this can also be a disadvantage if your logos or images are changing regularly).
I usually store them in _catalogs/masterpage/ORGNAME/...
You can refer this blog for actual implementation
http://markviky.blogspot.com/2010/11/sharepoint-2010-web-content-management.html
-Vighnesh Bendre

How to get to the admin page in Drupal

I've downloaded Drupal 6 and installed it on my local server, and ported a basic web site as a custom theme. I've set this as the default theme and everything works okay; the page appears nice with all the images and layout.
The problem is that now, no matter what I type as the URL I always get to my page. So how can I go to the admin page? /q=user does not work. I can change the theme from the database but that is not what I want. I just want to keep this theme and be able to access all the Drupal functionality.
For the custom page i've created the page.tpl.php and .info file. Along with the CSS file I've put them all in a new folder in the themes directory.
#abhaga's answer is spot on - you've turned the entire site's theme into a single page's HTML, so they're all going to be the same.
If you'd like to avoid glitching the admin side of things with a bad template file, you can set one of the core themes as your "administration theme" (in Site Configuration) - that way, the admin backend will always use that theme regardless of the other templates.
Ah! Basically page.tpl.php specifies the over all structure of site. Look at the original page.tpl.php file - it will be printing a variable called $content somewhere. That is the variable holding all the content of your specific page. You will need to print it at appropriate place in your pge.tpl.php
You should check out the right way of creating a theme here: http://drupal.org/theme-guide/6

Resources