Add Comment help
|
forberg
Joined: 2006-01-02
Posts: 4 |
Posted: Mon, 2006-01-02 22:28
|
|
Hello, at my gallery I wan't the "Add Comment"-button right under the picture. Please help me |
|
| Login or register to post comments |

Posts: 388
You should edit the theme template (if it's matrix you should look in themes/matrix/templates/photo.tpl) and add this where you want the link.
<a href="{g->url arg1="view=comment.AddComment" arg2="itemId=`$theme.item.id`"}">{g->text text="Add Comment"}</a>Read the header first before making any changes.
Posts: 157
Hi, thanks for this response -- I'd just posted a different message requesting the same thing. Having an "Add Comment" text link beneath each photo is one of the things I really miss from G1 as having it on the sidebar just doesn't work for me. Several of my users have complained about not having it below the photo.
I'm a SQL programmer who's never programmed a line of PHP code in his life. I wonder if anyone could give me a sense of where the above line of code should be placed within a theme's PHOTO.TPL file in order for the link to appear below a photo on the photo page. Thanks very much.
Posts: 4
thank you :D
Posts: 4
just one more question? when i press the "Save"-button, it does not redirect to the picture.. It just holds up at the Add Comment form.
Posts: 4
never mind.. found it out
Posts: 10
On a similar note, does anyone know how to write the add comment link under the thumbnail/title (on the album page) so it links to the item instead of the album?
Thanks for any help.
Posts: 32
Hi Rick, I had a bit of trouble figuring it out too. I placed mine right above the last table tag
<table width=760>
{* Download link for item in original format *}
and it works fine. I'm not sure how correct that is, but it worked perfect for me.
Posts: 157
Thanks, PatiH. I don't see your line <table width=760> in the PHOTO.TPL file for either Matrix or G1. I see two lines there:
<table width="100%" cellspacing="0" cellpadding="0">
[and later...]
<table width="100%">
both near the top. Is <table width=760> something you added? Thanks.
Posts: 144
i dont know if you guys are still looking for an answer for this, but i got it to work well like this.
in photo.tpl under the photo div, i put
<center><a href="{g->url arg1="view=comment.AddComment" arg2="itemId=`$theme.item.id`" arg3="return=true"}">{g->text text="Add New Comment"}<img src="xxxxxxx/add_comment.gif" alt=comments"></a></center>
it shows up, but its not centered. no biggie as long as it works and leads back to the orignal image when the commenting is done, which is does.
Posts: 157
Thanks much, Drazin -- that did it for me. I think the previous line of code was missing the "return=true" part that you added. I put your code right above the "{* Download link for item in original format *}" comment as PatiH suggested. And the resulting display text IS centered for me. Your <center> tags work fine.
So thanks to you guys I've now written -- well, inserted -- my first line of PHP code. Hey, who knows -- maybe someday I'll learn to program in it...
btw, I took out the <img src='xxxxxx/add_comment.gif....> part that you added. I assume that's if you want to use a special 'Add Comment' graphic rather than simple text? Is this something that you created?
Thanks, everybody.
Posts: 32
I did edit it, I'm sorry. You would put it above the one you see later that says
<table width="100%">
Posts: 144
Yes...its just the same graphic thats being used in the sidebar. i was trying to keep things the same.
Posts: 1
my add comment button disappeared and i tried the above code and it didnt work.
can someone give me the code and tell me where to paste it. I don't know what
the theme templete is on myspace....???
Posts: 4
What did you find out? I have the same problem, no return. tried adding arg3="return=true"}" but no luck
Posts: 7
add this:
arg3="return=`$theme.item.id`"
it worked for me and i used the same code provided earlier in this post for my add comment link. so if that works for you, i'm pretty sure adding this to it will have the same effect as it did for me.
Posts: 1
hi there
when edited my profile my
ADD COMMENT link button (on top of comment box )
was disappeared...
I've got only the one on bottom of the box....
but it's too far from view....
can anyone help me ?
please reply!!
thanx
Posts: 1
drazin thanks so much, adding your code did it for me
Kakosek
Posts: 2
good idea
MP3Budda
Posts: 1
umm i need some help some reason my add comment link went away and i didn't even put in a code for it to. does anyone have an idea of what might of happened?
Posts: 1
Really very good and interesting!!!
http://killakella.wordpress.com/
Posts: 1
hello every one!
Some times boring things like "codings" are also seems very interesting and funny!
Mkhasan147
Posts: 1
That means you really enjoyed this discussion! Me too. thanks everybody.
Download mp3