Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Joined: Jan 2003
Posts: 263
Member
Offline
Member
Joined: Jan 2003
Posts: 263
Omegatron,

I used your modified file, but it didn't work for me. Changing the position of the photopostpal did solve the problem!

Sponsored Links
Joined: Feb 2002
Posts: 950
P
Hacker
Offline
Hacker
P
Joined: Feb 2002
Posts: 950
> Photopost/Reviewpost cause havoc when used in IIP and the sidebar you must always switch back to the threads database.

For a while I had mine running this way and added mysql_select_db()'s to the end of my PALs. I finally merged my db's into the Threads one simply to avoid the overhead of switching databases.

gailg #260235 01/19/2004 4:06 PM
Joined: Apr 2001
Posts: 3,266
O
Member
OP Offline
Member
O
Joined: Apr 2001
Posts: 3,266
Yup moving the databases into one will correct it.

Joined: Jun 2002
Posts: 670
D
Code Monkey
Offline
Code Monkey
D
Joined: Jun 2002
Posts: 670
[]Omegatron said:
Easily fixed download it again [/]
Does this keep the pal from pulling photos from ALL users albums, or JUST their personal ones? If it's just personal ones, can you edit this pal for me to not pull any photos at all from users albums? I would appreciate that Omegatron

luan #260237 01/27/2004 5:48 AM
Joined: Apr 2001
Posts: 3,266
O
Member
OP Offline
Member
O
Joined: Apr 2001
Posts: 3,266
DonJulio

No biggy place this in the queries after the where clause

AND c.cattype = 'c'

I need to update this and a few others time permitting.

Sponsored Links
Joined: Jun 2002
Posts: 670
D
Code Monkey
Offline
Code Monkey
D
Joined: Jun 2002
Posts: 670
This pal box doesn't seem to be playing very nicely with my UBBThreads/PhotoPost integrated index mod. Take a look here:
http://www.laondalatina.com/foros/ubbthreads.php?Cat=0&C=1

I get this error: []
Fatal error: Cannot redeclare pp_get_ext() (previously declared in /home/laondal/public_html/foros/pals/custombox2pal.php:6) in /home/laondal/public_html/foros/templates/default/ubbt_photopost.tmpl on line 15 [/]

What do I need to do to fix this?

luan #260239 05/12/2004 8:05 AM
Joined: Oct 2003
Posts: 2,305
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
try commenting out the function in the customebox2pal.php since its being defined elsewhere or go in and edit it and in THAT box change the function to pp_get_ext2() and all calls to it.

234234 #260240 05/12/2004 2:51 PM
Joined: Jun 2002
Posts: 670
D
Code Monkey
Offline
Code Monkey
D
Joined: Jun 2002
Posts: 670
Thanks scroungr. I did just that and it almost worked. I just got the same problem with another function in the pal box, but following your "add 2 to the end" algorithm, I have this working correctly now

Thanks!

luan #260241 05/12/2004 3:04 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
np

234234 #260242 05/31/2004 5:59 AM
Joined: Jul 2002
Posts: 19
B
bud Offline
Newbie
Offline
Newbie
B
Joined: Jul 2002
Posts: 19
photopost.inc.php is incorrectly stomping on the $user variable causing subsequent Pals to fail. To correct the issue, change $user to $username on lines 9 and 14.

Sponsored Links
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
I use the following modification to use the stylesheet and display centered in Opera too

custombox3pal.php

replace:
Code
<br />// One box for each feature<br />$featured .= <<<PPPRINT<br /><br />    <tr><td align="center" bgcolor="#FFFFFF" width="20%"><br />        <font size="1" face="verdana,arial"><a href="{$url_path}/showphoto.php?photo={$pid}">$mthumb</a><br />        <br />by {$puser}</font><br />    </td></tr><br />


with

Code
<br />// One box for each feature<br />$featured .= <<<PPPRINT<br /><br />    <tr align="center"><td align="center" class="lighttable"><br />        <a href="{$url_path}/showphoto.php?photo={$pid}">$mthumb</a><br />        <br />by {$puser}<br />    </td></tr><br />

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Worked well on my 6.5, thank you

http://www.cccbmt.org/


- Allen wavey
- What Drives You?
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
your layout of the pal box looks odd in Opera. I attach my version. If you like to use it, rename it to your pal box name, modify the path at the beginning of the script and the DB name ant the end of the script like your old pal box.

This version use the stylesheet and center the images. Looks better on my site.

Attached Images
122975-custombox2pal.php.txt (0 Bytes, 194 downloads)
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
thank you, the font style doesn't need to be there?


- Allen wavey
- What Drives You?
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
the font style is pulled from class="tdheader" and if you have more then one style on your site it changes with the style.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
danke

I added some 'picture frames', does it look ok in opera?


- Allen wavey
- What Drives You?
Joined: Jul 2001
Posts: 808
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
looks good in Opera but different from IE. I have on the right side a vertical bar in deep purple. Maybe another display probblem but it looks 'as is' . It's ok.

Joined: Apr 2001
Posts: 18
S
User
Offline
User
S
Joined: Apr 2001
Posts: 18
Nice hack!!!

