Go to main content

Textpattern CMS support 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: 9,006
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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 ;)

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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)

Offline

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

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

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: 9,006
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

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

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: 9,006
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

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

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