Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Namespace starting with capital letter
For example "Wiki" instead of "wiki"
Avatar
dibe0014 #1
User title: Ben
Member since Dec 2006 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: Namespace starting with capital letter
Hi,

how can I use a namespace with a capital letter like in the example? I didn't find any documentation about it. I tried to rename the folder for the namespace, but it doesn't work.

When look in "do=index" the changed namespace appears in the first line, but i am not able to see which articles are in it.

Is there a solution for this problem?
Problem auf Deutsch:

Ich würde gerne die Namespaces mit einem Großbuchstaben anfangen lassen. Leider klappt das nicht, habe schon versucht den Ordner unter "data" umzubenennen, nur mit dem Erfolg, dass wenn ich auf den Button "Übersicht" klicke der Namespace automatisch in der ersten Zeile erscheint. Man kann ihn dann nicht öffnen und sehen welche Artikel sich innerhalb des Namespace befinden.

Gibt es dazu eine Lösung?

Thanks
Ben
Avatar
Wolfgang_F. #2
Member since Jul 2007 · 24 posts
Group memberships: Members
Show profile · Link to this post
Subject: titles in any case - possible with capital Ä,Ö or Ü?
I wanted namespaces and headers in capital letters too - so I hacked /inc/HTTPClient.php and /inc/pageutils.php as described in http://wiki.splitbrain.org/wiki:tips:titles_in_any_case

It works so far - but now I realized that only the lowercase ä, ö and ü are transformed to ae, oe and ue, while the uppercase Ä, Ö and Ü are left untouched. I'd like to have a header or pagetitle like "Ärger mit Überschriften" transformed to "Aerger_mit_Ueberschriften" ... "Umlaute zum ärgern" is transformed as expected to "Umlaute_zum_aergern"

Today I tried to hack the /inc/utf8.php: I added in the last line
'Ä' => 'Ae', 'Ö' => 'Oe',   'Ãœ' => 'Ue',

to this array (Line 1005)
global $UTF8_UPPER_ACCENTS;
$UTF8_UPPER_ACCENTS = array(
  'À' => 'A', 'Ô' => 'O', [...]

But nothing changed ...

Any Idea to fix my "Uppercase-Transform-Problem"?

Wolfgang
Avatar
andi (Administrator) #3
User title: splitbrain
Member since May 2006 · 3484 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #1
Quote by dibe0014 on 2006-12-18, 17:31:
how can I use a namespace with a capital letter like in the example?

You can't. Namespaces have to be valid pagenames.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
Wolfgang_F. #4
Member since Jul 2007 · 24 posts
Group memberships: Members
Show profile · Link to this post
Quote by andi:
Quote by dibe0014 on 2006-12-18, 17:31:
how can I use a namespace with a capital letter like in the example?

You can't. Namespaces have to be valid pagenames.

But it is possible as I mentioned above. See it working in a modified Monobook-Style at http://www.heine-wiki.de/. As far as I can see, everything except capital Ä, Ö or Ü works fine (this Problem seems to be a sideeffect of hacking /inc/HTTPClient.php and /inc/pageutils.php).

I admit, I don't understand why there has to be something like utf8_strtolower(...) or strtolower(...) - I think there must be a reason ...

In my opinion it would be better to deaccent capital letters without transforming them to lowercase and to let the user decide, if he wants to use namespaces, pagenames and headers in capital letters.

Wolfgang
This post was edited on 2007-09-14, 18:37 by Wolfgang_F..
Avatar
rakader #5
Member since May 2008 · 61 posts
Group memberships: Members
Show profile · Link to this post
Hi and hello,

I have the same problem and question but I'm not be able to understand what you have written. Could you please explain setting up namespaces in upper case for people who doesn't have the background being a PHP expert?

Thank you a lot in advance

rakader
Avatar
joergwl #6
Member since Nov 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Hi,

can anybody explain me why the namespaces / pagenames / media - filenames have to be in small letters??

Does it cause any unwanted side effects to remove the utf8_strtolower() from /inc/HTTPClient.php and /inc/pageutils.php ??

I modified this files and all seems to work fine ?!?

Ciao
Joerg
Avatar
Amy #7
Member since Oct 2008 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Solution
Hello :-)

I am using the arctic template and with the help of a friend, I pasted the following code to the end of the design.css file:

/lib/tpl/arctic/design.css:


.idx {

    text-transform:capitalize;
}

The pagename remains ins lower case but the appearance is upper case.

Hope that helps...
Avatar
joergwl #8
Member since Nov 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Hi,

its not just about displaying the upper case name spaces.

I have a lot of files on a server which I want to make available for linking in DokuWiki. The filenames use upper and lower case letters and I can't change all this names.

I have modified wiki as described in this thread and all seems to work fine, but I fear that there will come something up later on.

So, I would like to understand why this choice for lower case letters was made, and what a change could cause.

Ciao
Joerg
Avatar
g1smd #9
Member since Jan 2009 · 133 posts · Location: UK
Group memberships: Members
Show profile · Link to this post
Mixed-case URLs can cause Duplicate Content issues for search engine indexing in some cases.

In most cases it is wise to go with all lower-case URLs.
Avatar
og #10
Member since May 2006 · 436 posts · Location: Bayern
Group memberships: Members
Show profile · Link to this post
In reply to post #8
Well, dokuwiki seems not to be suited for integration of externaly supplied documents/files. What you try to do (which i do as well ;-) is to make a Content-Management System out of it, which it isn't. Dokuwiki has no chance to track the changes made in the media dirs, so i can't update metadata for search, etc.
Oli...
Avatar
AO #11
Member since Feb 2009 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Grossbuchstaben, geht nicht, gibts nicht
In inc/pageutils.php die Zeile mit utf8tolower auskommentiert und schon gehts.

Wer allerdings schon diverse Daten / Dateien angelegt hat, muss diese ggfs. auf Filesystemebene nun anpassen.
Das hängt davon ab, wie man im Quellcode geschrieben hat. Wer bislang (vorher!) immer nur Kleinbuchstaben verwandt hat, wird alte Informationen weiter finden. Wer beides (bisher!) wahllos eingesetzt hat, muss nun aufpassen.
Dazu in media und data nachsehen, ggfs. auch meta, cache, etc. einmal löschen.

Bislang keine Probleme unter Windows und Linux und auf USB-Stick. Wer neu aufsetzt, hat eh keine Probleme.
Avatar
tobias.wantzen #12
Member since Sep 2009 · 14 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Wolfgang,

I already answered your question in the german forum (see http://forum.dokuwiki.org/thread/1263). For all english speakers in this forum who want to solve it too:

inc/pageutilities.php: [dokuwiki-2009-12-25c]
To aktivate upper and lower casing, comment line 115:
115: //    $id = utf8_strtolower($id);

To deaccent even uppercase accented letters (e.g. german umlauts Ä, Ö, Ü, ...) set the second parameter of the utf8_deaccent() function to zero:
126:     if($conf['deaccent'] || $ascii) $id = utf8_deaccent($id,0);

Cheers
Tobias
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-10-16, 06:58:14 (UTC +02:00)