xoops forums

mf_iii

Just popping in
Posted on: 2008/1/31 0:49
mf_iii
mf_iii (Show more)
Just popping in
Posts: 47
Since: 2007/12/22
#1

Change the css class in comments

Hi again!

I have a small but importand problem. In some pages in my site i would want the css class "head" with a different color and i done this by editing the appropriate template in the module's folder "templates" and was done!

But i cannot find any template file of comments to change the class and i need this because i want to change the color of the head class again in the the "post comment" page. And i must change this because many modules (myalbum, news, x_movie) have to post comments.

If you understand me please help...

Thanks a lot again!

mr-reda04_fr

Theme Designer
Posted on: 2008/1/31 1:01
mr-reda04_fr
mr-reda04_fr (Show more)
Theme Designer
Posts: 326
Since: 2007/7/5 1
#2

Re: Change the css class in comments

Hi,

modules/system/templates/system_comments_thread.html Or system_comments_flat.html

A+

mf_iii

Just popping in
Posted on: 2008/1/31 6:17
mf_iii
mf_iii (Show more)
Just popping in
Posts: 47
Since: 2007/12/22
#3

Re: Change the css class in comments

Thanks for the answer but in these files there is not any "head" class

To understand i take a shot to see (the head class is with orange color and i dont want to change the main css style from the theme but only in the post comment pages)

http://img522.imageshack.us/img522/2964/orangelv6.jpg

mf_iii

Just popping in
Posted on: 2008/2/4 22:39
mf_iii
mf_iii (Show more)
Just popping in
Posts: 47
Since: 2007/12/22
#4

Re: Change the css class in comments

Anyone?

acegamer

Not too shy to talk
Posted on: 2008/2/4 23:09
acegamer
acegamer (Show more)
Not too shy to talk
Posts: 162
Since: 2005/7/11
#5

Re: Change the css class in comments

nope srysry

kris_fr

Theme Designer
Posted on: 2008/2/4 23:29
kris_fr
kris_fr (Show more)
Theme Designer
Posts: 1009
Since: 2005/12/31
#6

Re: Change the css class in comments

hi,

perhaps in yoursite/class/xoopscomments.php

@++

mf_iii

Just popping in
Posted on: 2008/2/5 7:45
mf_iii
mf_iii (Show more)
Just popping in
Posts: 47
Since: 2007/12/22
#7

Re: Change the css class in comments

No, it is not there

mf_iii

Just popping in
Posted on: 2008/2/9 21:19
mf_iii
mf_iii (Show more)
Just popping in
Posts: 47
Since: 2007/12/22
#8

Re: Change the css class in comments

The problem didnt solved yet..

wishcraft

Module Developer
Posted on: 2008/2/9 21:25
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3710
Since: 2007/5/18
#9

Re: Change the css class in comments

The one you have to change is /modules/system/templates/system_comments.html

currently it should be something like

<!-- start comment post -->
        <
tr>
          <
td class="head"><a id="comment<{$comment.id}>"></a> <{$comment.poster.uname}></td>
          <
td class="head"><div class="comDate"><span class="comDateCaption"><{$lang_posted}>:</span> <{$comment.date_posted}>&nbsp;&nbsp;<span class="comDateCaption"><{$lang_updated}>:</span> <{$comment.date_modified}></div></td>
        </
tr>
        <
tr>

          <{if 
$comment.poster.id != 0}>

          <
td class="odd"><div class="comUserRank"><div class="comUserRankText"><{$comment.poster.rank_title}></div><img class="comUserRankImg" src="<{$xoops_upload_url}>/<{$comment.poster.rank_image}>" alt="" /></div><img class="comUserImg" src="<{$xoops_upload_url}>/<{$comment.poster.avatar}>" alt="" /><div class="comUserStat"><span class="comUserStatCaption"><{$lang_joined}>:</span> <{$comment.poster.regdate}></div><div class="comUserStat"><span class="comUserStatCaption"><{$lang_from}>:</span> <{$comment.poster.from}></div><div class="comUserStat"><span class="comUserStatCaption"><{$lang_posts}>:</span> <{$comment.poster.postnum}></div><div class="comUserStatus"><{$comment.poster.status}></div></td>

          <{else}>

          <
td class="odd"> </td>

          <{/if}>

          <
td class="odd">
            <
div class="comTitle"><{$comment.image}><{$comment.title}></div><div class="comText"><{$comment.text}></div>
          </
td>
        </
tr>
        <
tr>
          <
td class="even"></td>

          <{if 
$xoops_iscommentadmin == true}>

          <
td class="even" align="right">
            <
a href="<{$editcomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href="<{$deletecomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$lang_delete}>" /></a><a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{elseif 
$xoops_isuser == true && $xoops_userid == $comment.poster.id}>

          <
td class="even" align="right">
            <
a href="<{$editcomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{elseif 
$xoops_isuser == true || $anon_canpost == true}>

          <
td class="even" align="right">
            <
a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{else}>

          <
td class="even"> </td>

          <{/if}>

        </
tr>
<!-- 
end comment post -->


each part that has class="head" in it will need a new class like class="head_orange"

You will then have to set the CSS Element in style.css in your theme just put it below #head, tr.head td {}

See CSS_Xoops2 for more CSS Data; Once you have edited this you will have to do an update on the system module and possibly clear out your /template_c path.
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/SimonXaies
github.com/Chronolabs-Cooperative
facebook.com/SimonSXaies

mf_iii

Just popping in
Posted on: 2008/2/9 22:54
mf_iii
mf_iii (Show more)
Just popping in
Posts: 47
Since: 2007/12/22
#10

Re: Change the css class in comments

I had tried this but i hadnt update the system module and delete the template_c files. Now i done all these but nothing again I dont understand where i must change..