php forum
php mysql forum
php mysql smarty
 
Topic Options
#284369 - 03/21/05 03:05 PM Finished-[6.5] MyPhotos v2.0
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md

   Finished-[6.5] MyPhotos v2.0 to Del.icio.us Add to del.icio.us
  Digg Finished-[6.5] MyPhotos v2.0 Digg it
Mod Name / Version: MyPhotos v2.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.5 <br /><br />Mod Status: Finished <br /><br />Any pre-requisites: Photopost 5.0 and UBBThreads 6.5 <br /><br />Author(s): Photopost <br /><br />Date: 03/21/05 <br /><br />Credits: MyPhotos updated for Photopost 5 by Omegatron <br /><br />Files Altered: ubbt_instant_ubbcode.tmpl,showflat.tmpl and showthreaded.tmpl<br /> <br /><br />New Files: pppanel.php <br /><br />Database Altered: Nope <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 /><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.


Attachments
126475-myphotos.zip (57 downloads)


Top
#284370 - 03/22/05 03:50 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: sf49rminer]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
litte bugfix. <br /><br />search for:<br /> $mthumb = "<img border=\"0\" src=\"{$data_dir}/{$ppcat}/{$user['U_Number']}{$photo_name}-thumb{$theext}\" alt=\"\" />"; <br /><br />replace with:<br /> $mthumb = "<img border=\"0\" src=\"{$data_dir}/{$ppcat}/thumbs/{$photo}\" alt=\"\" />";
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#284371 - 03/22/05 08:49 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: sf49rminer]
Sky YYZ Offline
Junior Member

Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
[]Omegatron said: <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 />Hi Omegatron, <br /> <br />I have Threads and Photopost using their own separate databases (database names, ie: fa_threads & fa_photopost), and both programs are installed in different folders on the server (ie: www.flightattendants.org/ubbthreads/ ... and ... www.flightattendants.org/photopost/ ... <br /> <br />I've installed the mod, but don't understand where to make the appropriate changes in pppanel.php. When I click on "Insert My Photos Into Post" I get the could not select database error message. <br /> <br />This is how I've currently got it set up in pppanel.php: <br /> <br />//Connecting, selecting database <br />$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.'); <br />mysql_select_db ("mysql_connect")or die("Could not select database. This feature has not yet been enabled. Please try again later."); <br /> <br /> <br />require ("/includes/main.inc.php"); <br /> <br /> <br />$pp_prefix=""; <br /> <br />$data_dir = "http://www.flightattendants.org/photopost/data/" ; <br /> <br />....and at the bottom I uncommented the mysql line as instructed. <br /> <br />Thanks for any advice you can offer! <br /> <br />Jason <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#284372 - 03/22/05 09:02 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: gingerginger]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
I'm not Omegatron but I try to help <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> You have to edit the pppanel.php. On top you find:<br /><br />// configure your database settings <br />$host = "ip or dnsname of host for pp"; // Server Name <br />$user= "username for pp db"; // Username <br />$password= "password for pp db"; // Password <br />$database="databasename of pp db"; // 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 />require ("./includes/main.inc.php");<br /><br />$pp_prefix="pp_";<br />$data_dir = "http://insert your url here/photopost/data" ; //URL of your photo dir where those jpeg stored (with n<br /><br />### search for:<br />else {<br /> $nextpage = $page + 1;<br /> if ( $page > 1 ) $prevpage = $page - 1;<br /> else $prevpage = 0;<br /> <br /> $page = ($page*16);<br />}<br /><br />### insert under it:<br />mysql_select_db ("name of your PP DB here")or die("Could not select database"); <br /><br />### now, search for the following:<br />$i=0;<br />$color = "lighttable";<br />$photorow="";<br />$photopanel="";<br /><br /><br />### under it insert:<br /><br />mysql_select_db ("name of your THREADS db here")or die("Could not select database");<br /><br />on bottom of the file you have:<br />//mysql_select_db ("UBBTHREADSDATABASE")or die("Could not select database");<br /><br />leave it with // or delete the line.<br /><br />It should work now.
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#284373 - 03/22/05 09:49 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: landyphil]
Sky YYZ Offline
Junior Member

Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
[]Zarzal said: <br />I'm not Omegatron but I try to help <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> You have to edit the pppanel.php. On top you find: <br /> <br />// configure your database settings <br />$host = "ip or dnsname of host for pp"; // Server Name <br />$user= "username for pp db"; // Username <br />$password= "password for pp db"; // Password <br />$database="databasename of pp db"; // Photopost database name or forum database name [/] <br /> <br />Thanks for your input, Zarzal. Unfortunately I still wasn't able to get it working. <br /> <br />// configure your database settings <br />$host = "here I inserted localhost"; // Server Name <br />$user= "here I inserted my PP_db username"; // Username <br />$password= "I inserted my PP db password"; // Password <br />$database="I inserted my PP_database name"; // Photopost database name or forum database name <br /> <br />Under: <br /> <br />$i=0; <br />$color = "lighttable"; <br />$photorow=""; <br />$photopanel=""; <br /> <br />...I added: <br /> <br />mysql_select_db ("I added my threads_database name here")or die("Could not select database"); <br /> <br />...and commented out on the last lines: <br />//mysql_select_db ("UBBTHREADSDATABASE")or die("Could not select database"); <br /> <br />I still get the could not select database error message. <br /> <br />Am I missing something else? <br /> <br />Sorry for not getting it, but thanks for your help! <br /> <br />Jason <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#284374 - 03/22/05 09:56 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: gingerginger]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
have you done this too:<br /><br />### search for:<br />else {<br />$nextpage = $page + 1;<br />if ( $page > 1 ) $prevpage = $page - 1;<br />else $prevpage = 0;<br /><br />$page = ($page*16);<br />}<br /><br />### insert under it:<br />mysql_select_db ("name of your PP DB here")or die("Could not select database");
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#284375 - 03/22/05 10:03 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: landyphil]
Sky YYZ Offline
Junior Member

Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
Nope, I hadn't... thanks for pointing that out! <br /> <br />Unfortunately I still get the same error message: <br /> <br />"Could not select database. This feature has not yet been enabled. Please try again later." <br /> <br />I customised the message in: <br /> <br />//Connecting, selecting database <br />$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.'); <br />mysql_select_db ("mysql_connect")or die("Could not select database. This feature has not yet been enabled. Please try again later."); <br /> <br />require ("./includes/main.inc.php"); <br /> <br />...so it would appear it's not making it past: <br /> <br />// configure your database settings <br />$host = "LOCALHOST"// Server Name (in lowercase) <br />$user= "PHOTOPOST DATABASE USERNAME"; // Username <br />$password= "PHOTOPOST DATABASE PASSWORD"; // Password <br />$database="PHOTOPOST DATABASE NAME"; // Photopost database name or forum database name <br /> <br />...also, in: <br /> <br />$database="PHOTOPOST DATABASE NAME"; // Photopost database name or forum database name <br /> <br />...I tried inserting my THREADS DATABASE NAME, but that didn't work either. My password for both threads and photopost databases are the same, so it can't be that either. <br /> <br />Any ideas, Zarzal? Thanks! <br /> <br />Jason <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />

