Anybody ever integrated MCImageManager and Zend Framework? I want to use MCImageManager in standalone mode (not as part of TinyMCE). I'm really at a loss here - don't know where to put any of the files. Do I need to create a view helper that somehow references the main index.php file of MCImageManager?
I think I figured it out. I just added the whole imagemanager directory to my public directory. That way I can just treat it like any other static files (images, css, js, etc).
Related
I am working on asp.net mvc2 project. Due to some limitations I cannot migrate the code to asp.net mvc4 version and due to this I am not able to use the Bundling and Magnification feature for bundling and minifying the js and css files. I used the SquishIt framework to work on this. Can anyone help me to know are there any other good options other than SquishIt framework to work on this task.
I used the following url to implement SquishIt framework:
http://www.codethinked.com/SquishIt-The-Friendly-ASPNET-JavaScript-and-CSS-Squisher
Can anyone help me know how to delete the old files that are created with change in the js and css files without manually cleaning them everytime.
Thanks & Regards,
Santosh Kumar Patro
The best solution for this is to not include the hash in your filename (I assume you are rendering to filename_#.ext). You'd just need to remove the '#' from your rendered filename, then SquishIt will use querystring invalidation by default. This will only keep a single copy of each bundled file on disk. If querystring invalidation won't work for you there is also a relatively new option that allows you to place the hash into the path as a directory, then scrub it out with an IIS rewrite rule.
For more on SquishIt's support for different cache invalidation strategies read this
I am developing an application for a client where a requirement is that a series of complex (multi-file, JS, CSS, etc), websites must be presented offline, without any web connection required at all.
So I have all of the HTML content folders, and can add them into my XCode project... but now I need to show them.
The UIWebView is fine when you just have one HTML file... but the relative paths for the JS and CSS do not translate over.
What is the best way to do this. I've seen a couple of potential choices. One way is to run a super basic web server locally, dump all the files into /documents (or thereabouts) and serve it from there... the second is to somehow make UIWebView re-interpret the paths so that they point to the right place locally... which I am not sure if it's possible but I've seen it alluded to.
Seems like a lot of people just cover loading a single UIWebView page, and not so much discussing how to deal with CSS/JS dependencies.
Anyone have any bright ideas, links, etc?
Thanks
I think that if you add your HTML/CSS/JS tree to your Xcode project and select "Create folder references for any added folder" (instead of "Recursively create groups for any added folders"), then your bundle will contain the HTML/CSS/JS folder hierarchy (instead of the flattened-out list of all files). This would preserve relative paths.
As to the "reinterpreting" point, you can define
– webView:shouldStartLoadWithRequest:navigationType:
in your UIWebViewDelegate to intercept any attempt at loading any file. There you can change the url on the fly.
Also, have a look at this interesting article by Rob Napier: Drop-in offline caching for UIWebView.
So, I have a problem and I have been searching forever about how to do this.
I want to have several project directories on my shared host but I want to be able to hit the public directory when someone types in the root directory for that project. I can't edit the httpd.conf to set up virtual hosts so I have been looking for alternative solutions.
Account Structure
/public_html
.../Project1
....../application
....../public
I stumbled on http://www.mauriciocuenca.com/blog/2009/03/two-or-more-zend-framework-projects-on-a-shared-host/ and followed the steps (modifying some stuff since it is outdated)
And I can get a single view to show up. The problem is, if I create a layout I can't get anything but the normal view to display. I think I am just missing a simple hook up.
Is the above solution the best for my situation?
You problem is not 100% clear, I can't figure out that you want to serve one site per shared host directory or all site from the same directory.
Although you can't edit httpd.conf, you can use .htaccess file. While using Zend you already use .htaccess (located in public dir). So you can write rules to make url based redirections.
I know that I can use normal html files in ASP.NET MVC; however I have a situation where several (above 20) html files are needed for static display. This is fine and good, but I really don't want it cluttering the MVC project since none of them will have controller actions.
Is there any way to load up a second project and use static html files from it, within ASP.NET MVC?
I know my answer is not directly related to your question as you are asking how to access HTML pages from a second project. But an alternate would be to place the html files in your content directory. This way you could catalog your static html pages
For Instance:
MVC Directory Structure
Content
images
logo.png
script
utility.js
staticHtml
static.html
static2.html
Model
Views
I don't have permission to change the document root the /public/ directory so how should I set up my Zend Framework application to run from the current root directory? Using the Zend Framework 1.8 command line tool, I don't know if there is a way to tell it to create a directory structure this way.
If you can access only the upper level of web (i.e. - public), you should set index there and the whole application folder too. Create a .htaccess with
Deny from all
And put it into your /application.
Your configuration will be:
/application
/library
index.php
The simplest way without changing a lot of configuration, is to put everything in the public folder you mention into your public_html folder, then place all the other contents, like the application, and library folders into the directory up from public_html.
You can also throw everything into your public_html folder, although that is not recommended. Each class has options to provide a different path. For example on the Front_Controller, you can set the Controllers directory to wherever you want. There are options to specify different paths, but if you follow convention it is done for you.
Just use the quickstart guide and adjust according to it. Zend_Tool is still experimental anyway. Let me know if this helps.
So here's what I ended up doing:
Download the Quickstart sample code.
Move everything in public up to the main directory, along side application, library directories.
Alter include paths to library and application in index.php to point to the correct locations
I think that was all I had to do. ZF new how to the rest.
I don't think this is ideal however, as already mentioned, application directory becomes accessible from the web, but for now, it's getting the job done.