Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pages & comments some design help?
#3
(2014-02-23, 00:39:23)shawn_a Wrote: Im gonna barf now, thanks
You're welcome. Big Grin
(2014-02-23, 00:39:23)shawn_a Wrote: First off wrap your comments in a div,so you can at least style it independantly.
you can either float it left, or give it a width 50% inline-block and that might be a start.
These are really css html quesitons, nothing special required for php

Generally, I would share your opinion here, and I'm aware of what'd have to do with css, but: The layout of the comments is determined by pages_comments.php, and all the html elements are embedded in php. I kind of need someone to tell me where to put my <div> tags in there. I've tried a few things but I didn't get very far. Same for the *s. You can't change their colour with the stylesheet.

I guess this is the portion I'm gonna have to work with, just how?
Code:
//only if comments are publics then they are showed.
                    if ($public_main == 'Y'){
            echo '<div class="tabla">';
            echo '<div class="commain" onMouseOver="shwimg(&quot;imgcontentmain'.$at.'&quot;)" onMouseOut="Nshwimg(&quot;imgcontentmain'.$at.'&quot;)">';
                echo '<div class="commainblg">';
                             echo '<div class="subjblg">';
                                  echo '<img src="'.$SITEURL.'plugins/pages_comments/images/etq.gif" alt="" />';
                                  echo '&nbsp;'.$linauth;
                                  if (trim($lin2) != ''){
                                      echo ': '.$lin2;
                                  }
                                  echo '<div class="blq">';
                                        echo '<a href="javascript:Insertcom(&quot;contentmain'.$at.'&quot;,&quot;'.$at.'&quot;,&quot;'.$count.'&quot;)"><img style="visibility: hidden;" src="'.$SITEURL.'plugins/pages_comments/images/ico-minor.png" id="imgcontentmain'.$at.'" alt="'.i18n_r('pages_comments/pc_collapse').'" /></a>';
                                  echo '</div>';
                      echo '<span class="arrow fill"></span>';
                             echo '</div>';
                             //clean float
                             echo '<div class="clear"></div>';
                             echo '<div id="contentmain'.$at.'" style="display: block;">';
                                  echo '<div class="comtblg">'.$comment.'</div>';
                                  echo '<div class="lastline">';
  
                                      echo '<div class="buttoncom">';
                                           echo '<div class="fftimeblg">';
                                                echo htmlentities(i18n_r('pages_comments/pubd'), ENT_QUOTES, "UTF-8").' '.$fftime;
                                                if ($ct != ''){
                                                    echo ', '.$ct;
                                                }
                                           echo '</div>';
                                      echo '</div>';
                                      echo '<div class="replyblg">';
                                           if ($dnlLen_r > 0){  
                                               echo '<a href="javascript:Insertcom(&quot;tablar'.$at.'&quot;,&quot;'.$at.'&quot;,&quot;'.$count.'&quot;)" title="'.i18n_r('pages_comments/nm_view').' '.$dnlLen_r.' '.i18n_r('pages_comments/nm_comc').'" id="bctablar'.$at.'">'.$dnlLen_r.' '.i18n_r('pages_comments/nm_comc').'</a>';
                                           }
                                           echo '&nbsp;&nbsp;&nbsp;';
                                           echo $linrpl;
                                      echo '</div>';
                                  echo '</div>';
                             echo '</div>';
                        echo '</div>';
                    echo '</div>';
                    echo '</div>';
                    //clean float
                    echo '<div class="clear"></div>';

//////////////////  //insert replies to this comments
                echo '<div class="tablardisplay" id="tablar'.$at.'" style="display: none;">';
            //$verNodeU_r = $xpath->query("entry[Id=$at and moder='Y' and answ='y']");
            $verNodeU_r = $xpath->query("entry[Id=$at and answ='y']");
            $dnlLen_r=$verNodeU_r->length;
                    $lindelete = '';
            if ($dnlLen_r ==0){ echo '<br />'; }
            $countr=1;
            foreach($verNodeU_r as $node) {
               //echo '<div class="tablar">';
               $dNdList_r = $node->getElementsByTagName( "*" );
               $at_r = $node->getAttribute('id');
               foreach($dNdList_r as $node) {
                 $name= $node->nodeName;
                 $d =$node->nodeValue;
                 $d = filtro(stripslashes(html_entity_decode($d)));
                 $n = strtolower($name);
                 //check if its an email address
                 if (check_email_address($d)) {
                     $d = '<a href="mailto:'.$d.'">&nbsp;'.$d.'</a>';
                 }

                 //check first line
                 if ($n == 'nb') {
                                     $namerpl = $d;
                                     if ($ncusr == 'Y'){
                                         if (isset($_SESSION["LoggedIn"])){
                                               if ($_SESSION["Username"] == stripslashes(html_entity_decode($namerpl))) {
                                                   $lindelete = '<a class="replyblg" href="'.$idpret.'iddelpost='.$at.'&amp;sidelpost='.$sidel.'"  onClick="return confirmar(&quot;'.i18n_r('pages_comments/pc_delcom').'&quot;)">'.i18n_r('pages_comments/pc_del').'</a>';
                                               }
                                         }
                                     }
                 }
                 else if ($n == 'date'){
                     $d = strtotime(substr($d,0,strpos($d,'+')-1));
                     $timerpl = strftime($ffpost, $d);
                 }
                 else if ($n == 'cm') {  //comment  
                                      $commentrpl = BBcodeN($d);
                                      $commentrpl = str_replace(htmlentities('<br />', ENT_QUOTES, "UTF-8"), '<br />', $commentrpl);
                                      foreach ($array_emot as $key => $val) {
                                             $commentrpl=str_replace($array_emot[$key], '<img src="'.$SITEURL.'plugins/pages_comments/img_emot/'.substr($array_emot[$key],1, strlen($array_emot[$key])-2).'.gif" alt="'.$array_emot[$key].'" />', $commentrpl);    
                      }                 }
                 else if ($n == 'ct'){
                                      $ctrpl = '';
                                      if (trim($d) != ''){
                                          $ctrpl =  htmlentities(i18n_r('pages_comments/WHO'), ENT_QUOTES, "UTF-8").' '.$d;
                                      }
                                 }
                 else if ($n == 'captcha'){}
                 else if ($n == 'em'){}
                    else if ($n == 'ip_address'){}
                 else if ($n == 'answ'){}
                 else if ($n == 'moder'){$public_rp=$d;}    
                 else if ($n == 'id'){}
                                 else if ($n == 'subid'){ $sidel=$d; }    
                } //end second foreach of replies
                            //start replies of comments
                            if ($public_rp == 'Y'){
                            echo '<div class="comrepl">';
                              echo '<div class="comreplblg">';
                                 echo '<div class="subjblg">';
                                      echo '<div class="img">';
                                           echo '<img height="18" src="'.$SITEURL.'plugins/pages_comments/images/etq.gif" alt="" />';
                                      echo '</div>';
                                      echo '&nbsp;'.stripslashes(html_entity_decode($namerpl));
                      echo '<span class="arrow fill"></span>';
                                 echo '</div>';
                                 echo '<div class="comtblg">'.$commentrpl.'</div>';
                                 echo '<div class="lastline">';
                                      echo '<div class="buttoncom">';
                                           echo '<div class="fftimeblg">';
                                                echo htmlentities(i18n_r('pages_comments/pubd'), ENT_QUOTES, "UTF-8").' '.$timerpl;
                                                if ($ctrpl != ''){
                                                    echo ', '.$ctrpl;
                                                }
                                           echo '</div>';
                                      echo '</div>';
                                      echo $lindelete;
                                 echo '</div>';
                              echo '</div>';
                            echo '</div>';
                            } //end if $public_rp == N (comments of replies are not moderated)
                //echo '</div>';  //end tabla replies
                $countr++;
            } //end first foreach of replies
                        echo '</div>'; //end main tabla
//////////////////
            echo '<div class="none">';
                        //Integrate frontend users plugin
                        if ($ncusr=='Y'){        
                            if (isset($_SESSION["LoggedIn"])){
                                    news_form('none', 'y', $log_file, $EMAIL, $count, $at, $capt,$vemot, $moder,$ncusr,$phpmailer);
                            }
                            echo '</div>';
                        } else {
                            news_form('none', 'y', $log_file, $EMAIL, $count, $at, $capt,$vemot, $moder,$ncusr,$phpmailer);
                            echo '</div>';

                        }


                    } //end if $public_main == Y  (main comments are not moderated)
        }            
        $count++;
            
        } //end first foreach of comment main

           //add or substract if is order ascending or descending
         if ($eleg == 'A'){
           $num++;
           } else {
           $num--;
       }
    }  //end for ($q= 0; $q< $dnlLen; $q++)
   }  //end if exist log
?>

    <script type="text/javascript">
    <!--
       function Smile(id,texto){
              var frm=document.getElementById(id);
              frm.comentario.value = frm.comentario.value + texto;
        }
       function rec_cpt(id,ourl){
             var aleat = Math.random();
                 var mf = document.getElementById(id);
                 mf.src = ourl + "/pages_comments/&amp;" + aleat;

       }

I hope this makes any sense...
Reply


Messages In This Thread
pages & comments some design help? - by der Warst - 2014-02-23, 00:26:47
RE: pages & comments some design help? - by der Warst - 2014-02-23, 01:32:03
RE: pages & comments some design help? - by cumbe - 2014-02-23, 20:03:45



Users browsing this thread: 3 Guest(s)