Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
#260193 10/08/2003 9:28 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay this is a modification from code posted here based on Michael Pierce's main index hack which pulls Photopost on the main page. I have been using this for quite a while and made a multiple photo pal for my site which many people have requested so here you go.
Attachments
96544-photopal1.3.zip (0 Bytes, 420 downloads)

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
thank you


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
thank you again, was finally able to get around to installing this last night, works very well


- Allen wavey
- What Drives You?
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Also while we are at it..

in the photopal 1.3 mod the only lines I changed were in

costombox3.php
[] require ("/home/scroungr/public_html/ubbthreads/photopost.inc.php");[/]

and photopost.inc.php
[]$url_path = "http://www.couch-tomatoe.cc/photopost/data/3003/"; //URL of your photo album, where the index.pl is (with / at end)
$data_dir = "http://www.couch-tomatoe.cc/photopost/data/3003/"; //URL of your photo dir where those jpeg stored (with / at end)
[/]

and my query fails everytime.. I cannot find the gallery directoy which according to that mod has a index.pl now only thing I do find is the data directory which has the gifs under them...

Any clearer information as to what these should be set to would be helpfull..

234234 #260197 10/26/2003 12:14 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Scoungr,

I see your problem without blinking

$url_path = "http://www.couch-tomatoe.cc/photopost/data/3003/"; //URL of your photo album, where the index.pl is (with / at end)

It asks you here the directory to your scripts not your data directory. You should have this set to this

$url_path = "http://www.couch-tomatoe.cc/photopost/"; //URL of your photo album, where the index.pl is (with / at end)


Now as far as your query failing I would recheck your mysql access information. Did you edit the prefix variable right under the path to the include file in the pal box?

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Thanx Will have to check.. I might have had another brain fart it was late. good thing they turned the clocks last nite

234234 #260199 10/26/2003 2:30 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Just wanna check a few more things in

photopost.inc.php should it read

[]
$data_dir = "http://www.couch-tomatoe.cc/photopost/data/3003/"; //URL of your photo dir where those jpeg stored (with / at end)[/]

or

[]
$data_dir = "http://www.couch-tomatoe.cc/photopost/data/"; //URL of your photo dir where those jpeg stored (with / at end)
[/]

and in custombox3pal.php should the following change?

[]
<?
require [:"red"]("/home/scroungr/public_html/ubbthreads/photopost.inc.php");[/]

//
// Featured Photos Code
// Follow down to End Feature Photos Code
//

$Globals['pp_db_prefix'] = "[:"red"]w3t_[/]";

// leave blank for no customization, otherwise list cats you only want images to appear from
$forcats = "";

// which type of images do you want to show
$q_switch = "random";

switch ($q_switch) {
case "most_view":
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM {$Globals['pp_db_prefix']}photos WHERE bigimage!='' AND approved='1' $forcats ORDER BY views DESC LIMIT 5";
break;
case "lastest":
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM {$Globals['pp_db_prefix']}photos WHERE bigimage!='' AND approved='1' $forcats ORDER BY date DESC LIMIT 5";
break;
case "random":
$query = "SELECT id,user,userid,cat,title,bigimage,views FROM {$Globals['pp_db_prefix']}photos WHERE bigimage!='' AND approved='1' $forcats ORDER BY RAND() DESC LIMIT 5";
break;
}

$result = mysql_query($query)or die("Query failed");

echo <<<UBBTPRINT
$tbopen
<tr class="darktable">
<td class="tdheader" align="center">
Featured Photos
</td>
</tr>

UBBTPRINT;

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$photo = $line["bigimage"];
$photolen = strlen($photo);
$photo_name = substr($photo, 0, -4);
$theext = substr( $photo, $photolen-3, $photolen);

print "<tr><td align="center" class="lighttable">";
print "<br /><a href="". $url_path ."/showphoto.php?photo=". $line["id"]. "">";
$temp_user = ($line["userid"]);

$img_width = $imgsize[0];
$img_height = $imgsize[1];
print "<img border="0" src="".$data_dir.$line["cat"]."/".$line["userid"].$photo_name."-thumb.$theext" alt="" />";
print "</a><font size="1" face="verdana,arial">";

if ($q_switch == "most_view") {
print "<a href="". $url_path ."/showphoto.php?photo=". $line["id"]. "">".$line["title"]."<br />".$line["views"]." times</a><br /></font><br />";
} else {
print "<a href="". $url_path ."/showphoto.php?photo=". $line["id"]. ""><br />".$line["title"];
print "</a><br />by ".$line["user"]."</font><br />";
}

