Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 3 1 2 3
#268356 01/29/2004 10:01 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Mod Name / Version: My Photos 1.0

Description: This modification will place a box and link along with the rest of the ubbt_instantcode where a user's photos from photopost will be listed when clicked and they can be inserted into the post with the ubbcode image tag formatted.

Working Under: UBB.Threads 6.3-6.4

Mod Status: Beta

Any pre-requisites:

Author(s): Photopost ( Michael Pierce )

Date: 01/29/04

Credits:

Files Altered: ubbt_instant_ubbcode.tmpl,showflat.tmpl and showthreaded.tmpl

New Files: pppanel.php

Database Altered: None

Info/Instructions: Mod assumes PhotoPost and Threads are installed into same database. If you have them in seperate databases, you will need to use a mysql_select_db() to switch to PP and then back to threads in the pppanel.php file.

Something like this

// configure your database settings
$host = "localhost"; // Server Name
$user= ""; // Username
$password= ""; // Password
$database=""; // Photopost database name or forum database name

// Connecting, selecting database
$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.');
mysql_select_db ("$database")or die("Could not select database");

and then after the queries etc bottom of file something like this

mysql_select_db ("UBBTHREADSDATABASE")or die("Could not select database");


Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
106674-myphotos.zip (0 Bytes, 322 downloads)

Sponsored Links
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Here is a screen shot of what it looks like.
Attachments
106678-pppanel.jpg (0 Bytes, 320 downloads)

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Closer view 1
Attachments
106683-view.gif (0 Bytes, 79 downloads)

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Closer view 2 ----The Panel Itself
Attachments
106684-Image3.gif (0 Bytes, 276 downloads)

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
That is beautiful! I'll be installing this when I get home. Awesome work!

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
What else would you expect from the master of Photopost himself Michael Pierce.

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
Well, I must say I'm glad I brought the subject up! Just kidding. This is what I was talking about in the other thread, for the most part. The only thing missing is an upload, not that it's that important, but if one could upload to their gallery from this panel would be excellent. Not that it's not excellent as it is! yada yada yada Slap me and make me shut up will ya!

Thanks guys!

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Chuck,

I started to install this mod but I saw in the instructions

the following is applicable if you have the quick reply mod installed

Does that mean if I dont have quick mod installed it wont work ? or I just dont need to edit the other files ?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
[]Now the following is applicable if you have the quick reply mod installed if you do not there is no need to continue.[/]

Just as it says. If you do not have quick reply installed your done.

Joined: Dec 2003
Posts: 123
Junior Member
Junior Member
Offline
Joined: Dec 2003
Posts: 123
Hey Chuck,

Great Mod!!! Unfortunately, I get this... any ideas?

SQL ERROR: Thu, Jan 29 2004 22:51:15 -0500 Unable to do_query: SELECT id,cat,title,bigimage,medsize FROM pp_photos WHERE userid = 4 ORDER BY date DESC LIMIT 0,16
Table 'flighta_thread.pp_photos' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/flighta/public_html/ubbthreads/mysql.inc.php on line 160

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/flighta/public_html/ubbthreads/mysql.inc.php on line 133

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Is the Photopost database along with Threads or on its own?

If not then read the first post in this thread

Is your prefix for the photopost database set?

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Never mind.. I took it off ! You did not answer the question. I am not a programmer.
You said Just as it says. If you do not have quick reply installed your done.

So does that mean the MOD is complete ? Or it wont work unless you have quick reply installed. If so why not say so at the top of the page

Just call me dense I guess.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay Lets take this one step at a time cause your getting confused here. I answered your question.

1. You edit your ubbt_instant_ubbcode.tmpl this puts a link in your newpost and newreply pages to the java 7photo panel.

2. The directions state that if you have the quick reply mod there is some extra steps OTHERWISE your done. If you are not familiar with the quick reply mod it adds a quick reply box on your showflat and showthreaded screens. This has a link to the graemlin panel and if you do the other steps in this mod will also add a MY PHOTOS link so users can use this mod there as well. However just as the instructions state if you do not have quick reply installed your done.

Do you understand? Just as it says if you do not have quick reply installed your DONE.

You only need to modify the one file ubbt_instant_ubbcode.tmpl

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Got it Thank you .

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Chuck,

Ok got the mod installed but I am getting the same error as the guy posted above. Per your post above my ubbthreads and photopost share the same database. The prefix was not set in PhotoPost so I set it to what I have in Ubbt w3t_

I have my datapath set to http://xxxxx/PhotoPost/data

See anything wrong with the way I have it setup ?



SQL ERROR: Unable to do_query: SELECT id,cat,title,bigimage,medsize FROM pp_photos WHERE userid = 2 ORDER BY date DESC LIMIT 0,16
Table 'ubbthreads.pp_photos' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/ubbthreads/mysql.inc.php on line 160

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/ubbthreads/mysql.inc.php on line 133

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
OKay redownload and upload the pppanel.php again.

I made a change to the modification but forgot to upload the change I made.

It was hardcoded to the pp_ prefix

