Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 5
Seite [1]
warlordrawks


Beginner




Beiträge: 4
# Thema - 12.01.2009 um 21:48 Uhr
Hello,

I would like to modify the current title system : For example, in the board, It would be interesting that the title contains the name of the displayed thread.
And for all the other pages, always the same thing (Welcome to Clansphere for example).

Is it possible and How to do?
If anyone has enought skill, he can edit the original script and help me

From system/core/templates.php

// Set title proper related to module
if (!empty($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;
}


Thanks.
Warlord
Inaktiv
SCHIRI ClanSphere Team


Weltmeister



Herkunft: Hamburg
Beiträge: 5299
# Antwort: 1 - 12.01.2009 um 23:05 Uhr
system -> options -> Clansphere

Pagetitle (4th from top)


------------------
www.laszlokorte.de

Inaktiv
|
fay-pain


Specialist




Beiträge: 2006
# Antwort: 2 - 13.01.2009 um 00:15 Uhr
@Schiri you didn´t his post, right?

@Topic
Mhh.. I think you have to create sql selects in cs core for every mod

 
1.
2.
3.
4.
5.
6.
1. / 2. / ... 
<?php 
if($cs_main['mod'] == 'board') {
  
$cs_board cs_sql_select(....); #and you have to get the id, but I´m not sure how it works in core^^
  
$scnd_action $cs_board['threads_headline']; 
}
$cs_main['def_title'] = $cs_main['def_title'] . ' - ' $scnd_action?>


That´s an example... no tests and no garanty - for lack of time^^


------------------
Manchmal hast du fay und machmal pain.
- hajo

Zuletzt editiert von fay-pain am 13.01.2009 um 00:15 Uhr (1x Editiert)
Inaktiv
|
SCHIRI ClanSphere Team


Weltmeister



Herkunft: Hamburg
Beiträge: 5299
# Antwort: 3 - 13.01.2009 um 11:58 Uhr
oh sry i just read the title


------------------
www.laszlokorte.de

Inaktiv
|
warlordrawks
Thread-Ersteller


Beginner




Beiträge: 4
# Antwort: 4 - 13.01.2009 um 18:37 Uhr
Thanks fay-pain for your answer,

I'll try to find something from it ... if anyone has a working script, he's welcome

Warlord.



Inaktiv
|
warlordrawks
Thread-Ersteller


Beginner




Beiträge: 4
# Antwort: 5 - 04.03.2009 um 23:33 Uhr
So, i've finished the script, here is its function :

In the board, the page's title contains the name of the displayed thread.
And for all the other pages, always the same thing (the default title set in admin panel System/Options/Clansphere).

The file to edit is /system/core/templates.php

I recall that the initial {func:title} displays "the default title - The mod".

Here is the initial script
 
1.
2.
3.
1. / 2. / ... 
<?php// Set title proper related to module
if (!empty($cs_main['mod']))
        $cs_main['def_title'] = $cs_main['def_title'] . ' - ' . ucfirst($cs_main['mod']);?>



And here my script
 
1.
2.
3.
4.
5.
6.
1. / 2. / ... 
<?php // Set title related to thread or default title - by Warlord
    
$id=$_REQUEST['where'];
    
$donnees cs_sql_select(__FILE__,'threads','threads_headline',"threads_id = '" $id "'");
    
$threads_headline $donnees['threads_headline'];
    if(
$cs_main['mod'] == 'board' and $cs_main['action'] == 'thread')        
        {    
$cs_main['def_title'] = $threads_headline;           } ?>


Hope it will be helpfull
Regards,
Warlord.




Inaktiv
|
Antworten: 5
Seite [1]


Sie müssen sich registrieren, um zu antworten.