Top
#284376 - 03/22/05 01:27 PM Re: Finished-[6.5] MyPhotos v2.0 [Re: gingerginger]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
[]//Connecting, selecting database<br />$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.');<br />mysql_select_db ("mysql_connect")or die("Could not select database. This feature has not yet been enabled. Please try again later.");<br />[/]<br /><br />Thats wrong <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> mysql_select_db ("mysql_connect".... <br /><br />I append my script here, just modify it for your settings. I have done some little modifications.


Attachments
126514-pppanel.php.txt (54 downloads)

_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#284377 - 03/22/05 08:32 PM Re: Finished-[6.5] MyPhotos v2.0 [Re: landyphil]
Sky YYZ Offline
Junior Member

Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
Sorry, I don't follow what you mean. What am I supposed to change?<br /><br />Thanks,<br /><br />Jason

Top
#284378 - 03/23/05 05:29 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: gingerginger]
Sky YYZ Offline
Junior Member

Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
Sorry, I hadn't noticed you had a download in your post. <br /> <br />Okay, it's making it further, but now the script won't go past line 89 - cause I don't know what to put in there. <br /> <br />mysql_select_db ($database)or die("Could not select database"); // switch to PP DB <br /> <br />Do I manually enter my PP database name on this line? I thought $database would pull it from the $database value I entered at the top of the script. No? <br /> <br />Also, if you are not using a database prefix (i.e. pp_), do you enter "0" or just leave it blank between the ""'s? <br /> <br />Sorry to be such a pain & thanks very much for your help, <br /> <br />Jason

Top
#284379 - 03/23/05 12:57 PM Re: Finished-[6.5] MyPhotos v2.0 [Re: gingerginger]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
[]mysql_select_db ($database)or die("Could not select database"); // switch to PP DB<br /><br />Do I manually enter my PP database name on this line? I thought $database would pull it from the $database value I entered at the top of the script. No?[/]<br /><br />this should pull the dbname that you entered on top in the script. You can try to enter here your dbname in (" ")<br /><br />[]Also, if you are not using a database prefix (i.e. pp_), do you enter "0" or just leave it blank between the ""'s?[/]<br /><br />Sorry, I dont know this. you have to try it. I guess its "" if you are using no prefix.
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#284380 - 03/25/05 10:20 AM Re: Finished-[6.5] MyPhotos v2.0 [Re: landyphil]
Sky YYZ Offline
Junior Member

Registered: 12/07/03
Posts: 131
Loc: Brantford, ON Canada
Zaral, <br /> <br />hmmm I did try your suggestion but again met a brick wall. Oh well, it was a good thought to try and get it working. It's not for lack of trying that I can't get this mod to work. Thanks again very much, you've been very helpful. <br /> <br />Jason <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#284381 - 05/05/06 03:48 PM Re: Finished-[6.5] MyPhotos v2.0 [Re: gingerginger]
atvtrailrider Offline
Lurker

Registered: 02/03/05
Posts: 4
where can I see an example of this working?

Top
#284382 - 05/08/06 03:52 PM Re: Finished-[6.5] MyPhotos v2.0 [Re: sf49rminer]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
to running pppanel under threads 6.5.x you need to modify it. In line 63 you find:<br />require ("$thispath/languages/$ubbt_language/instant_markup.php");<br /><br />replace with:<br />require ("languages/{$_SESSION['myprefs']['language']}/instant_markup.php");
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#284383 - 05/08/06 10:35 PM Re: Finished-[6.5] MyPhotos v2.0 [Re: landyphil]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25427
Loc: Texas
thanks zarzal <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top


Moderator:  Ian_W 
Who's Online
0 Registered (), 28 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by Ian_W
Yesterday at 03:47 PM
What do you use to edit the files
by Ian_W
Yesterday at 03:33 PM
BeyondCompare v3.00
by Ian_W
Yesterday at 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
Yesterday at 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3] Language file checker
by blaaskaak
09/09/08 12:56 AM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
ghengis317, NitroX, Dogan, EliYah-, W-D
13344 Registered Users
Top Posters Last 30 Days
AllenAyres 16
blaaskaak 13
FREAK1 7
Mike L_dup1 4
Chris Bale 4
Ian_W 4
tackaberry 3

 

 

 
fusionbb message board php hacks