View Full Version : Link to a specific / random photo ?
November 5th, 2002, 02:30 AM
Hi, I have a question:
if photopost is in use, is it possible to display a specific and/or random photo - with description - on e.g. the homepage of a site ?
is it possible to link to a specific photo e.g. to a specific news item ?
thanks for any help,
November 5th, 2002, 08:06 AM
Yes, with a little php code that can be done. Check out my site:
I have it pull a random thumbnail and display it. Then its clickable to take you to the photopost page. this hack was done by someone here, and I'm sure it could be done for any system you are running.
November 5th, 2002, 06:38 PM
I'd also like to post a random Photopost image on the front of my Web site. Do you have the code available to copy into this thread by any chance?
I'd also like to be able to put say the latest 3 pictures into the standard html page that is the front of the site etc too, but haven't found out how to do so yet. I assume the upload PHP instructions could make it write a given number of the latest pictures to a file, and this could then be displayed in an iframe on the front of the Web site - anyone have any code like that I wonder..
I did look at your site to see the random picture on the front page etc, but there didn't seem to be one.
November 6th, 2002, 11:25 AM
Oops, I think I turned the random picture thing off on accident. haha thanks for pointing it out, I need to fix that.
But basically, doing things with photopost is very simple if you have any php/mysql knowledge. Basically, in the photopost database you have all of the data which point to pictures in the data directory. So, all you need to do is have some code to execute a MySQL query to collect the data you want (such as 3 most recent photos) and then use the php code to display the output in HTML.
That's what is great about photopost, is the way its setup and with the database it is easy to write code to get almost any kind of result you could want. The key is knowing how to code a little or knowing someone who does :)
November 6th, 2002, 01:17 PM
....or asking someone who is already doing it and who is a Moderator on the Software Company BBS if they will put up the code for one and all to use... :)
Thousands of us all doing the same work would be pointless, hence why most of us are here, to share tips and code and ideas etc.
November 6th, 2002, 03:16 PM
The code is listed in the hacks section of this forum. But you can only see that if you have purchased the software and have logged in. You may be able to see some similar photopost type integrations at www.threadsdev.com as there are a few topics dealing with how to do some things with it as well.
November 6th, 2002, 04:34 PM
Yes, I'm current and registered and have seen the old rambling discussions etc.
I was just after a nice clean current file that is known to work with the current Photopost and produces a random image or the latest images for use on a normal Web page.
I assumed someone would be running one and would be happy to share it here... I'm really surprised that seems not to be so at present and that nobody seems to be doing it, most Photopost sites could gain from such a util being widely available you'd think.
I can probably chop bits out of one of the PHP files of the program itself and make it run and just save what I need to a file, but it seems such a waste of time if others here have it working and could just make the code available.
November 6th, 2002, 10:52 PM
As msula said:
Look for the "thumbincluder11.txt" file.
November 7th, 2002, 03:13 AM
Thanks for the link.
I have seen that large thread in the past, to me it reads as 3 pages of people trying to get versions that work for them and heaps of people commenting they can't get it to work as they want and uploading tweaked versions etc etc - a lot of the final messages read that some people are giving up perhaps. Also the talk of it being done to work with the code of the time and of the need to backup your database and so on and so forth doesn't fill me with confidence that any one piece of code in there is going to just work.
I did look at some of the sites that say they got it to work just now when I saw your link, none I looked at has it running now it seems so I presume they all had problems with it.
Putting something into my system that seems like it might not work and that might even do harm is not really what I'm looking for.
I was trying to find someone running something with the current version of Photopost that works, and where they would be willing to simply share the code they are using - then it is a safe bet for me to alter a few paths and run it.
I guess nobody here is actually doing it from the replies so far, even those who think they are seem to not have it working etc as you've seen :).
I think the ability to promote the Photopost area on normal Web pages/front pages of sites by showing latest pictures or random pictures or most downloaded pictures is such a useful one for both customers and for the promotion of Photopost itself that this might warrant an official util or even its inclusion in the main program - 'generate external page for : latest, most downloaded, random' - that generates a new page or pages each time there is an upload or similar perhaps.
Picking up the html page generated would be simple with an iframe.
Anyway.. if nobody has anything that they want to share running at this moment with the current Photopost then I guess I should probably forget that idea until something fresh pops up here. Thanks for replying anyway.
November 8th, 2002, 04:14 PM
Steve, I use thumbincluder11.txt. I have no problems with it. It does not make any changes to the database. The recommendation to backup your database is just that. It is always a good idea to make a regular backup of your db and special backups whenever you make changes or upgrade.
See here - http://www.fordf150.net/
November 8th, 2002, 06:09 PM
Many thanks, it seems to be working well on your 3.1.1 site which increases my confidence in it no end.
Nice site too..!
All the best from London,
June 24th, 2004, 04:19 PM
I have search and search this message base tring to find a simple way to include a random picture from a subcat in my pictures area. There must be some simeple code to include on a *.shtml file. I have found the following but no where can I find the file random.php ....
<iframe src="http://www.yoursite.com/random.php" width="500" height="300" scrolling="no" frameborder="0">
June 28th, 2004, 06:28 PM
I have visited the forum and read the posts to get the thumbincluder11.txt file to put random images on my home page. My problem, I don't see anywhere to "download" this file to look at and use! I am not very familiar with these types of boards, so I may be missing it somewhere, but if someone could point me in the direction to download this file and instructions I would appreciate it. I am a registered user
September 24th, 2005, 09:33 PM
Using the current version of photopost (v5.14) is there an easy way to have your most recent picture show on the home index page of one's website if the home page is just a simple HTML page?
Resurrecting this thread,
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.