php forum
php mysql forum
php mysql smarty
 
Page 3 of 5 < 1 2 3 4 5 >
Topic Options
#268396 - 01/31/04 08:35 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
smoknz28 Offline
Enthusiast

Registered: 04/10/03
Posts: 393
Loc: Washington, D.C.
Michael and Chuck, good job on this hack! <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /><br /><br />I've had a few good PMs come through from my site letting me know what a nice addition we've made. <img src="http://www.ubbdev.com/forum/images/graemlins/waytogo.gif" alt="" /><br /><br />No bugs to report at this time under v6.4
_________________________
F-Body Hideout
Project Speedy

Top
#268397 - 02/01/04 05:16 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
Omeatron, in your instruction you write: <br />$data_dir = "http://www.reeftalk.com/photos" ; //URL of your photo dir where those jpeg stored (with no / at end)<br /><br />in your ppanel.php you write:<br />//URL of your photo dir where those jpeg stored (with / at end)<br /><br />Which is correct ?
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#268398 - 02/01/04 05:55 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
I don't bring this hack to work <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> <br /><br />I also get this error:<br /><br />SQL ERROR: Sun, Feb 01 2004 12:48:53 +0100 Unable to do_query: SELECT id,cat,title,bigimage,medsize FROM pp_photos WHERE userid = 5 ORDER BY date DESC LIMIT 0,16<br />Table 'usr_web17_1.pp_photos' doesn't exist<br />Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/web17/html/dclan/ubbthreads/mysql.inc.php on line 160<br /><br />Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/web17/html/dclan/ubbthreads/mysql.inc.php on line 133<br /><br />I dont understand why always usr_web17_1 and not usr_web17_4 which is configured in pppanel.php is used. I try to follow your instructions for different databases but I guess I dont understand how to do it correctly. I attach my pppanel.php for a little review. Thanks.


Attachments
106907-pppanel.txt (57 downloads)

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

Top
#268399 - 02/01/04 09:01 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Zarzal <br /> <br /> no / at end <br /> <br />As far as different databases as long as the username and password is the same a simple mysql select datase command right before the query works. <br /> <br />However as Michael pointed out some servers do not like the select database command. <br /> <br />mysql_select_db ("photopost")or die("Could not select database");
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#268400 - 02/01/04 03:22 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
Ok, I got it. It seem's there is a misunderstanding. The correct modification for different database and the same user/password look like this:<br /><br />mysql_select_db ("photopostdbnamehere")or die("Could not select database"); <br /><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 />$numrows = $dbh -> total_rows($sth);<br /><br />if ( $numrows < 16 ) $nextpage = 0;<br /><br />$i=0;<br />$color = "lighttable";<br />$photorow="";<br />$photopanel="";<br /><br />mysql_select_db ("ubbdbnamehere")or die("Could not select database"); <br /><br />the mysql_select_db should not be on top and end of the file. It must be put direct before and after the select. <br /><br />Finished, User Happy <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#268401 - 02/01/04 03:32 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
me again, sorry <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> I have a final request. I use Dalans facelift and quickreply. Now I like to move the new box like this:<br /><br /> []http://www.dragonclan-forum.de/move.jpg[/] <br /><br />How I do it ? I m not so good in hacking templates <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> All what I can say it must be done in ubbt_instant_ubbcode.tmpl <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> I hate tables <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" />
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#268402 - 02/01/04 03:50 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
Zarzal could you post a attachment of updated file.. please.<br />Thanks

Top
#268403 - 02/01/04 04:03 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: Kelly]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
here it comes ... just rename to .php and edit the dbmanes inside


Attachments
106929-pppanel.txt (35 downloads)

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

Top
#268404 - 02/01/04 10:26 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
Thank you very much. I needed to change the prefix on the database to nothing on mine but very happy to have this working. <br /><br />Great idea guys and thanks to all that helped create this one.

