<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Development Blog &#187; cms</title>
	<atom:link href="http://www.web-development-blog.com/archives/tag/cms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-development-blog.com</link>
	<description>Web development tutorials, SEO articles and PHP script resources</description>
	<lastBuildDate>Sun, 25 Jul 2010 14:38:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Upload images for usage in TinyMCE</title>
		<link>http://www.web-development-blog.com/archives/upload-images-for-usage-in-tinymce/</link>
		<comments>http://www.web-development-blog.com/archives/upload-images-for-usage-in-tinymce/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 22:13:52 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[PHP scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tinymce]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://www.web-development-blog.com/?p=163</guid>
		<description><![CDATA[TinyMCE is a great online WYSIWYG editor which is used for a lot of projects, for example this WordPress blog application (the content backend). I use TinyMCE for custom projects too. TinyMCE is free, generates good HTML code and the interface is easy to learn even for non-webmaster. The project is open source and the [...]]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><p>TinyMCE is a great online WYSIWYG editor which is used for a lot of projects, for example this WordPress blog application (the content backend). I use TinyMCE for custom projects too. TinyMCE is free, generates good HTML code and the interface is easy to learn even for non-webmaster.</p>
<p>The project is open source and the developer Moxiecode earns money by selling useful plugins for image and link management. Sometimes the Image manager &#8220;looks too big&#8221; for projects, in this case the following (free) solution is an option. You can download your TinyMCE  copy from the <a rel="nofollow" href="http://tinymce.moxiecode.com/download.php">TinyMCE website</a>.</p>
<p>The editor has two different modes: simple and advanced mode. In the advanced mode is it possible to load several (already included) plugins. The advanced image function has an option to select images from a list. This list is a just a little JavaScript snippet which stores file name and the alternative text notation:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> tinyMCEImageList <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Logo&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;logo.jpg&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Using PHP we are able to generate this list dynamically. But first we need a script that uploads the images and store the data into a database. We use for our example the<a href="http://www.finalwebsites.com/snippets.php?id=7"> PHP Upload Class</a> from finalwebsites.com. The following snippet should do that job (check the examples with the upload class for more information about the upload process). Store this code together with an upload form in some PHP script.<span id="more-163"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #b1b100;">include_once</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'upload_class.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000088;">$max_size</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1024</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">250</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Submit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$my_upload</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> file_upload<span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">upload_dir</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'DOCUMENT_ROOT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/fotos/&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">extensions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.png&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.gif&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rename_file</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_temp_file</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'upload'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_file</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'upload'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">http_error</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'upload'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'error'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">replace</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">upload</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pw&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;database&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO foto_table SET file_name = '<span style="color: #009933; font-weight: bold;">%s</span>', alt_txt = '<span style="color: #009933; font-weight: bold;">%s</span>'&quot;</span><span style="color: #339933;">,</span>
			<span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">file_copy</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'alt_txt'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$my_upload</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">show_error_string</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Next we need a script that will create the image list from the data we have stored in our database:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pw&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;database&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/fotos/'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM foto_table&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$js</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'var tinyMCEImageList = new Array(
	// Name, URL'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'
	[&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">alt_txt</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;, &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #000088;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">file_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;],'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$js</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rtrim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$js</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">','</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">');'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$js</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Now we are able to use this dynamic list in our TinyMCE WYSIWYG editor. The following JavaScript snippet shows a very basic configuration, The script has many options and maybe you have already your own configuration in your content management system.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;&lt;!--</span>mce<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">--&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>The most important part are the declarations for the plugin and the image list. With these settings you should notice the dialog box:</p>
<p><img title="image list screen" src="http://www.web-development-blog.com/wp-content/uploads/2008/09/image_list_screen.jpg" alt="" width="488" height="406" /></p>
<p>As you see the alternative name is used in this list and also for other attributes within the image element.</p>
<p>This example is a quick and free alternative if you don&#8217;t like to buy the commercial image manger. You can download the example files <a href="http://www.web-development-blog.com/tutorials/image_list.zip">here</a>.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.web-development-blog.com/archives/upload-in-modal-window-and-pass-values-with-jquery/" rel="bookmark" title="September 5, 2009">Upload in modal window and pass values with jQuery</a></li>
<li><a href="http://www.web-development-blog.com/archives/tutorial-ftp-upload-via-curl/" rel="bookmark" title="October 11, 2007">Tutorial: FTP Upload via cURL</a></li>
<li><a href="http://www.web-development-blog.com/archives/save-bandwidth-with-phproxy-and-ip2nation/" rel="bookmark" title="May 30, 2007">Save bandwidth with PHProxy and ip2nation</a></li>
</ul>
<p><!-- Similar Posts took 3.776 ms --></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.web-development-blog.com/archives/upload-images-for-usage-in-tinymce/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Dynamic Flash Photo Galleries!</title>
		<link>http://www.web-development-blog.com/archives/dynamic-flash-photo-galleries/</link>
		<comments>http://www.web-development-blog.com/archives/dynamic-flash-photo-galleries/#comments</comments>
		<pubDate>Sun, 29 Apr 2007 17:28:50 +0000</pubDate>
		<dc:creator>Olaf</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Website templates]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://www.web-development-blog.com/archives/dynamic-flash-photo-galleries/</guid>
		<description><![CDATA[The latest product from TemplateMonster is some new CMS with a stylish flash powered photo gallery front end. While the product is developed for the &#8220;non professional&#8221; webmaster are the CMS features really advanced. The gallery script looks a little like the bigger PHP photo galleries but there is need no for a database and [...]]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><p>The latest product from TemplateMonster is some new CMS with a stylish flash powered photo gallery front end. While the product is developed for the &#8220;non professional&#8221; webmaster are the CMS features really advanced. The gallery script looks a little like the bigger PHP photo galleries but there is need no for a database and the CMS has some nice features like:</p>
<ul>
<li>automatic thumbnail generation (loads much faster than resizing a photo using Flash&#8217;s jpg object)</li>
<li>a PHP powered file upload</li>
<li>an unlimited number of categories and photos for each category (only the load time is the limit)</li>
<li>easy to modify descriptions for photo&#8217;s and categories</li>
<li>The ability to modify all information and configuration via the text editor (if PHP is not available on the websites host)<span id="more-95"></span></li>
</ul>
<p>The CMS looks very clean and doesn&#8217;t require a lot of  HTML knowledge to manage any photo gallery listing. The price is maybe a little to high: Starting at $235 each license could be a little to to high for some webmasters. On the other site the front end looks very nice and would be an impression for every visitor!</p>
<p>Our partner <a href="http://www.finalwebsites.nl">finalwebsites.com (website is in Dutch language)</a> is since a short time a TemplateMonster partner, maybe you like to take have quick look on these new <a href="http://www.finalwebsites.nl/templates/search.php?category=98">Dynamic Photo Galleries.</a><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.web-development-blog.com/archives/google-adsense-referrals-20-or-continue-with-ppc-ads/" rel="bookmark" title="July 3, 2007">Google Adsense Referrals 2.0 or continue with PPC ads?</a></li>
<li><a href="http://www.web-development-blog.com/archives/get-your-flash-website-high-ranked-at-google/" rel="bookmark" title="October 7, 2007">Get your Flash website high ranked at Google</a></li>
<li><a href="http://www.web-development-blog.com/archives/how-to-choose-a-wordpress-hosting-provider/" rel="bookmark" title="January 24, 2010">How-to choose a WordPress Hosting Provider</a></li>
</ul>
<p><!-- Similar Posts took 3.416 ms --></p>
<div style="clear:both;">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.web-development-blog.com/archives/dynamic-flash-photo-galleries/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->