[siriux] how to add a comment....

matt64

Joined: 2006-05-15
Posts: 3
Posted: Mon, 2006-05-15 22:10

Hi all ....
I have just find a solution for my problem that can help any noobs like me.
I have siriux theme setup in my gallery and to add a comment you just have to add these lines in
"modules\comment\templates\blocks\ViewComments.tpl" just after {* Set defaults *}:

<div>
<a href="{g->url arg1="view=comment.AddComment" arg2="itemId=`$theme.item.id`" arg3="return=true"}">Add a comment</a>
<p>
</div>

and you will see a link to add a comment on each photo ;)

Matt64

 
gcruchon

Joined: 2006-05-25
Posts: 1
Posted: Thu, 2006-05-25 04:10

Hello,

Actually, if you want the text "Add a comment" to be localized, you'd better use the following code :
<div>
<a href="{g->url arg1="view=comment.AddComment" arg2="itemId=`$theme.item.id`" arg3="return=true"}">{g->text text="Add Comment"}</a>
<p>
</div>

Anyway, thank you matt for this trick.

Best Regards,
Gilles.

 
matt64

Joined: 2006-05-15
Posts: 3
Posted: Wed, 2006-05-31 16:14

Hello Gilles
There is still a problem with this solution... I have the "Add comment" link in the maine page and in galleries section.
Lookt at my website >>> http://castaim.free.fr check "Poster un commentaire", I just want the link in the photo page.
How can y do ?
Thanks

 
grishkin

Joined: 2006-10-27
Posts: 23
Posted: Fri, 2006-10-27 04:36

Adding:

Quote:
<div>
<a href="{g->url arg1="view=comment.AddComment" arg2="itemId=`$theme.item.id`" arg3="return=true"}">{g->text text="Add Comment"}</a>
<p>
</div>

worked just great. Thank you.

How do I add the number of comments below each picture in the album? I tried everything possible within the settings in the gallery and nothing worked. Is there a way I can change the code to display the number of comments below each picture in the album view?

Thanks again,
Greg.

 
mihatt

Joined: 2006-10-02
Posts: 7
Posted: Sat, 2006-12-09 09:06

Link is working fine! Thanks.

However, how do we check if user has right permission to add a comment? For example if I dont want to allow guests to post comments ...

 
grishkin

Joined: 2006-10-27
Posts: 23
Posted: Wed, 2007-08-08 07:37

Adding Comments:
The easiest way to add an ability to add comments to SIRIUX theme is:

1) Add "Add Comments" block in the "Admin Options -> Gallery -> Themes -> Siriux Theme Settings -> Blocks to show on photo pages".

2) Then go back to your root Gallery directory, select "Edit Permissions" and add "Everybody" to "[comment] Add comments" group permission.

Displaying Comments in SIRIUX Theme:
Then you would most likely want these comments to be displayed. Here is what you do to make that happen:

1) Add "Show Comments" block before "Add Comments" in the "Admin Options -> Gallery -> Themes -> Siriux Theme Settings -> Blocks to show on photo pages".

2) Then go back to your root Gallery directory, select "Edit Permissions" and add "Everybody" to "[comment] Show comments" group permission.

3) And then modify themes/siriux/templates/theme.tpl (if you have Gallery 2.2.2 installed) by replacing:

Line 84: {/if}
Line 85: </a>

with

Line 84: {/if}
Line 85: </a>
Line 86:
Line 87: {g->block type="core.ItemInfo"
Line 88: item=$child
Line 89: showSummaries=true
Line 90: class="giInfo"}

 
Serge_chirk

Joined: 2008-07-14
Posts: 1
Posted: Mon, 2008-07-14 12:48

Great information! It's very useful and that's why I decided to post a comment. Many people often find here they couldn't find anywhere else!