Now in the beginning of the file there is a spot to set the Photopost prefix


$pp_prefix="";

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Works like a charm 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
great work chuck and michael


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Great Work Michael! I am just helping out by documenting install instructions.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
ok trying to add this in using a separate database put in the line
$query = "SELECT id,cat,title,bigimage,medsize FROM {$pp_prefix}photos WHERE userid = {$user['U_Number']} ORDER BY date DESC LIMIT $page,16";
$result = mysql_query($query);
$sth = $dbh -> do_query($query);
mysql_select_db ("threads")or die("Could not select database");


This is the error I get
SQL ERROR: Database error only visible to forum administrators

Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133
SQL ERROR: Database error only visible to forum administrators

Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 160

Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I haven't used this yet, but does it allow me to browse the photo categories to find photos quicker? I have 50 galleries and some users have hundreds of photos. So any way to browse the photos quicker would be cool. Also it would be cool if they could use any photo in this. What I mean is not just thier photos (that they themselves have uploaded to their member galleries or public galleries), but all photos in their personal gallery (not other members galleries) and all photos in the public galleries, regardless of who posted them.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Steelhead

At the top of that file you need to have the information to connect to photopost database. Try putting the select threads database at the bottom of the file or try it without it since it operates in another window.

Don Julio

This mod only pulls your photo's however if you look at the query I am sure you can adjust things to your liking. I beleive the default is ORDER BY date DESC

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Chuck ... I tried with out and with it at bottom.. no luck
I have the database stuff at the top.

BTW steelhead is the other guy, but I knew you meant me

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Marty,

Ok If the username and password to access the first database are the same you can just put this before the query in pppanel.php

mysql_select_db ("DATABASENAME")or die("Could not select database");

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
is the database named changed to match my sites? If so I got errors again.

SQL ERROR: Database error only visible to forum administrators

Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133
SQL ERROR: Database error only visible to forum administrators

Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 160

Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
You have to reselect your Threads database at the bottom.

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
It seems, that many people have trouble with the databaseswitching. It would be fine to put another modified file in your archiv with sample settings for people who have installed in seperate default databases.

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
Chuck, this looks like an awesome hack and I'm trying to get it implemented.

I'm running into an issue with this hack however and I'm sure it's something simple.

- A user clicks on post or reply.
- User clicks on the "Insert My Photos into Post"
- The users is shown the infamous red x with boxes that are suppose to show his/her photos.

I did not continue hacking into the showflat.tmpl or showthreaded.tmpl files as I don't use the quick reply hack.

Also, I'm assuming I'm to upload the pppanel.php file into the ubbthreads directory.

Now, a little background.

I'm running two seperate databases. One for my ubbthreads and one for the photopost.

I added the same user from ubbthreads to my photopost database. So that the same user can share the database.

I've tried following some of the thread here, but get a bit lost.

Any help on this is greatly appreciated.

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

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
I've added this code as I read above:

// Selecting the PhotoPost Database
[:"red"]mysql_select_db ("smoknz28_photopost")or die("Could not select database");[/]

$query = "SELECT id,cat,title,bigimage,medsize FROM {$pp_prefix}photos WHERE userid = {$user['U_Number']} ORDER BY date DESC LIMIT $page,16";
$result = mysql_query($query);
$sth = $dbh -> do_query($query);
$numrows = $dbh -> total_rows($sth);


But I'm having the same results.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
What is this setting?

$data_dir="";

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
I'm just curious. Could the js for the photopanel conflict with the js for the font colors? My font colors no longer render on the posting form. Example here.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Anything is possible.

However I would double check your hacking first.

There are multiple instances of defined functions under that script call and the only thing broken is your colors.

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
[]Omegatron said:
What is this setting?

$data_dir=""; [/]

Yea, I was a bit confused on this one as I wasn't sure where I should point this to as the jpeg files are stored in seperate subdirectories off of the data directory.

$data_dir = "http://www.f-bodyhideout.com/gallery/data/" ; //URL of your photo dir where those jpeg stored (with / at end)

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Well there is your problem. Your data path is not correct

I view one of your thumbs and get this as your data path

http://www.f-bodyhideout.com/ubbthreads/gallery/data/

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
Duhhhh....damn, do you ever get tired of dealing with knuckle-heads like me??

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I just smile a bit thats all

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
I'll check my hacking. On another note, if you are not logged in and click the My Photos, it throws mysql errors because there's no unumber. So, there needs to be a check for valid user so it doesn't throw the errors. But, awesome hack at any rate. Thanks for the hack Michael.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Do you allow anonymous posting?

Just checking cause if you have quick reply mod installed and you have no right to post thus the quick reply does not show so the my photos link would not work

Also in your posting screens if you have no photos it says you have no photos

So I am assuming that you allow anonymous posting?

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
Yes, I do allow anonymous posts of messages, but not uploading of any sort. I don't use the quick reply and thus don't have it installed. Yes, it does say that you have no photos, but not until it throws out the mysql errors when not logged in.

Page 1 of 3 1 2 3

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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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)