speech css bubble for comments

Begonnen von diabolo, 18 Juli 2007, 15:01:26

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

diabolo

Hi,
demo ex:
http://www.pragmamx.fr/News-file-article-sid-100.html#comments

for this:
open style.css of your theme and add:
/* css comments*/
.sbl { background: url('../images/bl.gif') bottom left no-repeat #ECF4D7; text-align: left; width: 100%; }
.sbr { background: url('../images/br.gif') bottom right no-repeat; }
.stl { background: url('../images/tl.gif') top left no-repeat; }
.str { background: url('../images/tr.gif') top right no-repeat; padding: 10px; }
.sb { padding: 2px 0px 10px 50px; background: url('../images/b.gif') 30px top no-repeat; }


Download pictures form this attachment post
and put them in: /themes/Yourtheme/images/

Open /modules/News/comments.php

line 82:
echo '
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="' . $bgcolor2 . '"><tr><td>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">' . $views . '</table>
        </td></tr></table>';


replace by
echo $views;

and line 279:
return '
    <tr bgcolor="' . $bgcolor2 . '">
    <td><a name="' . $data['tid'] . '"></a><span class="tiny"><b>' . $nameclick . '</b> ' . _WRITES . '&nbsp;' . _ON . ' ' . $datetime . ':</span></td>
    <td align="right">' . implode(' ', $pics) . '</td>
    </tr>
    <tr bgcolor="' . $bgcolor1 . '"><td colspan="2">' . $data['comment'] . '</td></tr>
    ';

replace by:
return '<div class="sbl">
    <div class="sbr">
    <div class="stl">
    <div class="str">' . $data['comment'] . '</div>
    </div></div></div>
<div class="sb"><a name="' . $data['tid'] . '"></a><span class="tiny"><b>' . $nameclick . '</b> ' . _WRITES . '&nbsp;' . _ON . ' ' . $datetime . ':</span>' . implode(' ', $pics) . '
</div>';


Enjoy  ;)
This is just a example from,
http://www.gamexe.net/view_tutorial.php?id=24

there is lot of possibilities for speech bubble css
look at google  ;)


Sitki

Hi Diabolo  :),

very nice idea! And thank you for the provision of information.  :thumbup:
viele Grüße

Kein Support über PN, Mail oder Messenger!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

henne

bye Henne

don't click the blue "e" on your desktop, use Firefox

Jeden Tag verschwinden Rentner im Internet, weil sie gleichzeitig alt und entfernen drücken

Sitki

... and the same way for the comments in surveys it works as well.  ;)
viele Grüße

Kein Support über PN, Mail oder Messenger!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

diabolo

Hi,
another way with javascript and css
source:
http://www.cssplay.co.uk/menu/bubbles


1/Open style.css of your template and add:
/* Rounded Bubble */
div.bubble div.rounded {
margin-bottom: 10px;
border: 1px solid #668247;
background-color: #F2F2F2;
}
div.bubble div.rounded blockquote {
border: 0;
background-color: transparent;
}
div.bubble div.rounded blockquote p {
margin: 0px 10px;
}
div.bubble cite.rounded {
position: relative;
margin: 0px;
padding-left: 15px;
padding-top: 12px;
top: 9px;
background: transparent url(../images/tip-rounded.gif) no-repeat 15px 0;
}


2/Open /modules/News/comments.php

Do the same change for line 82

And for line 279 replace by:
return '<div class="bubble">
    <div class="rounded">
<blockquote><p>' . $data['comment'] . '</p></blockquote>
</div>
<cite class="rounded"><a name="' . $data['tid'] . '"></a><span class="tiny"><b>' . $nameclick . '</b> ' . _WRITES . '&nbsp;' . _ON . ' ' . $datetime . ':</span>' . implode(' ', $pics) . '</cite>
</div>';


3/Download file attachment

-> Copy tip-rounded.gif to /themes/Yourtheme/images/
-> Copy rounded_corners.inc.js to /themes/Yourtheme/

4/Open theme.html of your theme and just after
<!-- START more_header -->
Cut and paste code from javascriptcode.txt

Enjoy
Result:


This speech buble is so nice and very easy to change but using javascript  :heu:

Sitki

Hi  :),

what do you mean exactly with
ZitatDo the same change for line 82
?
viele Grüße

Kein Support über PN, Mail oder Messenger!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

diabolo

Hi,
If you ve not made change for first method

Zitatine 82:
Code:

echo '
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="' . $bgcolor2 . '"><tr><td>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">' . $views . '</table>
        </td></tr></table>';

Zitatreplace by
Code:

echo $views;
;)

Sitki

Hi Diabolo :),

I'm so sorry, that I forgot to thank you for your last information, so I wish to make up leeway. Thank You!

Also I have to register me today on pragmaMX France and saw a very great work, that you and your team to mount. My respect and compliment! :thumbup:

Sorry for my bad English. :red:
viele Grüße

Kein Support über PN, Mail oder Messenger!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

breakdancer

Natürlich macht das bei mir wieder Probleme  :puzzled:

Hi out there,

also from me thnx for nice interpretation of comments by working with speech bubbles. That is a great hint, Diabolo, you made my day !

But...

it seems I have some Problems with deformed output and the grafics do not really fit... See here for example please: http://www.kirmes-und-volksfest.de/News-file-article-sid-75.html

Anyone here to tell me, why it looks so crazy ?

Kind regards

Markus

diabolo

Hi,

For this comments
http://www.pragmamx.fr/News-file-article-sid-100.html#comments

This is another method with no javascript  ;) only css

I'll explain it in the next few days  ;)