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
Posts: 1
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.
Posts: 3
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
Posts: 23
Adding:
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.
Posts: 7
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 ...
Posts: 23
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"}
Posts: 1
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!