Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
Hi,

I'm starting to look at your CMS, and let me say it looks very promising!

I have one question.

I suppose there is no bundled option for password-protected / user management / private pages, so:

I can use PHP programming in my pages appart of the CMS? I mean, can I code a register form and a login screen to user management, and use sessions in some pages? Will this be compatible with the CMS?

Thanks so much for the work! (And sorry about my english)
Hi Singurb,

Couch does support user management and private pages (albeit in a little rudimentary manner). You can find a full discussion of this topic at http://www.couchcms.com/docs/concepts/users.html

If the functionality provided by Couch does not suit you, you can always add your own PHP code to the pages.
I do not see any reason for any compatibility.
Just keep in mind that any PHP code you add on your own will execute BEFORE any of the Couch tags.

If you have any problems, do mention it at this forum.
great! Thanks! I'll have a look at it.

Can I ask another question? Is there something for multi-lingual sites?

Thanks!
Couch is completely UTF-8 compliant so multiple languages shouldn't be a problem.
Could you please be a little more specific as to what you have in mind when you say multi-lingual sites?
Sorry,

I mean sites in more than one language. I should install one copy of CouchCMS for each language?

And also, is there any information about pricing for commercial sites?

Thanks!
You can use multiple languages from within the same installation because Couch fully supports UTF-8.

As for the pricing for commercial sites, we'll be declaring that in the new year, but rest assured it is going to be much less than what you might be expecting :)
Sorry I think my english is worst than I thought...

I mean I would like my site to be in english, french AND spanish. Should I use one installation for each language?

Thanks :)
Hi Singurb,

Your English is perfectly fine :)
I think I understood you right but was not able to answer to your satisfaction.
Allow me to have another go -

Let us suppose you need the contents of the site to be in two languages - English and French.
There can be two different approaches to tackle this -

1. Give each language its own domain e.g
en.yourwebsite.com
fr.yourwebsite.com
In this approach, we have two different domains so Couch will need to be installed in both of them. Basically you'll have two separate sites each with its own separate admin section, so nothing new here.

2. Give each language a sub-folder e.g.
http://www.yourwebsite.com/en/
http://www.yourwebsite.com/fr/
This seems to be the most followed approach out there and so I'll look at it a little closer -

Suppose this was the original structure of a Couch managed site with only one language (say, English) -
Code: Select all
site_root
  |_couch (folder)
  |_index.php
  |_about.php
  |_news.php

There are three templates with the news template being a clonable template.
Each of the templates will be enclosed within the mandatory
<?php require_once( 'couch/cms.php' ); ?> and <?php COUCH::invoke(); ?> lines.
In any Couch tag where the masterpage parameter (i.e. name of the template ) needs to be supplied, we can use 'index.php', 'about.php' and 'news.php' as the names of the three templates.
This is all routine stuff. I am repeating it so that it can be compared to what follows.

Had the same site been multi-lingual (say English and French), the following could be a possible setup -
Code: Select all
site_root
  |_couch (folder)
  |_en (folder)
  |   |_index.php
  |   |_about.php
  |   |_news.php
  |_fr (folder)
  |   |_index.php
  |   |_apropos.php
  |   |_nouvelle.php
  |_index.php

We have now created the French versions of the three templates and placed them within a separate folder named 'fr' while the English templates are moved to a folder named 'en'.
So now we have six templates instead of three. Notice also the index.php that resides directly in the root which makes it seven templates in all. We'll talk about it in just a while.
Important thing is that there is only one couch installation.

Placing the templates within sub-folders will require two little changes that you need to be aware of -
1.
The mandatory php code placed at the beginnng of the templates placed within the subfolders will now become -
Code: Select all
<?php require_once( '../couch/cms.php' ); ?>

Notice the '..' that denotes that the couch folder is one level up in the hierarchy.
The seventh template that resides directly within the root will not need this adjustment.

2.
The name of the templates will now become -
'en/index.php', 'en/about.php', 'en/news.php', 'fr/index.php', 'fr/apropos.php', 'fr/nouvelle.php'
Notice how the names now have the folder names prefixed.
The seventh template will be simply 'index.php'.
So now any tag that has the masterpage attribute will need to be given these adjusted names.

With this setup, you can now create contents in both the languages as the admin panel will show them as separate templates.

The index.php that resides in the root can be used to direct the users to their desired language. It could be by explicitly asking them their preferred language or you can use the redirect tag to automatically make them land on the default language, say English
Code: Select all
<cms:redirect url='http://www.yourwebsite.com/en/' />


With prettyURLs enabled, the links to pages will be -
http://www.yourwebsite.com/
http://www.yourwebsite.com/en/
http://www.yourwebsite.com/en/about/
http://www.yourwebsite.com/en/news/
http://www.yourwebsite.com/en/news/my_news.html
http://www.yourwebsite.com/fr/
http://www.yourwebsite.com/fr/apropos/
http://www.yourwebsite.com/fr/nouvelle/
http://www.yourwebsite.com/fr/nouvelle/ ... elles.html

Hope my explanation makes sense :)
Do let us know if you have any doubts.
8 posts Page 1 of 1

Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 2 guests