Demo

Probiere ClanSphere aus und teste daran herum. Demo

Codepaste - Details
Weitere Infos zum Codepaste

Name Erweiterungsfunktion Datumsausgabe
Autor at maximal
CMS-Version ClanSphere 2007
Datei system/core/tools.php
Datum 05.10.2007 um 10:11 Uhr
Beschreibung In manchen Designs sind die Navis relativ schmal wobei es bei der Ausgabe von"*Datum* um *Uhrzeit*" zu ungewollten Zeilenumbrüchen kommen kann. Somit habe ich die Funktion eingebaut das "um" ausblenden zu können.
@CS-Team: bin auch nicht böse wenn ihr es generel einbaut^^
Alter Code Alter Code +-
 
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.
1. / 2. / ... 
 function cs_date($mode,$data,$show_time 0$show_date 1) {

    global 
$com_lang;
  if(
$mode=='date' AND preg_match('=-=',$data)) {
    
$explode explode('-'$data);
    
$data mktime(0,0,1,$explode[1],$explode[2],$explode[0]);
  }
    else {
        global 
$account;
        
$data $data $account['users_timezone'];

    if(empty(
$account['users_dstime']) AND date('I',$data) != '0' OR $account['users_dstime'] == 'on') {
      
$data $data 3600;
    }
    }

  
$var = empty($show_date) ? '' date($com_lang['dateset'],$data);
    if(!empty(
$show_time)) {
    
$var .= empty($show_date) ? '' ' ' $com_lang['dtcon'] . ' ';
      
$var .= date($com_lang['timeset'],$data) . ' ' $com_lang['timename'];
    }
  return 
$var;
}

function 
cs_datereal($mode,$time 0) {

    global 
$account;
    
$time = empty($time) ? cs_time() : $time;
    
$time $time $account['users_timezone'];

  if(empty(
$account['users_dstime']) AND date('I',$time) != '0' OR $account['users_dstime'] == 'on') {
    
$time $time 3600;
  }
    return 
date($mode,$time);
}
Neuer Code Neuer Code +-
 
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.
1. / 2. / ... 
 function cs_date($mode,$data,$show_time 0$show_date 1$show_dtcon 1) {

    global 
$com_lang;
  if(
$mode=='date' AND preg_match('=-=',$data)) {
    
$explode explode('-'$data);
    
$data mktime(0,0,1,$explode[1],$explode[2],$explode[0]);
  }
    else {
        global 
$account;
        
$data $data $account['users_timezone'];

    if(empty(
$account['users_dstime']) AND date('I',$data) != '0' OR $account['users_dstime'] == 'on') {
      
$data $data 3600;
    }
    }

  
$var = empty($show_date) ? '' date($com_lang['dateset'],$data);
    if(!empty(
$show_time)) {
          if(!empty(
$show_date) AND !empty($show_dtcon)) {
             
$var .= ' ' $com_lang['dtcon'] . ' ';
          }
          if(!empty(
$show_date) AND empty($show_dtcon)) {
             
$var .= ' ';
          }
      
$var .= date($com_lang['timeset'],$data) . ' ' $com_lang['timename'];
    }
  return 
$var;
}
Zurück - Übersicht


Bitte Login benutzen, um Kommentare zu schreiben.