TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 05, 2024, 06:12:34 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 250
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 225
  • Total: 226
  • @rjen

Change shoutbox layout

Started by Przemek84, September 30, 2008, 10:30:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Przemek84

I really did search but I haven't found a concrete answer how to do that apart from pointing where I can find the code.

My problem:
I want shouts to be displayed in the following pattern: Nick Date Shout (in one line)
I managed to incorporate date next to the nickname but I have problems with the content of the shout

Here is the code:

{
$shouts= $txt['tp-last'].' '.$limit.' '.$txt['tp-shouts'].'<hr />';

while($row = mysql_fetch_assoc($request))
{
$shouts .='<div style="margin: 4px;">
<div style="border: dotted 1px; padding: 2px 4px 2px 4px;" class="windowbg2"><b>'.$row['value3'].'</b>
'.timeformat($row['value2']).'</div>
<div style="padding: 4px;">';
$myshout='';
$myshout=$row['value1'];
$shouts .= doUBBC(censorText($myshout));
$shouts .= '</div></div>';
}
$context['TPortal']['shoutbox']=$shouts;
mysql_free_result($request);
}



Link to my site: http://dreamlords.ovh.org/index.php?action=forum
SMF version: SMF ver. 1.1.6
TP version: TP ver. 0983
Theme name and version: mysticjade
Mods installed: Fix Emoticon's Positions for SMF

For testing: login: test password: test

IchBin

#1
From the Posting guidelines:
Please do not ask your own question in a topic. In other words, please don't hijack the topic and make it  yours. Start your own topic and reference the other topic related to your issue.

This necessary for two reasons. To not hijack another users topic, and to make searching easier to find related topics.

The versions are important because there is a difference between TP 0.9.8 and TP 1.x., so we need to know which version you are using.  Thanks for the other info, I'll now split the topic since you didn't start your own topic.

Przemek84

Thanks and sorry for giving you additional work :/
I have edited the first post to describe my problem.

IchBin

How can you put the Shout on the same line? That doesn't make much sense to me at this point. That would be over-crowded in the block wouldn't it?

IchBin

By looking at the code you provided I would say all you probably have to do is remove the one div that separates the body from the topic.

{
$shouts= $txt['tp-last'].' '.$limit.' '.$txt['tp-shouts'].'<hr />';

while($row = mysql_fetch_assoc($request))
{
$shouts .='<div style="margin: 4px;">
<div style="border: dotted 1px; padding: 2px 4px 2px 4px;" class="windowbg2"><b>'.$row['value3'].'</b>
'.timeformat($row['value2']);
$myshout='';
$myshout=$row['value1'];
$shouts .= doUBBC(censorText($myshout));
$shouts .= '</div></div>';
}
$context['TPortal']['shoutbox']=$shouts;
mysql_free_result($request);
}


I don't imagine this will look pretty. Don't forget to BACKUP your file before you make any changes.

Przemek84

#5
Well, maybe it would but I'd like to see it nevertheless. If it looks bad I'll try to alter something else. I want to make the shoutbox as small as possible but showing a good amount of content so I'd like to try out various configurations. Apart from that, Even if it is not such a good idea I want to know how to solve this as it may come in handy in the future.

EDIT:

Ok... thank you for help IchBin the effect is exactly what I wanted. It doesn't look great but I think that if work a little bit with the style it will be superb :)

Great to have such helping hand.

Edit: Oopps... There is however something wrong still :/ Scrolling doesn't seem to work after that change :/

IchBin

How many shouts do you have set to show at a time?

Przemek84

I had 5 and scrolling wasn't workin so i tried different configurations and when I set to 7 ro more everything works fine.
Other solution is to decrease the height of shoutbox and then it works with 5 as well. There appears to be an interrelationship between the height of the shoutbox and the scrolling ability.

Thanks for everything IchBin.

IchBin