Hey, I’ve tried searching the forums but what I searched for and what I’m looking for didn’t really come through. I have a chatbox/shoutbox that is connected to my content management system, Joomla. I installed a module that was developed to be displayed vertically but I chose to go the other route. I’ve done what I needed to in the .css file but the PHP coding is where I’m running into trouble, could somebody help me?
Basically, I would like to get several objects onto one line such as “Latest Message:, XXX Time Here” and “Message:, Textbox Here, Send Button Here”
Ignore the “commas” above, it’s just the order I would like to have the objects in on one line.
Please see the following image to understand what I’m asking for:
Imageshack
Here’s the following code:
[code]<?php
if(!$ipaccess) {
JHTML::_(‘behavior.mootools’);
$module_base = JURI::base() . ‘modules/mod_shoutbox/’;
$document =& JFactory::getDocument();
$document->addScript($module_base . ‘js/fatAjax.php?refresh=’.$refresh);
if(JPluginHelper::isEnabled(‘system’, ‘yvsmiley’)) {
$document->addScript($module_base . ‘js/sbsmile.js’);
}
$document->addStyleSheet($module_base . ‘css/mod_shoutbox.css’);
}
?>
<?php echo JText::_( 'NOIPACC'); ?>
<?php else : ?>
<script type="text/javascript">
var fadefrom = '<?php echo $params->get("fadefrom"); ?>';
var fadeto = '<?php echo $params->get("fadeto"); ?>';
</script>
<div id="shoutbox">
<div id="chatoutput">
<?php echo $sound; ?>
<?php $first_time = true; ?>
<?php foreach ($list as $item) : ?>
<?php if ($first_time == true):
$lastID = $item->id; ?>
<div id="lastMessage"><span><?php echo JText::_( 'LAST_MESSAGE'); ?>:</span><em id="responseTime"><?php echo modShoutboxHelper::time_since($item->time); ?> <?php echo JText::_( 'AGO'); ?></em></div><ul id="outputList">
<?php endif; ?>
<?php if ($maydelete): ?>
<li><span title="<?php echo $item->ip; ?>"><?php echo $item->url; ?> : </span><?php echo $item->text; ?> <a href="?mode=delshout&shoutid=<?php echo $item->id; ?>" title="Delete">x</a></li>
<?php else : ?>
<li><span title="<?php echo modShoutboxHelper::time_since($item->time); ?>"><?php echo $item->url; ?> : </span><?php echo $item->text; ?></li>
<?php endif; ?>
<?php $first_time = false; ?>
<?php endforeach; ?>
</ul>
</div>
<?php if ($params->get('tag')) : ?>
<p><?php echo JText::_( 'GUESTTAG');?></p>
<?php endif; ?>
<?php if ($params->get('post_guest') || $loggedin != 'guest') : ?>
<form id="chatForm" name="chatForm" method="post" action="index.php">
<p>
<?php $name = ($params->get("name")) ? $user->get('name') : $user->get('username'); ?>
<?php if($loggedin != 'guest') : /* If they are logged in, then print their nickname */ ?>
<input type="hidden" name="shoutboxname" id="shoutboxname" class="inputbox" value="<?php echo $name; ?>" />
<?php else: /* Otherwise allow the user to pick their own name */ ?>
<label for="shoutboxname"><?php echo JText::_( 'NAME'); ?></label>
<input type="text" name="shoutboxname" id="shoutboxname" class="inputbox" value="<?php if (isset($_COOKIE['jalUserName'])) { echo $_COOKIE['jalUserName']; } ?>" />
<?php endif; ?>
<?php if (!$params->get('url')) : ?>
<span style="display: none">
<?php endif; ?>
<label for="shoutboxurl">Url:</label>
<input type="text" name="shoutboxurl" id="shoutboxurl" class="inputbox" value="<?php if (isset($_COOKIE['jalUrl'])) { echo $_COOKIE['jalUrl']; } else { echo 'http://'; } ?>" />
<?php if (!$params->get('url')) : ?>
</span>
<?php endif; ?>
<?php if ($params->get('textarea')) : ?>
<label for="chatbarText"><?php echo JText::_( 'MESSAGE'); ?></label><textarea rows="4" cols="16" name="chatbarText" id="chatbarText" class="inputbox" onkeypress="return pressedEnter(this,event);"></textarea>
<?php else: ?>
<label for="chatbarText"><?php echo JText::_( 'MESSAGE'); ?></label><input type="text" size="60" name="chatbarText" id="chatbarText" class="inputbox" onkeypress="return pressedEnter(this,event);"/>
<?php endif; ?>
<input type="text" name="homepage" id="homepage" class="homepage" />
</p>
<?php if(JPluginHelper::isEnabled('system', 'yvsmiley')): ?>
<a id="toggle" href="#" name="toggle"><?php echo JText::_( 'SMILEYS'); ?></a>
<?php
$smilies = '';
$mainframe->triggerEvent('onSmiley_RenderForm', array('document.forms.chatForm.chatbarText', &$smilies, 'sbsmile') );
echo $smilies;
?>
<?php endif; ?>
<input type="hidden" id="jal_lastID" value="<?php echo $lastID + 1; ?>" name="jal_lastID" />
<input type="hidden" name="shout_no_js" value="true" />
<input type="submit" id="submitchat" name="submit" class="button" value="<?php echo JText::_( 'SEND'); ?>" />
</form>
<span id="sbsound"></span>
<?php else: ?>
<p><?php echo JText::_( 'REGISTER_ONLY'); ?></p>
<?php endif; ?>
</div>
<?php endif; ?>[/code]
Cheers1