print "</td></tr>";
}

mysql_free_result($result);

echo <<<UBBTPRINT
$tbclose
<br />
UBBTPRINT;

//
// End Featured Photos Code
//

mysql_select_db('[:"red"]DATABASE[/]') or die("Could not select database '[:"red"]DATABASE[/]'\n");

?>
[/]

Should I be putting my photopost or my ubbthreads database where it says 'DATABASE' or leave it the way it is?

234234 #260200 10/26/2003 5:20 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay Let me go down your list

this is correct

$data_dir = "http://www.couch-tomatoe.cc/photopost/data/"; //URL of your photo dir where those jpeg stored (with / at end)

<?
require ("/home/scroungr/public_html/ubbthreads/photopost.inc.php");

//
// Featured Photos Code
// Follow down to End Feature Photos Code
//

$Globals['pp_db_prefix'] = "w3t_"; <<<<THIS DOES NOT SEEM RIGHT

You would set this to whatever prefix your photopost install has if any. If your tables read settings photos etc etc without a prefix this is set to blank. This is not set to your forums prefix which you have it set to unless you made the prefix to photopost this.

and the last line as I stated in the instructions. On most hosts expecially when using the sidebar you need to fill in the database for threads here since you will get errors if you do not have this line in there. DATABASE is set to your forums database.


Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Cool thanx Got it to Work Just had to change that last DATABASE Line to the ubbthreads one and yeah I set the photopost to w3t_ to be similiar to threads Thanx for all your help I can style it from here like now I wanna take out that link so they can't click and get to the graphics page

234234 #260202 11/04/2003 4:28 PM
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Omegatron,

Does this mod pull photos out of private member albums also? I would hope not

Sponsored Links
luan #260203 11/04/2003 4:55 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Well don't know I have to look at it. It randomly pulls images. There is some code that can be added to restrict it to display only specific cats if you want.

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I'm up to over 30 categories, so maybe it would be easier to exclude any category in the 3000s, which I think are the Personal Albums.

luan #260205 11/05/2003 1:15 PM
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
FYI, it DOES pull images from Private Albums

luan #260206 11/05/2003 1:18 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Which is NOT always a good thing since alot of people often UPLOAD things they don't want any but a few select to see

234234 #260207 11/09/2003 11:30 AM
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
In 4.1 and below you would need to add cat < 3000 for private albums to be ignored. In 4.5 (now in beta), you would need to check for cattype='c'

gailg #260208 11/10/2003 3:30 PM
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Do I just add this anywhere to the pal .php file?

luan #260209 11/10/2003 6:15 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
That would be added in the queries AFTER THE WHERE statement in the query place the following depending on version

AND cat < '3000'

AND cattype='c'

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
I've found an issue with using this Pal...

Members thumbnails from their 'Private Albums' will show up in in this Pal.

However, once you click on the thumbnail that is marked as Private, PhotoPost will pick up on it at that point and prompt the user to:

Password Required
This forum requires a password for access!


Anyway to fix this so that a member's Private Albums with thumbnails will not be viewable in this Pal?

I've taken this Pal offline until I can get this fixed.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Easily fixed download it again

Joined: Sep 2000
Posts: 49
Power User
Power User
Offline
Joined: Sep 2000
Posts: 49
Hey Chuck I get only the Pal table header saying "Featured Photos" but it doesn't pick up any photos.

My photopost.inc.php has:
$url_path = "http://www.domain.com/threads/photopost/";
$data_dir = "http://www.domain.com/threads/photopost/data/";

...and my database name and user info below that.


My customboxpal has:
require ("/home/myaccount/public_html/threads/photopost/photopost.inc.php");

...and my photopost prefix info ($pp_db_prefix = "jopho_";) plus my database name at the bottom (my photopost database and my threads database are the same)

Any suggestions?

Last edited by deltajo; 01/10/2004 5:03 PM.
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I would double check your path and user information. This is the exact same thing I use on my site as long as your access info is correct all should be good.

icewind #260214 01/11/2004 11:09 PM
Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
Chuck, I don't know if there's something I did wrong when I applied the changes you made....or if there's something wrong in the code.

Can you please just verify that the code is correct?

Thanks...

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
worked well for me, thank you


- Allen wavey
- What Drives You?
Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
[]AllenAyres said:
worked well for me, thank you [/]

When did you install this? If you installed it prior to January 6th then that's the same code I had as well and I had no problems with it....it's only after the changes were made on the 6th with the code that I'm having troubles with.

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
In the instructions for photopost.inc.php where it reads:

