Latest image copied to fixed place on server?
|
m_c
Joined: 2008-03-07
Posts: 4 |
Posted: Sun, 2008-05-11 17:54
|
|
I've been trying to get a latest image block to work on vBulletin/vBadvanced for a while, but no combination of modules/code I've tried so far works. So, I've been thinking about it for a while, and was wondering if a module/option exists that would copy the thumbnail of the latest uploaded pic to a fixed location/name on the server? |
|
| Login or register to post comments |

Posts: 973
This module should satisfy. Install it ("lastuploaded") and use it as follows (barring typos)
http://yourdomain.com/main.php?g2_view=lastuploaded.LastUploadedwill give you the thumbnail of the last photo item in the db, and
http://yourdomain.com/main.php?g2_view=lastuploaded.LastUploadedLinkwill give you a link to the item page for that item.
So you should be able to include html like this:
<a href="main.php?g2_view=lastuploaded.LastUploadedLink"><img src="main.php?g2_view=lastuploaded.LastUploaded"></a>to include the thumbnail *and* make it a link to the item page.
Let me know if there are any problems.
Posts: 4
That's done the trick for now.
Although I just linked to the latest uploads dynamic album, as the gallery runs in embedded mode, and that code supplies the a link to the unembedded version.
I now just need to find someway to get a random image using a similar method, as vBa doesn't like the image block way (the @readfile won't work in vBa modules).
Would it be possible to modify the lastupload plug-in to select a random pic instead?
I've just had a quick look, and it looks as though it's just the query part that would need to be altered.
Posts: 10113
I have created a codex page: http://codex.gallery2.org/Gallery2:Modules:lastuploaded
please feel free to update. Documentation for the users, by the users.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team