PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro How Do I...?

Photopost Pro How Do I...? Wondering how to do things in PhotoPost?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old March 3rd, 2006, 05:33 AM   #1 (permalink)
Junior Member
Verified Customer
 
Join Date: Feb 2006
Posts: 5
Smile Include recent photos from photopost on my main website

My photopost is installed in a subfolder /photo/ on my website.

I would like to somehow include the "recent photos"-section from photopost into my mainsite. What is the easiest way to do this?

Regards
Christian M
pvideo is offline   Reply With Quote
Old March 3rd, 2006, 08:50 AM   #2 (permalink)
Member
Verified Customer
 
firstrebel's Avatar
 
Join Date: Jan 2003
Location: London
Posts: 265
There are a couple of threads on this over the past few days if you look back. One covers single photo display and the other covers the block using inc_features.php that comes with photopost.

Bob
__________________
Robert Isaac

www.volvogallery.org.uk
firstrebel is offline   Reply With Quote
Old March 3rd, 2006, 09:51 AM   #3 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
Yep in the mods forum there are a couple photo blocks posted
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old March 3rd, 2006, 09:53 AM   #4 (permalink)
Member
Verified Customer
 
Join Date: Feb 2005
Posts: 393
Your main site is part of the vBulletin, just a webpage or some CMS?
DefenceTalk.com is offline   Reply With Quote
Old March 3rd, 2006, 10:02 AM   #5 (permalink)
Member
Verified Customer
 
firstrebel's Avatar
 
Join Date: Jan 2003
Location: London
Posts: 265
Quote:
Originally Posted by DefenceTalk.com
Your main site is part of the vBulletin, just a webpage or some CMS?
Our main web site homepage is not part of the forum nor gallery - www.volvoclub.org.uk/index.php

That uses the block from photopost/inc_features.php and is really good. I use this on the vB forum as well. The other web site pages use the single random code as it works on shtml pages as well as php pages. I can't get the inc_features.php to work on our shtml pages, but have changed them to php pages where I want the block to appear.

Bob
__________________
Robert Isaac

www.volvogallery.org.uk
firstrebel is offline   Reply With Quote
Old March 3rd, 2006, 10:08 AM   #6 (permalink)
Junior Member
Verified Customer
 
Join Date: Feb 2006
Posts: 5
My mainpage is just a website written in html and using php.
pvideo is offline   Reply With Quote
Old March 3rd, 2006, 10:55 AM   #7 (permalink)
Member
Verified Customer
 
firstrebel's Avatar
 
Join Date: Jan 2003
Location: London
Posts: 265
Quote:
Originally Posted by pvideo
My mainpage is just a website written in html and using php.
If the page extension is .php then you can use the inc_features.php block. Put this code on your web page where you want the block to be
Quote:
<?php include('photopost/inc_features2.php');
echo "$photopostfeature"; ?>
Change the path to inc_features.php to suit your set up. You will need to edit inc_features.php like this:
Uncomment these two lines near the beginning of the file and fill in your hostname/username/password/photopost db name:
Quote:
$link = mysql_connect ("hostname", "username", "password") or die('I cannot connect to the database.');
mysql_select_db ("photopost_db_name")or die("Could not select photopost database");
Then change this (it's near the bottom of the file):
Quote:
$photopostfeature = <<<PPPRINT
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%">
<thead>
<tr>
<td class="tcat" colspan="$columns" align="center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('featurepal');"><img id="collapseimg_featurepal" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_featurepal].gif" alt="" border="0" /></a>
Featured Photos from our Gallery
</td>
</tr>
</thead>
<tbody id="collapseobj_featurepal" style="$vbcollapse[collapseobj_featurepal]">
<tr>
$featured
</tr>
</tbody>
</table>
You will need to remove or change the 'class' and other bits of html that relate to the box the photos would appear in in the gallery or vB forum. Or if you want that same box display you could call the css that is used for this, or replace it with your own css. I used my own box to match the rest of the page so I changed the above to:
Quote:
$photopostfeature = <<<PPPRINT
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>
<table cellspacing="1" border="0" width="100%">
<thead>
<tr>
<td align="center">
</td>
</tr>
</thead>
<tbody id="collapseobj_featurepal" style="$vbcollapse[collapseobj_featurepal]">
<tr>
$featured
</tr>
</tbody>
</table>
</td>
</tr>
</table>
It's a bit quick and crude but it was OK to start with. I will tidy it up when I get time. I then put the code in the second QUOTE above inside my box to get the photos to appear within my own box.

You will notice also I changed the file name to inc_features2.php. I did this as my vB forum uses inc_features.php also, and changing the code for the box would have broken the box display in my forum.

Hope this all helps.

Bob
__________________
Robert Isaac

www.volvogallery.org.uk
firstrebel is offline   Reply With Quote
Old March 3rd, 2006, 01:09 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
PHP code will only be parsed in files that your apache config is set to parse PHP files. Thus by default on most sites this is going to be a file with extention php, php3 or phtml extention only.

If you clone the inc_features file as firstrebel has shown and alter the html to your needs it will work quite well if you change your homepage to a php page and echo out html

For your normal html code here is an example as you need to echo and print html

sample PHP file

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old March 4th, 2006, 05:19 AM   #9 (permalink)
Junior Member
Verified Customer
 
Join Date: Feb 2006
Posts: 5
I have tried to follow your example above, but I dont get any output. It connects fine to the database, and dosent give any parse errors, but as I said I dont get any output with the pictures only the table itself. This is the html output I get:

Code:
Content visible to verified customers only.

This is what my inc_features.php looks like:

Code:
Content visible to verified customers only.
Thanks.
pvideo is offline   Reply With Quote
Old March 4th, 2006, 05:38 AM   #10 (permalink)
Member
Verified Customer
 
firstrebel's Avatar
 
Join Date: Jan 2003
Location: London
Posts: 265
I am not sure if you are asking about my post or Chuck S's post. Please clarify.

Make a file and put this in it:

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Photopost block test</title>
</head>

<body><?php include('photopost/inc_features.php');
echo "$photopostfeature"; ?>
</body>
</html>
Save it as test.php. Make sure the path to your inc_features.php file is correct. Upload it to your web site and then run the URL www/yourdomain.com/test.php and see what appears.

You should get something like this:

www.volvoclub.org.uk/test.php


Bob
__________________
Robert Isaac

www.volvogallery.org.uk
firstrebel is offline   Reply With Quote
Old March 4th, 2006, 07:13 AM   #11 (permalink)
Junior Member
Verified Customer
 
Join Date: Feb 2006
Posts: 5
Stil blank.

This is what I get

http://pvideo.dk/test3.php
pvideo is offline   Reply With Quote
Old March 4th, 2006, 07:25 AM   #12 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,070
You might want to remove the vbulletin usergroup viewing permissions stuff

Code:
Content visible to verified customers only.
and this


Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old March 4th, 2006, 07:37 AM   #13 (permalink)
Junior Member
Verified Customer
 
Join Date: Feb 2006
Posts: 5
That did the trick. Thanks mate!
pvideo is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
integrating photopost to my website template gettingbuilt Photopost Pro Installation & Upgrades 9 August 3rd, 2007 11:58 PM
How do I include only member gallery photos in featured photos dlangley Photopost Pro How Do I...? 4 April 30th, 2005 10:25 AM
Recent Photos and not Main Gallery bicpm Photopost Pro How Do I...? 1 April 7th, 2005 08:44 AM
How to make `Recent Photos' work like view all recent pics? mjm Photopost Pro How Do I...? 1 February 3rd, 2005 01:54 PM


All times are GMT -5. The time now is 11:41 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0