How can I make this to work with PhotoPost Classified. I shouldn't be that much difference?

/Stefan

janne #260251 01/05/2005 9:44 AM
Joined: Apr 2001
Posts: 18
S
User
Offline
User
S
Joined: Apr 2001
Posts: 18
Anyone please!

Joined: Aug 2002
Posts: 100
D
Journeyman
Offline
Journeyman
D
Joined: Aug 2002
Posts: 100
Whats the proceedure to get reviews shown on the main page like the photos??? I have tried modifing it to work, but so far has been out of luck.

I get reviews to show on my threads main index, and i have photopost working on my IIP page too, but cant seem to get the reviews to show on the IIP page...

www.atvcanada.ca

Joined: Jun 2002
Posts: 303
Enthusiast
Offline
Enthusiast
Joined: Jun 2002
Posts: 303
I allow my members to have their own albums, which they can upload anything there. But, the main focus of my site is fishing, and the pal was pulling random photos from anywhere so I would end up with non fishing photos being displayed in the pal. To overcome this I went in and added certain photos to the My Favorites feature in Photopost, then altered the query to pull random photos from the list in My Favorites. Works kind of like a "featured" photo and works well. (Actually, a featured photo (a list that the admin ccould create) would be great in a Photopost release. But this is about tha PAL right?

What I was wondering though, is instead of using RAND in my query, I would like it to cycle through each photo in order. In other words, the first page load pulls the first photo in the list, the second pulls the scecond, and so forth. Then when it gets to the end of the list it starts all over. Now you may ask why. Well, it seems that although pulling randomly might seem to work well, I in fact see a lot of the same photos many times more than another, some I haven't seen at all. Hence my desire to ensure that each photo is displayed equally. Any idea how I could do this without modifying the database? Thanks

Joined: Apr 2001
Posts: 3,266
O
Member
OP Offline
Member
O
Joined: Apr 2001
Posts: 3,266
Well you can pull photos in this pal based on random recent or most views.

Adding AND cattype='c' into the query will only pull cat photos not album photos and is a minor edit

As far as adding pagination thats a whole different story yes this is a pal box.

Basically to do something like you want you would need to create a showgallery lite script almost

I have one site http://www.innertraveler.com/publicgallery where I made a pagination featured photo addition

You will see what I mean by showgallery lite that featured photo block displays like the last 240 images with page navigation 24 to a page on there main Photopost index.

If you want a copy of that featured script to play with and modify just let me know.

Joined: Jun 2002
Posts: 303
Enthusiast
Offline
Enthusiast
Joined: Jun 2002
Posts: 303
That's very nice, but not what I'm looking for, though I may want to check it out later.

As far as using the cattype=c, some of my users put all of their photos in their album, where as others just add to the main category. So, in order to display from both I changed the query to pull from my favorites list, then went and added the better pics to my list. I only want on location shots displayed in the PAL see, and some pics are taken after getting home and they're cleaning fish, and some are better than others, etc.

Basically, instead of showing random photos in the PAL, I simply want to display them in order. Am I making any sense? Sometimes I confuse myself.

Joined: Apr 2001
Posts: 3,266
O
Member
OP Offline
Member
O
Joined: Apr 2001
Posts: 3,266
So you want to display all photos in order from recent to oldest.

okay got that

Now how do you want them sorted?

Joined: Jun 2002
Posts: 303
Enthusiast
Offline
Enthusiast
Joined: Jun 2002
Posts: 303
I don't really need them sorted. Just one photo displayed in the PAL.

ex.

page loads, photo #1 is displayed
page loads again, photo # 2 is displayed
page loads again, photo #3 is displayed
if there are a total of three photos in the list and photo #3 was the last one, the next time the page is loaded it starts all over again with photo #1 and so forth.

I was thinking of a loop. There would be a check to see if there was a variable set, if not then pull the first photo in the list. If it was set, add 1. Query the data base. Count the number of rows. If the number is more than the sum of rows..... pull the first phot, if not then grab that number pic. But then there's the case of a deleted row and how to pass the variable from page to page. um... You know what? Maybe it's more trouble than it's worth. I know what I want, but I don't think there's an easy way to do it. Thanks anyway. I'll mull over it a while and get some other things done. Maybe something will go off in my head.

Joined: Nov 2001
Posts: 134
M
Journeyman
Offline
Journeyman
M
Joined: Nov 2001
Posts: 134
Hmmm tried to do this one...

First I get this ..

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 57

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 82
Featured Photos
Could not select database 'DATABASE'

So, I amend "DATABASE" in the custompal as clearly its not getting the variable, and then I just get

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 57

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 82

and no pictures...

Whats wrong?? thanks

Page 2 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
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,551
Posts293,833
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 403
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 30
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,808
Greg Hard 4,625
Top Posters(30 Days)
isaac 25
WebGuy 6
Gizmo 2
Top Likes Received
isaac 62
Gizmo 12
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 16
WebGuy 2
Gizmo 2
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.096s Queries: 69 (0.035s) Memory: 3.5307 MB (Peak: 3.8488 MB) Data Comp: Zlib Server Time: 2020-10-31 06:51:26 UTC
Valid HTML 5 and Valid CSS