Archive

Posts Tagged ‘JavaScript’

Watch a site being developed – the webveteran.com experiment

June 29th, 2009

I had this crazy idea, and  I think I’m going to try it! I started to build a new website for myself… long overdo from almost three years ago. And I figured, ‘why not do so publicly?’ Sure it’s like dropping my drawers, but I’m confident although I know I am not the absolute best. But I think it would be interesting… at least, I think it would be to watch someone else do so.

The completed site will be/have:

  • web2.0 layout and functionality
  • coldFusion, ajax, scriptaculous, javascript sound
  • custom cms with plugin architecture (I might open this up as well)
  • seo + sef urls
  • one page load navigation (ajax)

So without further wait, please visit 2009.webveteran.com to take part in the experiment. Comment and criticisms are welcome and appreciated.

Keep in mind, this is a site entirely in development! What you will see occasionally:

  • broken links
  • broken content
  • dummy text
  • images as test text

Heck, you might even see a table or two (gasp). You’ll probably also see me change libraries every now and then (as was the case with the scroller). And of course there may be days without any progress whatsoever. Subscribe to this blog or my twitter account to keep updated!

[sigh] here we go…

News, The Experiment , , , , , , , , , ,

CFup build 090624 – now on github

June 25th, 2009

It’s been asked that I release the source of CFup. Initially I was not comfortable doing so as I threw it together as a test of concept. Certainly nt my best work! Feeling inspired I cleaned up some of the code – mostly just so the ajax routines don’t clash – and uploaded it to github. Now anyone can download it, try it out, and contribute. I’m excited to see what optimizations and cleanups can be done to it. So if you’re interested in kicking the tires or helping develop it, check it out on github: http://github.com/WebVeteran/CFup/

CFup , , ,

ColdFusion function: create tinyMCE instances

March 31st, 2009

As promised, I am releasing the CF function I use to display tinyMCE instances. It can handle multiple languages, multiple instances per page, and of course compression.

It’s somewhat basic right now. I set up defaults for most end-clients, meaning its easy to use and familiar feeling. I came to this configuration after working with clients for two years – listening to their complaints and slowly molding the defaults to what is here now.

The simplest incarnation is:

<cfoutput>
#application.formutils.tinymce(content=read.bio)#
</cfoutput>

This assumes you cached the CFC into an application variable called ‘formutils’, and a query named ‘read’ with a field called ‘bio’. That will generate the base code (put into the htmlhead by default), create the textarea named ‘content’, set up modified defaults for tinyMCE and then display it.

But you can get fancier:

<cfoutput>
#session.utils.tinymce(
	content=read.rightcolumn,
	element="rightcolumn",
	cssfile="/includes/css/common.css,/includes/css/tiny_dyn.cfm?csswidth=210px",
	resizing=false,
	loadbase=0
)#
</cfoutput>

That one will create a textarea with name and id of ‘rightcolumn’. It will also use specific css files. If you notice that last css file is a cfm page that dynamically creates the width of the page. This is awesome for giving the editor a real-time view of their page. Then it turns resizing off. Finally, with loadbase=0, the base of tinyMCE will not be loaded (this example is for a secondary tinyMCE instance in the same page).

Most of the defaults can be overridden with arguments as demonstrated above. However this function is not all-encompassing of tinyMCE’s many attributes. If you need more customizability, feel free to fork the git project, or simply ask me for the attribute you need inserted.

You can get this CF function directly from github: http://github.com/WebVeteran/cf-tinymce

Bonus example

A multilingual coldfusion application using tinymce for translations. One instance is the english, the other is spanish. Both use a very simple editor. It’s actually the advanced editor configured to mock the simple editor, but with a few extra buttons.

<cfoutput>
<tr>
	<td>
		#application.includes.tinymce(
			content=read.en,
			element="en",
			csswidth="444px",
			resizing=true,
			theme='advanced',
			theme_advanced_buttons1 = "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,undo,redo,|,code,cleanup",
			theme_advanced_buttons2 = "",
			theme_advanced_buttons3 = ""

		)#
	</td>
	<td>
		#application.includes.tinymce(
			content=read.es,
			element="es",
			csswidth="444px",
			resizing=true,
			theme='advanced',
			loadbase='0',
			language='es',
			theme_advanced_buttons1 = "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,undo,redo,|,code,cleanup",
			theme_advanced_buttons2 = "",
			theme_advanced_buttons3 = "",
			gecko_spellcheck = "false"
		)#
	</td>
</tr>
</cfoutput>

Output is:

two tinymce instances

two tinymce instances - click to view larger

CF TinyMCE , , , , ,

TinyMCE CF GZIP 1.0

February 9th, 2009

TinyMCE CF GZIP is a ColdFusion based Javascript Concatenater, Compressor, and Cacher for TinyMCE.

This file compresses the TinyMCE JavaScript using GZip and enables the browser to do two requests instead of one for each .js file. From nearly 100 requests to 2, about 400KB to 80.

It is also a single file install. The current official TinyMCE ColdFusion Compressor requires a JAR file installed. But this one does not! Just drop the CF in, modify the TinyMCE js to use this file, and you’re done!

 

TinyMCE CF GZIP

TinyMCE CF GZIP

Live demo

Later today the source will either be on sourceforge or github. Stay tuned!

TinyMCE CF GZip , , , ,

Fancy Upload 1.0 – CSS Styled Upload Form

March 4th, 2007

Sometimes a client will ask me to make a styles upload form, and of course modify the ugly ‘Browse…’ utility. But we’re very limited to styling upload forms. We cannot rearrange the buttons, nor change the ‘Browse’ label. Even with CSS the browse button and the file name field act… funky.

So I’ve come up with a way to make it appear as if we’ve styled the ‘browse…’ button and file name field… with only CSS. Since I did not specify any widths in pixels, we will have a nice cross browser solution. Then by adding some javascript we have total control of the file name, and even add an icon.

And we’re going to make it so that the fancy form only shows in a modern browser (Safari 1.0+, Firefox 1.0+, Internet Explorer 5.5+/Win, Opera 8+). It will degrade gracefully when images, JavaScript, and/or CSS are not active. The markup validates to the XHTML 1.0 Transitional DOCTYPE.

Fancy Upload

Fancy Upload

Live Demo

I’ll have this up on github shortly!

Fancy Upload , ,