Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-02 23:56:12

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

samisdat.org CSS-Rebooted

Damm! When i returned from the 1.May Demonstration yesterday, the CSS-Reeboot site was down.
And now its back and i’m a day to late.

But i’m ready!

samisdat.org
Vote at css-reboot

Except the css reboot, I changed some other things:

  • Tags within URL Try http://samisdat.org/tags=plugin/ for example
  • Bilingual German / English
  • Different Stylesheets and Markup Try Small Font-Size or CSS-Off It’s not just a styleshwitcher, the markup can also be controlled! Themes, i can hear you coming.
  • Tooltips for external links made with Bubble Tooltips by Alessandro Fulciniti.
  • And some other things. Just one more example This link shows all my articles tagged plugin but not with flash in english and with small font-size. The only article tagged as mentioned is bas_lightbox and i can also link it direct. But imagine a page with a dozens of plugins….

The changelog is so long, so i would wonder if anything works.
But I hope less the half of these things work for you :)
I know there is a lot of fine tuning needed.

BTW: Make sure, to visit other txp-driven sites at css-reeboot. I made a list of them in this thread

Offline

#2 2006-05-03 00:57:40

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: samisdat.org CSS-Rebooted

Very nice, I really like the top navbar.

On the tooltips, there is a version where you can set a delay.

Offline

#3 2006-05-03 09:06:58

ricetxp
Member
From: London, UK
Registered: 2005-05-24
Posts: 89
Website

Re: samisdat.org CSS-Rebooted

Like your site a lot. However, none of the plugin links seem to work. I was trying to download bas_flvplayer. Is it still available?

Offline

#4 2006-05-03 09:46:36

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: samisdat.org CSS-Rebooted

Like your site a lot. However, none of the plugin links seem to work.

Thanks

I was trying to download bas_flvplayer. Is it still available?

Oops, i will add it again. Sorry

Last edited by Bastian (2006-05-03 09:47:22)

Offline

#5 2006-05-03 13:47:13

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,601
Website

Re: samisdat.org CSS-Rebooted

I like it Bastian! particularly your little toolbar across the top (nice how the small becomes x-small at the next level down)

Can you shed some light on the internal workings, particularly:

  1. How did you go about setting up the bilingual organisation of the site?
  2. your url addition scheme.

For 2 I’m guessing you’re using something like chs_ifurlvar or perhaps something custom to pick up certain url values and conditionally serving stylesheets accordingly, and maybe some mod_rewrite rules to change ?t=xyz into /tag=xyz/ which I’ve tried once before for filtering with two categories.

But how does that work for languages? Do you have duplicate articles in english sections or have you found/made another special trick for that? Also, do you have it set up so that every articles exists auf Deutsch and in English (i.e. must exist) or are the English and German pages independent of one another (i.e. can be different and are the same only where you choose to write parallel articles).


TXP Builders – finely-crafted code, design and txp

Offline

#6 2006-05-03 14:10:08

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: samisdat.org CSS-Rebooted

How did you go about setting up the bilingual organisation of the site?

I will write an longer article on samisdat. Here is the short version:

The lang function has two parts.
First checking the uri for the language and if english i replace the body or the excerpt with the translation.

The lang check function is called by

<pre><code> if (@txpinterface == ‘public’){ register_callback(“bas_controll_request”, ‘pretext’); } </code></pre>

bas_controll_request checks the requested uri by regex
And removes the the /lang=en/ part form the requested uri.
So all txp things done after that seems to work as normal,
but the lang is saved in $GLOBALS

<pre><code> if(!preg_match(“=\/lang=”,$_SERVER[‘REQUEST_URI’])){ $GLOBALS[‘bas_lang’] = ‘de’; } elseif(preg_match(“=\/lang\=en\/=”,$_SERVER[‘REQUEST_URI’])){ $GLOBALS[‘bas_lang’] = ‘en’; $_SERVER[‘REQUEST_URI’] = preg_replace(‘”\/lang\=en\/”’,’/’,$_SERVER[‘REQUEST_URI’]); } elseif(preg_match(“=\/lang\=de\/=”,$_SERVER[‘REQUEST_URI’])){ $GLOBALS[‘bas_lang’] = ‘de’; $_SERVER[‘REQUEST_URI’] = preg_replace(‘”\/lang\=de\/”’,’/’,$_SERVER[‘REQUEST_URI’]); } </code></pre>

