How can i upload my tempates to concrete5? - content-management-system

I am using c5 for social networking of my members. For front page i have my own templates in which all my css/images/javascript files are involved.How can i upload my template and change the theme.I just want to use my theme.How can i connect all this?

Why don't you create a theme. In your root/themes/, create a folder and name it basically whatever you want, as long as it's not the same as the name of one of the other themes. in that folder, create a default.php and view.php, as well as an "elements" folder where you can store your theme's header.php and footer.php, examples of which can be found in your root/concrete/themes/greensalad.
You could just copy that greensalad folder from root/concrete/themes/ to root/themes/, then change the name of the folder to a unique name for your custom theme -- root/themes/my_custom_theme, for example. After that, modify the new folder's contents however you want to. that's what i would do.
once you've created a theme that includes the required default.php and view.php, as well as your header.php and footer.php, you can create folders inside root/themes/my_custom_theme to store your root/themes/my_custom_theme/js, root/themes/my_custom_theme/css, root/themes/my_custom_theme/images, etc.
Lastly, you have to install your new theme. You can do that on your dashboard at yoursite.com/dashboard/pages/themes/, or, if you don't have pretty urls enabled, yoursite.com/index.php/dashboard/pages/themes/.
After that you should see your custom theme there, at yoursite.com/dashboard/pages/themes/, under "installed themes."
you can grab your .js files from your root/themes/my_custom_theme/js/, and your .css files from your root/themes/my_custom_theme/css/, by including something like the following in your custom theme's header.php, footer.php or default.php.
<link rel="stylesheet" href="<?php echo $this->getThemePath(); ?>/css/my_custom_style.css" />
<script type="text/javascript" src="<?php echo $this->getThemePath(); ?>/js/my_custom_script.js"></script>

Related

HTML5 Ad made with Google webdesigner to Doubleclick for publishers Small Business

How do I publish a HTML5-Ad in Doubleclick for publishers Small Business? Seems like I need to insert click-macros. But were do I insert them if it´s based on script-event?
Generally when you're uploading an HTML5 creative, there are multiple files you are generally dealing with (CSS, JS, images, etc - along with the actual HTML file). The procedure is generally as follows:
1) DFP requires your creative assets (images, scripts, CSS etc) to be uploaded individually (Alternatively, the CSS and Javascript can be added inline into the HTML5 code).
2) The source code of your HTML file must be added to the "Code snippet" area.
3) Next, every file path in your creative code needs to be replaced by DFP file macros, which upon ad serving will be replaced by the absolute path url. If any file is referenced within a CSS or Javascript file, it will need to be brought/surfaced to the "Code Snippet", otherwise they won't be replaced by the actual paths.
So if your original HTML source has an img tag like this:
<img src="product1.jpg"/>
You need to pre-upload product1.jpg into DFP and change that img src to reference the DFP name for this file using the macro. Thus it may end up looking like this:
<img src="%%FILE:JPG1%%"/>
But if you are using SVG images, you cannot currently use the macro in this way. You'll need to either host the SVG files externally and reference with a full path to them (ie: <img src="http://someserver/file.svg">) or you can paste the contents of the SVG file in-line.
BR,
Bablu Chakma

Grunt Inline CSS and Javascript