Top
#268405 - 02/02/04 10:00 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: Kelly]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Zarzal have you modified the html to show the box where you want?<br /><br />Intead of this that I say<br /><br /><br /><br /><table width="350" cellpadding="1" cellspacing="1" class="tablesurround"><br /><tr><br /><td><br /><table cellpadding="4" cellspacing="1" width="100%" class="tableborders"><br /><tr><br /><td valign="top" class="tdheader"><br /><center><b>Photos</b><br /></td><br /></tr><br /><td align="center" class="lighttable"><br /><br /><a href="javascript:void(0)" onclick="openPhotoPanel()">Insert My Photos into Post</a><br /><br /><br /></td><br /></tr><br /></table><br /></td><br /></tr><br /></table><br /><br />In the instant ubbcode template<br /><br />Do something like this<br /><br />Find this:<br /><br /><table border="0"><tr><td class="tdheader"><br /><b>{$ubbt_lang['INST_GRAEMLIN']}</b><br /></td><br /><td valign="top" class="tdheader"><br /><b>{$ubbt_lang['INST_UBB']}</b><br /></td><br /><td valign="top" class="tdheader"><br /><b>{$ubbt_lang['FONT_COLOR']}</b><br /></td><br /></tr><br /><br />Change it to this:<br /><br /><table border="0"><tr><td class="tdheader"><br /><b>{$ubbt_lang['INST_GRAEMLIN']}</b><br /></td><br /><td valign="top" class="tdheader"><br /><b>{$ubbt_lang['INST_UBB']}</b><br /></td><br /><td valign="top" class="tdheader"><br /><b>{$ubbt_lang['FONT_COLOR']}</b><br /></td><br /><td valign="top" class="tdheader"><br /><center><b>Photos</b><br /></td><br /></tr><br /><br />Then find this:<br /><br /></table><br /></td><br /></tr><br /></table><br /><br />and replace it with something like this:<br /><br /></table><br /></td><br /><td valign="top"><br /><table border="1"><br /><tr><br /><td align="center" class="lighttable"><br /><br /><a href="javascript:void(0)" onclick="openPhotoPanel()">Insert My Photos into Post</a><br /><br /><br /></td><br /></tr><br /></table><br /></td><br /></tr><br /></table>
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#268406 - 02/02/04 10:03 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
Thanks, right now I finished it on myself. Du some other modifications and the facelift I encounter some missing tags and fix my template. Thanks anyway.<br /><br />this is a great add on, I like it.
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#268407 - 02/02/04 01:11 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Zarzal, Photos, NOT Photo's ......

Top
#268408 - 02/02/04 04:24 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: domain123]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
That's the original text from Omegatron <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> But I see he change it.
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#268409 - 02/04/04 01:55 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
steelhead Offline
Power User

Registered: 01/14/04
Posts: 99
Loc: Portland, Oregon
Chuck,<br />Ok, I am running seperate batabases with the same passwords.<br />I got this:<br />$data_dir = "http://www.qualityfishing.net/gallery" ;<br /><br />My query now looks like this:<br />}<br />mysql_select_db ("proguide_gallery")or die("Could not select database"); <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 />$numrows = $dbh -> total_rows($sth);<br /><br />if ( $numrows < 16 ) $nextpage = 0;<br /><br />$i=0;<br />$color = "lighttable";<br />$photorow="";<br />$photopanel="";<br />mysql_select_db ("proguide_forum")or die("Could not select database");<br /><br />I sill get the same error everyone else way getting.<br />So as you told me I added to the top of the file and have this:<br />require ("main.inc.php");<br />// configure your database settings <br />$host = "localhost"; // Vertexhost <br />$user= ""; // ?????? <br />$password= ""; // ????? <br />$database=""; // proguide_gallery or proguide_forum <br /><br /><br />Still the error message. What am I missing??? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />
_________________________
Fish-On
Qualityfishing.net

