"view comments" v.1.4.2
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
I am sure this would be a great add-on for this version. there are working examples such as http://www.tnatech.com/gallery but same code can't seem to work in 1.4.2 has anyone developed this code for new version... (maybe we can get it for the next update as a feature to turn off/on) |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
In albums.php find this: print lastCommentString($lastCommentDate, $displayCommentLegend); and add these lines below: if ($lastCommentDate > 0) { ?> <br><span class=error>*</span><a href=<?php echo makeGalleryUrl("view_comments.php", array("set_albumName" => $tmpAlbumName)) ?>>[View comments for this album]</a> <?php } before the ?> Dave |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
Floridave, Thanks for the reply I have added the code where you said to, but i get no change on the page after making the change in the code... Again thanks for the reply. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
sexdrvn, $gallery->app->comments_indication = "both"; $gallery->app->comments_indication_verbose = "yes"; Dave |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
Floridave, We are defiantely making progress... you forgive my ignorance, my PHP language experience is very limited. I can see the link, it just doesn't go anywhere. we are getting there. I can't thank you enough for thus far.. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
OOOPS :oops: Need to mod one more file: // Hack check if (!$gallery->user->isAdmin() && !$gallery->user->isOwnerOfAlbum($gallery->album)) { and change to: // Hack changed to allow all that can read album to read comment if (!$gallery->user->canReadAlbum($gallery->album)) { Dave |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
That worked!!!! WooooHoooo! I thank you Soooo much, I have been wanting that to work for some time. |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
So I guess for those looking to do the same thing in their Gallery v1.4.2 all the steps put together to get "view comments" in the main page is the following code, I hope this will benefit others as well. In albums.php find this: Quote:
print lastCommentString($lastCommentDate, $displayCommentLegend); and add these lines below: Quote:
if ($lastCommentDate > 0) { ?> before the ?> In config.php verify: Quote:
$gallery->app->comments_indication = "both"; Need to mod one more file: Quote:
// Hack check and change to: Quote:
// Hack changed to allow all that can read album to read comment |
|
somethinclever
Joined: 2004-03-09
Posts: 8 |
![]() |
is there a way for this to work on sub albums? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Sure, Dave |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
After installing and updating my gallery and overwritting the files I needed to get it all back to normal i get this error when click on the view comments link. is there something we need to change on this line to get it to work??? Quote:
Fatal error: Call to undefined function: myalbumname() in /home/eclipse/public_html/gallery/view_comments.php on line 151 |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
After installing and updating my gallery to 1.4.3 and overwritting the files I needed to get it all back to normal i get this error when click on the view comments link. is there something we need to change on this line to get it to work??? Quote:
Fatal error: Call to undefined function: myalbumname() in /home/eclipse/public_html/gallery/view_comments.php on line 151 |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
After installing and updating my gallery to 1.4.3 and overwritting the files I needed to get it all back to normal i get this error when click on the view comments link. is there something we need to change on this line to get it to work??? Quote:
Fatal error: Call to undefined function: myalbumname() in /home/eclipse/public_html/gallery/view_comments.php on line 151 |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
sexdrvn, The only thing I changed in 1.4.3RC3-view_comments was // Hack check changed to allow all that can read album to read comment if (!$gallery->user->canReadAlbum($gallery->album)) { Perhaps your ftp client did not overwrite all the files on your server? Dave |
|
sexdrvn
Joined: 2003-12-30
Posts: 57 |
![]() |
Well i guess that was my fault when i reloaded the new and made your line change, errors went away. its up and running again, thanks. I wish i new more php, guess after I finish school I could pick up another class in programming. add that to my studies... |
|