PDA

View Full Version : Photopost Latest uploads in user profile


Delphiprogrammi
03-31-2006, 10:00 PM
hi, People,

this plugin will display the latest upload user "x" did in user "x" profile page eg member.php?u=1 (admin) installation is very easy


download the plugin
edit the plugin to match your setup (path to PhotoPost and possible login & passwords if you use seperated databases)
import the plugin in vbulletin
template modification


template "MEMBERINFO" wherever you want it to appaer for example i have i right under my signature find


<!-- / signature row -->
<br />
</if>


add below

<!--PhotoPost -->
<if condition="$profileimagebits">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat" colspan="$columns">$userinfo[username]'s Latest Gallery Submissions</td>
</tr>
<tr>$profileimagebits</tr>
</table>
<br />
</if>
<!-- PhotoPost end -->


done

trackpads
04-01-2006, 12:31 PM
Excellent!

alfaowner
04-01-2006, 08:52 PM
Thanks installed and works great, but how do I change the back ground behind the image to the filmstrip I have set in my gallery?

Also, can this be done for photopost classifieds adds?

Thanks for this.

AO

IrPr
04-02-2006, 08:03 AM
Doesn't work for vBAGallery ? ( Old Versions )
Edit: No, just needs some changes ~ ;)

Delphiprogrammi
04-03-2006, 10:28 AM
Thanks installed and works great, but how do I change the back ground behind the image to the filmstrip I have set in my gallery?

Also, can this be done for photopost classifieds adds?

Thanks for this.

AO

i don't own a Photopost classified licence so unable to check however you are free to modify it yourself and if you can do it you can release it on your own .I wouldn't have a problem with it

Noonster
04-03-2006, 03:32 PM
Doesn't work for vBAGallery ? ( Old Versions )
Edit: No, just needs some changes ~ ;)
Would it be easy to make it work?? Can someone make it work??

Thanks!

Delphiprogrammi
04-03-2006, 04:11 PM
Would it be easy to make it work?? Can someone make it work??

Thanks!

i don't know probably it will work but i do not know for sure

bada_bing
04-03-2006, 04:13 PM
I am trying to import the plugin but says this
This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.

What am I doing wrong. Also my photopost is using the same datebase so do I edit the xml file to point to /photopost as that is the directory name I have it installed in?

Delphiprogrammi
04-03-2006, 04:50 PM
I am trying to import the plugin but says this
This file appears to be a Plugin, not a Product. Please use the Plugin Manager to add this file.


What am I doing wrong. Also my photopost is using the same datebase so do I edit the xml file to point to /photopost as that is the directory name I have it installed in?

you need to use plugin system => download / upload plugins scroll down until you see a form labeled "Import Plugin Definitions XML File" and yes you need to edit the xml to point to your Photopost installation or you could import and then edit the plugin that's a personal preference

caliman
04-03-2006, 05:58 PM
Thanks very much for this.

My thumbs are not showing up, (they are black) but they do link to the right photos. This sounds familar from playing around with photopost in the past. Do you recall what this is about?

Delphiprogrammi
04-03-2006, 07:09 PM
Thanks very much for this.

My thumbs are not showing up, (they are black) but they do link to the right photos. This sounds familar from playing around with photopost in the past. Do you recall what this is about?

goto photopost admin and under global options the setting "FULL SERVER path to your PhotoPost Data directory" is that by any chance missing a trailing (/) slash at the end ?

do the same check for "edit integration" => URL to your PhotoPost DATA directory a / at the end should be there

if you are having trouble to set this via the PhotoPost admin then open config-int.php and set the variables to the correct paths with a / at the end

caliman
04-03-2006, 10:06 PM
do the same check for "edit integration" => URL to your PhotoPost DATA directory a / at the end should be there


That was the ticket! Thanks!!! :cool:

IrPr
04-04-2006, 01:34 AM
i think Zach can do for non Pro Versions !
im newbie with MySQL Queries and PP
but seems a little MySQL Query modification needed !

bada_bing
04-05-2006, 07:43 PM
How do I uninstall this plugin? can I revert the code I placed in my memberinfo and then just delete the plugin? Will this also remove any fields it placed in my database?
If now how do I do this manually?

Delphiprogrammi
04-05-2006, 08:18 PM
How do I uninstall this plugin? can I revert the code I placed in my memberinfo and then just delete the plugin? Will this also remove any fields it placed in my database?
If now how do I do this manually?

remove the code from the template and delete the plugin al done ....

LBmtb
04-06-2006, 12:58 AM
It was working before I upgraded to Photopost 5.3 and now they're black. I checked for the trailing slash and theyr'e both there. Ideas? Thanks in advance.

bada_bing
04-06-2006, 01:59 AM
remove the code from the template and delete the plugin al done ....
Thank you...

