Report about the errors that occur in this forum

Started by Kiyevame Ikran, March 08, 2014, 09:37:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ertew

Tìtstewan, i tried it and no effect. Probably the presets only change time string, and next that string was used in whole forum.


Quote from: Toruk Makto@shoutbox[03|Jul 07:57 pm]:   Shoutbox is a plugin and doesn't take all the setttings, unfortunately.
What about shoutbox source code, are they user-friendly or messy? And license, was hacker-friendly or crappy "use and don't touch"?
I think, if the time was printed by simply php funcion: date("d|M h:i a", $timestamp); and there should be possibility to change it to: date($time_format_from_user_profile_from_database, $timestamp); or in pair with rtrim to remove % char from time string.
Any errors in spelling, tact or fact are transmission errors.

Hi! I'm a signature virus. Copy me into your signature to help me spread.

Tìtstewan

#21
This is the mod page of the shoutbox, I think:
http://custom.simplemachines.org/mods/?mod=1295
...and there is a screenshot:

...and I think this option is avaliabe on the pro version only.

And modifying the original, I would be careful...

EDIT: Is there not somewhere a comand, for "use the users time" for that field?

EDIT 2:

It is not just easy to edit it. I looked at the code:
Code (php) Select
'poster' => ($cmd_me ? '' : '<a href="' . $scripturl . '?action=profile;u=' . $s['ID_MEMBER'] . '" target="_blank"' . (!empty($s['colorName']) ? ' style="color:' . $s['colorName'] . '"' : '') . '>' . $s['realName'] . '</a>') . ' <span style="color:' . $shoutbox['timeColor'] . '">[' . ($s['timestamp'] > 0 ? timeformat($s['timestamp'], $shoutbox['timeFormat']) : $txt[470]) . ']</span>:',
Code (php) Select
list ($count) = mysql_fetch_row($query);
mysql_free_result($query);

$context['shoutbox']['page_index'] = constructPageIndex($url, $start, $count, $shoutbox['startShouts'], true);

// get msgs...
$query = db_query("
SELECT ID_SHOUT, ID_MEMBER, realName, colorName, style, message, timestamp
FROM {$db_prefix}shoutbox
WHERE ID_SHOUT <= $limit
ORDER BY ID_SHOUT DESC LIMIT $start, " . $shoutbox['startShouts'], __FILE__, __LINE__);

$context['shoutbox']['msgs'] = array();
while ($s = mysql_fetch_assoc($query))

Code (php) Select
// send msg
db_query("
INSERT INTO {$db_prefix}shoutbox
(ID_MEMBER, realName, style, message, timestamp" . (!empty($color) ? ', colorName' : '') . ")
values($ID_MEMBER, '$user_info[name]', '$style', '$msg',
'" . time() . "'" . (!empty($color) ? ", '$color'" : '') . ")", __FILE__, __LINE__);

return Shoutbox_GetMsgs();


and some other related codes...

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Toruk Makto

I'm not particularly inclined to bang on the shout box code anymore since it is actually working, for a wonder.

Lì'fyari leNa'vi 'Rrtamì, vay set 'almong a fra'u zera'u ta ngrrpongu
Na'vi Dictionary: http://files.learnnavi.org/dicts/NaviDictionary.pdf

Ertew

Ok, everything here was possible, but code was to wired for editing it. Thanks for explain it. Now i shut up and try to learn wired time/date notation without next questions.
Any errors in spelling, tact or fact are transmission errors.

Hi! I'm a signature virus. Copy me into your signature to help me spread.