Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

PhotoGallery.php Question

Asked Modified Viewed 3,729 times
L
lsainsbury
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
asked
Senior Member

Hi,

If I wanted to remove the comments, ratings text under each photo from the Photo Gallery, what do I need to remove / delete? I've assuming this will be from photogallery.php - is there anywhere else I would need to delete it?

Or is this against the licence code and I shouldn't do it at all?

In short, I want to supress the comments and ratings text from displaying.
0 replies

12 posts

A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

I think that it gives you options to tick : Enable Ratings and Enable Comments when editing a Photo.

Or you want to Remove the whole Function of Comments and Ratings from the Photos so that it never shows you the Options for Enabling Ratings, Comments etc and just Display Photos ?

Please explain more..... B)
0 replies
L
lsainsbury
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
answered
Senior Member

Quote

Ankur wrote:
I think that it gives you options to tick : Enable Ratings and Enable Comments when editing a Photo.

Or you want to Remove the whole Function of Comments and Ratings from the Photos so that it never shows you the Options for Enabling Ratings, Comments etc and just Display Photos ?

Please explain more..... B)


I want to remove the whole comments / ratings text from each photo / album - I don't need them.

Edit - and the voting system function - forgot about that!

The tick boxes just disable the comments / ratings but I think the text is still under each photo...I'm not at home and cannot check my site as it's ona box that's off at the moment!

For example - look at yours:

http://ankurthakur.co.cc/fusion/photogallery.php?photo_id=1

I'd like to remove:

Added by: <name>
Dimensions: 800 x 600 pixels
Filesize: 27.85kB
Comments: 0
Rating: None
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Oh ! So open photogallery.php and Search for these two Lines :

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if ($data['photo_allow_comments']) { showcomments("P", DB_PHOTOS, "photo_id", $_GET['photo_id'], FUSION_SELF."?photo_id=".$_GET['photo_id']); }
if ($data['photo_allow_ratings']) { showratings("P", $_GET['photo_id'], FUSION_SELF."?photo_id=".$_GET['photo_id']); }[/syntaxhighlighter]

Just Comment them !!! That is, change them to :

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]//if ($data['photo_allow_comments']) { showcomments("P", DB_PHOTOS, "photo_id", $_GET['photo_id'], FUSION_SELF."?photo_id=".$_GET['photo_id']); }
//if ($data['photo_allow_ratings']) { showratings("P", $_GET['photo_id'], FUSION_SELF."?photo_id=".$_GET['photo_id']); }[/syntaxhighlighter]
0 replies
L
lsainsbury
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
answered
Senior Member

That's it? I can become a programmer at this rate!

Thanks - I'll give it a try tonight!

Perhaps I might get my project off the ground after all! :)
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Hmm..... B)

In this way, it will Hide you Comments and Ratings, such that you can enable it whenever you want in future just by Removing the comments ... ;)
0 replies
L
lsainsbury
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
answered
Senior Member

Excellent - thanks!

Which lines do I comment out if I want to do the same for

Added by: <name>
and
Dimensions: 800 x 600 pixels
and
Filesize: 27.85kB
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Search for :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false] echo $locale['434'].profile_link($data['user_id'], $data['user_name'], $data['user_status'])."<br />\n";
echo $locale['454']."$photo_size[0] x $photo_size[1] ".$locale['455']."<br />\n";
echo $locale['456'].parsebytesize($settings['photo_watermark'] ? filesize(PHOTODIR.$data['photo_filename']): filesize($photo_file))."<br />\n";[/syntaxhighlighter]

Comments them :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]// echo $locale['434'].profile_link($data['user_id'], $data['user_name'], $data['user_status'])."<br />\n";
// echo $locale['454']."$photo_size[0] x $photo_size[1] ".$locale['455']."<br />\n";
// echo $locale['456'].parsebytesize($settings['photo_watermark'] ? filesize(PHOTODIR.$data['photo_filename']): filesize($photo_file))."<br />\n";[/syntaxhighlighter]
0 replies
L
lsainsbury
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
answered
Senior Member

OK - so I commented them out - the detail has been removed from when I display the photo but the information is still being displayed when I view the actual album.

How do I remove these? I've checked photogallery.php and photo.php but could not find the lines to comment out...
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Ok ! So you are talking about that when you View an Album, it shows No. of comments and Ratings below each Thumbnail.... Am I right ?

For that edit the same file and Search for :

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false] $photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'"wink;
echo ($photo_comments == 1 ? $locale['436b'] : $locale['436']).$photo_comments."<br />\n";
echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".get_image("star"wink."' alt='*' style='vertical-align:middle' />", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br />\n";[/syntaxhighlighter]

Just Comment them :

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]// $photo_comments = dbcount("(comment_id)", DB_COMMENTS, "comment_type='P' AND comment_item_id='".$data['photo_id']."'"wink;
// echo ($photo_comments == 1 ? $locale['436b'] : $locale['436']).$photo_comments."<br />\n";
// echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".get_image("star"wink."' alt='*' style='vertical-align:middle' />", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br />\n";[/syntaxhighlighter]
0 replies
L
lsainsbury
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
answered
Senior Member

I mean when you first view the album before opening the photo. I've found the code and // it out - all looking now blank - just how I want it!

Thanks!
0 replies
M
Mike5501
M
  • Newbie, joined since
  • Contributed 1 post on the community forums.
answered
Newbie

I have done the above, but it still shows the text. What am i doing wrong?

Greets
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Quote

Mike5501 wrote:
I have done the above, but it still shows the text. What am i doing wrong?


Please Check if you have modded the Right Code.

Else, Which Modification you have done and what you want it to look like ? Please tell first... ;)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 12 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

L
L
Best Regards,
Lee
  • Senior Member, joined since
  • Contributed 270 posts on the community forums.
  • Started 53 threads in the forums
  • Started this discussions
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
M
M
  • Newbie, joined since
  • Contributed 1 post on the community forums.

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet