News:

Join the Facebook Fan Page.

Main Menu

Create a 'time2'

Started by Pяηѕѕ LF, November 12, 2008, 02:22:23 PM

Previous topic - Next topic

Pяηѕѕ LF

Hello,

When the topic list appear. On the right there is Time (Date + Hours)

I want only the date and not the hours.

Only on the topic list not everywhere in the forum

I think it's in the MessageIndex.template.php. It's there that I want make the modification.

I think create a new 'time' as 'time2' where I copy all the 'time' but delete the 'hours'. But I don't make it.





I hope Anyone can help me for this  :-\.

I write this topic in languages support but anyone can help me. I try my chance here.  :-[

thanks.

1.1.21 Default

H

AFAIK this isn't a language problem. It can most likely be changed either in the messageindex template or in the Sources, where the time is set.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Pяηѕѕ LF

#2
Quote from: H on November 12, 2008, 04:59:03 PM
AFAIK this isn't a language problem. It can most likely be changed either in the messageindex template or in the Sources, where the time is set.

Huw,

I know it isn't a language problem I want to say only I opened the same topic in my language support but anyone can help me.

Perhaps you can give me more information about where I change exactly for this ?  :-[

In source but in wich file time set found etc ..

thanks.
1.1.21 Default

Pяηѕѕ LF

Anyone can help me to make this modification  :-[ ?
1.1.21 Default

SoNSuZLuKC

Cok Cok teessuf ederiz ederiz bizden kimse yardim etmemis demissin  :P

%d %B, %Y %H:%M:%S seklinde olan tarih formatinin sadece mesaj indexinde %d %B, %Y ollarak gorunmesini istiyorsun sanirim. bunun icin 2. bir date_function olmasi lazim.

$haftaningunu = date("w"); 
$gun = date("d"); 
$tay = date("n"); 
$yil = date("Y"); 

$hgun = array ('Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi');
$ay = array (1 => 'Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık');

echo "Bugün $gun {$ay[$tay]} $yil {$hgun[$haftaningunu]}"; 


function tarih() { // türkçe tarih fonkiyonu
$saat_farki=60*60*8;
$tarih=time()+$saat_farki;
$i=date("w",$tarih);
switch ($i) {
    case 0:$gun="Pazar"; break;
    case 1:$gun="Pazartesi";break;
    case 2:$gun="Salı";break;
    case 3:$gun="Çarşamba";break;
    case 4:$gun="Perşembe";break;
    case 5:$gun="Cuma";break;
    case 6:$gun="Cumartesi";break;
}
$tarih=date("d.m.Y ",$tarih);
$tarih=$tarih." ".$gun;
return $tarih;
}


kodlarda bu zaman araligini sunucudan aliyor.  ;)

Pяηѕѕ LF

SoNSuZLuKC öncelikle cevap için tesekkürler.

Evet konuyu açtigimda türkçe bölümüne kirgin'dim biraz o bölüme açmamistim baska yerlere açmistim ama vs vs..

Dedigin gibi sadece mesaj indexinde bu degisikligin olmasini istiyorum konularin listendigi sayfada. Peki verdigin kodlari nasil entegre edebilirim degistirebilirim ? birazdaha yardimci olabilirmisin ?  :-\
1.1.21 Default

Kermit

#6
We should talk better in english here  :P

so here we go

Sources/MessageIndex.php


Code (find) Select

if (mysql_num_rows($result) != 0)
{
$theboards = array();
while ($row_board = mysql_fetch_assoc($result))
{
if (!isset($context['boards'][$row_board['ID_BOARD']]))
{
$theboards[] = $row_board['ID_BOARD'];

// Make sure the subject isn't too long.
censorText($row_board['subject']);
$short_subject = shorten_subject($row_board['subject'], 24);



Code (add after) Select


                  $time_format = '%d %B %Y';



Code (find) Select

'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470],


Code (replace with) Select

'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime'],$time_format) : $txt[470],



Code (find) Select


'time' => timeformat($row['lastPosterTime']),


Code (replace with) Select


'time' => timeformat($row['lastPosterTime'],$time_format),
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Pяηѕѕ LF

Duncan85 when I make the modification all is deleted.

Me I want only the date not the time. As this.

when I Make that you give me




I want this



:-\
1.1.21 Default

Kermit

Hmm weird,than try to do this in the same file

Code (find) Select
// 'Print' the topic info.

Code (add after) Select

$time_format = '%d %B %Y';


of course,after doing the changes,that i gave you above
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Pяηѕѕ LF

"of course,after doing the changes,that i gave you above "

I don't understand this but with this modif. it's work as I want as  ;D Since a long time I want to make this thousands thanks Duncan85
1.1.21 Default

Kermit

Yw, please mark your topic as solved  ;)
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Advertisement: