php forum
php mysql forum
php mysql smarty
 
Page 4 of 5 < 1 2 3 4 5 >
Topic Options
#268416 - 02/11/04 11:57 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
[]Omegatron said:<br />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 [/]<br /><br />Ok, I'll try to get you to understand.. :-) <br /><br />first just as a note you have a conflict in your directions. In the directions it says no slash and in the comments on the php after the path it says to put a slash (or vice-versa) can't remember without looking. It was the same on this sites download and also the other you posted it on.<br /><br />OK, to the meat of the problem:<br /><br />My path "www.The-Jersey-Devil.com/photopost/data" is were the bb users photos are (in the "500" sub folder) and folder "501" is where another catagories photo's are (I had to remove the 501 catagory for it to work).<br /><br />Both the 500 folder and the 501 folder are created by photopost when the catagory is created. I tried www.The-Jersey-Devil.com/photopost/data/500 and I get "blank pics" in the select image screen when trying to add a pic to the post. If you look at the path of the "blank" thumb pics it shows the path is pointing at the 501 folder ??. So I tried "www.The-Jersey-Devil.com/photopost/data/500/" and still no go.<br /><br />Anyway I need several differant catagories and the only way it wil work is with JUST the 500 folder inside the data folder. If you put the 501 back it trys to pull the images from there.<br /><br />The only way I got it to work was with the path: <br />"www.The-Jersey-Devil.com/photopost/data" and only leaving the "500" sub folder in there if the 501 was ther no go. <br /><br />If I extend the path to:<br />"www.The-Jersey-Devil.com/photopost/data/500" it won't work. <br /><br /><br />If the 501 folder is in there with this path:<br />"www.The-Jersey-Devil.com/photopost/data" it won't work.<br /><br />Hope that explains it <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" /> <br /><br /> <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" /><br /><br />Thanks

Top
#268417 - 02/11/04 12:38 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
Pappy Offline
Member

Registered: 11/17/00
Posts: 235
Loc: Germany (US Citizen)
I had a similar issue the problem was solved by selecting a chmod value of 2777 so that files would inherit the group and not apache since I use SU-EXEC on that virtual Server. what would happen is the folder would get made but no files would move into it. one problem I did notice is that it appears that you may need to fix the permissions every time you create a new category (for the category folder) so that the files inherit properly. This is most likely because of the way I have my server set up but since I am admin and can get to the directories and modify them easily and it is not a big issue for me.

Top
#268418 - 02/11/04 12:48 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: MercAqua]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
[]Pappy said:<br />I had a similar issue the problem was solved by selecting a chmod value of 2777 so that files would inherit the group and not apache since I use SU-EXEC on that virtual Server. what would happen is the folder would get made but no files would move into it. one problem I did notice is that it appears that you may need to fix the permissions every time you create a new category (for the category folder) so that the files inherit properly. This is most likely because of the way I have my server set up but since I am admin and can get to the directories and modify them easily and it is not a big issue for me. [/]<br /><br />I'm running Win 2003 Server, does this still apply ? Keep in mind the folders work properly and the catagories work well, the files move into them fine. Just the hack doen't when ther is another folder in the data folder.<br /><br />Thanks

Top
#268419 - 02/11/04 01:32 PM 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 /> This hack does not care about what cat they are in. <br /> <br />you need to set your data_dir to this <br /> <br />$data_dir = "http://www.the-jersey-devil.com/photopost/data"; <br /> <br /> <br /> It pulls the photos based on userid. The cat variable is inherited from the query <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 /> <br />Sounds to me like you have some server issues. <br /> <br />If you look at how the image is displayed you will see what I mean. <br /> <br />It takes your data path and appends the cat number on it and then appends the userid and file name <br /> <br />That is how photopost stores information.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#268420 - 02/11/04 01:43 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
[]Omegatron said: <br />Jersey, <br /> <br /> This hack does not care about what cat they are in. <br /> <br />you need to set your data_dir to this <br /> <br />$data_dir = "http://www.the-jersey-devil.com/photopost/data"; <br /> <br /> <br /> It pulls the photos based on userid. The cat variable is inherited from the query <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 /> <br />Sounds to me like you have some server issues. <br /> <br />If you look at how the image is displayed you will see what I mean. <br /> <br />It takes your data path and appends the cat number on it and then appends the userid and file name <br /> <br />That is how photopost stores information. [/] <br /> <br />I was just going to post this reply, it seems that if the catagory is created after the hack it works... OR it just decided to start working on it's own.. <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /> I did reboot and it is windows <img src="http://www.ubbdev.com/forum/images/graemlins/smirk.gif" alt="" /> <br /> <br />Either way Thank you very much... <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" />

