Hallo,
ich würde gerne eine Joomla Komponente (com_moderatedchat) nach meinen Wünschen anpassen...
und zwar möchte ich erstmal den gesamten Inhalt nicht zentriert in der Mitte haben, sondern linksbündig am Rand...
Hier mal der relevante Code:
Code
		
					
				<LINK REL=StyleSheet HREF="<?=$mosConfig_live_site?>/components/com_moderatedchat/dimming.css" TYPE="text/css">
    <script language="javascript">
        strImagesPath = '<?=$mosConfig_live_site?>/components/com_moderatedchat/images/close.jpg';
    </script>
    <SCRIPT LANGUAGE="JavaScript" SRC='<?=$mosConfig_live_site?>/components/com_moderatedchat/dimmingdiv.js'>
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC='<?=$mosConfig_live_site?>/components/com_moderatedchat/chatscript.js'>
    </SCRIPT>
         <p align="left" style="float: left;">
         <?
    //Print the chat header
    print "<br><b>$row->Title </b><br>";
    print "<b>" . _CHAT_COM_DATE . ":</b> " . date('F d Y', strtotime($row->DateChat)) ."<br>";
    print "<br>$row->Description <br><br><br></p>";
    //0 if the user is anonymous
    if ($my->id == $row->GuestId || $my->id == $row->ModeratorId) { // this user is the Guest and/or moderator
        /*Shout box & Admin options*/?>
       <div><?=_CHAT_COM_SEND_ANNOUNC?><br>
       <?=_CHAT_COM_SEND_ANNOUNC_DESC?><br><br>
       <form name="form1" method="post" action="index.php?option=com_moderatedchat&chatid=<?=$chatid?>">
            <textarea name="shout" cols="40" rows="4" wrap="VIRTUAL"></textarea><br>
            <br>
            <input name="Submit" type="submit" id="Submit" value="<?=_CHAT_COM_SEND_ANNOUNC_BTN?>">
            <input name="Clear " type="reset" id="Clear " value="<?=_CHAT_COM_FORM_CLR?>">
       <input type="hidden" name="task" value="addshout">
       <input type="hidden" name="user" value="<?=$my->username?>">
            </div><br>
            <br>
            <br>
            <table border="0" cellspacing="0" cellpadding="3">
              <tr>
                <td ><input type="button" name="preview" value="<?=_CHAT_COM_CHAT_VIEW?>" onClick="showChat()"></td></tr>
                <?
                if ($my->id == $row->ModeratorId) { //only moderator can finish the chat
                    ?>
                <tr><td ><input type="button" name="<?=_CHAT_COM_START_CHAT?>" value="<?=_CHAT_COM_START_CHAT?>" onClick="startChat()"> </td>
                <td ><input type="button" name="<?=_CHAT_COM_FINISH_CHAT?>" value="<?=_CHAT_COM_FINISH_CHAT?>" onClick="finishChat()"> </td>
                        <?
                }
                ?>
              </tr>
            </table>
       </form>
        <? /*End of Shout box & Admin options*/
        ?>
                 <script language="javascript">
           RefreshActivated = '<?=$row->Inprogress?>';
        </script>
                 <div id="transcript_cage">
            <!--This is where we'll be displaying the chat script once it's loaded-->
            <script language="javascript">
                             var currchatid = <?=$chatid?>;
                             var RefreshRate = <?=$RefreshRate?>*1000;
                             getQuestionlist();
            </script>
        </div>
                 <!--internal management form -->
        <form  name="intForm" method="post" action="index.php?option=com_moderatedchat&chatid=<?=$chatid?>">
            <script language="javascript">
                    function deleteQuestion(questionid){
                document.forms['intForm'].idtoproc.value = questionid;
                document.forms['intForm'].task.value = 'delete';
                document.forms['intForm'].submit();
                                 }
                                 function answerQuestion(questionid){
                                         document.forms['intForm'].idtoproc.value = questionid;
                                         displayWindow();
                                 }
                                 function approveQuestion(questionid){
                                         document.forms['intForm'].idtoproc.value = questionid;
                                         document.forms['intForm'].task.value = 'approve';
                                         document.forms['intForm'].submit();
                                 }
                                 function finishChat(){
                                         document.forms['intForm'].task.value = 'finish';
                                         document.forms['intForm'].submit();
                                 }
                                 function startChat(){
                                         document.forms['intForm'].task.value = 'start';
                                         document.forms['intForm'].submit();
                                 }
                                 function showChat(){
                                         var wintranscriptCMG = window.open("index2.php?option=com_moderatedchat&no_html=1&chatid=<?=$chatid?>&task=transcript&GuestName=<?=$GuestName?>&PrevMode=1","wintranscr","height=450,width=500,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes");
                                         if (wintranscriptCMG.blur) {
                                                 wintranscriptCMG.focus();
                                         }
                                 }
                                 function displayWindow()
                                 {
                                 var w, h, l, t;
                                 w = 400;
                                 h = 200;
                                 l = screen.width/4;
                                 t = screen.height/4;
                               // with title
                displayFloatingDiv('windowcontent', '<?=_CHAT_COM_ENTER_ANSWER?>', w, h, l, t);
                }
        </script>
        <input type="hidden" name="idtoproc" value="">
        <input type="hidden" name="task" value="delete">
        <input type="hidden" name="answer" value="">
        </form>
        <div style="width: 518px; height: 287px;visibility:hidden" id="windowcontent">
            <script language="javascript">
            function SubmitAnswer()
            {
                document.forms['intForm'].task.value = 'answer';
                   document.forms['intForm'].answer.value = document.forms['answerpane'].answerfromguest.value;
                //close the prompt
                hiddenFloatingDiv('windowcontent');
                document.forms['intForm'].submit();
            }
            </script>
            <form name="answerpane">
                             <table >
                                 <tr>
                                     <td colspan="2"></td>
                                 </tr>
                                 <tr>
                                     <td><?=_CHAT_COM_ANSWER?>:</td>
                                     <td><textarea name="answerfromguest" cols="40" rows="4" wrap="VIRTUAL"></textarea></td>
                                 </tr>
                                 <tr>
                                     <td colspan="2">
                                     <input type="button" value="<?=_CHAT_COM_SUBMIT_ANSWER?>" onclick="SubmitAnswer();"/>   <input type="button" value="<?=_CHAT_COM_CANCEL_ANSWER?>" onclick="hiddenFloatingDiv('windowcontent');void(0);" /></td>
                                 </tr>
                             </table>
               </form>
        </div>
          <?
    }
    else { //this is a regular user ?>
        <script language="javascript">
            RefreshActivated = '<?=$row->Inprogress?>';
        </script>
                 [B][I][U][COLOR=Red]<div style="border: dotted 1px #FF0000;" id="transcript_cage">[/COLOR][/U][/I][/B]
                         <!--This is where we'll be displaying the chat script once it's loaded-->
            <script language="javascript">
             var currchatid = <?=$chatid?>;
            var RefreshRate = <?=$RefreshRate?>*1000;
             getTranscript();
            </script>
                 </div>
    <?
    //print form to submit questions
    //this determines if the user is anonymous and have permision to post questions
    $showForm = true;
    if (!$my->id) {
        if ($AllowAnononymous) {
            $showForm = true;
        }
        else {
            $showForm = false;
        }
    }
        //check if this chat is still in progress, if not, then the submit form wont be shown...
    if ($row->Inprogress == '-1' && $showForm) {
    ?>
    [COLOR=Red][U][I][B]<div style ="border: solid 1px #0000FF;" id="jump_here">[/B][/I][/U][/COLOR]
    <form name="formSubmitQ" method="post" action="index.php?option=com_moderatedchat&chatid=<?=$chatid?>">
    [COLOR=Red][U][I][B]<table style="border: solid 1px #ffffff;">[/B][/I][/U][/COLOR]
        <tr>
            <td><?=_CHAT_COM_USER_NAME?>:<br>
            <? //if the user is logged, then we pick up his/her name from the DB, if not, then we display a field to capture it
            if ($my->id!=0) {
                $database->setQuery( "select username from #__users where id='$my->id'" );
                $FanName = $database->loadResult();
                print $FanName;
                print '<input type="hidden" name="name" value="'. $FanName .'">';
            } else {
                print '<input type="text" name="name">';
            }
            ?>
            </td>
        </tr>
        <tr>
            <td><?=_CHAT_COM_USER_COMMENT?>:<br><textarea name="comment" cols="40" rows="4" wrap="VIRTUAL"></textarea></td>
        </tr>
                 <tr>
                 <td>
                  <input name="Submit" type="submit" id="Submit" value="<?=_CHAT_COM_USER_POST?>">
                  <input name="Clear " type="reset" id="Clear " value="<?=_CHAT_COM_USER_CLEAR_FORM?>">
         <input type="hidden" name="task" value="Submitq">
        </td>
                 </tr>
            </table>
    </form>
         </div>
    <?
        }
    }
}
else {
    //No chatid selected. Present the Archive?>
    <?=_CHAT_COM_WELCOME?>:<br>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000"><tr>
              <td width="13%" align="center"><b><br><?=_CHAT_COM_DATE?></b><br><br></td>
        <td width="16%" align="center"><b><br><?=_CHAT_COM_GUEST?></b><br><br></td>
        <td width="22%" align="center"><b><br><?=_CHAT_COM_SESSION_TITLE?></b><br><br></td>
        <td width="39%" align="center"><b><br><?=_CHAT_COM_SESSION_DESC?></b><br><br></td>
        <td width="10%" align="center"><b><br><?=_CHAT_COM_SESSION_STATUS?></b><br><br></td>
    </tr>
    <?
        /* set pagination variables */
        $display = $SessionsPerPage;
        $pg = (isset($_REQUEST['pg']) && ctype_digit($_REQUEST['pg'])) ?
          $_REQUEST['pg'] : 1;
        $start = $display * $pg - $display;
        $database->setQuery( "select count(*) from #__moderatedchat" );
        $total = $database->loadResult();
        //load chat information
        $database->setQuery( "select chatid, Guestid, datechat, title, description, inprogress from #__moderatedchat order by datechat DESC LIMIT $start, $display" ); //$start and $display is set for the pagination
        $fields =  $database->loadObjectList();
        if (count($fields) > 0) {
            foreach ($fields as $field) {
                //get the Guest name
                $database->setQuery ("select username from #__users where id='" . $field->Guestid ."'");
                $ArchiveGuestList = $database->loadResult();
                if ($rowClassColor == 'sectiontableentry3') {
                    $rowClassColor = 'sectiontableentry4';
                } else {
                    $rowClassColor = 'sectiontableentry3';
                }
    ?>
      <tr>
             <td width="13%" class="<?=$rowClassColor?>"><?=date('m/d/Y', strtotime($field->datechat))?></td>
        <td width="16%" class="<?=$rowClassColor?>"><?=$ArchiveGuestList?></td>
        <td width="22%" class="<?=$rowClassColor?>"><?=$field->title?></td>
        <td width="39%" class="<?=$rowClassColor?>"><?=$field->description?></td>
        <td width="10%" class="<?=$rowClassColor?>"><a href="index.php?option=com_moderatedchat&chatid=<?=$field->chatid?>">
        <?  switch ($field->inprogress) {
                case '-1':
                    echo _CHAT_COM_SESSION_IN_PROGRESS;
                break;
                case '0':
                    echo _CHAT_COM_SESSION_WRAP;
                break;
                default:
                    echo _CHAT_COM_SESSION_COMING;
                break;
            }
        ?>
        </a></td>
      </tr>
      <?
            }
        }else {
        ?>
        <td colspan="5"><?=_CHAT_COM_SESSION_NO_CHAT?></td>
        <?
        }
?>
    </table>
	
			Alles anzeigen
	Habe mal die 3 wichtigen Punkte hervorgehoben...
Zu betrachten ist das ganze HIER
Bitte einloggen, um das Problem zu sehen:
testuser
testpasswort
Der erste DIV ist Rot markiert... id=transcript_cage
Der zweite DIV ist BLAU (id=jump_here) und beinhaltet
eine Tabelle mit WEISSEM Rahmen...
Würde jetzt gerne die WEIßE Tabelle innerhalb des BLAUEN Divs ganz links ausrichten..., doch wenn es so mache:
<table style="float: left; border: solid 1px #ffffff;">
Kommt das hier bei raus:
Wer kann weiterhelfen?
Danke Vorab.
Eike