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.
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!
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
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
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
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_
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
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
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.
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
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
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.
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.
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.
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)
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.
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?
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.
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.