change design of gbook?

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Uta13
Posts: 41
Joined: Sun Sep 07, 2008 6:53 pm

change design of gbook?

Post by Uta13 » Fri Sep 12, 2008 7:09 pm

Hello,

I have installed gbook by qualifire on a website project I am building at the moment - it works fine. The only problem I have: I just don´t get it to look nicer so it matches with my webdesign.
I tried a lot in the stylesheet.css of the plugin but just don´t get it.

I want to:
* remove the border around the entries
* give the entries a transparent background

I am not very good at CSS yet, I know...
Here you can have look at the guestbook: http://www.klemenssander.at/seitenkunst ... %3Bstebuch

And this is my stylesheet.css:

Code: Select all

td.gbtitle
{
   background: #006699;
   font-weight: normal;
   color: white;
   font-size: 1.0em;
}

td.gblightline
{
   background: #FFFFFF;
}

td.gbdarkline
{
   background: #FFFFFF;
}

span.gbdatetime
{
   font-size: 0.8em;
}

div.gbname
{
   font-weight: bold;
   font-size: 1.0em;
   overflow: hidden;
   width: 100%;
}

span.gbmessage
{
   font-weight: normal;
   font-size: 1.0em;
}

input.gbcaptcha
{
   font-weight: normal;
   color: black;
   background: white;
}

input.gbtextbox
{
   font-weight: normal;
   color: black;
   background: white;
}

textarea.gbmsgbox
{
   font-weight: normal;
   color: black;
   background: white;
   overflow: auto;
}
Thanks a lot for any help!

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: change design of gbook?

Post by Tata » Fri Sep 12, 2008 9:32 pm

There are more stylesheets available.
1. Take any of them and try to change all background-colors to "transparent"
2. Open the index.php of the Gbook and look for the line (about the line #534):

Code: Select all

$tm .= "<TABLE width=\"100%\" cellpadding=\"4\" cellspacing=\"1\" bgcolor=\"#666666\" border=\"0\">";
leave the bgcolor value to empty or just remove it.
In this part you also may change the look of the "entry-table". But be careful.
You may try e.g. the entry organized only in lines:

Code: Select all

      <TABLE width=\"100%\" cellpadding=\"4\" cellspacing=\"1\" bgcolor=\"#666666\" border=\"0\">";
      if ($gbTitleArray[$i] != '') $tm .= "
        <TR>
          <TD class=\"gbtitle\">" . gb_showSmileys($gbTitleArray[$i]) . "</TD>
        </TR>";
      $tm .= "
        <TR>";
      $tm .= "
          <TD class=\"" . $lineClass . "\" valign=\"top\">
            <span class=\"gbname\" title=\"".$gbNameArray[$i]."\">" . $gbNameArray[$i] . "&nbsp;</span>&nbsp;&nbsp;";
      $tm .= "
            <span class=\"gbdatetime\">" . $gbDateArray[$i] . ", " . $gbTimeArray[$i] . "</span>&nbsp;&nbsp;";
      if (($gbEmailArray[$i] != '') && (eregi("true",$plugin_cf['gbook']['show_email']))) 
      $tm .= "
            <span><A href=\"". "&#109;&#97;&#105;&#108;&#116;&#111;&#58;" . gb_EncMail($gbEmailArray[$i]). "\">
              <IMG src=\"".$imgpath."email.png\" border=\"0\" alt=\"email.png\" title=\"" . gb_EncMail($gbEmailArray[$i]) . "\">
            </A></span>&nbsp;&nbsp;";
      if (($gbWebsiteArray[$i] != '') && (eregi("true",$plugin_cf['gbook']['show_website']))) 
      $tm .= "
            <span><A href=\"http://" . $gbWebsiteArray[$i] . "\" target=\"_blank\">
              <IMG src=\"".$imgpath."website.png\" border=\"0\" alt=\"website.png\" title=\"" . $gbWebsiteArray[$i] . "\">
            </A></span>&nbsp;&nbsp;";
      if ((eregi("true",$plugin_cf['gbook']['show_ip_addr'])) && (eregi("true",$plugin_cf['gbook']['store_ip_addr'])))
         if ($_SERVER["SERVER_NAME"] == "localhost") {
            $tm .= "
                <span><IMG src=\"".$imgpath."machine.png\" border=\"0\" alt=\"machine.png\" title=\"" . $gbIpaddrArray[$i] . " = localhost"  . "\"></span>&nbsp;&nbsp;";
         } else {
            $tm .= "
                <span><IMG src=\"".$imgpath."machine.png\" border=\"0\" alt=\"machine.png\" title=\"" . $gbIpaddrArray[$i] . " = " . @gethostbyaddr($gbIpaddrArray[$i]) . "\"></span>&nbsp;&nbsp;";
         }
      $tm .= "
          </TD>
        </tr>
        <tr>";
      //$gbMessageArray[$i] = gb_showSmileys($gbMessageArray[$i]);
      //$gbMessageArray[$i] = gb_chkQuarantine($gbMessageArray[$i],$gbTStampArray[$i]);
      $tm .= "
          <TD class=\"" . $lineClass . "\" valign=\"top\">
            <span class=\"gbmessage\">" . gb_chkQuarantine(gb_showSmileys($gbMessageArray[$i]),$gbTStampArray[$i]) . "&nbsp;</span>
          </TD>";
      //$tm .= "<TD class=\"" . $lineClass . "\" valign=\"top\"><span class=\"gbmessage\">" . gb_showSmileys($gbMessageArray[$i]) . "&nbsp;</span></TD>";
      $tm .= "
        </TR>";
      $tm .= "
      </TABLE>";
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Uta13
Posts: 41
Joined: Sun Sep 07, 2008 6:53 pm

Re: change design of gbook?

Post by Uta13 » Sat Sep 13, 2008 2:13 pm

hello tata,

thanks a lot, that works perfectly! you have done me a big favour, thank you!

uta13

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: change design of gbook?

Post by Tata » Sat Sep 13, 2008 4:03 pm

My pleasure :-)
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply