2008-12-22, 06:59 PM
Code from http://www.mybboard.pl/automatycznie-dod...l#pid12293
1.Open File inc/datahandlers/post.php
2.Search
How I can change this code ? I want to when I write new posts , in place of title of topics shows date automatically.
edit: I found this one, but I don't now how add this to windows with name of topic
Pattern newthread
I found <td class="trow2" width="20%"><strong>{$lang->thread_subject}</strong></td>
<td class="trow2"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
Next I added <script language="JavaScript"><!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(day + "." + month + "." + year);
//--></script>
This shows that:
<td class="trow2" width="20%"><strong>{$lang->thread_subject}</strong></td>
<td class="trow2"><script language="JavaScript"><!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(day + "." + month + "." + year);
//--></script><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
When I do it that , this shows that :
Can you tell me where I should add this script to in windows shows ' Name of topics'
1.Open File inc/datahandlers/post.php
2.Search
// Inserting a new thread into the database.
else
{
$this->thread_insert_data = array(
"fid" => $thread['fid'],
"subject" => $db->escape_string($thread['subject']),
i change to // Inserting a new thread into the database.
else
{
$this->thread_insert_data = array(
"fid" => $thread['fid'],
"subject" => $db->escape_string('['.date("d.m.Y",intval($thread['dateline'])).'] '.$thread['subject']),
How I can change this code ? I want to when I write new posts , in place of title of topics shows date automatically.
edit: I found this one, but I don't now how add this to windows with name of topic
Pattern newthread
I found <td class="trow2" width="20%"><strong>{$lang->thread_subject}</strong></td>
<td class="trow2"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
Next I added <script language="JavaScript"><!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(day + "." + month + "." + year);
//--></script>
This shows that:
<td class="trow2" width="20%"><strong>{$lang->thread_subject}</strong></td>
<td class="trow2"><script language="JavaScript"><!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(day + "." + month + "." + year);
//--></script><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
When I do it that , this shows that :
Can you tell me where I should add this script to in windows shows ' Name of topics'