 | |  | | | Photopost Pro How Do I...? Wondering how to do things in PhotoPost? |
February 3rd, 2006, 06:28 PM
|
#21 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2006
Posts: 20
|
Chuck,
Ok say I make a html filed called test.html
I will stick in Quote:
<?
echo <<<HTML
SOME GOES HERE
HTML;
include('../photoalbums/htdocs/inc_features.php');
echo "$photopostfeature";
echo <<<HTML
maybe some more html here
HTML;
?>
| Now, it should work correct? http://www.disneypost.com/test.html
I get nothing. Now my inc_features.php is located in photoalbums/htdocs/
|
| |
February 3rd, 2006, 07:45 PM
|
#22 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
The file I noted above is a PHP file not an HTML FILE
|
| |
February 4th, 2006, 01:13 PM
|
#23 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2006
Posts: 20
|
Ok, I created this file called test.php with Dreamweaver.
I included the code below. Why doesn't it work. Chuck, I am very frustrated to get this work. Thank you for your help. Quote:
<?
echo <<<HTML
SOME GOES HERE
HTML;
include 'http://photoalbums.disneypost.com/inc_features.php';
echo "$photopostfeature";
echo <<<HTML
maybe some more html here
HTML;
?>
| |
| |
February 4th, 2006, 02:02 PM
|
#24 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
include is a server path not html and it would be like this
include('../photoalbums/htdocs/inc_features.php');
make sure to put the proper server path there and then post a link to test.php
|
| |
February 6th, 2006, 11:33 AM
|
#25 (permalink)
| | Member Verified Customer
Join Date: Jun 2005
Posts: 34
| Quote: |
Originally Posted by Chuck S thirtytwo You can edit inc_features.php directly if not using it elsewhere. Otherwise a copy is fine as long as you place the proper path to config-int.php in there. | Thanks, man! I duplicated inc_features.php and am calling it out. But the PHP page (outside of Vb or PP) where I'm calling it out is throwing up three errors from the inc_features.php page I'm using. And I edited the inc_features.php page as you suggested.
Errors: Quote:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/dirtragm/public_html/gal/inc_features2.php on line 49
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/dirtragm/public_html/gal/inc_features2.php on line 63
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/dirtragm/public_html/gal/inc_features2.php on line 115
| I can't seem to ID what the problem is in those lines. Thanks!
|
| |
February 6th, 2006, 02:25 PM
|
#26 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Well make sure if your trying to access a database in some non database program you uncomment the $link and mysql_select_db lines at the top of the file and put the proper database info for photopost there.
|
| |
February 6th, 2006, 03:08 PM
|
#27 (permalink)
| | Member Verified Customer
Join Date: Jun 2005
Posts: 34
| Quote: |
Originally Posted by Chuck S Well make sure if your trying to access a database in some non database program you uncomment the $link and mysql_select_db lines at the top of the file and put the proper database info for photopost there. | Fantastic! I got it to work. The only problem is now a database connection (unrelated to PhotoPost) below where I call out the PhotoPost featured image is now broken. I tried closing everything on inc_features.php, but nothing seems to work. Any ideas?
Thanks so much!
|
| |
February 6th, 2006, 03:09 PM
|
#28 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
You uncomment the mysql_select_db at the bottom of the script and put in the name of the database that your using on that page |
| |
February 6th, 2006, 03:14 PM
|
#29 (permalink)
| | Member Verified Customer
Join Date: Jun 2005
Posts: 34
| Quote: |
Originally Posted by Chuck S You uncomment the mysql_select_db at the bottom of the script and put in the name of the database that your using on that page  | Cool! I tried that before, but didn't work. I just completely called out the WHOLE connection again, and we're working fine. Thanks so much!!!!
|
| |
February 6th, 2006, 07:07 PM
|
#30 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2006
Posts: 20
|
Ok.. I made the file test.php with code Quote:
<?
echo <<<HTML
SOME GOES HERE
HTML;
include('../photoalbums/htdocs/inc_features.php');
echo "$photopostfeature";
echo <<<HTML
maybe some more html here
HTML;
?>
| I get nothing.
Here is the link http://www.disneypost.com/test.php |
| |
February 6th, 2006, 08:58 PM
|
#31 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Did you remove the viewperms as noted earlier in this thread. Your getting the code just no photos
|
| |
February 6th, 2006, 09:06 PM
|
#32 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2006
Posts: 20
|
Yes, I removed the code, as you stated.. now Chuck, could it be this.
my photopost is located in --> http://photoalbums.disneypost.com
and I am running the php from ----> http://www.disneypost.com
which means it trying to look for my inc_features.php in
http://www.disneypost.com/photoalbums/htdocs/inc_features.php' ??
|
| |
February 6th, 2006, 09:09 PM
|
#33 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2006
Posts: 20
|
Chuck, I got go it to work with
<?php
$host = xxxx;
$dbUser = 'xxx';
$dbPass = 'xxx';
$db = 'xxxxx';
mysql_connect("$host", "$dbUser", "$dbPass") or die(mysql_error());
mysql_select_db("$db") or die(mysql_error());
$result = mysql_query("SELECT id,cat,bigimage FROM pp_photos order by rand() LIMIT 4" ) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
print "<a href=\"http://photoalbums.disneypost.com/showphoto.php?photo=" . $row['id'] . "\"><img src=\"http://photoalbums.disneypost.com/data/" . $row['cat'] . "/thumbs/" . $row['bigimage'] . "\" border=\"0\"></a>";
}
?>
For some reason.
|
| |
February 6th, 2006, 09:09 PM
|
#34 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
You removed this? Code: Content visible to verified customers only.
Your getting no $featured printed at all in the page
Use whatever code you want that works for you.
|
| |
February 6th, 2006, 09:13 PM
|
#35 (permalink)
| | Junior Member Verified Customer
Join Date: Jan 2006
Posts: 20
|
Yes I removed
if ( $ViewPerm[$pcat] == 1 ) continue;
ummm.. Chuck, is it my path? are you sure I can't use a http:// instead of a path?
|
| |
February 6th, 2006, 09:21 PM
|
#36 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
You do not use a url in the place of a path.
If your concerned about your path just put the full server path to the file instead of ..
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 11:18 AM. | |