German is my default language, so if German articles passed throught the normal <txp:article>
For English articles i replace the german body by the English one.
This is the code on my article form.

<pre><code> &lt;txp:bas_if_lang lang=‘de’> &lt;txp:body/> &lt;txp:else /> &lt;txp:bas_lang_body /> &lt;/txp:bas_if_lang> </code></pre>

For every German article with an translation i added the ID of the translation in a custom field named Lang.

<pre><code> function bas_lang_body($atts){ global $thisarticle; if(!empty($thisarticle[‘Lang’])){ $body_en = fetch(‘Body_html’,‘textpattern’,‘ID’,$thisarticle[‘Lang’]); } return (empty($body_en))?$thisarticle[‘body’]:parse($body_en); } </code></pre>

I tried different methodes for the bilangual. But this one seems to be the fastest, because it uses the txp-standard tag for the default lang.

Just an example form my localhost: German homepage-> Runtime=0.4781
and the English homepage ->Runtime =0.5311

Last edited by Bastian (2006-05-03 16:15:57)

Offline

#7 2006-05-04 10:44:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,601
Website

Re: samisdat.org CSS-Rebooted

Thanks for the heads-up, Bastian. That looks very interesting and I’d love it if you could write it up in more detail when you get the chance. I’ve used my own parallel article setup to relate articles to one another in another context before but your little function looks a whole lot slicker, particularly tied in with the URL rewriting.

Do I understand you correctly?
  • If there’s no article-ID in custom field “lang” the article won’t be listed, i.e. you don’t have to have an equivalent article.
  • Do the english articles then reside in the same section? If so, how do you stop them showing in the normal German list?

TXP Builders – finely-crafted code, design and txp

Offline

#8 2006-05-04 11:25:33

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: samisdat.org CSS-Rebooted

If there’s no article-ID in custom field “lang” the article won’t be listed,

On samisdat.org the articles avaible only in German are listed when /lang=en/.
I add in this cases this img to the heading:

But it is also no problem to hide all articles that are not matching to the current language.
I want to show them to, because my site has not the overflow of content :)
So why hide something

you don’t have to have an equivalent article.

No you don’t have to.

Do the english articles then reside in the same section?

Yes, the have the same section, same tags, same cates and same comments like the German article
I post all English articles into an hidden section and i extract only body and excerpt.

how do you stop them showing in the normal German list?

I don’t stop that, because there is no German or English list.

Textpattern gives out the pages, sections etc. normal but replaces the German body or excerpt by the English one, if /lang=en/

Last edited by Bastian (2006-05-04 23:38:15)

Offline

#9 2006-05-14 15:30:49

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: samisdat.org CSS-Rebooted

I added some animations to my header image.

I tested it with Firefox 1.5, Opera 8 and IE 6 and i seems to work.
There is only a minor problem with the onclick handle in IE. At the moment i don’t know why

Would be nice if you can have a look and test the all-seying eye.

Offline

#10 2006-05-14 16:44:54

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: samisdat.org CSS-Rebooted

Animation looks nice in FF MAC. There are some nnnnnnnnn’s in the top left corner of the header graphic though. Might look better if the cloud speed was slower than the left to right tram.

Last edited by lee (2006-05-14 16:46:43)

Offline

#11 2006-05-14 17:39:43

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: samisdat.org CSS-Rebooted

I don’t get any animation at all (FF in Wndows at the moment). As for the all seeing eye I’m presuming it’s that little grey smudge in the right half of the sun in the article graphic.


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#12 2006-05-14 18:27:54

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: samisdat.org CSS-Rebooted

lee:

Thanks for the n, i deleted them.
Different speed for train and cloud are my choice, too,
But i have problems with that at the moment, it slows the whole thing down.

NyteOwl:

I don’t get any animation at all (FF in Wndows at the moment). As for the all seeing eye I’m presuming it’s that little grey smudge in the right half of the sun in the article graphic.

I the article is animation at all. The eye should be in the fixed bar at the top, if you have JavaScript activted.
If you have Javascript enable, with which version do you came.

Thank you both for the quick resonse.

Offline

Board footer

Powered by FluxBB