[:"red"]//URL of your photo album, where the index.pl is (with / at end)[/]

Is this a misprint because I don't know where this file is. I am assuming, and that's usually where I go wrong, that it's to read index.php (inside the PhotoPost directory).

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I installed it a few minutes ago

http://www.fiebre.com


- Allen wavey
- What Drives You?
Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
Okay interesting....

With this pal in place (I left the name of it as custombox3pal.php and overwrote the default file) on the left of the page layout...I get the same error in the center and right side of the page layout:

[]http://members.cox.net/gonzo_family/misc/IIP_1.gif[/]

[]http://members.cox.net/gonzo_family/misc/IIP_2.gif[/]

This is what's on line 133 of mysql.inc.php:

$this->row = mysql_fetch_array($sth);

As I move this integrated pal into the middle of the page, the same error gets less. And as I move this pal into the right side of the page layout, the error is gone but I do get a little error note on the bottom left corner:

[]http://members.cox.net/gonzo_family/misc/IIP_3.gif[/]


My PhotoPost database is not inside of my Threads database. I made a seperate database just for the PhotoPost.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
mine too... did you remember to edit the bottom of the custompal3.php file to point back to your forum's database?


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
What you reported is not the error.

The real error is "Error only visible to Admins".

Check your admin logs for the real error, and that'll give us a clue.

That line 133 thing is an error whenever a query has failed. But what we realy need to know is the error its hiding.

Daine #260222 01/12/2004 10:38 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Exactly what Allen said

Photopost/Reviewpost cause havoc when used in IIP and the sidebar you must always switch back to the threads database.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
suggestion: rename the custompal3.php to custompalx.php to prevent me from overwriting someone's already in use custompal3

I had renamed it to custompal7 but accidently clicked on the old one after opening an ftp connection smirk I don't have a backup either Users will still need to rename it to something else, but there won't be a custompal3 sitting on their harddrive to overwrite another one


- Allen wavey
- What Drives You?
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I am up to custombox90000pal.php already...

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
[]AllenAyres said:
mine too... did you remember to edit the bottom of the custompal3.php file to point back to your forum's database? [/]

Grrrr....hate when that happens!

Figures it was something simple that I was overlooking.

Thanks guys.

Joined: Sep 2000
Posts: 49
Power User
Power User
Offline
Joined: Sep 2000
Posts: 49
It's odd...... on mine, I found I couldn't get this to work unless I commented-out the last line. When I put my forum database name in there, it stopped working. The only problem I've found is that the Max Online in the ShortStats Pal (which is below the PhotoPost Pal along with other Pal boxes) doesn't convert the Unix time into normal time. Or at least I think that's the only problem.

I also tried adding above the last line:
mysql_connect ('localhost', 'name-of-my-database', 'password');
...and that worked just the same as when the last line is commented-out.

icewind #260227 01/14/2004 12:10 PM
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I'm also allowing multimedia uploads (short movies) in photopost and this causes a "N/A" in my Photopost Pal.
Any idea how I could prevent this ?

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Any idea what might be causing this? >>>

As soon as I activate my Photopost Pal in IIP, my status box gets messed up.

I also tried this with a different user and the same problem occurs (with that same 'p')

The statusbox shout read:
... you as Pasqual (Pasqual), Administrator, with 513 posts. You have 255 (0 new) private messages.


When I switch it off, statusbox is ok.
Attachments
105148-status.jpg (0 Bytes, 313 downloads)

Last edited by Pasqualist; 01/14/2004 6:01 PM.
10k #260229 01/17/2004 12:26 PM
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
How do I get this to have the same background color as the rest of the PAL boxes? The previous version of this pal box was that way. I'm not a big fan of the white background.
http://www.laondalatina.com

Last edited by donJulio; 01/17/2004 12:27 PM.
luan #260230 01/17/2004 12:44 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
No biggy

find this bgcolor="#FFFFFF" and change to class="lighttable"

Now the select database command at the bottom will be required by about 99% of people out there otherwise you get error's

Now as far as your error Pasqualist I found that and there is always some sort of bizarre behavior when selected between databases I assume. While this does not wreak havoc with threads it does tend to play a little bit with IIP. Now given the fact that I love Photopost etc I just tweaked by loginpal.php file as bit. I can post it here if you like.

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Omegatron,

I realy love this photopost pal so I would realy appreciate it if you could post your tweaked version of loginpal.php!

Thank you very much

10k #260232 01/17/2004 9:08 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
OKay here you go
Attachments
105496-loginpal.txt (0 Bytes, 172 downloads)

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)