Gossamer Forum
Home : Products : Links 2.0 : Customization :

anderer Kategoerienamen am Server

Quote Reply
anderer Kategoerienamen am Server
Ich versuche die ganze Zeit eine Lösung für folgendes Problem zu bekommen.
Ich möchte wie bei yahoo.com einen anderen Kategorienamen auf der Startseite(Home Template)als am Server. Z.b. Computer&Internet landet im Ordner am Server unter "ci" oder Arts & Humanities landet bei "ar". Gleiches auch bei Unterkategorien.
Kurz gesagt die Kategoriennamen lauten anders als am Server.
Wer kann mir bitte Helfen?
Danke
Michael

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
I think this is what you want.

http://www.gossamer-threads.com/perl/forum/showflat.pl?Cat=&Board=L2Cust&Number=37483&page=&view=&sb=&vc=1

There is more than one solution offered in that thread. I recommend the one by Widgetz.

Viel Gluck!
Daniela

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
From a private follow-up message:
In Reply To:
Ist es mit diesem Mod möglich eine Category Computer & Internet einzurichten und diese
Category lautet aber am Server Computer_Internet oder ci ?
What is your objective? If it is to be able to use the & character in category names, then you need the Links 2 Non-English Mod which you can find in the Resources section. This mod will also permit you to use characters with umlauts in category names.

But--if your objective is to save disk space on your server by having abbreviated category names in the category field of your links.db which are matched to expanded names in your category.db--I don't think you can do that. I once asked Alex (the author of Links) if it would be possible to store only the category record number in links.db rather than the full category name, which can be really long if you have many subcategories. You can see his answer here, but it boils down to "no":
http://www.gossamer-threads.com/...ew=&sb=&vc=1

The mod I originally suggested to you makes it possible for a single subcategory to appear under more than one supercategory. For instance, if you have a category named Entertainment/Films and you think that some of your users may look for films under the category Arts/Films, this mod lets you have Films appear under both main categories. This is done in Yahoo.

I hope this helps you!

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
Dear Michael,

I think it best if we post our communication regarding your question in this forum so others can help you if they have ideas different from mine. I need clarification of your question before I can suggest a mod. There are several existing mods which may serve your needs.

To readers other than baerli90:
The following is simply a restating of my request for clarification in my previous post


Eigentlich weiss ich nicht was Du willst. Du hast gesagt Du möchtest dass die Kategoriennamen lauten anders als am Server. Aber warum? Was willst Du dabei? Es gibt einige Möglichkeiten und verschiedene Lösungen.

1) Du möchtest verbotenen Buchstaben sowie "& - + Ü" in deinem Kategoriennamen benutzen. In diesem Fall brauchst du Links 2 Non-English Character Mod. Es steht im Resources Abschnitt und ist von einem Deutschen geschrieben. Du kannst auch diesen threads lesen:
http://www.gossamer-threads.com/...um3/HTML/001103.html
http://www.gossamer-threads.com/...um3/HTML/001722.html

2) Du möchtest hard-disk Raum konservieren, deshalb willst Du sehr kurz Kategoriennamen sowie "ci" im Database aufnehmen. Leider ist das nicht möglich. Mann braucht LinksSQL dafür, aber es kostet viel.

3) Du möchtest das eine Kategorie unter zwei oder mehr Kategorien erscheint. z.b. Film unter Arts und auch unter Entertainment. Dafür brauchst Du die Mod von meinem ersten Post.

4) ?? Vielleicht hast du noch etwas vor.

End of German

Michael, if you clarify your request I will do my best to help you. You may post in either German or English--I can understand both--but if you post in English then perhaps others will have ideas which may help you.

Best wishes,
Daniela

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
leider versteh ich die frage nicht genau, es besteht die möglichkeit mit multiple templates eine vielzahl von
alternativen kategorien mit verschiedenen layouts zu konfigurieren. bitte definiere deine frage anders, damit
wir dir helfen können
mfg
klaus

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
Hallo Klaus,
Ich verwende derzeit folgenden Mod http://goodstuff.orphanage.com/mtemplates_mod.html .
Habe allerdings folgendes Problem. Ich habe die Rubrik Dienstleistung/Deutschland/Architektur und Dienstleistung/Oesterreich/Architektur
Da beide Kategorien Architektur enthalten schaffe ich es nicht jeder Architektur Kategorie einen anderen Template zuzuornen. Deshalb bin ich auf die Idee mit den anderen Kategorienamen am Server gekommen. Vielleicht gibt es aber bei diesem Mod auch eine Möglichkeit einer Untekatekorie in einer Unterkategorie ein anderes Template zuzuweisen.