Top
#268421 - 02/11/04 02:03 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
This is a wonderfull mod and the help in getting it working was second to none...

Top
#268422 - 02/16/04 11:41 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
NEXT page won't work. I've sat starring at this for hours. I can't figure out why "Next Page" won't work, can someone help please. <br /> <br />here it is.. <br /> <br /><? <br />// Popup Graemlin Panel <br />// <br />// Copyright David Lozier 2003. All Rights reserved. <br />// <br />// This software may be used and modified freely provided that <br />// the copyright notice remains intact at the head of the file. <br />// <br />// This software may NOT be distributed without expressed written <br />// consent from the author. <br />// <br />// The author accepts no liability for any loss or damages whatsoever <br />// incurred directly or indirectly from the use of this software. <br />// The author of this software makes no claims as to its fitness for <br />// any purpose whatsoever. If you wish to use this software you <br />// should first satisfy yourself that it meets your requirements. <br />// <br />// Email: []dave@chattersonline.com[/] <br />// URL: http://www.chattersonline.com <br /> <br />// configure your database settings <br />$host = "localhost"; // Server Name <br />$user= "edited-out"; // Username <br />$password= "edited-out"; // Password <br />$database="the_jersey_devil"; // 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 /> <br />require ("main.inc.php"); <br /> <br />$pp_prefix="photopost_"; <br />$data_dir ="http://www.the-jersey-devil.com/photopost/data"; //URL of your photo dir where those jpeg stored (with no / at end) <br /> <br />function get_ext( $filename ) { <br /> return substr($filename, strrpos($filename,".")); <br />} <br /> <br />function is_image( $filename ) { <br /> $retval = 0; <br /> <br /> $mediatypes = array( ".jpg", ".gif", ".png" ); <br /> $ext = get_ext( $filename ); <br /> <br /> if ( in_array(strtolower($ext), $mediatypes) ) <br /> $retval = 1; <br /> <br /> return( $retval ); <br />} <br /> <br />$userob = new user; <br />$user = $userob -> authenticate(); <br /> <br />$StyleSheet= $user['U_StyleSheet']; <br />$Status = $user['U_Status']; <br />$ubbt_language = ${$config['cookieprefix']."w3t_language"}; <br /> <br />if (empty($ubbt_language)) { $ubbt_language = $config['language']; } <br /> <br />require ("$thispath/languages/$ubbt_language/instant_markup.php"); <br /> <br />if (empty($StyleSheet) || ($StyleSheet == "usedefault") ) { <br /> $StyleSheet = $theme['stylesheet']; <br />} <br /> <br />$theme['css_wrapper'] = $StyleSheet; <br />$myLang = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />"; <br />$styleLink = "<link rel=\"stylesheet\" href=\"{$config['styledir']}/$StyleSheet.css\" type=\"text/css\" />"; <br /> <br />$html = new html; <br />list($tbopen,$tbclose) = $html -> table_wrapper(); <br /> <br />if ( !isset($page) || $page == 0 ) { <br /> $page = 0; <br /> $nextpage = 1; <br /> $prevpage = -1; <br />} <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 />mysql_select_db ("the_jersey_devil")or die("Could not select database"); //name of the photopostdb here <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 ("the_jersey_devil")or die("Could not select database"); //name of the ubbthreadsdb here <br /> <br />while (list($ppid, $ppcat, $pptitle, $photo, $medsize) = $dbh -> fetch_array($sth)) { <br /> if ( is_image($photo) ) { <br /> $photolen = strlen($photo); <br /> $theext = get_ext($photo); <br /> $photo_name = str_replace( $theext, "", $photo ); <br /> <br /> if ( $medsize > 0 ) $imgurl = "[img]{$data_dir}/$ppcat/{$user['U_Number']}{$photo_name}-med{$theext}[/img]"; <br /> else $imgurl = "&#091;img&#093;{$data_dir}/$ppcat/{$user['U_Number']}$photo&#091;/img&#093;"; <br /> <br /> $mthumb = "<img border=\"0\" src=\"{$data_dir}/{$ppcat}/{$user['U_Number']}{$photo_name}-thumb{$theext}\" alt=\"\" />"; <br /> <br /> $photorow .= <<<EOF <br /> <td width="25%" align="center" valign="middle" class="$color"> <br /> <a href="javascript:void(0)" onclick="updatePost(' $imgurl')">$mthumb</a> <br /> </td> <br />EOF; <br /> <br /> $i++; <br /> if ($i==4) { <br /> $i=0; <br /> $photopanel .= "<tr>$photorow</tr>"; <br /> $photorow = ""; <br /> $color = $html -> switch_colors($color); <br /> } <br /> } <br />} <br />if (!empty($photorow)) { <br />$photopanel .= "<tr>$photorow"; <br />} <br /> <br />if ($numrows == 0 && $page == 0) { <br />$photopanel .= <<<EOF <br /><td colspan="4" align="center" valign="middle" class="$color">You have no images in your PhotoPost gallery.</td> <br /></tr> <br />EOF; <br />} <br />elseif ($i==1) { <br />$photopanel .= <<<EOF <br /><td width="25%" align="center" valign="middle" class="$color"> <br /></td> <br /><td width="25%" align="center" valign="middle" class="$color"> <br /></td> <br /><td width="25%" align="center" valign="middle" class="$color"> <br /></td> <br /></tr> <br />EOF; <br />} <br />elseif ($i==2) { <br />$photopanel .= <<<EOF <br /><td width="25%" align="center" valign="middle" class="$color"> <br /></td> <br /><td width="25%" align="center" valign="middle" class="$color"> <br /></td> <br /></tr> <br />EOF; <br />} <br />elseif ($i==3) { <br />$photopanel .= <<<EOF <br /><td width="25%" align="center" valign="middle" class="$color"> <br /></td> <br /></tr> <br />EOF; <br />} <br /> <br />echo <<<UBBTPRINT <br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /><html> <br /><head> <br /><title>PhotoPost Panel</title> <br />$myLang <br />$styleLink <br /><script language="JavaScript" type="text/JavaScript"> <br />function updatePost(GraemlinCode) { <br />BodyVal = opener.document.replier.Body.value; <br />opener.document.replier.Body.value = BodyVal + GraemlinCode; <br />} <br /></script> <br /></head> <br /><body> <br />$tbopen <br /><tr> <br /><td align="left" colspan="4" class="tdheader"> <br />Instant PhotoPost <br /></td> <br /></tr> <br />$photopanel <br /></tr> <br /><tr> <br /><td colspan="2" class="lighttable"> <br />UBBTPRINT; <br /> <br />if ( $prevpage != -1 ) echo "<< <a href=\"pppanel.php?page=$prevpage\">PREV PAGE</a>"; <br /> <br />echo <<<UBBTPRINT <br /></td> <br /><td colspan="2" class="lighttable" align="right"> <br />UBBTPRINT; <br /> <br />if ( $nextpage > 0 ) echo "<a href=\"pppanel.php?page=$nextpage\">NEXT PAGE</a> >>"; <br /> <br />echo <<<UBBTPRINT <br /></td> <br /></tr> <br /><tr> <br /><td colspan="4" class="lighttable" align="center"> <br /><a href="#" onclick="javascript:window.close();">close window</a> <br /></td> <br /></tr> <br />$tbclose <br /></body> <br /></html> <br />UBBTPRINT; <br /> <br /> <br />?>

