Jump to content


Guestbook3


42 replies to this topic

#1 rain

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 10 May 2005 - 06:44 AM

I have added a new snippet to the Snippet Library!

Snippet name: Guestbook3
Author: rain
Version: 1.0 (Final)
More info: <a href="http://www.etomite.com/browsesnippets.html?int_snipid=91">View this snippet</a>
Description:
Guestbook3 is derived from Guestbook2 and has as extra feature some nice smiley images functionality

Please feel free to comment on this snippet, suggest improvements, or simply praise my work! ;)

[This is an automatically created message]

Attached Files



#2 rain

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 11 May 2005 - 11:10 AM

I have updated this snippet in the Snippet Library!

[This is an automatically created message]

#3 rain

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 11 May 2005 - 11:11 AM

I have updated this snippet in the Snippet Library!

[This is an automatically created message]

#4 hechacker1

    Etomite Forum Fan

  • Member
  • Pip
  • 59 posts

Posted 11 May 2005 - 11:44 AM

rain, on May 11 2005, 04:11 AM, said:

I have updated this snippet in the Snippet Library!

[This is an automatically created message]

how do I change the header color background, and also the font colors? Could you make that a variable?

http://ordorica.org/index.php?id=22

is my site as an example.

#5 Johanna

    Etomite Forum Newbie

  • Member
  • 2 posts

Posted 11 May 2005 - 02:04 PM

I`ve installed Guestbook-3 at my site, but I get an error at the Guestbooksite.. who says "Guestbook-user/manager not found. Configurate the settings".

I dont know what I have to configurate/edit in the snippet. Can anybody help?

You can see the site here: Johannas Studieside - Use the link "Gæstebog"!!! :blink:

#6 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 11 May 2005 - 02:22 PM

Johanna, on May 11 2005, 11:04 AM, said:

I`ve installed Guestbook-3 at my site, but I get an error at the Guestbooksite.. who says "Guestbook-user/manager not found. Configurate the settings".

I dont know what I have to configurate/edit in the snippet. Can anybody help?

You can see the site here: Johannas Studieside  -  Use the link "Gæstebog"!!! :blink:
That message refers to the fact that you need to adjust the code to include an existing Etomite user/manager as the GuestBook3 administrator... The variable which needs attention is $gbadmin which can either be hard-coded or can be sent in the snippet call... Hope this helps... :eto:

#7 Johanna

    Etomite Forum Newbie

  • Member
  • 2 posts

Posted 11 May 2005 - 02:59 PM

Thank you!

