Member
Member
vincent3569   08-06-2010, 22:36
#1

hello

the commentform allows to comment photos, albums, news or pages.

For personnal use (whith my theme herited from zpGalleriffic) I modified the function printCommentForm in commentform.php like that :

line 314 :
`

function printCommentForm($showcomments=true, $addcommenttext=NULL, $showcommentmsg=true)

`

[note] : the addcomment parameter is not described yet in the user guide

line 351
`

            case 0:

                if ($showcommentmsg) {echo ''.gettext('No Comments').'';}

`

line 355
`

            default:

                if ($showcommentmsg) {echo ''.sprintf(ngettext('%u Comment','%u Comments',$num), $num).'';}

`

line 466
`

            if (!empty($addcommenttext)) {

                if ($showcommentmsg) {echo ''.$addcommenttext.'';}

            }

`

those modifications allow the user to show or not some messages of the plugin

could you take this improvement in the zenphoto's core ?
it would be cool !

Administrator
Administrator
acrylian   09-06-2010, 08:23
#2

Sorry, I don't exactly get what is the benefit of this. You could even put this check for comments around the function itself and have the same effect.

Thanks for the note about the parameter.

Member
Member
vincent3569   09-06-2010, 20:27
#3

sorry too, i don't understand your suggestion.
In fact, with my theme, i don't want to show some messages of comment_form : number of messages (it is shown) and add message.

first time, i've modified comment_form and commented the concerned line.
but i want to give my theme to the community: by taking this improvement, the users don't have to hack the file and the other themes always going well (the default value of the new parameter is true)...

Member
Member
sbillard   09-06-2010, 22:37
#4

One way to do this would be to use CSS to hide that text. Anyway, feature suggestions are always welcome. However, they will get lost if just posted on this forum. The only way to track such a request is if you do it through the "Trac" system.

Administrator
Administrator
acrylian   10-06-2010, 07:35
#5

All right, I think I missunderstood the purpose of your change. I would have suggested zu use CSS as well next.

Anyway, the "Trac" system is to be found on the "bugtracker" link.

Member
Member
vincent3569   10-06-2010, 21:26
#6

in fact, i can't used css to hide the text.
i want to hide the number of comment but i don't want to hide the message "closed to comment".
i can't have two distinct CSS rules on those messages
to do that, i should use some javascript...

i will create a trac

Member
Member
sbillard   11-06-2010, 00:13
#7

Well, actually you can hide the count but not the closed to comments with CSS. Those are in different DIVs. Granted it is a little obscure how to do this since the former is in the major DIV commentcontent and the latter is in a sub-dif of that--commententry. So you want to hide H3 at the commentcontent level and show H3 at the commententry level.

Administrator
Administrator
acrylian   11-06-2010, 08:54
#8

Maybe we should consider to add different css classes or id to each element so it is easier to address them via CSS.

Member
Member
vincent3569   11-06-2010, 12:15
#9

i have tried to implement those css rules.
as far i can remember, i have tried this :

  • hide the high level div H3 commentcontent
  • show the low level div H3 commententry
    but commentcontent rule is high priority on commententry rule

maybe, usind a id rather a class...

Administrator
Administrator
acrylian   11-06-2010, 12:20
#10

If a parent id prevents changes using a class you could add an !important to the setting to override (e.g. border: 1px !important;).

You can also address sub items using >. Don't know the details right now but div h3 #commententry > h3 might work. CSS can be tricky...

Member
Member
vincent3569   11-06-2010, 21:45
#11

ok, i found my mistake : i don't had a specific rule on commententry h3 to show the text

with those rules, it's going well

Quote:#commentcontent h3{font-size: 100%; display: none;}

commententry h3{font-weight:bold; text-transform: lowercase; [b]display: block;[/b]}


thanks for your help

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.