Add comments form directly below each image rather than link in sidebar...

andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Fri, 2009-01-23 06:34

Hi again guys,

My question is simple. Is there a module/easy way of having the comments form directly below each of the images, that way a user doesnt have to click on the "add comment" link in the sidebar, and go to a seperate page to add a comment.

This is something id really like to have on my gallery, i do know a fair bit about coding so am fairly competent to "attempt" most things, but is this something that would be easy to acheive or....?

Thanks for your time
Andrew

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-01-23 14:30

Edit album -> theme tab, remove the comments block from the sidebar and add it to the photo page.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Fri, 2009-01-23 21:36

Thanks a lot dave. Did exactly what i wanted.

Now i gotta work out how to re-style the comment form. Ive been looking in the comment.css file, and there is pretty much no css which relates to the styling of the form itself. Ive checked out the theme im using's css and there is only styling on the viewing of comments.

I cant seem to find out where the css is to style the form fields themselves. any idea?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-01-24 02:20

@CSS: http://gallery.menalto.com/node/70126

Best start with a colorpack if you wan to change things like background color as the colorpacks have fonts changed as well as for fields for you.

Stuck?: URL?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sat, 2009-01-24 02:53

Thanks dave, i havent followed your instructions yet, but before i do, id just like to run something past you if thats ok. Id like to restyle my comments form to look exactly like other forms on my site.

How hard do you think the comment form is to modify to look like my forms on this page: http://www.mileycyrus-online.co.uk/latest/official-hannah-montana-movie-trailer.html

At the bottom you'll see a comments form. I have created all the css for that form, just need to implement it into the gallery2 comments form. Ive looked at the source code, and i have to be honest, it looks pretty difficult. what do you think mate?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-01-24 04:18

If you want it exactly like that form then it will take a bit of effort to do.
If you just want to change the BG color then that is easy. Just change the css.

If you wan to position text and give rounded corners then I would edit:
modules/comments/templates/AddComment.tpl and give it your own classes in the <div> and add <div class="boxtop">/div> like you have in the other form as well as the one at the bottom.

Sorry no time to do this for you.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sat, 2009-01-24 04:47

Thank you for your advice dave.

It seems a bit complex, ill have to give it a try, but if anybody else reading this post can take on such a mod, contact me with your price.

thanks again dave. appreciate your time and advice!!!

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sat, 2009-01-24 21:36

Hi Dave,

One more question, ive just used firebug to inspect my comment form area, and its telling me that part of the css class in that area, there is a class called "block-comment-addcomment"

ive looked in all the css files and cant find that anywhere. All i have in my main CSS file which is in modules/commment/comment.css is the following:

Quote:
.commentNavigator {
display: block;
margin: 1em;
}
.commentNavigator div {
display: inline;
}
.commentNavigator a {
padding: 0 0.5em;
}

Is that right? All things seem to point to all the css for the commments section being controlled in the above css file, but the only classes in there is what ive pasted above.

am i missing something here?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-01-25 02:27
Quote:
cant find that anywhere

Then add it.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sun, 2009-01-25 03:29
floridave wrote:
If you wan to position text and give rounded corners then I would edit:
modules/comments/templates/AddComment.tpl and give it your own classes in the <div> and add <div class="boxtop">/div> like you have in the other form as well as the one at the bottom.

Dave
Blog & G2 || floridave - Gallery Team

Ive just started analysing this particular file and all changes i was making didnt show up on the site, so i deleted the entire contents of the file and uploaded, and the comments form still remained on the site. Deleted my cache, browser history etc, refreshed and the form is stil there, so if this is the file the form is supposed to be in, where the hell is my forms file??? *confused*

Im using the matrix theme, does that have anything to do with it?

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sun, 2009-01-25 03:56

Right, im now getting somewhere.

Ive worked out that my add comments file is actually in modules/comments/templates/local/addcomment.tpl

Ive managed to style the form with my correct border, padding etc, only problem now is when you actually click on the field to type something in, it reverts back to its old style.

Is there some sort of hover/selected style in the css that controls this? exmple: http://www.mileycyrus-online.co.uk/gallery2/main.php?g2_itemId=1071

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sun, 2009-01-25 04:14

Cancel that all-together. Ive worked it out.

Cant belive how easy it was once you find the right file. Took me all over 20 minutes, and im shit with coding. Just got to implement my coloured background now.

Thanks for your advice though dave. I appreciate it!!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-01-25 04:18

in theme.css the background color of the forms is changed when the form is in focus with

#gallery input:focus, #gallery textarea:focus {
    background-color: #ffc;
    color: #000;
}

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sun, 2009-01-25 04:24

Thanks dave,

Whilst your here theres one other question, could you tell me where i need to be looking to drop down the word "subject" and "comment" so they are under the newly resized form fields? Im guessing a couple of < br > tags will do the job, any idea where that wording placement is controlled please?

Andy

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-01-25 04:37

modules/comments/templates/AddCommnent.tpl

    <h4> {g->text text="Subject"} </h4>

    {include file="gallery:modules/core/templates/MarkupBar.tpl" viewL10domain="modules_core"
	     element="subject" firstMarkupBar=true}

    <input type="text" id="subject" size="60" class="gcBackground1"
	   name="{g->formVar var="form[subject]"}" value="{$form.subject}"
	   onfocus="this.className=''" onblur="this.className='gcBackground1'"/>
    {if empty($inBlock)}
    <script type="text/javascript">
      document.getElementById('addCommentForm')['{g->formVar var="form[subject]"}'].focus();
    </script>
    {/if}

If you don't want the text subject just remove <h4> {g->text text="Subject"} </h4>
or you could remove the whole block of code if you don't need the subject.

    <h4>
      {g->text text="Comment"}
      <span class="giSubtitle"> {g->text text="(required)"} </span>
    </h4>

is the "Comment" and required.
Why all the {g-> text.... you ask? That is required for translations.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andymacdonalduk

Joined: 2009-01-22
Posts: 56
Posted: Sun, 2009-01-25 04:44

Thanks mate, i was thinking of getting rid of the subject field, but i prefer the idea of turning that into a URL field, and (somehow) making any link typed into it automatically be applied to the persons name when the comment is viewed on the page....if that makes sense?

Much like blog commenting etc. I wont ask you how to do that now, ill research that another time, ive used up enough of your time.

Thanks again for your help.

 
robinrobin

Joined: 2009-02-13
Posts: 19
Posted: Tue, 2009-02-17 17:33

I have a problem that seemed to be solved for the topic starter but wasn't for me. The "Add Comment" link in the sidebar won't go away. Even though it's not part of the theme in any album, it's visible in every one. It seems like it's part of the "Item actions" because there are several actions visible on the side-bar that i don't want there. I guess i'll have to manually edit the code to get rid of it, but i can't figure out in which file i'm supposed to edit to customize what's visible on the side-bar.