Short Version:
Is there a way, using Grunt, to include minified CSS and JavaScript inline?
To use usemin's formatting as an example, I would like to see something like this:
<!-- build:css inline -->
<link rel="stylesheet" href="styles/foo.css">
<link rel="stylesheet" href="styles/bar.css">
...
<!-- endbuild -->
<!-- build:js inline -->
<script src="js/foo.js"></script>
<script src="js/bar.js"></script>
...
<!-- endbuild -->
Turned into this something like this:
<style>body { color: red; } /*css is here*/</style>
<script>var foo = 1; bar = 'some javascript code is here'; ...</script>
Long Version:
So, I'm working on a Tumblr theme. In order to use CSS or JS files in a theme, they have to be uploaded to Tumblr. The only way to upload is a crappy little web form that often crashes. I'm trying to avoid this interface until I'm ready to upload the final code because
there's no way to delete uploaded files, and
while I'm in the middle of development, these extra steps take too much time
To get this, I've been copying my CSS and JS into <style> and <script> tags in my file, then copying the whole thing into the Tumblr theme editor. It's faster, so I'm happy with that, but manually copying and pasting CSS and JS into a file seems to go against the spirit of Grunt and the automation it provides.
Ideally, I would be able to run grunt build and have it spit out an html file with the CSS and JS inline, then I can just copy that into the Tumblr interface (well, ideally, I would be able to copy that HTML file to Tumblr, but Tumblr doesn't provide FTP or SSH or any useful interface, so I'll settle for this).
It seemed like grunt-usemin could provide the functionality I'm looking for, but I haven't been able to get it working as I described. Maybe it's only made to put everything into a separate file.
I'm open to using any Grunt tool if anyone knows of one that could accomplish this.
I've used this one before: https://github.com/motherjones/grunt-html-smoosher. It's very straightforward, just provide an input file and output file; no extra configuration, it just finds the files automatically and inlines them.
grunt.initConfig({
smoosher: {
dist: {
files: {
'dest-index.html': 'source-index.html',
},
},
},
});
Hope this helps.
Just providing other references that might be useful:
This grant-inline task do inline css and javascripts but you can do it selective using the _inline parameter. There is also a similar task grunt-inline-assests that do same thing. Both are good to generate HTML e-mails.
Finally, the purpose of this one is a bit different; it inserts all your css and js as externals based on a tag in your HTML. This can be very useful when developing themes and front-ends where you want to have you js or css contained in many small files to easy maintenance. Sails-linker task can be used to inject all css and js while in development and one of the inliners above can be used to generate the final production HTML file with CSS and JS minified and inlined.

How To automatically update resourse link in eclipse when files moved to other location

I have imported website template in eclipse using file->import->General->Archive File..Template contains html files and also resource folder which contains CSS Javascript etc.I want to put html file in user folder and resource files in user_resource folder. But the problem i get is eclipse doesn't automatically update links in html file to the resource file.Do i manually update all the links in HTML file or is there any way like dreamweaver to update the links when file get moved to other location? For example i have link
<link href="user/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
it should automatically update to
<link href="../user_resource/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
when assets folder move to user_resource folder.
Any help would be appriciated
I have not used dreamweaver much. But I find these links may be useful to solve the problem if someone know how to use dreamweaver.
Try it out...
http://www.whoi.edu/services/stad/classes/DreamWeaver/movingfilesfolders.html
http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7c3ea.html

How to link javascript / css files in main app directory in IOS from html file in ApplicationStorageDirectory in Adobe Air

I'm using Adobe Air for IOS offline app, and I want to implement a download updates (html files + js,css) feature from within the application. The files would be displayed in a StageWebView component.
Since Apple doesn't allow saving files inside the installation directory, I must use ApplicationStorageDirectory instead to download files into.
I want those download html files to link to .js / .css files already installed within the main application directory (e.g. at myApp.app).
The reason for that is I want to minimize the number of the downloaded (shared) files as much as possible. Is this possible?
EDIT 1:
What I need is something like the following:
Inside ApplicationStoarageDirectory (/Library/Application Support/):
test.html
I need it to link to a css file located inside ApplicationDirectory (installation directory), something like:
<link rel="stylesheet" href="**../../MyApp.app/**CSS/Templates.css" type="text/css" media="screen, mobile" title="main" charset="utf-8">
Thank you.
EDIT 2:
I had to copy everything I need in another place (application storage directory) and load from there.

how to change the path of a zendframework project

Hi
I want to set up a zend frame work project in my local system. I have downloaded the files and folder and set up in my local xampp (ie, within htdocs I have created a folder named NFL_021. Here I copied all the files and folders). But I need to change the path to /NFL_021/www e:g, from /images/site/register-here.png to /NFL_021/www/images/site/register-here.png It's very difficult to change each and every page. Is there is any easy way to set up this?
Please reply
I think baseUrl view helper would be useful. With this helper you could just specify relative path to your files, e.g.:
<img src="<?php echo $this->baseUrl('/images/site/register-here.png'); ?>" />