Trying to change the appearance of the Add Comment screen

tp
tp's picture

Joined: 2003-03-26
Posts: 104
Posted: Tue, 2013-08-13 20:08

I am on version 3.09 and followed Dave's suggestion here and successfully removed the requirements for email and url for adding comments:
http://galleryproject.org/node/110850#comment-405517:

Then I thought 'I'd like to remove the fields altogether for those options', so I poked around and found 'comment/controllers/comments.php' and tried removing:

$comment->guest_email = $form->add_comment->email->value;
$comment->guest_url = $form->add_comment->url->value;

I thought this worked because those fields were then gone from the add comment screen, but then later when I tried to access the site, I got the attached message and could not get into any page of the gallery, even admin/dashboard...

I then went and added the lines back to 'comment/controllers/comments.php' and after 5 or 10 minutes, I could get back into the site.

Any suggestions for how to safely remove those lines (email and url) from the add comment screen?

Thanks,
Todd

AttachmentSize
sshot-251.jpg28.47 KB
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-08-13 20:37

I would use CSS to hide the fields now that the validation is not done.

#g-comment-form li:nth-child(2){
   display:none;
}
#g-comment-form li:nth-child(3){
   display:none;
}

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
tp
tp's picture

Joined: 2003-03-26
Posts: 104
Posted: Tue, 2013-08-13 21:13

thanks again Dave. Seems to have worked perfectly (of course)

 
tp
tp's picture

Joined: 2003-03-26
Posts: 104
Posted: Wed, 2013-08-14 00:44

Hmm Now my whole site is down (last time it was just G3..) 500 Internal Server Error.. The only changes were to the comments/models/comment.php as advised and then adding the CSS change above... Strange. It was working at least for a little while after I made the CSS change because I tested it. (Linked images and emails are still up and I can ftp to the host so it seems to suggest if must be config related)

I guess I will put these changes back and see if the problem resolves.

 
tp
tp's picture

Joined: 2003-03-26
Posts: 104
Posted: Wed, 2013-08-14 01:04

Sure enough.. Site is back up once I reverted these changes (it takes a while but I am assuming this is why it came back up).. Doesn't make sense that these two files could bring down wordpress, G2 and G3.. Any thoughts?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-08-14 06:39

a css change will not do this. must be something else.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
tp
tp's picture

Joined: 2003-03-26
Posts: 104
Posted: Wed, 2013-08-14 06:49

Yeah. Really strange. I put the comment.php change back in a couple hours ago and it's still running. I will put the CSS change back in now before I hit the sack and see how it goes.. Thanks

 
tziady

Joined: 2014-03-13
Posts: 12
Posted: Sun, 2014-03-16 23:17

Looking to get rid of the URL part of the comment form. Can someone point me to how to accomplish this safely. I have looked at the comment/css/comment.css file; but cannot quite figure out what to change.

Thanks,
Tamer