View Single Post
Old March 3rd, 2006, 10:55 AM   #7 (permalink)
firstrebel
Member
Verified Customer
 
firstrebel's Avatar
 
Join Date: Jan 2003
Location: London
Posts: 267
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