"View recent comments" on albums.php in 1.4 RC1 ?

rcory

Joined: 2003-04-04
Posts: 16
Posted: Thu, 2003-08-28 09:24

Hi,

There is a mod i used to make on previous gallery versions but know, i can't... :

I would like to have "view recent comments" on the first page of the gallery and "view all comments" on each album", both for all users.

I kept "recent_comments.php" from the previous version and it works perfectly so i just need to include a link to that file on albums.php but i don't know how to do it.

For the second mod, i tried a few things but it doesn't work :-?

Tks a lot if you can help me :wink:

-- Rcory --

 
infinity005

Joined: 2003-11-11
Posts: 43
Posted: Wed, 2003-11-12 08:23

have you found the answer to this?

 
rcory

Joined: 2003-04-04
Posts: 16
Posted: Wed, 2003-11-12 14:32

Nope :-?

But thanks anyway :lol:

Rcory

 
infinity005

Joined: 2003-11-11
Posts: 43
Posted: Wed, 2003-11-12 18:24

i hacked the code up and got something to work. let me know if you have problems getting it to work and we can solve them together ;)

http://www.brendon.com/recent_comments.tar.gz

It seems there is an issue with permission inheretence. I'm not sure if its a feature or a bug. Hopefully i'll figure out soon.

 
infinity005

Joined: 2003-11-11
Posts: 43
Posted: Wed, 2003-11-12 18:31

i'm using 1.4.1rc2 btw.

 
efurban

Joined: 2002-12-17
Posts: 15
Posted: Mon, 2003-11-17 12:04

this is exactly what i want!! I'll look into it right after my finals. :D

 
infinity005

Joined: 2003-11-11
Posts: 43
Posted: Tue, 2003-11-18 00:21

I hacked it up more a few days ago. I implemented permissions on my website and the script broke. Its fixed now. Let me give you another link. I'm using 1.4.1rc2. I'm going to upgrade to 1.4.1 final when it comes out since i haven't had complaints with rc2.

http://www.brendon.com/recent_comments_0.9.1.tar.gz

 
efurban

Joined: 2002-12-17
Posts: 15
Posted: Tue, 2003-11-18 18:52