Michael

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
baerli90 has asked me to translate the question in his previous message to English, so here it is:

He has installed the Multiple Category Templates mod by Bobsie. He wants to be able to use the same template for all subcategories with a common substring in their name, regardless of their supercategories. For example:

Entertainment/Germany/Film
and
Entertainment/France/Film

should use a common template which is shared by all subcategories which contain the substring "Film" in the category name.

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
Hi!
Nur mal so zur Info: ein deutsches Forum für LINKS gibt's auch:
http://www.nicky.net/cgi-bin/ub/Ultimate.cgi

...
Denis

Quote Reply
Re: anderer Kategoerienamen am Server In reply to
Micheal,

Ich habe keine erfahrung mit diesem mod. Du sollst bobsie fragen weil er diesen mod geschrieben hat. Er ist auch der Moderator dieser Forums.



Quote Reply
Re: anderer Kategoerienamen am Server In reply to
I think I have come up with a solution to your problem, but I don't use this mod personally, so you should check with bobsie to see if my advice is sound.

You want to use a specific template for all subcategories that share the same substring in their name. For example, a template specifically for subcategories containing the substring "Film" should be used by the following categories:
Entertainment/Germany/Film
Entertainment/France/Film

Bobsie's mod forces you to create duplicate templates since it looks at the beginning of the category name and therefore considers the above two categories to be distinct.

I think you can solve this dilemma by removing from Bobsie's code the character I have marked in red:

In Reply To:
If you are trying to load a special template for just a sub-category, you will need to modify the code similar to that in Note 1 but specify a different template as shown below:
# Set the appropriate template file to load
if ($category_name =~ /^Film/) {
$template = "film.html"; }
else { $template = "category.html"; }
The caret character causes the script to look only at the beginning of the string. By removing it you cause the script to look for the occurrence of the substring "Film" at any point in the string.

Now, please check this with bobsie to see if I'm right because I am not a Perl programmer and I don't use this mod myself.


Viel gluck!



Quote Reply
Re: anderer Kategoerienamen am Server In reply to
Actually, if he wanted a single template file for "Entertainment" (including all sub-categories of Entertainment) then the following code would work:
Code:
if ($category_name =~ /^Entertainment/) {
$template = "entertainment.html"; }
else { $template = "category.html"; }
But if he wanted different templates used for German and French, and still another one for Entertainment itself, then this code would work:
Code:
if ($category_name =~ /^Entertainment\/German/) {
$template = "egerman.html"; }
elsif ($category_name =~ /^Entertainment\/French/) {
$template = "efrench.html"; }
elsif ($category_name =~ /^Entertainment/) {
$template = "entertainment.html"; }
else { $template = "category.html"; }
If you remove the carat (^), then it would still work except in for the Entertainment category. In that case, any category name that contains the word Entertainment would use the entertainment.html template.

The key in the second example is that we check for the sub-categories FIRST and the top-level category afterwards.

I hope this helps/clarifies.

By the way, if the message has been posted in English to begin with, I probably would have answered this sooner. Until the last post, I had no idea what it was saying.

- Bobsie
bobsie@orphanage.com
http://goodstuff.orphanage.com/
Quote Reply
Re: anderer Kategoerienamen am Server In reply to
I'm sorry if I've been unclear. He is not concerned with top-level categories at all, or even subcategories immediately below the top-level categories. He wants to designate one template to be used by subcategories with the same name, regardless of what top-level categories they might be nested inside of. For example, the template Film.html would be used by the following subcategories related to film (note that they may be nested inside completely different top-level categories):

Entertainment/German/Film
Entertainment/French/Film
Festivals/International/Swedish/Film
Festivals/International/Film
Information/Arts/Film


Thank you so much for your help, Bobsie.


P.S.
In Reply To:
By the way, if the message has been posted in English to begin with, I probably would have answered this sooner. Until the last post, I had no idea what it was saying.
Even those of us who understand German didn't know what he wanted until many messages had been exchanged. He did not reveal from the outset that he was using your mod. As a result of some private messages that were exchanged I learned what he wanted and agreed to be his translator in order that his problem could be considered by a wider range of list members.



Quote Reply
Re: anderer Kategoerienamen am Server In reply to
Then this should work (and is how my mod was originally written):
Code:
if ($category_name =~ "Film") {
$template = "film.html"; }
else { $template = "category.html"; }
Now it doesn't care about where "Film" appears in the category name. It will use the same template (film.html) if it appears anywhere in the name.

- Bobsie
bobsie@orphanage.com
http://goodstuff.orphanage.com/