Textpattern Forum

You are not logged in. Register | Login | Help

#1 2012-02-06 10:19:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 5,016
Website

trilingual gallery site

This is a new trilingual gallery site I’ve put together for some friends.

Plugins used:

  • For the front end
    • glx_if
    • rvm_css
    • rvm_privileged
    • zem_contact_reborn
    • mem_postmaster
    • zem_redirect
  • For the administration
    • rss_admin_db_manager
    • upm_img_popper
    • bot_privs
    • bot_write_tab_customize
    • adi_notes
    • rah_textile_bar
    • smd_where_used
    • sed_default_article_status
    • wet_babble
    • rah_change_passwords

Some content is not up yet but I think that it all functions as it should :)


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Offline

#2 2012-02-06 15:59:09

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,397
Website

Re: trilingual gallery site

Hi Yiannis, I loved browsing the site, it really made me want to visit this gallery, even though I probably wouldn’t be able to actually buy something… ;)

I see you are not using MLP, but sections for languages (a solution I have used a couple of times). I have a couple of questions about it. Why aren’t the language sections used for Newsletter and Contact? And I noticed that the language links (top right) on most individual article pages link to that article’s translation, but on category pages they link to the section landing page, not to the category page; is this a deliberate choice?

And I noticed something that I encountered on my own site as well: in excerpts (are you using rss_auto_excerpt too?) like on this page, footnote links go nowhere. I solved that by hiding them with CSS, in this case it would be something like .grid_12 .footnote {display: none;}. But maybe it doesn’t bother you at all ;)


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#3 2012-02-06 18:00:46

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 5,016
Website

Re: trilingual gallery site

Els wrote:

Hi Els, thanks for visiting.

… even though I probably wouldn’t be able to actually buy something… ;)

Tell me about it:)

I see you are not using MLP, but sections for languages (a solution I have used a couple of times). I have a couple of questions about it. Why aren’t the language sections used for Newsletter and Contact? And I noticed that the language links (top right) on most individual article pages link to that article’s translation, but on category pages they link to the section landing page, not to the category page; is this a deliberate choice?

The way I worked out the languages was to have 3 main sections and 3 main parent categories which have the same names as the sections. I don’t remember how I opted to have the contact and newsletter as different sections (in 3 languages).

categories do not have their links to their corresponding languages as I could not figure out a way to link them dynamically. The only way I could think of was to hard code them, but as the owners of the site have full control over the creation of categories, a generic link was a good solution… Unless somebody can think of a way with which these links can be dynamically added.

And I noticed something that I encountered on my own site as well: in excerpts (are you using rss_auto_excerpt too?) like on this page, footnote links go nowhere. I solved that by hiding them with CSS, in this case it would be something like .grid_12 .footnote {display: none;}. But maybe it doesn’t bother you at all ;)

Thanks for spotting that! Hiding with css is not the best solution, especially with the search engines. The owners have full responsibility over the content. I’ll have to let them know.


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Offline

#4 2012-02-06 20:50:11

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,397
Website

Re: trilingual gallery site

colak wrote:

as the owners of the site have full control over the creation of categories, a generic link was a good solution…

Ah yes, that makes sense, I didn’t think of that.

Unless somebody can think of a way with which these links can be dynamically added.

If only we had custom fields for categories, or more than two categories… No, I can’t think of another way that would also be workable for the site owners.

Hiding with css is not the best solution, especially with the search engines.

It had not occurred to me that it could also be a search engine problem. It’s not that the links produce 404’s, so can you explain why it wouldn’t be a good solution?

Last edited by Els (2012-02-06 20:51:15)


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#5 2012-02-07 01:39:23

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,399

Re: trilingual gallery site

colak wrote:

…. Unless somebody can think of a way with which these links can be dynamically added.

Hi,
Maybe something like this could work? Or I’m raving?

<txp:if_category>
	<a href='<txp:site_url />el/?c=<txp:category />'><img width="30" height="20" class="grid_1 mtop50" alt="english" src="http://www.artareacyprus.com/images/8.jpg"/></a>
</txp:if_category>

Offline

#6 2012-02-07 07:23:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 5,016
Website

Re: trilingual gallery site

Els wrote:

It had not occurred to me that it could also be a search engine problem. It’s not that the links produce 404’s, so can you explain why it wouldn’t be a good solution?

Yesterday I got a 404 on clicking those links for some reason. Today, the site works just fine:)

redbot wrote

Maybe something like this could work? Or I’m raving?

That is a very good idea if I make the names of the sub-categories the same in all three languages. Does txp allow that?


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Offline

#7 2012-02-07 08:13:42

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,399

Re: trilingual gallery site

colak wrote:

…That is a very good idea if I make the names of the sub-categories the same in all three languages….

Oops you are right, I’m raving ;)
I assumed subcategories were the same in all languages, I should have paid more attention.
In any case your solution is already a good compromise so I’d stick with that.

Offline

#8 2012-02-07 08:56:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 5,016
Website

Re: trilingual gallery site

redbot wrote:

Oops you are right, I’m raving ;)

Not really… It could work with something like … if I change the category names

<txp:if_article_list>
<txp:variable name="categoryname" value='<txp:page_url type="c" />' />
<txp:if_variable name="categoryname" value=""><!-- section page -->
<a href="<txp:site_url />en/"><txp:image id="8" class="grid_1 mtop50" /></a>
<txp:image id="30" class="grid_1 mtop50" />
<a href="<txp:site_url />ru/"><txp:image id="7" class="grid_1 mtop50" /></a>
<txp:else /><!-- category page -->
<txp:if_category name='<txp:category />'>
<a href="<txp:site_url />en/<txp:category />/"><txp:image id="8" class="grid_1 prefix_14 mtop50" /></a>
<txp:image id="30" class="grid_1 mtop50" />
<a href="<txp:site_url />ru/<txp:category />/"><txp:image id="7" class="grid_1 mtop50" /></a>
</txp:if_category>
</txp:if_variable>
<txp:else />
<txp:article_custom id='<txp:article_id />' allowoverride="0" time="any"><!-- individual article page -->
<txp:if_custom_field name="englishID">
<txp:permlink id='<txp:custom_field name="englishID" />'><txp:image id="8" class="grid_1 mtop50" /></txp:permlink><txp:else /><a href="<txp:site_url />en/"><txp:image id="8" class="grid_1 prefix_14 mtop50" /></a></txp:if_custom_field>
<txp:image id="30" class="grid_1 mtop50" />
<txp:if_custom_field name="russianID">
<txp:permlink id='<txp:custom_field name="russianID" />'><txp:image id="7" class="grid_1 mtop50" /></txp:permlink><txp:else /><a href="<txp:site_url />ru/"><txp:image id="7" class="grid_1 mtop50" /></a></txp:if_custom_field>
</txp:article_custom>
</txp:if_article_list>

Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Offline

#9 2012-02-08 22:35:30

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,399

Re: trilingual gallery site

colak wrote:

Not really… It could work with something like … if I change the category names…

Sorry Yiannis, your example is too complicated for me to follow.
My fault, my attention level is below-zero lately.
Anyway – I’m just speculating here – I think the first part of your code (the “if_article_list” part) does exactly what my code does without using variables.
…and, yes, probably this is an absolutely futile debate – as I said the solution you already adopted is ok for me ;)

Offline

Board footer

Powered by FluxBB