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.
Do any of you know which file I should edit and what I should type in to get the "Add Comment"-butten right under the image?

Please help me :)

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Tue, 2006-01-03 01:27

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.

 
rick7

Joined: 2005-03-02
Posts: 168
Posted: Tue, 2006-01-03 02:59

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.

 
forberg

Joined: 2006-01-02
Posts: 4
Posted: Tue, 2006-01-03 13:57

thank you :D

 
forberg

Joined: 2006-01-02
Posts: 4
Posted: Tue, 2006-01-03 14:02

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.

 
forberg

Joined: 2006-01-02
Posts: 4
Posted: Tue, 2006-01-03 14:10

never mind.. found it out :)

 
blitz boy

Joined: 2006-01-03
Posts: 10
Posted: Tue, 2006-01-03 19:51

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.

 
PatiH
PatiH's picture

Joined: 2005-12-21
Posts: 32
Posted: Wed, 2006-01-04 02:54
rick7 wrote:
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.

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.

 
rick7

Joined: 2005-03-02
Posts: 168
Posted: Wed, 2006-01-04 10:15

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.

 
drazin

Joined: 2002-11-23
Posts: 144
Posted: Wed, 2006-01-04 18:42

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.

 
rick7

Joined: 2005-03-02
Posts: 168
Posted: Wed, 2006-01-04 20:22

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.

 
PatiH
PatiH's picture

Joined: 2005-12-21
Posts: 32
Posted: Wed, 2006-01-04 20:23
rick7 wrote:
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.

I did edit it, I'm sorry. You would put it above the one you see later that says
<table width="100%">

 
drazin

Joined: 2002-11-23
Posts: 144
Posted: Thu, 2006-01-05 15:44

Yes...its just the same graphic thats being used in the sidebar. i was trying to keep things the same.

 
Kelley_JS

Joined: 2006-01-26
Posts: 1
Posted: Thu, 2006-01-26 14:17

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....???

 
scotchsean

Joined: 2006-07-05
Posts: 4
Posted: Thu, 2006-07-06 05:05

What did you find out? I have the same problem, no return. tried adding arg3="return=true"}" but no luck

 
wheresraz

Joined: 2006-02-12
Posts: 7
Posted: Tue, 2006-07-25 17:00

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.

 
alansax

Joined: 2006-08-19
Posts: 1
Posted: Sat, 2006-08-19 16:34

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

 
brianna_marie

Joined: 2008-03-21
Posts: 1
Posted: Fri, 2008-03-21 03:54

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?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-07-07 03:03

Did you change permissions? You know this thread is a few years old and was about adding a link.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Plasticsuper

Joined: 2008-07-11
Posts: 1
Posted: Fri, 2008-07-11 21:06
forberg wrote:
Hello, at my gallery I wan't the "Add Comment"-button right under the picture.
Do any of you know which file I should edit and what I should type in to get the "Add Comment"-butten right under the image?

Please help me :)

If you want to do that, you have to edit header.php

 
petterprkr619

Joined: 2009-03-03
Posts: 1
Posted: Tue, 2009-03-03 10:12

I don't know what
the theme templete is on myspace....???

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-03-03 14:46

Yes and no.