I still get errors.. so I`ll look at it later! :blush:

#8 rain

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 12 May 2005 - 06:35 PM

Oh I forgot: :blush:

if you add this:

#smilie_box {
visibility: hidden;
position: absolute;
left: 750px;
top: 285px;
padding: 5px;
margin: 22px 0 0 -26px;
border: 1px solid #0000FF;
background: #FFFFFF;
width: 200px;
}

to your style sheet,
you can use these variables to pre-position the smilie box when the smilie-button is pressed.

Perhaps there are some more make-up things that I placed directly in the snippetcode which can be placed in the style sheet. Please feel free to do so and enhance the guestbook.

#9 Newlukai

    Etomite Forum Newbie

  • Member
  • 12 posts

Posted 23 May 2005 - 03:20 PM

Hi there,

i successfully installed etomite and the guestbook3 snippet. It worked great. I didn't change anything but now I get a 'Cannot redeclare smile()' error everytime I try to watch the guestbook. I don't know where the bug is, in the snippet itself or in the etomite parser.
Can anybody help me?

Greetz
Newlukai

#10 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 23 May 2005 - 05:56 PM

Newlukai, on May 23 2005, 12:20 PM, said:

Hi there,

i successfully installed etomite and the guestbook3 snippet. It worked great. I didn't change anything but now I get a 'Cannot redeclare smile()' error everytime I try to watch the guestbook. I don't know where the bug is, in the snippet itself or in the etomite parser.
Can anybody help me?

Greetz
Newlukai
If you aren't doing so already, try using [!...!] for your snippet call instead of [[...]] to see if that helps... If this caching issue doesn't solve your problem then you might want to try reinstalling the snippet code, although I can't imagine how it would become only partially corrupt... Keep us posted... Also, try refreshing your site from within Etomite manager... :eto:

#11 Newlukai

    Etomite Forum Newbie

  • Member
  • 12 posts

Posted 24 May 2005 - 01:57 PM

Ralph (rad14701), on May 23 2005, 08:56 PM, said:

If you aren't doing so already, try using [!...!] for your snippet call instead of  [[...]] to see if that helps... If this caching issue doesn't solve your problem then you might want to try reinstalling the snippet code, although I can't imagine how it would become only partially corrupt... Keep us posted... Also, try refreshing your site from within Etomite manager... :eto:

I changed the snippet call but it doesn't work. I reinstalled the code more than 1 time. Doesn't work, too. Could it be that PHP 5 isn't supported?

#12 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 24 May 2005 - 02:28 PM

Newlukai, on May 24 2005, 10:57 AM, said:

I changed the snippet call but it doesn't work. I reinstalled the code more than 1 time. Doesn't work, too. Could it be that PHP 5 isn't supported?
Ahhhh... Another piece of the puzzle is revealed... Might have helped to have lnown about the PHP5 earlier... You may want to check into whether PHP5 does additional caching... If so, I'm sure there is a work-around... :eto:

#13 Newlukai

    Etomite Forum Newbie

  • Member
  • 12 posts

Posted 24 May 2005 - 03:02 PM

Ralph (rad14701), on May 24 2005, 05:28 PM, said:

Ahhhh... Another piece of the puzzle is revealed... Might have helped to have lnown about the PHP5 earlier... You may want to check into whether PHP5 does additional caching... If so, I'm sure there is a work-around... :eto:

OK. I'm a beginner in such issues, but I will do my best.

#14 Prelithe

    Etomite Forum Newbie

  • Member
  • 4 posts

Posted 07 June 2005 - 11:40 PM

I can say that it works with php 5 (i have tested it with php 5.0.3 apache)

I helped myself and did a few little modifications, mostly to the style so you can edit directly from css, so here is the new code:

/*
Snippet:        GuestBook3 (based on GuestBook2) - Etomite v0.6.3 - Modified 2005-09-05

Created By:     Ralph A. Dahlgren - rad14701@yahoo.com
Modified By:    Mikko K. Lammi - lammikko@gmail.com - www.parea.fi
Modified By:    Rain R. Visser
Modified By:    Prelithe - Added Styles

Demo URL GB2:   http://www.parea.fi/raaputuksia/guestbook.html

Usage:          Create an Etomite user or admin as GuestBook owner in Etomite Manager
                Change $defaultadmin variable to match GuestBook owner
                OR
                Messages will be deposited into that mailbox, but only GuestBook
                messages will be displayed within the GuestBook listing.
                Place the .gifs in assets\images
                Place the .JS in assets\site

Variables:      $gbtype - Referenced in GuestBook admin User Messages Subject
                $gbadmin - Etomite User/Admin who will receive this message

Examples:       Use the [!SnippetName!] syntax instead of regular [[SnippetName]]:
                [!GuestBook!] - Will use snippet defaults for $gbtype and $gbadmin
                [!GuestBook?gbtype=GuestBook&gbadmin=guestbook!] - Self Explanatory
                [!GuestBook?gbadmin=someuser!] - Uses $etomite->documentObject['pagetitle'] for $gbtype
                [!GuestBook?bgtype=SomeTopic!] - Uses $defaultadmin for $gbadmin

Note:           $etomite->documentObject['createdby'] was not used for $gbadmin intentionally
                To implement this capability would entail and additonal DB Query before Inserts
*/

// BEGIN SETTINGS -------------------------------------------------------------

// Variables you may want to change

$defaultadmin = "Prelithe"; // Default GuestBook admin to use if $gbadmin not passed
$gap = " :: "; // Separator between $type and $subject in User Messages Subject field
$messages = 10; // Number of messages on one page


$dateformat = "%d.%m.%Y om %H:%M:%S"; // Preferred Date & Time display format, European dateformat is "%d.%m.%Y %H:%M:%S"
$order = "DESC"; // Order of messages by postdate: DESC = descending, ASC = ascending
$server_offset_time = 21600; // number of seconds for timezone difference

// English language for guestbook

$_lang_guestbook["write_new_message"] = "Write a new message";
$_lang_guestbook["messages"] = "Messages";
$_lang_guestbook["name_or_alias"] = "Name or alias";
$_lang_guestbook["send"] = "Send";
$_lang_guestbook["reset"] = "Reset";
$_lang_guestbook["next_page"] = "Next page";
$_lang_guestbook["previous_page"] = "Previous page";
$_lang_guestbook["message"] = "Message";
$_lang_guestbook["date_and_time"] = "Date and time";
$_lang_guestbook["sender"] = "Sender";
$_lang_guestbook["cancel"] = "Cancel";
$_lang_guestbook["error"] = "GuestBook User/Manager not found... Check your settings...";
// END SETTINGS ---------------------------------------------------------------



// Variables you should not need to change
$type = isset($gbtype) ? $gbtype : $etomite->documentObject['id']; // Set $type field for new entry
$trimtype=substr($type,0,15); // Truncate $type to 15 character limit for field
$guestbookadmin = isset($gbadmin) ? $gbadmin : $defaultadmin; // Set GuestBook admin
$pageid=$etomite->documentIdentifier; // ID of the calling document
$pageurl=$etomite->makeURL($pageid); // URL if you don't have friendly uri
$tbl = $etomite->dbConfig['dbase'].".".$etomite->dbConfig['table_prefix'];
$msgdb = $tbl."user_messages"; // DB.Prefix_user_messages variable

// Function to show smileys
function smile($text) {
    $text = str_replace(":)", "<img src=\"assets/images/smile.gif\">", $text);
    $text = str_replace(":D", "<img src=\"assets/images/biggrin.gif\">", $text);
    $text = str_replace(":haha:","<img src=\"assets/images/laugh.gif\">", $text);
    $text = str_replace(";)","<img src=\"assets/images/wink.gif\">", $text);
    $text = str_replace(":cool:","<img src=\"assets/images/cool.gif\">", $text);
    $text = str_replace(":o","<img src=\"assets/images/blush.gif\">", $text);
    $text = str_replace(":(","<img src=\"assets/images/frown.gif\">", $text);
    $text = str_replace(":foei:","<img src=\"assets/images/nono.gif\">", $text);
    $text = str_replace(":schrik:","<img src=\"assets/images/eek.gif\">", $text);
    $text = str_replace(":boos:","<img src=\"assets/images/mad.gif\">", $text);
    $text = str_replace(":dood:","<img src=\"assets/images/dead.gif\">", $text);
    $text = str_replace(":huil:","<img src=\"assets/images/cry.gif\">", $text);
    $text = str_replace(":kus:", "<img src=\"assets/images/kiss.gif\">", $text);
    $text = str_replace(":love:","<img src=\"assets/images/rose.gif\">", $text);
    $text = str_replace(":stil:", "<img src=\"assets/images/quiet.gif\">", $text);
    $text = str_replace(":kijk:","<img src=\"assets/images/look.gif\">", $text);
    $text = str_replace(":poets:", "<img src=\"assets/images/brushteeth.gif\">", $text);
    $text = str_replace(":proost:","<img src=\"assets/images/cheers.gif\">", $text);
    $text = str_replace(":clown:","<img src=\"assets/images/clown.gif\">", $text);
    $text = str_replace(":td:","<img src=\"assets/images/notgood.gif\">", $text);
    $text = str_replace(":tu:",  "<img src=\"assets/images/perfect.gif\">", $text);
    $text = str_replace(":buig:","<img src=\"assets/images/hail.gif\">", $text);
    $text = str_replace(":spring:","<img src=\"assets/images/bouncey.gif\">", $text);
    $text = str_replace(":nerd:","<img src=\"assets/images/nerd.gif\">", $text);
    $text = str_replace(":idee:","<img src=\"assets/images/idea.gif\">", $text);
    $text = str_replace(":zzz:","<img src=\"assets/images/sleep.gif\">", $text);
    $text = str_replace(":P","<img src=\"assets/images/tongue.gif\">", $text);
    $text = str_replace(":zwaai:","<img src=\"assets/images/wave.gif\">", $text);
    $text = str_replace(":fluit:", "<img src=\"assets/images/whissle.gif\">", $text);
    $text = str_replace(":verbaasd:","<img src=\"assets/images/confused.gif\">", $text);
   return $text;
}


// Function to make hyperlinks
function hyperlink($text) {
    $search = array ("/([\w\.\/\&\=\?\-]+)@([\w\.\/\&\=\?\-]+)/","/((ftp(7?):\/\/)|(ftp\.))([\w\.\/\&\=\?\-]+)/","/((http(s?):\/\/)|(www\.))([\w\.\/\&\=\?\-]+)/");
    $replace = array ("<a href='mailto:$1@$2'>$1@$2</a>","<a href='ftp$3://$4$5' target='_blank'>$4$5</a>","<a href='http$3://$4$5' target='_blank'>$4$5</a>");
    return preg_replace ($search, $replace, $text);
}

// Don't allow unwanted re-posts of messages
if($_POST['submitted'] == "TRUE") header( "Location: index.php?id=$etomite->documentIdentifier" );

// Query for the user ID (id) for the GuestBook owner
$sql = "SELECT id FROM ".$tbl."manager_users WHERE ".$tbl."manager_users.username='$guestbookadmin';";
$rs = $etomite->dbQuery($sql);
$limit = $etomite->recordCount($rs);

// Check to make sure $guestbookadmin has been created and assigned
if($limit == 1) {

    $userrec = $etomite->fetchRow($rs);
    $userid = $userrec['id'];

    // Check to see if a valid message has been submitted
    if(isset($_POST['submit']) && ($_POST['subject'] > "")  && ($_POST['message'] > "")){
        $postdate = time();

        $recipient = $userid;
        $subject = $type . $gap . strip_tags($_POST['subject']);
        $message = strip_tags($_POST['message']);

        // Query to INSERT a new GuestBook message into user_messages
        $sql = "INSERT INTO $msgdb ( id , type , subject , message , sender , recipient , private , postdate , messageread ) VALUES ( '', '$type', '$subject', '$message', '0', '$recipient', '0', '$postdate', '0' );";

        $rs = $etomite->dbQuery($sql);  // Execute the Query
        $submitted="TRUE";
    }
    else $submitted = "TRUE";

    // Display write new message form
//    if ($_GET['new_message'] == "TRUE") {
        // Display a Form for submitting a new message
        $output .= "<script language=\"javascript\" type=\"text/javascript\" src=\"assets/site/gb.js\"></script>";
        $output .= "<h2 class='GBHeaderStyle'>".$_lang_guestbook["write_new_message"]."</h2>";
        $output .= "<table width='100%'><tr><td>";
        $output .= "<form name=\"form\" method='post' action='index.php'>";
        $output .= "<input type='hidden' name='id' value='$pageid' />";
        $output .= "<input type='hidden' name='submitted' value='$submitted' />";
        $output .= $_lang_guestbook["name_or_alias"]."<br /><input name='subject' size='40' />";
        $output .= "<br /><br />".$_lang_guestbook["message"]."<br /><text"."area rows='8' cols='50' name='message'></"."text"."area>";
        $output .= "<button type=\"button\" onclick=\"show_smilies();\"><img src=\"assets/images/smile.gif\"></button><div><div id=\"smilie_box\"></div></div><br /><br />";
        $output .= "<input type='submit' name='submit' value='".$_lang_guestbook["send"]."' />";
        $output .= "  <input type='reset' name='reset' value='".$_lang_guestbook["reset"]."' />";
        $output .= "  <input type='button' value='".$_lang_guestbook["cancel"]."' onClick=\"window.location.href='$pageurl&new_message=FALSE'\">";
        $output .= "</form>";
        $output .= "</td></tr></table>";
//    }
  
    // Display write new message link
 /*   else {
        $output .= "<h2 $header_style>".$_lang_guestbook["write_new_message"]."</h2>";
        $output .= "  <form><input type='button' value='".$_lang_guestbook["write_new_message"]."' onClick=\"window.location.href='$pageurl&new_message=TRUE'\"></form>";
    }
  */
    $output .= "<h2 class='GBHeaderStyle'>".$_lang_guestbook["messages"]."</h2>";

    // Query to COUNT existing messages
    $sql = "SELECT * FROM ".$tbl."user_messages
    WHERE ".$tbl."user_messages.recipient=$userid
    AND ".$tbl."user_messages.type='".$trimtype."'
    ORDER BY ".$tbl."user_messages.postdate $order;";

    $rs = $etomite->dbQuery($sql);  // Execute the Query
    $total = $etomite->recordCount($rs);  // Number of messages found

    // Message page number from GET
    if (isset($_GET["page"])) { $page = $_GET["page"]; }
    else { $page = 1; }

    // Index where to start in result set
    $from = 0 + ($page-1)*$messages;

    // Query to SELECT existing messages
    $sql = "SELECT * FROM ".$tbl."user_messages
    WHERE ".$tbl."user_messages.recipient=$userid
    AND ".$tbl."user_messages.type='".$trimtype."'
    ORDER BY ".$tbl."user_messages.postdate $order LIMIT $from, $messages;";

    $rs = $etomite->dbQuery($sql);  // Execute the Query
    $limit = $etomite->recordCount($rs);  // Number of messages found

    // Number of pages
    $pages = ceil($total/$messages);

    // Previous page link
    $previouspage = $page-1;
    $previouspage_text .= "  <form><input type='button' value='« ".$_lang_guestbook["previous_page"]." [$previouspage/$pages]' onClick=\"window.location.href='$pageurl&page=$previouspage'\"></form>";
//    $previouspage_text = "<a href='?page=$previouspage'>« ".$_lang_guestbook["previous_page"]." [$previouspage/$pages]</a>   ";

    // Next page link
    $nextpage = $page+1;
    $nextpage_text = "  <form><input type='button' value='".$_lang_guestbook["next_page"]." [$nextpage/$pages] »' onClick=\"window.location.href='$pageurl&page=$nextpage'\"></form>";
//    $nextpage_text = "<a href='?page=$nextpage'>".$_lang_guestbook["next_page"]." [$nextpage/$pages] »</a>";

    // Previous and next page links at top of the page
    if ($previouspage > 0) { $output .= $previouspage_text; }
    if ($nextpage <= $pages) { $output .= $nextpage_text; }

    // Empty lines
    if ($total > $messages) {
        $output .= "<br /><br />";
    }

    // Loop through each of the messages and format for display
    for ($y = 0; $y < $limit; $y++) {
        if ($order == "DESC") { $number = $total - $from - $y; }
        if ($order == "ASC") { $number = $from + $y + 1; }
        $guestbookrec = $etomite->fetchRow($rs);
        $poster = str_replace($type.$gap,"",$guestbookrec['subject']);
        $message = nl2br($guestbookrec['message']);
        $postdate = strftime($dateformat, $guestbookrec['postdate']+$server_offset_time);
        $output .= "<table class='GBCommentBox' width='100%'>";
        $output .= "<tr><td nowrap width='80%'>$poster</td>";
        $output .= "<td nowrap width='20%' align=right>$postdate</td>";
        $output .= "<tr><td colspan=\"2\"> </td>";
        $output .= "<tr><td colspan=\"2\">".hyperlink(smile($message))."</td>";
        $output .= "<tr><td width='80%'> </td>";
        $output .= "<td width='20%' nowrap align=right>".$_lang_guestbook["message"].": $number/$total</td>";
        $output .= "</table><br />";
    }

    // Previous and next page links at bottom of the page
    if ($previouspage > 0) { $output .= $previouspage_text; }
    if ($nextpage <= $pages) { $output .= $nextpage_text; }
}

// If no valid GuestBook owner is found display error message...
else  $output = $_lang_guestbook["error"];

// Output
return $output;

and the stylesheet code:

.GBCommentBox {
border: 1px solid #000000; 
padding: 5px;
background-color: #FFFFFF;
}

.GBHeaderStyle {
font-size: 14px;
}

#smilie_box {
visibility: hidden;
position: relative;
left: 100px;
align: center;
padding: 5px;
margin: 22px 0 0 -26px;
border: 1px solid #0000FF;
background: #FFFFFF;
width: 300px;
}

Other changes:
Made gb_type equal to the page ID if no value was set
gb_admin is set to prelithe - change it!
Comments box shows up regardless of button pressing, just uncomment the if and else statements if you want it back to default

Hope you like!

EDIT: Sorry bout the page expanding, it's not my fault :ph34r:

#15 Robsta

    Likes Etomite Forums!

  • Member
  • PipPip
  • 360 posts

Posted 08 June 2005 - 12:01 AM

I've been trying to add formating to message list, and I can't seem to get it to add padding (using CSS).
   // Loop through each of the messages and format for display
    for ($y = 0; $y < $limit; $y++) {
        if ($order == "DESC") { $number = $total - $from - $y; }
        if ($order == "ASC") { $number = $from + $y + 1; }
        $guestbookrec = $etomite->fetchRow($rs);
        $poster = str_replace($type.$gap,"",$guestbookrec['subject']);
        $message = nl2br($guestbookrec['message']);
        $postdate = strftime($dateformat, $guestbookrec['postdate']+$server_offset_time);
        $output .= "<table class='GBMessageList' width='100%'>";
        $output .= "<tr><td class='GBMessagePoster' nowrap width='80%'>$poster</td>";
        $output .= "<td class='GBMessagePostDate' nowrap width='20%' align=right>$postdate</td>";
        $output .= "<tr><td colspan=\"2\"> </td>";
        $output .= "<tr><td colspan=\"2\">".hyperlink(smile($message))."</td>";
        $output .= "<tr><td width='80%'> </td>";
        $output .= "<td width='20%' nowrap align=right>".$_lang_guestbook["message"].": $number/$total</td>";
        $output .= "</table><br />";
    }

I would assume that adding a class 'GBMessageList' into CSS and applying padding, this would work. But it doesn't seem to for some reason, any ideas why? :blink: I've successfully does this to the add message form, and works a treat.

#16 Robsta

    Likes Etomite Forums!

  • Member
  • PipPip
  • 360 posts

Posted 10 June 2005 - 07:27 PM

Robsta, on Jun 8 2005, 01:01 AM, said:

I've been trying to add formating to message list, and I can't seem to get it to add padding (using CSS).

I would assume that adding a class 'GBMessageList' into CSS and applying padding, this would work. But it doesn't seem to for some reason, any ideas why?  :blink: I've successfully does this to the add message form, and works a treat.
Any ideas on this? :blink: or am I missing something obvious? :huh:

#17 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 10 June 2005 - 11:40 PM

Robsta, on Jun 7 2005, 09:01 PM, said:

I've been trying to add formating to message list, and I can't seem to get it to add padding (using CSS).
   // Loop through each of the messages and format for display
    for ($y = 0; $y < $limit; $y++) {
        if ($order == "DESC") { $number = $total - $from - $y; }
        if ($order == "ASC") { $number = $from + $y + 1; }
        $guestbookrec = $etomite->fetchRow($rs);
        $poster = str_replace($type.$gap,"",$guestbookrec['subject']);
        $message = nl2br($guestbookrec['message']);
        $postdate = strftime($dateformat, $guestbookrec['postdate']+$server_offset_time);
        $output .= "<table class='GBMessageList' width='100%'>";
        $output .= "<tr><td class='GBMessagePoster' nowrap width='80%'>$poster</td>";
        $output .= "<td class='GBMessagePostDate' nowrap width='20%' align=right>$postdate</td>";
        $output .= "<tr><td colspan=\"2\"> </td>";
        $output .= "<tr><td colspan=\"2\">".hyperlink(smile($message))."</td>";
        $output .= "<tr><td width='80%'> </td>";
        $output .= "<td width='20%' nowrap align=right>".$_lang_guestbook["message"].": $number/$total</td>";
        $output .= "</table><br />";
    }

I would assume that adding a class 'GBMessageList' into CSS and applying padding, this would work. But it doesn't seem to for some reason, any ideas why?  :blink: I've successfully does this to the add message form, and works a treat.

Why not simply add padding to the <td> element by using td { padding:5px; } in your CSS... Or you could use .GBMessageList td { padding:5px; } if you only wanted to change the padding for the td elements in the GuestBook entries... Just some food for thought... B)

#18 Robsta

    Likes Etomite Forums!

  • Member
  • PipPip
  • 360 posts

Posted 14 June 2005 - 07:58 PM

Ralph (rad14701), on Jun 11 2005, 12:40 AM, said:

Why not simply add padding to the <td> element by using td { padding:5px; } in your CSS... Or you could use .GBMessageList td { padding:5px; } if you only wanted to change the padding for the td elements in the GuestBook entries... Just some food for thought... B)
Of course... doh! ...and solves the problem. Thanks :D

#19 healthresource

    Etomite Forum Fan

  • Member
  • Pip
  • 63 posts

Posted 01 September 2005 - 12:38 PM

excellent snippet,works fine for me.

i am trying to get colour coding to my liking but to no avail,have edited css but hardly any difference noticed.

My Site

those message boxes are having blue background and want it to be different,say #CCCCFF but i can't,please help me,where am i going wrong?

i went to template folder/and edited css there to add the following codes:-
.GBMessageList td {
border: 1px solid #000000; 
padding: 5px;
background-color: #CCCCFF;
}

.GBCommentBox {
border: 1px solid #000000; 
padding: 5px;
background-color: #CCCCFF;
}

.GBHeaderStyle {
font-size: 14px;
}

#smilie_box {
visibility: hidden;
position: relative;
left: 100px;
align: center;
padding: 5px;
margin: 22px 0 0 -26px;
border: 1px solid #0000FF;
background: #FFFFFF;
width: 300px;
}

but it doesn't change.i still see blue box background.

please help.

thanks,

niskumar

#20 healthresource

    Etomite Forum Fan

  • Member
  • Pip
  • 63 posts

Posted 01 September 2005 - 12:46 PM

i think i was doing it wrong,i need to make those changes in snipet itself,trying now,but please do post any suggestions that i may find useful.

niskumar





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users