Simple Machines Community Forum

SMF Support => Language Specific Support => Topic started by: Pяηѕѕ LF on November 12, 2008, 02:22:23 PM

Title: Create a 'time2'
Post by: Pяηѕѕ LF on November 12, 2008, 02:22:23 PM
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.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg100.imageshack.us%2Fimg100%2F1748%2Fooodw1.jpg&hash=a6c11c0e902d20b3795fb416b0d76169b4038709)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg379.imageshack.us%2Fimg379%2F8021%2Fsssswt7.jpg&hash=fecdc6c8b3dce72970c8bea313d8d844cc910c1c)

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.

Title: Re: Create a 'time2' or modify 'time' ?
Post by: 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.
Title: Re: Create a 'time2' or modify 'time' ?
Post by: Pяηѕѕ LF on November 13, 2008, 11:18:55 AM
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.
 
Title: Re: Create a 'time2' or modify 'time' ?
Post by: Pяηѕѕ LF on November 16, 2008, 12:41:54 PM
Anyone can help me to make this modification  :-[ ?
Title: Re: Create a 'time2' ~ AnyBody Can Help Me ):
Post by: SoNSuZLuKC on November 29, 2008, 04:39:28 AM
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.  ;)
Title: Re: Create a 'time2' ~ AnyBody Can Help Me ):
Post by: Pяηѕѕ LF on November 29, 2008, 06:38:02 AM
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 ?  :-\
Title: Re: Create a 'time2' ~ AnyBody Can Help Me ):
Post by: Kermit on November 29, 2008, 07:23:05 AM
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),
Title: Re: Create a 'time2' ~ AnyBody Can Help Me ):
Post by: Pяηѕѕ LF on November 29, 2008, 07:47:25 AM
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


(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg90.imageshack.us%2Fimg90%2F4043%2Ftest1ut8.png&hash=fbcd75046025024a33d54ca43bc9329c4787f7a2)

I want this

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg90.imageshack.us%2Fimg90%2F5733%2Ftest21rp8.png&hash=4db9aad4f00f4e957fa8dbc54bc7f5682fb5431d)

:-\
Title: Re: Create a 'time2' ~ AnyBody Can Help Me ):
Post by: Kermit on November 29, 2008, 07:51:44 AM
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
Title: Re: Create a 'time2' ~ AnyBody Can Help Me ):
Post by: Pяηѕѕ LF on November 29, 2008, 07:59:41 AM
"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
 
Title: Re: Create a 'time2'
Post by: Kermit on November 29, 2008, 08:02:58 AM
Yw, please mark your topic as solved  ;)