Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 2
Seite [1]
fixed


Beginner





Beiträge: 4
# Thema - 19.09.2008 um 10:57 Uhr
I don't know is this right board but ...

i wanted to know ....

it's possible to make a array or loop or something else to replace and put in laguage file this my code ?

here is my code for dynamic title renaming to my language... +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
1. / 2. / ... 
 
    
// Set title proper related to module
    
if (!empty($cs_main['mod']))
        if(
$cs_main['mod'] == "news") {
        
$cs_main['mod'] = "Jaunumi";
        }elseif(
$cs_main['mod'] == "board") {
        
$cs_main['mod'] = "Forums";
        }elseif(
$cs_main['mod'] == "users") {
        
$cs_main['mod'] = "Lietotāji";
        }elseif(
$cs_main['mod'] == "search") {
        
$cs_main['mod'] = "Meklēt";
        }elseif(
$cs_main['mod'] == "members") {
        
$cs_main['mod'] = "Biedri";
        }elseif(
$cs_main['mod'] == "wars") {
        
$cs_main['mod'] = "Klanu kari";
        }elseif(
$cs_main['mod'] == "articles") {
        
$cs_main['mod'] = "Raksti";
        }elseif(
$cs_main['mod'] == "clans") {
        
$cs_main['mod'] = "Klani";
        }elseif(
$cs_main['mod'] == "gallery") {
        
$cs_main['mod'] = "Galerija";
        }elseif(
$cs_main['mod'] == "faq") {
        
$cs_main['mod'] = "BUJ";
        }elseif(
$cs_main['mod'] == "history") {
        
$cs_main['mod'] = "Vēsture";
        }elseif(
$cs_main['mod'] == "rules") {
        
$cs_main['mod'] = "Noteikumi";
        }elseif(
$cs_main['mod'] == "partner") {
        
$cs_main['mod'] = "Partneri";
        }elseif(
$cs_main['mod'] == "servers") {
        
$cs_main['mod'] = "Serveri";
        }elseif(
$cs_main['mod'] == "files") {
        
$cs_main['mod'] = "Faili";
        }elseif(
$cs_main['mod'] == "replays") {
        
$cs_main['mod'] = "Demo faili";
        }elseif(
$cs_main['mod'] == "links") {
        
$cs_main['mod'] = "Saites";
        }elseif(
$cs_main['mod'] == "quotes") {
        
$cs_main['mod'] = "Citāti";
        }elseif(
$cs_main['mod'] == "fightus") {
        
$cs_main['mod'] = "Izaicināt mūs";
        }elseif(
$cs_main['mod'] == "contact") {
        
$cs_main['mod'] = "Par mums";
        }elseif(
$cs_main['mod'] == "messages") {
        
$cs_main['mod'] = "Ziņas";
        }elseif(
$cs_main['mod'] == "clansphere") {
        
$cs_main['mod'] = "Administrācija";
        }elseif(
$cs_main['mod'] == "count") {
        
$cs_main['mod'] = "Statistika";
        }elseif(
$cs_main['mod'] == "events") {
        
$cs_main['mod'] = "Notikumi";
        }elseif(
$cs_main['mod'] == "votes") {
        
$cs_main['mod'] = "Aptaujas";
        }else{
        
$cs_main['mod'] = ucfirst($cs_main['mod']);
        }
        
        
$cs_main['def_title'] = $cs_main['def_title'] . ' :: ' ucfirst($cs_main['mod']);
    
    
$cs_main['def_title'] = htmlspecialchars($cs_main['def_title'], ENT_QUOTES);
    
$cs_temp_get str_replace('{func:title}'$cs_main['def_title'], $cs_temp_get);
    
$cs_temp_get str_replace('{func:charset}'$com_lang['charset'], $cs_temp_get);
    
$cs_temp_get str_replace('{func:queries}'$cs_logs['queries'], $cs_temp_get);
    
$cs_logs['php_errors'] = nl2br($cs_logs['php_errors']);
    
$cs_logs['errors'] = nl2br($cs_logs['errors']);
    
$cs_temp_get str_replace('{func:errors}'$cs_logs['php_errors'] . $cs_logs['errors'], $cs_temp_get);
    
$cs_logs['sql'] = nl2br(htmlspecialchars($cs_logs['sql'], ENT_QUOTES));
    
$cs_temp_get str_replace('{func:sql}'$cs_logs['sql'], $cs_temp_get);
    
$getparse cs_parsetime($cs_micro);
    
$cs_temp_get str_replace('{func:parse}'$getparse$cs_temp_get);
    
$getmemory function_exists('memory_get_usage') ? cs_filesize(memory_get_usage()) : '-';
    
$cs_temp_get str_replace('{func:memory}'$getmemory$cs_temp_get);
    
    return 
$cs_temp_get;
Inaktiv
Pred


Poststar




Herkunft: Bischofsmais
Beiträge: 762
# Antwort: 1 - 19.09.2008 um 16:14 Uhr
i've done something like this a few days ago.

Its not finished, but i postet the code in the nopaste:
http://www.clansphere.de/index/nopaste/view/id/246

u just have to create a new .tpl in /clansphere for example and then put the {clansphere:dyn_title} in ur index.htm

With my version of the Code there's also the Headline of the News/Article in the Title


------------------


Inaktiv
|
fixed
Thread-Ersteller


Beginner





Beiträge: 4
# Antwort: 2 - 19.09.2008 um 16:33 Uhr
thnx nice ... when i get free moment i check out the code and try to finish


Inaktiv
|
Antworten: 2
Seite [1]


Sie müssen sich registrieren, um zu antworten.