Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pages & comments some design help?
#1
Hello there,

So I downloaded Get Simple CMS two days ago and basically, I'm pretty much ready to migrate my 'Warstware'-site very soon.

This is what the Dummy looks like:
http://der-warst.de/getsimple/audioware/zoom-sos/
The theme is based on the ElegantOne theme.

Having never worked with a CMS before, I was quite surprised how easy setting it up was. Fun stuff.

I'm still fiddling around with it, but it's mostly done. There's a few design issues I'm having with the pages & comments plugin though...

If you visit the link above, and scroll down to the comment section, you probably already see what I am trying to achieve. I'd like to have this section with a two column design. the comments to the left, and the form to the right. I've come as far as you can see, but now I'm a bit stuck. As far as I understand, in order to achieve this, the comments would have to be contained in a div with a fixed width. Problem is just: I don't really know much php, so I'm a bit unsure how to do this within pages_comments.php.

Second: I would quite like to have the *s in front of NAME and COMMENTS in the same pink that I am using everywhere else. It's not possible from the css. How do I do this?

Thanks in advance for any help,
Simon
Reply
#2
Im gonna barf now, thanks

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
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#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
#4
I have no idea how page comments inserts itself, I assuming it uses a hook.
Perhaps it has a template built in to add code wraps? Or maybe an option to manually insert it not automatically?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
Hi der Warst;

I have to upload to extend new beta version, with more features and where that makes it easier.

Of moment you can download the new version from: http://cumbe.no-ip.org/gs323/data/upload...230214.zip

Please read txt: http://cumbe.no-ip.org/gs323/data/upload...230214.txt

This version is not compatible with older versions, then you have to remove folder data/other/pages_comments or rename the folder.

There is to check that works good.

Regards and I'm sorry for my english.
Reply
#6
Hey, Cumbe, that sounds cool. Thanks a lot.
I've just downloaded it and put it on my site.
After a bit of fiddling, it seems to work nicely at a first look.
I'll play around with it a bit and let you know how it goes.
Reply
#7
Just to add a few words, I have tested the beta of Pages and Comments very deeply and made Cumbe make it much better than it was before and you can see for instance here in the bottom that it works pretty well and people don't hesitate to use it. It's a great plugin.

If you want to wrap something in the div, find the proper HTML tag you wanna wrap (in pages_comments.php in your plugins folder) and write before it or the HTML for your wrapper. I had to make some wrappers as well as some extra IDs for custom javascripts. I can send you my edited file if you want to, cumbe may have already included it into the beta.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply




Users browsing this thread: 2 Guest(s)