| Author |
Message |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Dec 15, 2003 10:26 am Post subject: [TESTING] Random Photo- Version 2.0 |
|
|
A totally rewritten random photo block is available for testing.
i have rewritten the block as follows:
- image size can be modified
- number of images (for random photo only) can be altered (can easily be tweaked for hourly/daily as well, if enough people request it).
- horozontal/vertical switch so block can be top/bottom center with multiple images laid out horozontally
- allows for marquee-style scrolling when in vertical orientation
- allows for auto-refresh (interval set by user); eliminates need to refresh entire page to see new random photo.
see it in action at http://phpnuke.nukedgallery.net
NOTE: because i want to retain the feature of using the one "core" block file to allow for multiple random/hourly/daily blocks on a site, the "support" file is now a functions file that gets put in the blocks directory. no need to touch/tweak that at all. this functions file has been extensively rewritten (allows other extensions besides jpg) and is much cleaner. also, the auto-refresh feature makes use of an IFRAME, which requires an additional file. The total package is now three files:
- <nuke>/blocks/block-NG-Random.php
- <nuke>/blocks/block-NG-Random_functions.php
- <nuke>/block-NG-AutoPhoto.php
See the auto refresh in action on the demo site. If you have no desire to use the auto refresh feature, then you don't need the AutoPhoto.php. If there are any other requests, please let me know and I'll try to add them in before a release.
http://www.nukedgallery.net/download-file-30.html [nukedgallery.net] _________________
 |
|
| Back to top |
|
|
AdBot
|
| Post subject: [TESTING] Random Photo- Version 2.0 |
|
|
|
|
|
| Back to top |
|
 |
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Mon Dec 15, 2003 10:35 am Post subject: |
|
|
| ok, so to continue from old old posts, does this random block only allow images that people have permissions to view? (id be happy with it just displaying images that only the public can view), but would like to know if it will display restricted albums... |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Dec 15, 2003 10:36 am Post subject: |
|
|
yes, only images available to the EVERYBODY user are viewable. it's an easy tweak in the _functions file to get rid of that check (i believe it's in the scan function, just remove the check..). _________________
 |
|
| Back to top |
|
|
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Mon Dec 15, 2003 10:40 am Post subject: |
|
|
| nope, thats fine the way it is. Thanks! |
|
| Back to top |
|
|
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Mon Dec 15, 2003 10:47 am Post subject: |
|
|
im getting an intermittant error:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/hosting/web/anton/www.strangeparty.com/fullgallery/classes/database/mysql/Database.php on line 37
any ideas on how to debug this.. the images display fine, but the occasional one doesnt open a real image when clicked on. Gives some gallery error |
|
| Back to top |
|
|
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Mon Dec 15, 2003 10:48 am Post subject: |
|
|
| funny, ive just noticed it seems to only happen if im logged in to nuke.... wierd |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Dec 15, 2003 10:49 am Post subject: |
|
|
what setting (random, auto, etc)? _________________
 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Dec 15, 2003 10:55 am Post subject: |
|
|
ok i got the same error...will try to debug later this afternoon. _________________
 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Dec 15, 2003 11:43 am Post subject: |
|
|
ok, i know what the error is, why it's caused, and where it's coming from. i'm just having a helluva time getting rid of it... _________________
 |
|
| Back to top |
|
|
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Mon Dec 15, 2003 12:06 pm Post subject: |
|
|
| remove the offending line of code.. it doesnt seem to work, yet the images seem to display even if it is broken... |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
Posted: Mon Dec 15, 2003 3:47 pm Post subject: |
|
|
i've fixed it (i think...at least i don't get the error anymore).
in block-NG-RandomPhoto.php, change:
PHP: › <?php global $gallery; ?>
to
PHP: › <?php global $gallery,$Version_Num; ?>
i will update the download... _________________
 |
|
| Back to top |
|
|
unknownid
Beginner


Joined: Aug 21, 2003 Posts: 6
|
Posted: Mon Dec 15, 2003 6:23 pm Post subject: |
|
|
Cool! This worked great right off for me, and scrolling a set of 4 is awsome. I am still curious about removing the 'check' you speak of so that maybe I could make the block only viewable by loggedin and the block would use 'ALL' the photos in the galleries (no matter the permissions), or at least all the galleries with the permissions of loggedin?
Man, you guys are so cool. I am so happy to have this cool block on my site.
--Thanks |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Tue Dec 16, 2003 7:07 am Post subject: |
|
|
| out of interest.. is there a way to recursively set permissions on galleries? like all at once? cause that would be really useful |
|
| Back to top |
|
|
darkknight
Guru


Joined: Aug 21, 2003 Posts: 54
|
Posted: Tue Dec 16, 2003 7:10 am Post subject: |
|
|
| The file to fix was actually the block-NG-RandomPhoto_funcionts.php, but yeah.. it seems to work! |
|
| Back to top |
|
|
|
|
|
|
|