Top
#268410 - 02/04/04 02:46 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: Starfleet14]
Zarzal Offline
Coder

Registered: 07/03/01
Posts: 806
Loc: Berlin, Germany
I m not sure if you just post an example with:<br /><br />// configure your database settings <br />$host = "localhost"; // Vertexhost <br />$user= ""; // ?????? <- databaseusername for PP<br />$password= ""; // ????? <- pwd for this user<br />$database=""; // proguide_gallery or proguide_forum <br /><br />but you have to fill it out with your settings. This is needet for my board, running 2 seperatet DB's with the same username and password.<br /><br />sample:<br />$host = "localhost"; // Vertexhost <br />$user= "mydbusername"; // ?????? <- databaseusername for PP<br />$password= "pwdofuser"; // ????? <- pwd for this user<br />$database="proguide_gallery"; // proguide_gallery or proguide_forum <br /><br /><br />after this you need to set the following for creating a first time contact to the PP_DB:<br /><br />// Connecting, selecting database <br />$link = mysql_connect ("$host", "$user", "$password") or die ("I cannot connect to the database."); <br /><br />The rest seems to be correct. Just take my example tha I attach some messages above and edit it to reflect your account settings. It should work.
_________________________
my forum: http://www.dragon-clan.de
my hobby: http://www.biker-reise.de

Top
#268411 - 02/04/04 03:22 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
steelhead Offline
Power User

Registered: 01/14/04
Posts: 99
Loc: Portland, Oregon
yep, I have it as this:<br /><br />$host = "localhost"; // <br />$user= "thisismydbusername"; // <br />$password= "thisismydbpassword"; // <br />$database="proguide_gallery"; //<br /><br />No go. I made it this:<br /><br />$host = "localhost"; // <br />$user= "thisismyusername"; // <br />$password= "thisismypassword"; // <br />$database="proguide_gallery"; //<br />// Connecting, selecting database <br />$link = mysql_connect ("$host", "$user", "$password") or die ("I cannot connect to the database."); <br /><br />Still no go. ; (
_________________________
Fish-On
Qualityfishing.net

Top
#268412 - 02/04/04 07:46 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: Starfleet14]
steelhead Offline
Power User

Registered: 01/14/04
Posts: 99
Loc: Portland, Oregon
any ideaa??
_________________________
Fish-On
Qualityfishing.net

Top
#268413 - 02/04/04 11:10 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: Starfleet14]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Steelhead, <br /> <br /> As long as your database supports the mysql_select_db thing you should be able to add the same user permissions from your forum to your gallery database. That would be the easy thing add that mysql user to the proguide_gallery database and then change the query in pppanel.php to this <br /> <br />mysql_select_db ("proguide_gallery")or die("Could not select database"); <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 />$numrows = $dbh -> total_rows($sth);
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#268414 - 02/11/04 01:14 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
Hi, <br /> <br />It seems that if you have multiple (catagory) folders in your data (picture) directory it doesn't know which one to pick for the users of the board if you put in a /"proper folder" it doesn't work the only way I could get it working was to delete all but the bb users folder and use the path to data without the /. Can this be fixed ? I also had to put the database name in manually in a few places because it was hard coded in, is there a mod for that or is that wat you intended? <br /> <br /> <br /> <br />


Edited by JerseyDevil (02/16/04 04:54 PM)

Top
#268415 - 02/11/04 08:20 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Jersey,<br /><br /> You are correct you do not need to place a / at the end. No big deal but what is all this it doesnt know what folder to pick<br /><br /> $imgurl = "[img]{$data_dir}/$ppcat/{$user['U_Number']}{$photo_name}-med{$theext}[/img]"; <br /><br />The above is the default photopost format<br /><br />data/whichcat/usernumberphotonameextention
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
Page 3 of 5 < 1 2 3 4 5 >


Moderator:  Ian_W 
Who's Online
0 registered (), 24 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Today at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
Yesterday at 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks