Tag Archives: install

SPAW WYSIWYG was showing HTML characters not HTML

I noticed when installing the SPAW Editow recently that on the Design tab in SPAW, the HTML was showing as converted HTML Symbols like &lt; and &gt; rather than < and >.

After a bit of playing, i found this hidden piece of information on the SPAW FAQ’s.


You should use getHtml() method instead of show(). It returns the code which you can store into variable and use whenever you need it.

SPAW getHTML() Rather than show()

SPAW getHTML() Rather than show()

CodeIgniter & Spaw Editor

I have released an updated version at http://sheldon.lendrum.co.nz/codeigniter-spaw-editor-tabs_411/10/. This new version allows CodeIgniter and SPAW TABS !

Recently I have been working on a large project for a National Sporting team, It has been a process and it is almost finished.
As part of this system, we have developed an extended custom content management system.

Finding a WYSIWYG Editor for these types of sites is a tricky thing. Your editor of choice needs to be complex enough to let the user Manage their site, but not too hard that they can’t and don’t manage it, yet not give them so many options that your beautiful design gets listed on some of the ‘worst’ design sites due to ‘Crazy Customisation’, bright, huge highlighted words, 5mb images on every page and so on… like a ‘Client goes Crazy’ Video.

WordPress uses TinyMCE editor from MoxieCode, which is what we first implemented, but the design agency requested that they can add inline images in to the content. ( Bad thoughts crept in to my mind of a horror site coming out ) but I decided this would be a nesscarry change.

I went back to an old faithful that Ryan & I have used for years on other CMS’s.
The issue with this is it uses it’s own class, and interferes with CodeIgniter, the PHP FRamework that we are developing this site in.

After some googling, I found a solution on the CodeIgniter Wiki. After installing it, I first found I needed some small customizations, and that it wasn’t a new version, and didn’t have Safari support, which both us developers, and the advertising agency use. So I went to work on repackaging SPAW 2.0.8.1 for CodeIgniter with a few extra plugins.

Download it for free and let me know how it works :)
check the new version with TABS
[download#6]

Installing PHP5 and mySQL on Mac OSX Leopard

There has been a lot of posts on a lot of sites that explain how to get PHP and mySQL working & talking on OSX Leopard, but none that are fully step by step. So with thanks to The Busy Geek ( www.thebusygeek.com ), Here is a comprehensive guide.

You will need a very basic knowledge of using OSX Terminal ( Command Line Commands) and your root password.

Step 1:

Go to Developer.MySQL.com and download the copy that matches your Machine. In my case because I am on a G4 PowerPC iBook, I had to download the 10.4 version (Mac OS X 10.4 (PowerPC, 32-bit)) as there is no 10.5 version for PPC.

Once you have downloaded the package, install all 2 packages, and the preference pane.

Installing the MySQL packages.

Installing the MySQL packages.


Step 2:

Open Terminal ( Applications / Utilities / Terminal.app ) and log in as root;

sudo su

Enter your root password when prompted.
Navigate to your mysql directory;

cd /usr/local/mysql

If you view the directory you should see something like the following;

ls

COPYING			data		scripts
EXCEPTIONS-CLIENT	docs		share
INSTALL-BINARY		include		sql-bench
README			lib		support-files
bin			man		tests
configure		mysql-test

Next we start mySQL.

./scripts/mysql_install_db --user=mysql

It should run a whole lot of commands, starting with…

Installing MySQL system tables...

Once that has finished we add the mySQL User permissions

./bin/mysqld_safe --user=mysql &

Which will ( or should ) give this..

Starting mysqld daemon with databases from /usr/local/mysql/data

Now the mySQL root user’s password. and then confirm password and database location.

./bin/mysqladmin -u root password '**PASSWORD**'
./bin/mysqladmin -u root -h **IP_ADDRESS** password '**PASSWORD**'

Now, All going well, Lets hope you get this error:

./bin/mysqladmin: connect to server at '**IP_ADDRESS**' failed
error: 'Host '**IP_ADDRESS**' is not allowed to connect to this MySQL server'

Thats good news, This means mySQL is running and that is step 2 finished.

Step 3:

Next Step, We will install PHP, You think huh? Apple already has a copy of PHP pre-complied in OSX?
Yeah, true, but ( No Offense Apple ) its shit.

Still as root user:

cd /usr/local/

We want to download the newest build of PHP from Marc Liyanage’s site. Thank you to Marc, who has openly releasd and supported Great PHP builds for years! And totally for free!
* Make sure this path represents the newest version.

curl -O http://www2.entropy.ch/download/php5-5.2.5-6-beta.tar.gz

We have used cURL as OSX does not support wGet. Remember the -0.

You will see if download like this…

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 51 85.2M   51 43.4M    0     0  47790      0  0:31:10  0:15:54  0:15:16 52563

Once the download has completed, uncompress it with this command:

tar -zxvf php5-5.2.5-6-beta.tar.gz

Making sure that the file name represents the downloaded file name.
(z = gunzipp, x = uncompress, v = view, f = force ).

View the dir;

ls

You should get a directory looking like this;

OpenSourceLicenses	include		mysql-5.0.51b-osx10.4-powerpc
OpenSourceVersions	lib		php5
bin			mysql		php5-5.2.5-6-beta.tar.gz

Go into the PHP5 Directory; Then view the dir.

CD php5
ls
bin			etc		info		libphp5.so	php.d
entropy-php.conf	include		lib		man		share

Then Copy the entropy-php.conf file in to the Apache2 Dir installed by Apple.

cp entropy-php.conf /etc/apache2/other/

Now we need to tell Apache to use our new version of PHP and not the original Apple build.

cd /etc/apache2/

Open the httpd.conf and comment out the following line.

LoadModule php5_module        libexec/apache2/libphp5.so

by placing a # in front of it.

#LoadModule php5_module        libexec/apache2/libphp5.so

To Save your changes press “ctrl x”, there will be a prompt to save, press “y”, then press “return” to save with the same filename.

Now restart Apache with this Command

apachectl restart

And we are done.

Installing PHP and MmySQL Summary

Begin writing your PHP/mySQL applications.

You can access your local Apache environment at two locations:

http://127.0.0.1/		/Library/WebServer/Documents/

or for your User account:

http://127.0.0.1/~username/		/Users/username/Sites/

Enjoy :)