News:

Wondering if this will always be free?  See why free is better.

Main Menu

Topic Author And Topic Age

Started by Rohan_, June 25, 2009, 03:21:48 PM

Previous topic - Next topic

sAce

sorry to disappoint you rohan_ , but aranator is right this is a complex  modification you are asking for,

i looked into it and and found it requires a lot of work, not just some 1-2 line modification

but have patience it will be done sometime :P , i will try to make it work once i understand how :P

have faith , :D

thank you

Aleksi "Lex" Kilpinen

Moved this over to "SMF Coding Discussion" where this may get better responses on the issue at hand.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

sAce


Rohan_

please do it as fast as possible :)

thank u all
Proud To Be An Indian

Rohan_

Proud To Be An Indian

Arantor

Let me clarify: this means several modifications to core code, and between trying to find a job and repeated hospital visits, I really haven't had time to dig into this. As soon as I am able I will attempt it, but my personal life is making this somewhat difficult at present (you may have noticed that my post rate has dropped)
Holder of controversial views, all of which my own.


Rohan_

Proud To Be An Indian

Sabre™

Quote from: Arantor on June 27, 2009, 07:46:02 AM
.... I'm just someone who posts far too much and frequently doesn't know what I'm talking about.

LOL
Best line I've read in ages! lol

Sorry, off topic :D
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Aleksi "Lex" Kilpinen

Quote from: Sabre™ on July 08, 2009, 08:06:09 AM
Quote from: Arantor on June 27, 2009, 07:46:02 AM
.... I'm just someone who posts far too much and frequently doesn't know what I'm talking about.

LOL
Best line I've read in ages! lol

Sorry, off topic :D
Actually, how did I miss that? :D Hilarious. ;)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Rohan_

guys we will do jokes after work :( why dont someody help me :( this is the SMF owners site  .. where is the creator of smf .. they can solve it in seconds
Proud To Be An Indian

Aleksi "Lex" Kilpinen

Sorry to say Rohan_ but if you can't do something yourself, you should at least have patience to allow others the time they need - unless you want to pay for the work.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Bulakbol

Try this one. Paste this code in your MessageIndex.template.php. Let's see if that's the one you are looking for. This is for the default theme.
Code (find) Select
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
Code (replace) Select
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>';
$today = @getdate(time());
echo '<div style="font-size: 10px; padding: 2px;">', $topic['first_post']['member']['name'], ' - ', floor(($today[0] - $topic['first_post']['timestamp']) / 86400 ), ' days</div>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

sAce

thank you bulakbol ,

he wanted "days ago"

so for that replace " days " from the end of the code with " ', $txt['days_ago'], ' " and
add " $txt['days_ago'] = 'Days ago.';  " in modifications.english.php

Rohan_

Can u please make a exact code for me ?? i want days old
Proud To Be An Indian

Rohan_

hey i got this

Parse error: syntax error, unexpected '}' in .../Themes/default/MessageIndex.template.php on line 243

234:
235: // Is this topic new? (assuming they are logged in!)
236: if ($topic['new'] && $context['user']['is_logged'])
237: echo '
238: <a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
239:
240:                   echo '
241: <small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>';
242:                   $today = @getdate(time());

243:                   echo '<div style="font-size: 10px; padding: 2px;">', $topic['first_post']['member']['name'], ' - ', floor(($today[0] - $topic['first_post']['timestamp']) / 86400 }, ' days</div>

244: </td>
245: <td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" width="4%" align="center">
246: ', $topic['replies'], '
247: </td>
Proud To Be An Indian

Arantor

Change the } on line 243 to a ) and try it again.
Holder of controversial views, all of which my own.


Rohan_

woww how easily Bulakbol solved this problem .. anyways there is a problem the days are exactly not matching with the real date of the topic when it posted .. there is a difference of 1 day .. i just have posted a topic and it showing 1 days old ... and in some topics it showing 0 days old i want Today not 0 days old
Proud To Be An Indian

Rohan_

see this pic the first topic posted 10 mins ago and it showing it 1 days ago i want to see it Today .. and the other topics are 23 days old and it showing them 22 days ago .. there is a problem of 1 day please solve it

any topic i am posting now my site showing them 1 days old :(
Proud To Be An Indian

Arantor

This is why Bulakbol is on the team and I am not. As I said to you earlier on, I frequently don't know what I'm talking about.

As for this, try replacing:

<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>';
$today = @getdate(time());
echo '<div style="font-size: 10px; padding: 2px;">', $topic['first_post']['member']['name'], ' - ', floor(($today[0] - $topic['first_post']['timestamp']) / 86400 ), ' days</div>


With:

<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>';
$today = @getdate(time());
$days = ceil(($today[0] - $topic['first_post']['timestamp']) / 86400 );
if($days <= 1) {
echo '<div style="font-size: 10px; padding: 2px;">', $topic['first_post']['member']['name'], ' - <b>Today</b></div>';
} else {
echo '<div style="font-size: 10px; padding: 2px;">', $topic['first_post']['member']['name'], ' - ', $days, ' days</div>';
}
echo '


It probably won't work but worth a try anyway.
Holder of controversial views, all of which my own.


Rohan_

#39
woo hoooo .. i dont think that its true that u dont know what u are talking about :D u have solved it buddy .. it is solved .. i am really very happy because is solved after a long time .. thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks  . A TON . all of u  .. thanks from heart to all that helped me and a special thanks to Bulakbol to giving us the idea:) thanx again
Proud To Be An Indian

Advertisement: