SimplePortal

Customization => Custom Coding => Topic started by: dry3210 on September 24, 2009, 09:34:17 AM

Title: What code to edit to remove timestamp from shoutbox?
Post by: dry3210 on September 24, 2009, 09:34:17 AM
What code to edit to remove timestamp from shoutbox?

I'm guessings its in the PortalShoutbox template page and I don't mind it in the history but I'd like to remove the date/time stamp off the shoutbox....any help?
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: Nathaniel on September 25, 2009, 01:36:33 AM
Find and remove the code below from your 'Themes/default/PortalShoutbox.template.php' file:
Code: [Select]
<span class="smalltext shoutbox_time">', $shout['time'], '</span>
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: dry3210 on September 25, 2009, 12:51:03 PM
Find and remove the code below from your 'Themes/default/PortalShoutbox.template.php' file:
Code: [Select]
<span class="smalltext shoutbox_time">', $shout['time'], '</span>

That works except when you type a message it shows the timestamp again until its refreshed...

Also, how can I bump the font up a bit

And finally...

No scroll for people on the iphone and ipods in the shoutbox?

Thanks for the help
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: Nathaniel on September 25, 2009, 09:17:35 PM
Remove the code below from your 'Themes/default/portal.js'
Code: [Select]
<span class="smalltext shoutbox_time">' + time + '</span>
Find this code (same file as above):
Code: [Select]
<li class="smalltext"
Replace with this code:
Code: [Select]
<li class="normaltext"
Find this code (Themes/default/PortalShoutbox.template.php);
Code: [Select]
<li class="smalltext">', !$shout['is_me']
Replace with this code:
Code: [Select]
<li class="normaltext">', !$shout['is_me']
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: dt1 on November 30, 2009, 06:57:18 AM
Is it possible to move the timstamp?
I would like it before the username, so shouts would be 1 line only.

1 more quick one, can the format of the time be changed, or does it follow the general board settings?

Thnaks
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: lakechurch on May 04, 2010, 08:35:22 PM
I would like it before the username, so shouts would be 1 line only.

I know it is an old thread, but I could not find it anywhere else. Is it possible to put it on 1 line? I think it is better in 1 line when the shoutbox is in the top block (instead of a side block, than is the normal view better).
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: Westlund on October 25, 2010, 03:11:25 PM
I would like it before the username, so shouts would be 1 line only.

I know it is an old thread, but I could not find it anywhere else. Is it possible to put it on 1 line? I think it is better in 1 line when the shoutbox is in the top block (instead of a side block, than is the normal view better).

Bump, I'd like this too.
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: Infernus on November 13, 2011, 11:58:00 PM
Sorry about getting up an old thread. But I haven't realy found any other thread that fits thат I want, so im posting it here.

I figured out how to change it so date will appear before the name, you have to change this line in portal.js:
Code: [Select]
new_body += '<li class="smalltext">to
Code: [Select]
new_body += '<li class="smalltext"><span class="smalltext shoutbox_time">' + '[' + time + '] ' + (is_me == 0 ? '</span><strong>' + author + ':</strong> ' : '') + body + '<br />' + (delete_link != 0 ? ('<span class="shoutbox_delete">' + delete_link + '</span>') : '') + '</li>';
This makes the date appear before name, but the problem is that this only applyes only when the shout is made.
Thing I haven't figured out is how to make the date next to name on shoutbox load. It seems like it's somewhere, but where... checked throw bunch of files already.

This is how it looks

On load, when user loads shoutbox:
(http://i208.photobucket.com/albums/bb43/noober42/1.png)
On shout:
(http://i208.photobucket.com/albums/bb43/noober42/2.png)
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: [SiNaN] on November 14, 2011, 04:20:08 AM
Themes/default/PortalShoutbox.template.php

Code: (Find) [Select]
<span class="smalltext shoutbox_time">', $shout['time'], '</span></li>
Code: (Replace) [Select]
</li>
Code: (Find) [Select]
<li class="smalltext">', !
Code: (Replace) [Select]
<li class="smalltext"><span class="smalltext shoutbox_time">', $shout['time'], '</span>', !
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: Infernus on November 14, 2011, 07:15:03 AM
Meh, im blind. Thank you.  ;D
Title: Re: What code to edit to remove timestamp from shoutbox?
Post by: duzzzstar on February 28, 2012, 02:05:58 AM
Guys, I'm using the SP 2.3.4 and I has made the modification on the PortalShoutbox.template.php. Look http://kagbrasil.com/forum/index.php?action=forum

But, after I post any message, the shoutbox comes to the old style, with the timestamp under the nick and message.

Whats going on?
SimplePortal 2.3.8 © 2008-2024, SimplePortal