1
SirTanksAlot
XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...

I just finished a bunch of hacking on XoopsGallery...

you can get my changes from: http://www.shirel.com/modules/mydownloads

Following is the contents of the change.txt for everything that I did...

Matt's Gallery Hacks
mls-at-shirel.com

If you have any questions, email me and I'll do my best to help... I'm a php newbie,
and I know even less SQL.. But I hack my way through as best I can... btw -- Some "Bugs"
could possibly considered "features".. but I wanted different behavior...

June 1, 2003

Bug: Album Description do not show up on top level page that lists each of the albums...
Reason: Typo of smarty template
Fix: In the template file: xoopsgallery_index.html change the smarty-template name on line 27:
from: <{$album.desc}>
to: <{$album.album_desc}>
Note: Your template files (stored in the DB) will have to be refreshed for this change to go
into affect.

Bug: The sort function bombed for anything other than a random sort.
Reason: the album save() function is not reenterant.
Fix: Modified classes/album.php and sort_album.php.
The function -- SortPhotos() -- now takes a 3rd argument. This arguement defaults to false
meaning it will execute a save() in the middle of the function. When called from sort_album,
the 3rd arguent is passed as try to bypass the save since one will be done upon exiting the
function call.

Bug: New Pictures Block displays full size images instead of the thumbnail image.
Reason: B/c that's the source that was being passed... the block needed more/better info...
Fix: Modified class/image.php and blocks/xoopsgallery_blocks.php
image.php: Added new functions to the XoopsgalleryImage() class to put together a thumbnail link.
xoopsgallery_blocks.php: call the new function (getFullThumbURL) instead of the old (getFullURL)

Bug: New Picture Block would display less than the desired number of pictures if they movies/albums/etc
were a part of the list...
Reason: Only N items were pulled out of the MySQL tables...
Fix: Modified class/image.php and blocks/xoopsgallery_blocks.php
image.php: Added new functions to the XoopsgalleryImage() class.
xoopsgallery_blocks.php: pull some more entries from the table and make sure there is a
thumbnail for all the ones you are going to use...

Bug: Random Image Block would not provide a link to the image/gallery the image originated from...
Reason: b/c that's the way it was written..
Fix: modified class/image.php, blocks/xoopsgallery_blocks.php and
templates/blocks/xoopsgallery_block_rand.html
image.php: this depends upon the modification for the "New Pictures Block" hacks
xoopsgallery_blocks.php: Completely rewrote the function -- b_xoopsgallery_getRandomImage()
It now more closely resembles the b_xoopsgallery_newshow() function.
xoopsgallery_block_rand.html: This now exactly mimics the new picture block template...
* Note: make sure you refresh your template files for this block...

Bug: The Recent Comments block does not reliably link to the image/comments w/i a gallery. It
frequently throws and error about undefined object (or something similar) and returns a blank page.
Reason: The link from Recent Comments passes the albumName as albumName=XXX instead of set_albumName=XXXX.
Fix: ************* HACK *************************
This should really be fixed in the comments block code.. but I wasn't going to start my way through
that learning curve tonight... So I did the following as a major hack:
Modified session.php
Now, instead of just looking for set_albumName to be passed as a GET param, it will also look
for albumName...

NOTE: The sporatic success/failures seems to be b/c an Album object is carried around in the session
after you have visited any albums. If the last album visited happened to be the same one as the
comment went to, you were in luck and everything worked. If it was a different album, you would
end up on the wrong image.


WHEW!!!!!!! I think that's it...

ToDo: Sometime in the future, when I (or someone) has the time to figure out how to do it...

1) Count the total number of new Images added in the last week/month/??? and include in new image block.
1a) Page/Block to show list (thumbnail) of all images added in last week/month/???
2) Add block configuration options for the Random Image block... How many? Size? Show Upload Date?
2a) Add option to new image block to configure timeframe of 1/1a.
3) Add notifications when new images are added to an album.
4) Exclude "private" images from new/random blocks.

2
Twilo
Xoops Gallery
  • 2003/6/1 15:18

  • Twilo

  • Just popping in

  • Posts: 24

  • Since: 2003/4/24


http://www.shirel.com/mydownloads this link does not work. I think it should be like this

Also, I registered to your site and mydownloads section does not work. When I want to access there it says "Sorry, you don't have the permission to access this area.
If the page does not automatically reload, please click here" Maybe you forgot to give access rights for registered users in System Admin/groups.

3
hsalazar
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/6/1 17:30

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


SirTanksAlot:

Indeed you haven't allowed registered visitors access to your downloads. The hacks you mention are all quite desirable, so please open this access.

Happy Xoopsing!

4
SirTanksAlot
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...

Sorry I had granted anonymous, et.al. access to the blocks.. but missed the module...

I guess that's what I get for not being able to sleep and doing all of the posting on 36+hrs of no sleep...

It should be fixed now.. Sorry for the messup..

5
SirTanksAlot
Re: Xoops Gallery

You are correct sir.. I fubar'd the link too..

http://www.shirel.com/modules/mydownloads/

6
Twilo
Xoops Gallery
  • 2003/6/1 20:18

  • Twilo

  • Just popping in

  • Posts: 24

  • Since: 2003/4/24


Thanks for the fix and hacks. :)

7
kjs222
Re: Xoops Gallery
  • 2003/6/3 19:59

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


These look like good hacks, and I hope they're included in the next xoopsgallery release.



8
DrBohner
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/6/19 16:58

  • DrBohner

  • Just popping in

  • Posts: 16

  • Since: 2003/4/4 1


M. Shirel,

I thought I had placed all the updated changes in their correct area - perhaps not.

My Random Images block is not displaying an image, anymore.

Can someone make a suggestion where I should look to make the fix?

<www.sprintboat.org>

Daniel
drbohner@existinglight.net

9
SirTanksAlot
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...

the image is there.. it's size is just set to height=0 width=0

<a href="http://www.sprintboat.org/modules/xoopsgallery/view_photo.php?xoops_imageid=2828&amp;set_albumName=roosters&amp;id=P6140313"><img src="http://www.sprintboat.org/modules/xoopsgallery/cache/albums/roosters/P6140313.thumb.jpg" width="0" height="0" alt="" /></a>


I'm not sure if this picture has something bad in the database or if you are overriding the size settings somewhere...

10
DrBohner
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/6/19 17:20

  • DrBohner

  • Just popping in

  • Posts: 16

  • Since: 2003/4/4 1


MAN - You R Quick!

Thanks for the good eye - I'll try to determine what it is... now that you've pointed me.

If you see something, too - please update me..

Daniel
drbohner@existinglight.net

www.sprintboat.org

Login

Who's Online

191 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 191


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits