Using the UP1 Mobile Controls how can you create a link to an external web site? - xpages

Using the Outline control in a mobile page and setting it's href to a URL doesn't seem to work for me. Moving to another mobile page does in fact work. The older OpenNTF controls used to support this and I am wondering if I am missing something as you would think that this functionality would be supported.

The basicLeafNode is used to create a node that contains an external url.
If your pointing to a different server you need to use the full http:// format.
If your pointing to a different nsf on the current server you can use the /.ibmxspres/domino/filename.nsf format

Related

Orchard CMS - menu link to network-shared file

I have an Orchard 1.6 site hosted on Windows Server 2012, IIS 8.5, .NET 4.0.
I need to add a link to a network-hosted file into my Orchard menus, where the network share is accessible from my web server - the destination file itself resides on a different server. I put in file://path/to/network/file in the Custom Link menu URL, but the base URL of the site always gets prepended to the link.
E.g., if my base URL is http://example.com, the link becomes http://example.com/file://path/to/network/file, and then .NET does not like the second : in the path - on top of it being the incorrect link. No combination of forward-slashes, backslashes, or other symbols prevents the prepended base URL.
To add another wrinkle to this, the same URL scheme works fine with a slightly different setup: Orchard 1.6, Windows Server 2008, IIS 7.0, .NET 4.0; web server and destination network URL are on the same server.
Is there a way to force Orchard to use the URL as given, without changing it at all? Alternatively, where is the code that constructs the final link?
Using a 'HTML menu item' instead of 'Custom link' to insert raw HTML as a link does work, but that seems like a pretty kludgy workaround; I have to do this for a few dozen links, and I won't necessarily be the one to change them later on.
I've looked into Orchard settings and IIS settings; neither has anything about rewriting links. Changing the base URL on Orchard to match the expected destination server doesn't work (and wouldn't be acceptable long-term). I've also tried hosting a temporary local file (c:\temp\test.txt) but I can't even get that to produce the correct file:// destination on the new setup.
Upgrading to the latest Orchard (1.8.x) is not a feasible solution (if that even ends up being a possible solution).
Edit:
I should clarify that both sites are on an intranet; I'm aware of the security implications associated with file:// links, and the problems with getting various browsers to load them properly, but I want to get the link generation working first.
Edit: problem source
I figured out why link handling was inconsistent between my own sites - I had written a small chunk of Javascript in the first site to strip the application's base URL for any file:// links it encountered. I forgot that it was there and hardcoded to remove only a certain base URL, so when I moved the site to a different hostname, it broke.
So, no inconsistency in Orchard, just my own faulty memory.
Orchard deliberately limits menu links to mailto, tel, http, and https protocols, and excludes all others, such as file and ftp (see navigationmanager.cs). If you want to use other protocols, you will have to use another type of menu item, but please keep in mind that the file protocol is unsafe and is not supported by all browsers, for security reasons (see for example http://kb.mozillazine.org/Links_to_local_pages_do_not_work). Even Internet Explorer has stopped supporting it in the Internet zone since IE6 SP1: http://msdn.microsoft.com/en-us/library/aa767731(v=vs.85).aspx

differentiating and setting two different types of css and jsp for pc Version and iPad Version

I am trying to make an existing website to properly shown in iPad as an extended support. As there will be two sets of jsp and CSS for both version.
How can I differentiate when website is accessed by ordinary PC browser or iPad browser and what kind of approach should I take so that I can set different JSP and CSS for both version?
Please provide useful resources to reference. thanks for any help.
just for my case, I check the user agent whether it is coming from iPad user agent . Then I use two sets of css or necessary jsp.

Making a EXISTING CMS site compatible for mobile site NOT REDIRECT

Making a EXISTING CMS site compatible for mobile site NOT REDIRECT
Hi All.
I am currently creating a mobile version of an expression engine site that we use.
I am having problems with this, because typically I can just use media quires, or use redirect scripts.
However, the layout of the mobile site will be completely different from the desktop, so I can't just fiddle with a media quires for the CSS (as site just looks to different).
I was thinking of using a javascript to wipe the code or markup (php) if the device is mobile BUT it would mean perhaps loading two versions of code anytime a page loads up (not good for mobile). Eg one code for desktop and another for mobile.
I can't change the file names eg (mobile_index) because it is a CMS and the links wont link up correctly. I have tried this a few times , and also editing the .HTACCESS file, but it simply didnt work.
So if anyone knows how do I change the code of a page if the device mobile, but cant change file name, directory or any of that :-)
Cheers
Daragh
Why no redirect? If I was in your position, which I was a few months ago, I would handle this totally different:
Install Multiple Site Manager by ExpressionEngine: http://expressionengine.com/user_guide/cp/sites/index.html
Add another site -- mobile
Give it a proper domainname like m.domain.com
Give it its own template group
... and redirect with http://github.com/sebarmeli/JS-Redirection-Mobile-Site/
Now you can manage both installations from the same CMS and both installations can access existing channels, modules, extensions and members. This will keep your code fast and clean.
Adding a bunch of conditionals will only slow down installation.
Actually you could mess with media queries - it's the most flexible. JS is really overkill for something like this. At larger sizes, UL>LI menus could appear, and at smaller sizes they could be hidden (display:none) and swapped to select lists; divs can be replaced, elements dropped or resized. I also combine them with different snippets or embeds so you can tailor the content out as well.
You might try something like MX Mobile Device Detect. It gives you some variables that can detect if the user is on a mobile device that you could use in conditionals in your templates.

Browser based WebDAV client?

Is there any good browser based WebDAV client? If not, is it possible to make one?
Look at the AjaxFileBrowser from ITHit. Pretty slick, and has FireFox & Chrome PUT support for uploading. IE, drag-and-drop from your desktop to the browser. They have a fully functional demo site up at http://www.ajaxbrowser.com.
There's a plugin for Firefox which handles WebDAV.
Webfolders is a firefox extension that gives you the ability to view the contents of WebDAV
servers in the browser and use the full functionality of the WebDAV protocol.
Depends on what you expect the client to do, and whether you're looking for a cross-browser "web application", or a browser extension.
The main issue with doing this in a "web application" (as opposed to a browser extension) is (1) the lack of binary data support in Javascript, and (2) the lack of access to the local file system (which of course is a security feature).
There is webdav-js which can be enabled as a bookmarklet or served by the WebDAV server itself as an HTML page.
It supports the regular listing of files and directories, file upload, directory creation, renaming, as well as in-page display of images and other media.
If by browser based you mean that it runs in html (ie you don't want your users to install a plugin) then the answer is partly yes and mostly no.
Partly yes, because I have built and used one. It uses the jquery jtree plugin to display folders, and selecting a folder node populates a file list in the right hand panel. Panels are done with another jquery plugin, and the file list is made dynamic with the jquery datatables plugin.
But I think for you the answer is probably "no". Thats because for the browser to use webdav is must user webdav "methods" like PROPFIND and MKCOL. These methods just arent supported in most browsers, so your javascript can't use them directly. I have a server-side mapping in my webdav server project which allows my javascript to use normal GET and POST methods, and these requests are transformed on the server to webdav methods.
I said "probably no" for you since this serve side mapping isnt standard, its a part of milton. But if you happen to use milton, or you can use milton, then its all good.
Try SMEStorage.com. They turn any WebDav back-end into a personal cloud file solution. As well as a rich browser desktop and mobile client, there are clients for Mac,Windows, Linux and Mobile clients for Android, iOS, Windows Phone, and BlackBerry.

How do you globally modify page output sent from IIS without modifying the page source?

A couple sites of mine recently got "hacked". Someone was able to add a line of JavaScript to the bottom of every page on the site.
The server is a Windows Server 2003, and has Cold Fusion 8 and MySQL 5.x installed and running.
Looking into the code on each page shows that none of the pages were modified. The JavaScript is not in the code files themselves. This leads me to believe it is an IIS problem, but I am unsure and cannot find anything that would be able to do this within IIS.
The JavaScript being added redirects a user to another page only when they come from Google, or at least it appears to work this way.
Any help on how someone was able to accomplish this as well as removing it would be greatly appreciated.
Another way to word the question thanks to #Jeffrey Hantin
How do you systematically modify output from IIS without modifying individual pages?
EDIT: A bit more testing has shown that only the .cfm pages add the extra javascript. Added a new .cfm and the js was there but a .html did not have it.
Edit2: Turns out to have been a coldfusion problem after all. Somehow the pages OnRequestEnd.cfm were created on the sites and added that js.
Looks like someone exploited some latest Adobe CF vulnerabilities.
Please see these blog posts for details and try to search symptoms on your server:
Image upload
FCKEditor bug + this post
Hope this helps.
Turns out to have been a coldfusion problem after all. The page OnRequestEnd.cfm were created on the sites and added that js.
If you only want to use IIS to modify output, the ISAPI filter is probably the best answer. If you would like to use Coldfusion, you could utilize the application.cfc to modify output during certain parts of the request cycle or wrap all of your pages in a Custom Tag to consolidate the like portions of your page templates.
I have used both. In cases where my page headers and footers are all the same, the custom tag is fast and easy to use. To make changes to all the pages, you edit one custom tag file. In cases where I have a more complicated web application I'll use the application.cfc to store and insert common components where they are needed.
They might have guessed your password. You should change it immediately.
It's possible that an ISAPI filter is used to do this. I once used one myself to perform compression before IIS supported it natively.
In your specific situation, you may want to check for ISAPI filters you don't want installed. Of course, if your server has been compromised, you will likely be better off rebuilding from a known good image rather than trying to fix it in situ.

Resources