Mod Name / Version: My Photos 1.0 <br /> <br />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. <br /> <br />Working Under: UBB.Threads 6.3-6.4 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: <br /> <br />Author(s): Photopost ( Michael Pierce ) <br /> <br />Date: 01/29/04 <br /> <br />Credits: <br /> <br />Files Altered: ubbt_instant_ubbcode.tmpl,showflat.tmpl and showthreaded.tmpl <br /> <br />New Files: pppanel.php <br /> <br />Database Altered: None <br /> <br />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. <br /> <br />Something like this <br /> <br />// configure your database settings <br />$host = "localhost"; // Server Name <br />$user= ""; // Username <br />$password= ""; // Password <br />$database=""; // Photopost database name or forum database name <br /> <br />// Connecting, selecting database <br />$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.'); <br />mysql_select_db ("$database")or die("Could not select database"); <br /> <br />and then after the queries etc bottom of file something like this <br /> <br />mysql_select_db ("UBBTHREADSDATABASE")or die("Could not select database"); <br /> <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />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.
#268360 - 01/29/0403:32 PMRe: Beta-[6.3-6.4] My Photos 1.0
[Re: sf49rminer]
donJulio
Code Monkey
Registered: 06/17/02
Posts: 682
Loc: CA, USA
That is beautiful! I'll be installing this when I get home. Awesome work! <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" />
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />
#268362 - 01/29/0406:49 PMRe: Beta-[6.3-6.4] My Photos 1.0
[Re: sf49rminer]
fishtails
Enthusiast
Registered: 06/19/02
Posts: 307
Loc: Fernandina Beach, FL
Well, I must say I'm glad I brought the subject up! <img src="http://www.ubbdev.com/forum/images/graemlins/smirk.gif" alt="" /> 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! <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /><br /><br />Thanks guys!
Registered: 10/26/02
Posts: 112
Loc: Kinston, Alabama USA Planet Ea...
Chuck, <br /><br />I started to install this mod but I saw in the instructions <br /><br />the following is applicable if you have the quick reply mod installed <br /><br />Does that mean if I dont have quick mod installed it wont work ? or I just dont need to edit the other files ?
[]Now the following is applicable if you have the quick reply mod installed if you do not there is no need to continue.[/]<br /><br />Just as it says. If you do not have quick reply installed your done.
Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
Hey Chuck,<br /><br />Great Mod!!! Unfortunately, I get this... any ideas?<br /><br />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<br />Table 'flighta_thread.pp_photos' doesn't exist<br />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<br /><br />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
Is the Photopost database along with Threads or on its own?<br /><br />If not then read the first post in this thread<br /><br />Is your prefix for the photopost database set?
Registered: 10/26/02
Posts: 112
Loc: Kinston, Alabama USA Planet Ea...
Never mind.. I took it off ! You did not answer the question. I am not a programmer. <br />You said Just as it says. If you do not have quick reply installed your done. <br /><br />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 <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> <br /><br />Just call me dense I guess.
Okay Lets take this one step at a time cause your getting confused here. I answered your question.<br /><br />1. You edit your ubbt_instant_ubbcode.tmpl this puts a link in your newpost and newreply pages to the java 7photo panel.<br /><br />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. <img src="http://www.ubbdev.com/forum/images/graemlins/busted.gif" alt="" /><br /><br />Do you understand? Just as it says if you do not have quick reply installed your DONE.<br /><br /> You only need to modify the one file ubbt_instant_ubbcode.tmpl
Registered: 10/26/02
Posts: 112
Loc: Kinston, Alabama USA Planet Ea...
Chuck,<br /><br />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_<br /><br />I have my datapath set to http://xxxxx/PhotoPost/data<br /><br />See anything wrong with the way I have it setup ?<br /><br /><br /><br />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<br />Table 'ubbthreads.pp_photos' doesn't exist<br />Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/ubbthreads/mysql.inc.php on line 160<br /><br />Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/ubbthreads/mysql.inc.php on line 133
OKay redownload and upload the pppanel.php again.<br /><br />I made a change to the modification but forgot to upload the change I made.<br /><br />It was hardcoded to the pp_ prefix<br /><br />Now in the beginning of the file there is a spot to set the Photopost prefix<br /><br /><br />$pp_prefix="";
ok trying to add this in using a separate database put in the line<br />$query = "SELECT id,cat,title,bigimage,medsize FROM {$pp_prefix}photos WHERE userid = {$user['U_Number']} ORDER BY date DESC LIMIT $page,16";<br />$result = mysql_query($query);<br />$sth = $dbh -> do_query($query);<br />mysql_select_db ("threads")or die("Could not select database"); <br /><br /><br />This is the error I get<br />SQL ERROR: Database error only visible to forum administrators<br /><br />Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133<br />SQL ERROR: Database error only visible to forum administrators<br /><br />Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 160<br /><br />Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133