Member
Member
Newzic   2008-08-29, 00:03
#1

Hello,

with template exemple : I want not to display "no comment". But I want also, if there are one or more comments, display title "One comment" or "2 comments", etc. as a title.
(for example, the source would be: One comment, 2 comments etc.)

I take the code for comments in exemple template. It is:
``

I try to put ... only when there are comments and disable "no comment" when there is no comment.
I Write:

``

That don't work.

One idea?

Administrator
Administrator
acrylian   2008-08-29, 08:12
#2

`

Member
Member
Newzic   2008-08-29, 10:00
#3

Thank's. I try it (I m'not yet include at this time)

`

`
but I have message error...

Administrator
Administrator
acrylian   2008-08-29, 10:22
#4

Of course, you have basic errors in your code. Try this:

`

`
Please try to learn the basics of php. There are lots of tutorials out there. I hope you will understand that we can't teach those here.

Member
Member
Newzic   2008-08-29, 13:02
#5

yes, basics errors...

To finish this post, I correct it and include ... with "One comment" and "xx comments". There is nothing in the code source if there is 0 comments (no h3 balises empty).

This code is ok:

`

`
Thank you.

Administrator
Administrator
acrylian   2008-08-29, 16:11
#6

You are welcome (in case I may have sounded a little harsh). Last note, in case translation is important for you. The gettext calls will probably not work correctly since this is not the setup the translation files are made with.

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