WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: sam on June 05, 2007, 08:59:32 AM

Title: How to correctly zip and upload template files on a mac
Post by: sam on June 05, 2007, 08:59:32 AM
After ploughing through acres and acres of posts on here, when I couldn't get my templates to work, I finally found the answer to the recurring "install.php line 61" error message that you can get when installing zipped templates on an Apple Mac. I thought I would make a post about it, in case other people are searching and are getting frustrated about it not working...

Here is how you do it.

Zipping your files up in StuffIt or YemuZip doesn't seem to work. The best way to make your zip file so that it will install properly is to do it using the terminal client on your mac.

Make your template as usual, and in the info.php file, make sure that you give the "template directory" value a unique name. For example, let's say that in this instance, the info.php file says

$template_directory = 'samtemplate';

Remember this; this is what the zipped file must be called.

Now collect all the files that make your template into one place. In this example, let's say that I put them into sam/docs/WebsiteBaker

To zip the files:

Open up a terminal window. Navigate to the directory that you put the files into, using terminal. In the case above, you would simply type into terminal exactly as below:

cd sam/docs/WebsiteBaker

Now that you are in that directory, all you need to do is type exactly as below into terminal:

zip -r samtemplate *

It is essential that this is typed exactly as written, with the spaces, and the star at the end.

This simply tells it to zip all the files (indicated by "*") into an archive called "samtemplate". The -r means that it is done recursively, meaning that the file structure is properly maintained, so it all works properly when website baker is installing it.

Now hit enter. A zip archive will appear in the same folder. You can now upload this to website baker in the usual way - admin>add ons>templates>install template and then browse to the zip archive you have created, and hit install.

I discovered, while doing this, that (either) short names for the zip file - mine originally had only 3 letters - or long names for the template name - mine originally had 13 letters - don't work. Or both.

Anyway, after much gnashing of teeth, this worked perfectly, and my new template is installed.

Hooray!

Hopefully this post will be useful for someone else searching the forums with this problem.


(I should point out that I found the answer here - http://forum.WebsiteBaker.org/index.php/topic,6121.0.html - thanks to icouto...)

Title: Re: How to correctly zip and upload template files on a mac
Post by: kweitzel on June 05, 2007, 09:49:17 AM
Hi SAM, thanks for writing that up for the MAC Users ...

cheers

Klaus
Title: Re: How to correctly zip and upload template files on a mac
Post by: zaphmann on June 06, 2007, 01:05:26 AM
Hello Sam - I am a fellow newcomer.

I am on a Mac and just tried to upload my first add-on.
I found another 'easier' way:
- Let the add-on download to your mac and unzip.
- ftp the add-on folder to your host WB Modules or Templates folder (whichever it is)
- Go to your site admin (Settings -> Administration Tools -> Reload Add-ons which is at the very foot of the page)
- Click on Reload Add-ons

This way you can do several at once.

I believe this is INCORRECTLY described in the WebsiteBaker Admin Reference Guide • page 62 (yellow box) where they say to upload the zip file, which doesn't work.

Experts>> Is this method OK? It seems to work or am I missing something?
Thanks
Zaph

Title: Re: How to correctly zip and upload template files on a mac
Post by: sam on June 06, 2007, 02:52:36 AM
Hey Zaphmann -

You're quite right if you are downloading a ready-made template. I was talking from the perspective of people who have coded their own files, and want to upload them.  :-)

If you've downloaded a ready-made add-on or template, there should be no problem downloading it to your mac, then uploading it through the website baker interface, as normal.

You're quite right, though, that if you want to do several at once, ftp and *reload* may be a more streamlined option.   :-D

Thanks

Sam
Title: Re: How to correctly zip and upload template files on a mac
Post by: ruebenwurzel on June 06, 2007, 06:48:38 AM
Hello,

The reload tool only actualisize the addons table. It does not install any modul. It is not thought for installing anything. It can be used for templates as they don't need any other database entries but for modules, tools or snippets it does not work.

Also please remember that all files wich you upload via ftp have the ftp-user as owner. The server and scripts from the server (wwwrun-user) has no permissions to change these files except you give chmod 777 (or maybe 755 is enough). And also you give these permissions you are not able to delete these via WB admin interface. All what from ftp user is uploaded, the ftpuser has to delete and on the other hand what from WB interface is installed can be deleted only from WB interface.

So the best is always to use the things they are thought for. Installing/Uninstalling should be done from WB interface. Reload should only be used for cleaning/actualizing the addons table.

Matthias
Title: Re: How to correctly zip and upload template files on a mac
Post by: zaphmann on June 12, 2007, 10:43:06 PM
OK - I was put off WebsiteBaker by the thought of having to go through a convoluted procedure to load modules (being on a mac). However I have found that it is as simple as on a PC if you avoid Safari.

Safari, a faster and more responsive browser that the popular ones, in this instance does too much for you. When it downloads it automatically unzips files, which for WB doesnot suit. You can stop it before it unzips (a prompt) but then you don't have a zip file - you have a zip file wrapped in a Safari control file. If you attempt to load that through the WB add-ons db you will get this error:

Safari can’t open the page “http://www.morethanoil.com/admin/modules/install.php”. The error was: “POSIX error: Is a directory” (NSPOSIXErrorDomain:21) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.

The solution  is simply to use Firefox for downloads, it gives you an unwrapped zip file and the option to save to disc, then follow normal WB procedure.
Title: Re: How to correctly zip and upload template files on a mac
Post by: Emilio on March 31, 2009, 10:27:31 PM
Hello All,
I have another workaround for uploading zipped template files from a Mac.

In the previous posts Sam suggested using Stuffit or Yemuzip did not seem to work. The trick to it is to zip only the files and folders within the your customised template directory, and not the whole directory itself, as WB will create a folder on the server to put these in.

Then it is a simple matter of uploading the template through the usual WB Add-Ons interface

This info was contained at the tutorial below:
http://project.websitebaker2.org/wiki/Docs-EN-TemplateTutorial2 (http://project.websitebaker2.org/wiki/Docs-EN-TemplateTutorial2)

Hope this helps someone.