Top
#268423 - 02/16/04 03:07 PM 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 the next page function works just fine. You can PM me a user that has more than 16 photos to check out but I assume you probally have a browser or java problem which causes the page not to refresh.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#268424 - 02/16/04 03:18 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
Thanks Chuck, I sent you them.. <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" />

Top
#268425 - 02/16/04 04:14 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
Just wanting to keep this in thread.. Still can't get the next page thing working, chuck looked at it also.<br /><br />Thanks Chuck I do appreciate the effort. I'll keep staring at it and maybe it will make sense why it won't work, I know you said you had it working elswhere so it's possible. Now I just have to find a good book on php <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" /> I am a total newbee to php @ sql but the longer I stare at the stuff the more sense it starts to make.<br /><br />Being I'm new to this and all I'm not sure but I would think any hacks that are used credit should be given to there respective authors somewhere on the bb, is this so and where do they usually get put?<br /><br />Scott

Top
#268426 - 02/16/04 04:25 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
Just to clarify the problem: <br />When you click "next page" the page "refreshes" but the same pictures are displayed. They do not change to the next 16 pictures in the album. So it seems to be a query thingy (yea i'm an newbee)...

Top
#268427 - 02/17/04 06:49 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
My tipp is that it's a problem with global variables.<br />I assume you've turned register globals off, what is the default value in newer php-versions.<br /><br />Try to add this to the top of the ppanel.php:<br /><br /> $page = get_input("page","get");
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#268428 - 02/17/04 09:18 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: -Fusion-]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
THANK YOU !.... so much, IT WORKS ! I was up for hours for the last few days. I will post the final working copy as it is on my Windows 2003 server... <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /> <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /> <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /> <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" /> YEA... I love this hack. It makes the bb so much better.<br /><br />I appreciate everyones time. Hopefully I can contribute over in the futre..

Top
#268429 - 02/17/04 09:49 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
Just a quick question, am I correct in assuming this line <br /><br /> $ubbt_language = ${$config['cookieprefix']."w3t_language"};<br /><br />should be changed to the actual database prefix i'm using as in:<br /><br />$ubbt_language = ${$config['cookieprefix']."photopost_language"};<br /><br />(seems to work either way ?)<br /><br />If i'm WAY off base take it easy on me..<br /><br /> <img src="http://www.ubbdev.com/forum/images/graemlins/rolleyes.gif" alt="" />

Top
#268430 - 02/17/04 09:56 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
$ubbt_language = ${$config['cookieprefix']."w3t_language"};<br /><br />is the correct use.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#268431 - 02/17/04 10:26 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sf49rminer]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
<img src="http://www.ubbdev.com/forum/images/graemlins/shocked.gif" alt="" /> Thanks Chuck..

Top
#268432 - 02/17/04 11:08 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: mikesmothers]
JerseyDevil Offline
Newbie

Registered: 02/09/04
Posts: 15
Here's the pppanel.php as I have it working on a Windows server 2003 and the most current version of threads and photopost.<br /><br />Hope this helps someone in the future.<br /><br />see attachment. You must rename it from .txt to .php<br /><br />Scott


Attachments
108127-2-17-2004-pppanel.txt (22 downloads)


Top
#268433 - 06/29/04 08:09 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: landyphil]
Gary_dup1 Offline
User

Registered: 06/25/02
Posts: 38
This is the best damn mod I've ever seen... oh yes...
_________________________
The world's best online headshop and cannabis resource: EveryoneDoesIT.com

Top
#268434 - 06/29/04 05:13 PM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: sonolum]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
hehe <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#268435 - 07/01/04 09:49 AM Re: Beta-[6.3-6.4] My Photos 1.0 [Re: SurfMinister]
DrChaos Offline
Coder

Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
/*captain kirk<br /><br />I.... need... photopost<br />got.....to...get.....photopost<br /><br />captain kirk*/
_________________________
DrChaos
LeetGamers

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


Moderator:  Ian_W 
Who's Online
1 registered (Gizmo), 17 Guests and 10 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
<