|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
how about instead of showing a static frame with the last 5 images posted, a gadget or something that shows a slide show of random images from your gallery.
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
Well, it is the "latest photos" widget
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
The Latest Photos island; or where you talking each gallery in general?
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
that's just an island with static images, not really a widget
I want a single image frame that you can set to randomly pull photos from your gallery and cycle through them, or to just cycle through the last X amount of photos.
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
A random photo island would be nice
|
|
|
|
Joined: Sep 2009
Posts: 95
journeyman
|
journeyman
Joined: Sep 2009
Posts: 95 |
I agree, I would like to see a random photo island that refreshed every minute or so maybe...
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Here's a quick little "random image" custom island that can be used/modified. Just displays a single random image that links to the the actual gallery post:
/* PHP CODE HERE */
$query = "
select POST_ID,FILE_DIR,FILE_NAME
from ubbt_FILES
where FILE_DIR <> ''
order by rand() limit 1
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);
list($postId,$fDir,$fName) = $dbh->fetch_array($sth);
/* BODY HERE */
$body = <<<EOF
<div style='text-align: center'>
<a href="{$config['BASE_URL']}/ubbthreads.php?ubb=showgallery&Number=$postId">
<img border="0" src="{$config['BASE_URL']}/gallery/$fDir/thumbs/$fName" />
</a>
</div>
EOF;
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
what is this I see at the bottom of the right column? a random image island?!?! :-)
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
you posted that as I was noticing it~
Thank you rick!
Last edited by Bad Frog; 10/13/2009 4:45 PM.
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
works great, already running it on my site, thank you again!
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Sep 2009
Posts: 95
journeyman
|
journeyman
Joined: Sep 2009
Posts: 95 |
|
|
|
|
Joined: May 2008
Posts: 753 Likes: 1
Old Hand
|
Old Hand
Joined: May 2008
Posts: 753 Likes: 1 |
custom islands under the control panel
"No matter where you go, there you are." "If you can't do something smart, Do something right" "There are three kinds of people in the world, those who can count, and those who can't"
|
|
|
|
Joined: Sep 2009
Posts: 95
journeyman
|
journeyman
Joined: Sep 2009
Posts: 95 |
Love it man!
Thanks!
It is awesome...
TOM!
|
|
|
|
Joined: Aug 2009
Posts: 29
newbie
|
newbie
Joined: Aug 2009
Posts: 29 |
Thank you for this cool little widget it is a hit on my forum. In my gallery the post containing pictures #4,5,6,7, & 8 was deleted and this code is looking for those numbers. Of course the island displays a Red X since the photos no longer exist. I have manually loaded picture thumbs with these numbers and elimited the Red X but of course when displayed you can not follow the photo by clicking on it as no post is associated with it. Also when doing permission checks the gallery/thumbs directory now fails the check. Should I be concerned with my work around solution? Should I remove the photos and just live with the Red X or can I somehow change the code to exclude #4-8 in the random sort order? Have a Great Day Jay
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
There was a bug in older versions where the entry in the FILES table wouldn't get deleted. Your solution is probably the best workaround for the time being.
In version 8 we'll be introducing a bunch of new maintenance tools that will go through and clean up things like this (removing orphaned attachments, table entries, etc.)
|
|
|
|
Joined: Jun 2006
Posts: 319
Enthusiast
|
Enthusiast
Joined: Jun 2006
Posts: 319 |
Here's a quick little "random image" custom island that can be used/modified. Just displays a single random image that links to the the actual gallery post:
/* PHP CODE HERE */
$query = "
select POST_ID,FILE_DIR,FILE_NAME
from ubbt_FILES
where FILE_DIR <> ''
order by rand() limit 1
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);
list($postId,$fDir,$fName) = $dbh->fetch_array($sth);
/* BODY HERE */
$body = <<<EOF
<div style='text-align: center'>
<a href="{$config['BASE_URL']}/ubbthreads.php?ubb=showgallery&Number=$postId">
<img border="0" src="{$config['BASE_URL']}/gallery/$fDir/thumbs/$fName" />
</a>
</div>
EOF;
Rick, How do you get the images to change more frequently with the code you have supplied please.
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
Change the Cache time to 1 min a 0 makes it static Just done mine so i'm guessing but seems to be right
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
Yep, I have mine set for 10 minutes.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
Is there away to exclude a Gallery? From the Randomize?
There is a Members Gallery and they all look pretty Rough, i'm afraid they could frighten new members off lol
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Dec 2003
Posts: 6,562 Likes: 78
|
Joined: Dec 2003
Posts: 6,562 Likes: 78 |
I am no sql expert but the query near the top has a greater than less than for a file directory. So it should be a simple say add the forum number in the quote to exclude 1.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Mors),
833
guests, and
197
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|