the link seems to be broken :( could u please fix it ?

 
infinity005

Joined: 2003-11-11
Posts: 43
Posted: Fri, 2003-11-21 01:37

the internet connection to the server was down for two days

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Mon, 2003-12-15 23:34

Can you help? I am getting this error
Warning: Division by zero in home/mydomain/public_html/gallery/recent_comments.php on line 148

do not know what the problem is. can anybody help?

Thanks,
Carl

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Wed, 2003-12-17 13:46
 
Lapino
Lapino's picture

Joined: 2003-12-22
Posts: 6
Posted: Mon, 2003-12-22 14:01

I got a similar error when switching to v1.4.1, but it was not at that line. Maybe you should check your file and do a search for this part of code:

$perPage = $gallery->app->default["albumsPerPage"];

and it that's present, you should change it to:

$perPage = $gallery->app->albumsPerPage;

Something else I'd like to say: I've been using a modification of recent_comments.php that displayed *all* comments next to the picture, instead of just the last one. I forgot who made this mod, and I can't find it anymore. It didn't work with 1.4.1 anymore, and I couldn't find an up to date version, so I made my own modified version, which you can find here:
http://lapino.be/recent_comments_0.9_modified.tar.gz

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Mon, 2003-12-22 23:56

Mine already has the right code there.
Here is the line it says it is having a problem with
$maxPages = max(ceil($numRecent / $perPage), 1);

 
Lapino
Lapino's picture

Joined: 2003-12-22
Posts: 6
Posted: Tue, 2003-12-23 13:10

Maybe you should check your config.php then and see if you can find the line

gallery->app->albumsPerPage = "a number" in your config.php

If this kind of line is not present, add one, and change "a number" to the number off albums you want per page.
If this line is present, check if the number isn't zero.

 
diomark
diomark's picture

Joined: 2003-03-14
Posts: 90
Posted: Fri, 2003-12-26 21:15

curious if this works in 1.4.1 now?
(and yes, I'll go off and try it shortly:) )
-mark

 
Lapino
Lapino's picture

Joined: 2003-12-22
Posts: 6
Posted: Sat, 2003-12-27 01:24
diomark wrote:
curious if this works in 1.4.1 now?
(and yes, I'll go off and try it shortly:) )
-mark

I'm using 1.4.1 now and infintiy's modification worked for me, now I'm using my own modification, with all the comments aligned next to the picture. You can preview it here (warning: contains strange pictures of drunk people :wink: )

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Tue, 2003-12-30 01:16

Its there
$gallery->app->default["showOwners"] = "no";
$gallery->app->default["albumsPerPage"] = "7";
$gallery->app->default["showSearchEngine"] = "yes";
$gallery->app->default["useOriginalFileNames"] = "yes";

 
Lapino
Lapino's picture

Joined: 2003-12-22
Posts: 6
Posted: Tue, 2003-12-30 03:33
carlandtracey.com wrote:
Its there
$gallery->app->default["showOwners"] = "no";
$gallery->app->default["albumsPerPage"] = "7";
$gallery->app->default["showSearchEngine"] = "yes";
$gallery->app->default["useOriginalFileNames"] = "yes";

All right, this looks strange, normally, the, "default" should be gone in this version. Ok, there are 2 things you can do:

1. make a backup of your config.php before you do this, yo never know what can happen and then add this line to your config.php:

$gallery->app->albumsPerPage = "7";

(you might even try to remove the $gallery->app->default["albumsPerPage"] = "7"; line, and if everything works fine afterwards, don't worry about it anymore):

2. do the opposite in the recent_comments.php file (change $gallery->app->albumsPerPage back to $gallery->app->default["albumsPerPage"]). I wouldn't recommend this, as it will probably give troubles when you upgrade later on.

 
sexdrvn

Joined: 2003-12-30
Posts: 57
Posted: Sun, 2004-01-04 13:26

I downloaded the "recent_comments_0.9_modified.tar.gz" from lapino but having issues on where and what lines to edit to make this work... if someone can break this down a bit more in deatil that would be great.
I am also trying to implement the view comments under the albums, but sadly, i am not very savvy when it comes to editing code.

I am using verion 1.4.1 and have created anothing string topic concerning this very question.

/ http://eclipsesvc.com/gallery

I hope someone will help in this matter.

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Fri, 2004-01-16 00:01

bump

 
zevlag

Joined: 2004-02-04
Posts: 1
Posted: Wed, 2004-02-04 16:01

This link http://www.brendon.com/recent_comments_0.9.1.tar.gz
It basically works on v1.4.1-pl1.

It will only show page 1 if not logged in. the page 2/3 links don't work, though they do when I log in.
When logged in as admin and try to delete a comment, I get

Fatal error: Call to a member function on a non-object in /home/www/laytonparadise2004/do_command.php on line 133

[/code]

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Wed, 2004-02-04 19:50

Appearantly I am adept now. Why do I feel so ignorant?

 
drazin

Joined: 2002-11-23
Posts: 144
Posted: Thu, 2004-02-05 02:25
Lapino wrote:
I got a similar error when switching to v1.4.1, but it was not at that line. Maybe you should check your file and do a search for this part of code:

$perPage = $gallery->app->default["albumsPerPage"];

and it that's present, you should change it to:

$perPage = $gallery->app->albumsPerPage;

that worked for me!!!!!!! thanks

 
rcory

Joined: 2003-04-04
Posts: 16
Posted: Thu, 2004-02-05 09:06

Hi,

Did anyone managed to make this file work on v1.4.2-RC2 ?

I've been using the old files and got an error...

If you have any answer ;-)

-- Rcory --

 
Carl_in_Florida
Carl_in_Florida's picture

Joined: 2003-01-07
Posts: 110
Posted: Thu, 2004-02-05 23:31

I downloaded this again and now it works. I have no idea why it didn't before. I am just thankful to the little "1"s and "0"s

 
briiii
briiii's picture

Joined: 2004-02-01
Posts: 8
Posted: Wed, 2004-02-11 16:34

Any idea how can I modify recent_comments.php so it supports a parameter (set_albumName) so it shows only the chosen album? I've been playing with "view_comments" but it doesn't seem to order the comments correctly.

Thank you,
- Brian

 
drazin

Joined: 2002-11-23
Posts: 144
Posted: Mon, 2004-02-16 07:42

any way to get this to display multiple comments for one image insteady of displaying the same image over and over for every comment??

 
somethinclever

Joined: 2004-03-09
Posts: 8
Posted: Tue, 2004-04-06 18:19

= ] works perfectly on 1.4.2 with no modification.