LBmtb
04-06-2006, 06:36 AM
It was working before I upgraded to Photopost 5.3 and now they're black. I checked for the trailing slash and theyr'e both there. Ideas? Thanks in advance.
Nevermind. I had an incorrect value for $data_dir :tired:

Thanks for the great plugin! Here's another example (http://www.socaltrailriders.org/forum/member.php?u=191) of what it does for those who are interested.

h_kakashi
04-06-2006, 09:35 PM
I get the following error :


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php on line 760

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php on line 812

The rest of the profile loads but that error is at the top and no thumbnails :(

Any ideas ?

version is 5.2.1
vbulletin is 3.5.0 with security patches.
default member.php file (Chmod 777)

Thanks

SIINSI
04-06-2006, 10:18 PM
I get this error. I double checked everything but, maybe I missed something?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 468

EDIT: Got it working. had to put my prefix in config-int :)

Thanks

Delphiprogrammi
04-06-2006, 10:19 PM
I get the following error :


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php on line 760

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php on line 812

The rest of the profile loads but that error is at the top and no thumbnails :(

Any ideas ?

version is 5.2.1
vbulletin is 3.5.0 with security patches.
default member.php file (Chmod 777)

Thanks
check your database config your datase needs a predix i guess

h_kakashi
04-06-2006, 11:28 PM
The prefix is pp_

The path to config-int.php is correct. Within config-int the prefix is set to pp_

It can connect to the database so username and pass / database name is correct. I'll keep working on it tommorrow.

The Realist
04-07-2006, 03:35 PM
The paths in the plugin:

<phpcode><![CDATA[$ppath="/your/path/to/PhotoPost";
require "{$ppath}/config-int.php";

What should it be written like?

And do you change the 2 above lines of code or just were it says "/your/path/to/PhotoPost

Delphiprogrammi
04-07-2006, 04:18 PM
The paths in the plugin:

<phpcode><![CDATA[$ppath="/your/path/to/PhotoPost";
require "{$ppath}/config-int.php";

What should it be written like?

And do you change the 2 above lines of code or just were it says "/your/path/to/PhotoPost

you only need to change the $ppath variable.What value it should have on your system well no idea .... if you don't know this you need to ask your host's support

MamboCube
04-10-2006, 05:07 PM
i get this error


Warning: Unknown(): open_basedir restriction in effect. File(/gallery/config-int.php) is not within the allowed path(s): (/home/uk2flo/:/usr/lib/php:/usr/local/lib/php:/tmp) in /member.php(651) : eval()'d code on line 4

Warning: Unknown(/gallery/config-int.php): failed to open stream: Operation not permitted in /member.php(651) : eval()'d code on line 4

Warning: Unknown(): open_basedir restriction in effect. File(/gallery/config-int.php) is not within the allowed path(s): (/home/uk2flo/:/usr/lib/php:/usr/local/lib/php:/tmp) in /member.php(651) : eval()'d code on line 4

Warning: Unknown(/gallery/config-int.php): failed to open stream: Operation not permitted in /member.php(651) : eval()'d code on line 4

Fatal error: (null)(): Failed opening required '/gallery/config-int.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uk2flo/public_html/forum/member.php(651) : eval()'d code on line 4


any ideas?

great hack, like it alot:)

Delphiprogrammi
04-10-2006, 05:18 PM
i get this error


Warning: Unknown(): open_basedir restriction in effect. File(/gallery/config-int.php) is not within the allowed path(s): (/home/uk2flo/:/usr/lib/php:/usr/local/lib/php:/tmp) in /member.php(651) : eval()'d code on line 4

Warning: Unknown(/gallery/config-int.php): failed to open stream: Operation not permitted in /member.php(651) : eval()'d code on line 4

Warning: Unknown(): open_basedir restriction in effect. File(/gallery/config-int.php) is not within the allowed path(s): (/home/uk2flo/:/usr/lib/php:/usr/local/lib/php:/tmp) in /member.php(651) : eval()'d code on line 4

Warning: Unknown(/gallery/config-int.php): failed to open stream: Operation not permitted in /member.php(651) : eval()'d code on line 4

Fatal error: (null)(): Failed opening required '/gallery/config-int.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uk2flo/public_html/forum/member.php(651) : eval()'d code on line 4


any ideas?

great hack, like it alot:)

that's a security setup from your host i'm afraid there is not much you can do about it except install Photopost inside vbulletin's directory ...

The Realist
04-10-2006, 05:21 PM
Its because your trying to read a directory outside of what you are allowed to view.

Install this within the vbulletin directory and all will be fine.

MamboCube
04-10-2006, 05:21 PM
oh right,

i currently use a reseller package for my hosting, so is there anything i can change in the WHM, or is it something to do with the actuall server?

thnx for your help by the way, appreciate the quick reply:)

MamboCube
04-10-2006, 05:29 PM
Its because your trying to read a directory outside of what you are allowed to view.

Install this within the vbulletin directory and all will be fine.


ok, but is there any other way?

as i would rather have them in seperate directorys

i have tried setting my path as the full path (with http:// and evrything)

and i get this error Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 36

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 88

same kinda thing as h_kakashi

thnx very much for the reply guys, really appreciate it

Delphiprogrammi
04-10-2006, 05:43 PM
ok, but is there any other way?

as i would rather have them in seperate directorys

i have tried setting my path as the full path (with http:// and evrything)

and i get this error Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 36

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 88

same kinda thing as h_kakashi

thnx very much for the reply guys, really appreciate it

http:// is a url NOT a path ..... did you set the table prefix photopost is uisng ?

MamboCube
04-10-2006, 05:44 PM
yeh its "pp_", i checked it in config_int

The Realist
04-10-2006, 05:48 PM
The path should be like this: /home/blah/public_html/photopost

Laters

MamboCube
04-10-2006, 06:00 PM
The path should be like this: /home/blah/public_html/photopost


when i do this i get this error message

Warning: Unknown(home/*****/public_html/gallery/config-int.php): failed to open stream: No such file or directory in /member.php(651) : eval()'d code on line 4

Warning: Unknown(home/*****/public_html/gallery/config-int.php): failed to open stream: No such file or directory in /member.php(651) : eval()'d code on line 4

Fatal error: (null)(): Failed opening required 'home/*****/public_html/gallery/config-int.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/forum/member.php(651) : eval()'d code on line 4

any ideas?

MamboCube
04-10-2006, 06:17 PM
ok, i put a forward slash infront of "home" and now i get this error again

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 36

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 88

any one else got any ideas wat this could be

MamboCube
04-11-2006, 06:31 AM
ok, not sure if this would work but i have added this code



//################ Go to gallery directory.
chdir("gallery");

//############### Require config.
require "./config-int.php";

//################ Back to forum directory.
chdir("forum");


and i get this error

Parse error: syntax error, unexpected '<' in /home/*****/public_html/forum/member.php(651) : eval()'d code on line 3

does this mean that this way wont work?

vbreal
04-11-2006, 10:41 AM
i get this error

Fatal error: Cannot redeclare pp_get_ext() (previously declared in /hsphere/local/home/trudaily/trudaily.com/gallery/ppp_block.php:64) in /hsphere/local/home/trudaily/trudaily.com/member.php(652) : eval()'d code on line 459

the photopostblock hack which displays pics at the top of my forum home page. it shows random images. it works fine when i disable it.

they both use the same variable. how can i get both to work at the same time

Delphiprogrammi
04-11-2006, 02:25 PM
i get this error

Fatal error: Cannot redeclare pp_get_ext() (previously declared in /hsphere/local/home/trudaily/trudaily.com/gallery/ppp_block.php:64) in /hsphere/local/home/trudaily/trudaily.com/member.php(652) : eval()'d code on line 459

the photopostblock hack which displays pics at the top of my forum home page. it shows random images. it works fine when i disable it.

they both use the same variable. how can i get both to work at the same time

ok try this open the plugin "PhotoPost Gallery Photos in profile" and find this code


function pp_get_ext($filename)
{
return substr($filename, strrpos($filename,"."));
}


comment it out like this


/*function pp_get_ext($filename)
{
return substr($filename, strrpos($filename,"."));
}*/


now try again

Delphiprogrammi
04-11-2006, 02:28 PM
ok, not sure if this would work but i have added this code



//################ Go to gallery directory.
chdir("gallery");

//############### Require config.
require "./config-int.php";

//################ Back to forum directory.
chdir("forum");


and i get this error

Parse error: syntax error, unexpected '<' in /home/*****/public_html/forum/member.php(651) : eval()'d code on line 3

does this mean that this way wont work?

that error would mean you have syntax related error at the line php told you (or before that line)

Delphiprogrammi
04-11-2006, 02:30 PM
ok, i put a forward slash infront of "home" and now i get this error again

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 36

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 88

any one else got any ideas wat this could be

if you are not sure what the path is you should ask your host or if you have shell access you can find out

MamboCube
04-11-2006, 04:08 PM
i know that the path is /home/*****/public_html/gallery

that should be working

this is the code i have when i put in the chdir

$ppath="/gallery";

//################ Go to forum directory.
chdir("../gallery");

require "./config-int.php";

//################ Back to website directory.
chdir("../forum");
//################################################## #################################
//if you use Photopost in a SEPERATED database from vbulletin uncomment these lines
//################################################## #################################
//$link=mysql_connect("localhost","$dbuserid","$dbuserpassword") OR die("I cannot connected to the Database");
//mysql_select_db("products") OR die("failed to select PhotoPost Database");
//################################################## ##################################

//##############################
// Number of photos to display
$num_display = 4;
//##############################

//#####################################
// Number of columns (1 for vertical)
$columns = 4;
//#####################################

//################################################## ###################
// which type of images do you want to show (random, most_view, latest)
$q_switch = "latest";
//################################################## ####################
if(!isset($ViewPerm))
{
if(isset($vbulletin->userinfo['usergroupid']))
{
$mygroups = $vbulletin->userinfo['usergroupid'];
if ($vbulletin->userinfo['membergroupids'] != "") $mygroups .= ",".$vbulletin->userinfo['membergroupids'];
}
$grouparr = explode( ",", $mygroups );
$resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories");
$ViewPerm = array();
while (list($catugid,$ugnoview)=mysql_fetch_row($resultb ))
{
$noview=0; $ViewPerm[$catugid] = 1;
$allnoview = explode( ",", $ugnoview );
foreach ($allnoview as $key)
{
if (in_array($key,$grouparr))
{
$noview=1;
}
}
if ($noview == 0)
{
$ViewPerm[$catugid]=0;
}
}
}
function pp_get_ext($filename)
{
return substr($filename, strrpos($filename,"."));
}
function pp_is_image( $filename)
{
$retval = 0;
$mediatypes = array( ".jpg", ".gif", ".png", ".bmp");
$ext = pp_get_ext($filename);
if (in_array(strtolower($ext),$mediatypes)) $retval=1;
return $retval;
}
switch ($q_switch)
{
case "latest":
$query = "SELECT id,user,userid,cat,bigimage,height,width
FROM {$pp_db_prefix}photos
WHERE storecat = 0 AND userid = $userinfo[userid]
ORDER BY date DESC";
break;
case "most_view":
$query = "SELECT id,user,userid,cat,bigimage,height,width
FROM {$pp_db_prefix}photos
WHERE storecat = 0 AND userid = $userinfo[userid]
ORDER BY views DESC";
break;
case "random":
$query = "SELECT id,user,userid,cat,bigimage,height,width
FROM {$pp_db_prefix}photos
WHERE storecat = 0 AND userid = $userinfo[userid]
ORDER BY RAND()";
break;
}
$result=mysql_query($query);
$counted = 0; $countcol = 0; $profileimagebits = "";
while (list($pid,$puser,$puserid,$pcat,$photo,$height,$w idth) = mysql_fetch_row($result))
{
if ( $ViewPerm[$pcat] == 1 ) continue;
if (pp_is_image($photo))
{
$temp_user = $puserid;
if ($height > $width)
$mthumb = "<img src=\"{$url_path}/images/overlay-roundp.gif\" height=\"105\" width=\"81\" border=\"0\" alt=\"\" />";
else
$mthumb = "<img src=\"{$url_path}/images/overlay-round.gif\" height=\"81\" width=\"105\" border=\"0\" alt=\"\" />";
$profileimagebits .= <<<PPPRINT
<td align="center" class="alt1">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: url({$data_dir}{$pcat}/thumbs/$photo); background-color: #000000; background-repeat: no-repeat; background-position: center;"><a href="{$url_path}/showphoto.php?photo={$pid}">$mthumb</a></td>
</tr>
</table>
</td>
PPPRINT;
$counted++;
$countcol++;
}
if ($counted == $num_display ) break;
if ($countcol == $columns)
{
$profileimagebits .= <<<PPPRINT
</tr>
<tr>
PPPRINT;
$countcol = 0;
}
}
@mysql_free_result($result);

//################################################## ################################################## ###############
//if you use PhotoPost in a SEPERATED database you need to uncomment this line to reselect it
//################################################## ################################################## ###############
//mysql_select_db("products") or die("Unable to select PhotoPost Database");

i am now getting this error

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 43

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 95

know what this means?

thnx for the help by the way

appreciate it

ubblite
04-22-2006, 06:44 AM
Hello Delphiprogrammi,

Love your hack, however I had to uninstall it for now because there's a conflict with Zachariah's Featured Photos mod which can be found here:
http://www.photopost.com/forum/showthread.php?t=121970

If both are installed you will get this error:

Fatal error: Cannot redeclare pp_get_ext() (previously declared in /home/xxxxxxx/public_html/photopost/ppp_block.php:64) in /home/xxxxxxx/public_html/member.php(651) : eval()'d code on line 65

Do you think you could fix this mod to work with his?

Thanks

morrow
04-22-2006, 08:14 PM
I guess this wont work if Photopost is installed in a seperate directory than VB?

Delphiprogrammi
04-22-2006, 08:26 PM
Hello Delphiprogrammi,

Love your hack, however I had to uninstall it for now because there's a conflict with Zachariah's Featured Photos mod which can be found here:
http://www.photopost.com/forum/showthread.php?t=121970

If both are installed you will get this error:

Fatal error: Cannot redeclare pp_get_ext() (previously declared in /home/xxxxxxx/public_html/photopost/ppp_block.php:64) in /home/xxxxxxx/public_html/member.php(651) : eval()'d code on line 65

Do you think you could fix this mod to work with his?

Thanks

yes this is because both hacks use the same function pp_get_ext() it's a PhotoPost function so if you want to use both hacks on the same board then open the plugin's php code find this code


function pp_get_ext($filename)
{
return substr($filename,strpos($filename,"."));
}


and comment it out by doing


/*function pp_get_ext($filename)
{
return substr($filename,strpos($filename,"."));
}*/


that's all it should work now

Delphiprogrammi
04-22-2006, 08:29 PM
I guess this wont work if Photopost is installed in a seperate directory than VB?

you can try as long as your path to config-int.php PhotoPost file is correct it should work.Althrough i have received reports from users that if the PHP security feature openbase_dir is enabled you'll get an error about this

ubblite
04-23-2006, 12:11 AM
yes this is because both hacks use the same function pp_get_ext() it's a PhotoPost function so if you want to use both hacks on the same board then open the plugin's php code find this code


function pp_get_ext($filename)
{
return substr($filename,strpos($filename,"."));
}


and comment it out by doing


/*function pp_get_ext($filename)
{
return substr($filename,strpos($filename,"."));
}*/


that's all it should work now

Nope, did not work.

When you said "open the plugin's php code", which one are you referring too? Zach's or yours? I've applied your suggestion to ppp_block.php & also tried it in PhotoPost Gallery Photos in profile - Hook location: member complete and I'm still getting an error:

Fatal error: Call to undefined function pp_get_ext() in /home/xxxxxx/public_html/photopost/ppp_block.php on line 72

vbreal
04-23-2006, 08:02 PM
ok try this open the plugin "PhotoPost Gallery Photos in profile" and find this code


function pp_get_ext($filename)
{
return substr($filename, strrpos($filename,"."));
}


comment it out like this


/*function pp_get_ext($filename)
{
return substr($filename, strrpos($filename,"."));
}*/


now try again

that didn't work

ubblite
04-24-2006, 09:16 PM
Is there any other way to fix the above problem?

AsukaValentine
04-28-2006, 10:16 AM
I installed it and obtain this error:

Parse error: parse error, unexpected '<' in /home/bbsdream/public_html/member.php(653) : eval()'d code on line 304

This appears at top of users profile, and I don't modify the MEMBERINFO template yet (only in my test template and it doesn't show anything).

I uninstall the plugin and the error persist.

Some fields on my user profile don't show now.
How can I fix it??

Delphiprogrammi
04-28-2006, 06:25 PM
Is there any other way to fix the above problem?

rename the function


function pp_getextensionprofile($filename)
{
return substr($filename, strrpos($filename,"."));
}


you have to change all calls to that function to if you do this ....

Delphiprogrammi
04-28-2006, 06:28 PM
I installed it and obtain this error:

Parse error: parse error, unexpected '<' in /home/bbsdream/public_html/member.php(653) : eval()'d code on line 304


This appears at top of users profile, and I don't modify the MEMBERINFO template yet (only in my test template and it doesn't show anything).

I uninstall the plugin and the error persist.

Some fields on my user profile don't show now.
How can I fix it??

you need to disable this plugin

doyou still get the error ? no then your problem is caused by some other modification

if you still get the error you did something wrong with the template modififcation (or plugin modification) best is to revert the template but note you will LOOSE ALL modifications made to it it will be reset to the original template

vbreal
04-30-2006, 10:37 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=958131&postcount=46" target="_blank">https://vborg.vbsupport.ru/showp...1&postcount=46</a>

can u help me out with this issue

Delphiprogrammi
05-01-2006, 08:39 AM
https://vborg.vbsupport.ru/showpost.php?p=958131&postcount=46

can u help me out with this issue

https://vborg.vbsupport.ru/showpost.php?p=962429&postcount=49

freefallu
05-01-2006, 08:49 PM
I cant see any admincp entries for this ( as in anywhere to change the settings ) but got a wierd problem.

The photos that I as admin have uploaded show in my profile but regular users who have uploaded pics dont show in the profile. I thought perhaps it did not go back over old photos and only started registering photos installed since install but no joy. I as the admin am the only person this will work for ?

Delphiprogrammi
05-01-2006, 09:31 PM
I cant see any admincp entries for this ( as in anywhere to change the settings ) but got a wierd problem.

The photos that I as admin have uploaded show in my profile but regular users who have uploaded pics dont show in the profile. I thought perhaps it did not go back over old photos and only started registering photos installed since install but no joy. I as the admin am the only person this will work for ?

it doesn't add admincp settings that's why you didn't found any.It does check permissions for Photopost.i will test it as a normal user on my testboard maybe you found some "unexpected behaviour"

freefallu
05-01-2006, 09:37 PM
thank you very much. Its great to see hacks for photopost integration to add some beef to photopost...

Delphiprogrammi
05-02-2006, 10:23 AM
hi,

That works fine for me.I see all pics i uploaded as a normal user.Make sure you do not change anything to the plugin source and double check your photopost usergroups permissions (they are similair to vbulletin ) you find them in adm-index.php photopost file

freefallu
05-02-2006, 10:29 AM
I dont quite know what I would be looking for in terms of permissions in photopost ? I will however uninstall and reinstall the hack to see what happens.

Delphiprogrammi
05-02-2006, 10:58 AM
I dont quite know what I would be looking for in terms of permissions in photopost ? I will however uninstall and reinstall the hack to see what happens.

you find that on a link like this www.yourboard.com/forums/photopost/adm-misc.php?admact=usergroups (http://www.yourboard.com/forums/photopost/adm-misc.php?admact=usergroups)

MamboCube
05-14-2006, 10:31 AM
has anyone managed to get it working where their forum and gallery are in seperate directorys?

phkk
05-16-2006, 11:40 PM
This is work fine but YOu can only view it under member?u=1 ( admin )

phkk
05-16-2006, 11:42 PM
if you are using diff database or and database account
delete //

the original of the plug in is
//$link=mysql_connect("localhost","$dbuserid","$dbuserpassword") OR die("I cannot connected to the Database");
//mysql_select_db("products") OR die("failed to select PhotoPost Database");

make them become . delete the // . your forum will connect to your database

$link=mysql_connect("localhost","$dbuserid","$dbuserpassword") OR die("I cannot connected to the Database");
mysql_select_db("products") OR die("failed to select PhotoPost Database");

bada_bing
05-17-2006, 02:39 AM
Is there a way to have it display more then one row ? I am showing 3 images so that it will allign with my style correctly but I would like to add two rows and 3 images per row

glowinggal
05-18-2006, 12:23 PM
I installed it and obtain this error:

Parse error: parse error, unexpected '<' in /home/bbsdream/public_html/member.php(653) : eval()'d code on line 304


This appears at top of users profile, and I don't modify the MEMBERINFO template yet (only in my test template and it doesn't show anything).

I uninstall the plugin and the error persist.

Some fields on my user profile don't show now.
How can I fix it??


I'm getting this as well this morning and when I disable the module - no more errors so it's definetely related to this.

Here is my members.php coding; HAVE NO IDEA what the issue is... but it's something....

I know FOR CERTAIN that my path is correct..... running PP Gallery database on vbulletin - integrated. No database extension prefix.


Parse error: parse error, unexpected '<' in /home/sbbamy/public_html/chat/member.php(651) : eval()'d code on line 1


****** update to the above issue ******
deleted the plug in and then reinstalled it.... .Now receiving this error. Our PP gallery does not have a prefix (as noted above).


Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 34

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 86

glowinggal
05-18-2006, 01:06 PM
check your database config your datase needs a predix i guess

So what happens if PP doesn't a prefix for the database? Is this not useable :(

futuredood
07-06-2006, 04:34 AM
can this be fixed to work with vbgallery? it's pretty much the same file system isn't it, except filenames?

mcyates
07-15-2006, 08:37 PM
I'm getting this error:

Warning: mysql_connect(): Access denied for user 'myfootba'@'localhost' (using password: NO) in /member.php(829) : eval()'d code on line 32
I cannot connect to the database.

EVEN though i have entered the username and password for the photopost database. The one at the top and the one at the very bottom.

LICryptkeeper
09-24-2006, 12:42 AM
I tried installing it on 3.6.1, installing the plugin breaks member.php :( I really need this!

LICryptkeeper
09-24-2006, 01:05 AM
by breaks, I mean nothing shows up.

I did manage to start playing with some connection settings, and now I get "cannot connect" but I know the paths are correct. I'm not sure if it's a VB issue, version isue, or PP issue.

edit: Now I get "failed to select PhotoPost Database" I changed it from 192.168.1.1(which is the pp database) to localhost, do i need to edit anythign else?

I unccomented out the 2 lines in the mysql connection, and the last line. inside confic_inc.php the database user is $mysql_user and in the plugin it's $dbuserid,

is that correct?
vb3.6.1
pp 5.21

edit 2: moved the gallery into the forum directory, still no go.

$ppath="/home/******/public_html/forums/m_gallery";
require "{$ppath}/config-int.php";
//################################################## #################################
//if you use Photopost in a SEPERATED database from vbulletin uncomment these lines
//################################################## #################################
$link=mysql_connect("localhost","$dbuserid","$dbuserpassword") OR die("I cannot connected to the Database");
mysql_select_db("products") OR die("failed to select PhotoPost Database");
//################################################## ##################################

//##############################
// Number of photos to display
$num_display = 4;
//##############################

//#####################################
// Number of columns (1 for vertical)
$columns = 4;
//#####################################

//################################################## ###################
// which type of images do you want to show (random, most_view, latest)
$q_switch = "random";
//################################################## ####################
if(!isset($ViewPerm))
{
if(isset($vbulletin->userinfo['usergroupid']))
{
$mygroups = $vbulletin->userinfo['usergroupid'];
if ($vbulletin->userinfo['membergroupids'] != "") $mygroups .= ",".$vbulletin->userinfo['membergroupids'];
}
$grouparr = explode( ",", $mygroups );
$resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories");
$ViewPerm = array();
while (list($catugid,$ugnoview)=mysql_fetch_row($resultb ))
{
$noview=0; $ViewPerm[$catugid] = 1;
$allnoview = explode( ",", $ugnoview );
foreach ($allnoview as $key)
{
if (in_array($key,$grouparr))
{
$noview=1;
}
}
if ($noview == 0)
{
$ViewPerm[$catugid]=0;
}
}
}
function pp_get_ext($filename)
{
return substr($filename, strrpos($filename,"."));
}
function pp_is_image( $filename)
{
$retval = 0;
$mediatypes = array( ".jpg", ".gif", ".png", ".bmp");
$ext = pp_get_ext($filename);
if (in_array(strtolower($ext),$mediatypes)) $retval=1;
return $retval;
}
switch ($q_switch)
{
case "latest":
$query = "SELECT id,user,userid,cat,bigimage,height,width
FROM {$pp_db_prefix}photos
WHERE storecat = 0 AND userid = $userinfo[userid]
ORDER BY date DESC";
break;
case "most_view":
$query = "SELECT id,user,userid,cat,bigimage,height,width
FROM {$pp_db_prefix}photos
WHERE storecat = 0 AND userid = $userinfo[userid]
ORDER BY views DESC";
break;
case "random":
$query = "SELECT id,user,userid,cat,bigimage,height,width
FROM {$pp_db_prefix}photos
WHERE storecat = 0 AND userid = $userinfo[userid]
ORDER BY RAND()";
break;
}
$result=mysql_query($query);
$counted = 0; $countcol = 0; $profileimagebits = "";
while (list($pid,$puser,$puserid,$pcat,$photo,$height,$w idth) = mysql_fetch_row($result))
{
if ( $ViewPerm[$pcat] == 1 ) continue;
if (pp_is_image($photo))
{
$temp_user = $puserid;
if ($height > $width)
$mthumb = "<img src=\"{$url_path}/images/overlay-roundp.gif\" height=\"105\" width=\"81\" border=\"0\" alt=\"\" />";
else
$mthumb = "<img src=\"{$url_path}/images/overlay-round.gif\" height=\"81\" width=\"105\" border=\"0\" alt=\"\" />";
$profileimagebits .= <<<PPPRINT
<td align="center" class="alt1">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: url({$data_dir}{$pcat}/thumbs/$photo); background-color: #000000; background-repeat: no-repeat; background-position: center;"><a href="{$url_path}/showphoto.php?photo={$pid}">$mthumb</a></td>
</tr>
</table>
</td>
PPPRINT;
$counted++;
$countcol++;
}
if ($counted == $num_display ) break;
if ($countcol == $columns)
{
$profileimagebits .= <<<PPPRINT
</tr>
<tr>
PPPRINT;
$countcol = 0;
}
}
@mysql_free_result($result);

//################################################## ################################################## ###############
//if you use PhotoPost in a SEPERATED database you need to uncomment this line to reselect it
//################################################## ################################################## ###############
//mysql_select_db("products") or die("Unable to select PhotoPost Database");

Delphiprogrammi
10-01-2006, 09:39 AM
can this be fixed to work with vbgallery? it's pretty much the same file system isn't it, except filenames?

No photopost pro and photopost vbgallerry is a big difference

Delphiprogrammi
10-01-2006, 09:41 AM
I'm getting this error:

Warning: mysql_connect(): Access denied for user 'myfootba'@'localhost' (using password: NO) in /member.php(829) : eval()'d code on line 32
I cannot connect to the database.

EVEN though i have entered the username and password for the photopost database. The one at the top and the one at the very bottom.

don't fill in both that error means your MySQL account info is not correct

Delphiprogrammi
10-01-2006, 03:46 PM
I tried installing it on 3.6.1, installing the plugin breaks member.php :( I really need this!

mine is working fine with vb 3.6.1 carefully read the comments above the code.You only need to uncomment that if you have a seperated MySQL database for photopost.Also make sure your permissions on the photopost files are correct

tomotron
12-18-2006, 04:59 AM
i installed this plugin and it seems to be working fine as far as showing that a user has uploaded photos.. but the thumbnails are just the overlay without the image.

any suggestions?

NEVERMIND, FORGOT THE TRAILING SLASH ON MY DATA DIRECTORY

IrPr
12-29-2006, 12:21 AM
Doesnt Work on 3.6.4
I got this error:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /includes/functions_gallery.php on line 419

Warning: Invalid argument supplied for foreach() in /includes/functions_gallery.php on line 419

Warning: Division by zero in /includes/functions_gallery.php on line 1126

Any Suggestion?

Gholsie
12-29-2006, 04:00 AM
Hi guys,

Is there a way I can also add a link in this block? I want one that says "Or, view XXXX's entire gallery" by clicking HERE. Or similar...

IrPr
12-31-2006, 07:45 AM
Doesnt Work on 3.6.4
I got this error:

Warning: array_keys() [function.array-keys]: The first argument should be an array in /includes/functions_gallery.php on line 419

Warning: Invalid argument supplied for foreach() in /includes/functions_gallery.php on line 419

Warning: Division by zero in /includes/functions_gallery.php on line 1126

Any Suggestion?
BUMP
Please Help me Delphiprogrammi

Delphiprogrammi
12-31-2006, 09:49 AM
BUMP
Please Help me Delphiprogrammi

Nope doesn't work on 3.6.4 no longer i just tryed it why it is not working well no idea i have other things todo today :cool:

Cocko
12-31-2006, 10:09 AM
Nope doesn't work on 3.6.4 no longer i just tryed it why it is not working well no idea i have other things todo today :cool:

thats a great pity, really.

Delphiprogrammi
12-31-2006, 10:24 AM
thats a great pity, really.

actually i got this plugin working...


download the plugin XML and open it
set $ppath variable to your photopost installation (NO TRAILING SLASH AT THE END)
save it
admincp => product system => down / upload plugins and import the plugin XML
edit the MEMBERINFO template


all done working fine.If not make sure you have Photopost PHP pro not vbgallerry

Magz
12-31-2006, 11:38 AM
Installed on 3.6.4 with no issues here.

It does as it says on the Tin.

Nice mod

regards

Cocko
12-31-2006, 12:19 PM
actually i got this plugin working...


download the plugin XML and open it
set $ppath variable to your photopost installation (NO TRAILING SLASH AT THE END)
save it
admincp => product system => down / upload plugins and import the plugin XML
edit the MEMBERINFO template


all done working fine.If not make sure you have Photopost PHP pro not vbgallerry


thanx for advice.
will give it a new try next days.
(pp pro running)

IrPr
12-31-2006, 08:00 PM
Installed on 3.6.4 with no issues here.

It does as it says on the Tin.

Nice mod

regards
Which Version of PhotPost vBGallery u use?

Delphiprogrammi
12-31-2006, 09:44 PM
Which Version of PhotPost vBGallery u use?

this is not for vbgallerry .... it's for photopost PHP PRO erm confusing they took over that old vbadvanced script

dpnow
01-13-2007, 11:29 AM
i installed this plugin and it seems to be working fine as far as showing that a user has uploaded photos.. but the thumbnails are just the overlay without the image.

any suggestions?

NEVERMIND, FORGOT THE TRAILING SLASH ON MY DATA DIRECTORY

I have this problem too. All I'm seeing are black boxes

We recently moved from separate databases for PPPro and vB (5.5 and 3.6.4) to a single database, but afaik the correct combined database is being looked at.

Ian

hexonxonx
01-17-2007, 05:55 AM
Very nice, works perfectly with 3.6.4! Clicking installed.

dpnow
01-18-2007, 08:25 AM
I have this problem too. All I'm seeing are black boxes

We recently moved from separate databases for PPPro and vB (5.5 and 3.6.4) to a single database, but afaik the correct combined database is being looked at.

Ian

Problem solved - the missing slash at the end of the PP data path!

Ian

vdi
03-16-2007, 08:12 AM
Hello

I have install your plugin, and i had no problems or fails.
BUT no Thumbnails show on the Member Profile, but the link work perfekt.

http://www.informatikboard.ch/members/rene.html

yotsume
08-26-2007, 09:22 AM
Works great and I have photopost and VB in different directories and in different databases. Now I am off to find a nice block like this to show photopost on my vbadvanced hompage and forum home!

BTW the directions for adding in the database name at the bottom of the file are misleading. I first made the mistake of adding my VB database info at the bottom when it needs to be photopost database! Kicked back errors until I corrected that...

ryancooper
12-16-2007, 11:33 PM
cant seem to figurte this out. . . I get

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/talkdis/public_html/forums/member.php(651) : eval()'d code on line 18