PDA

View Full Version : Phototopost features block on forumhome


Delphiprogrammi
03-29-2006, 10:00 PM
hi people,

I see people who are heavenly modifying there boards to get this done.This is actually not needed.Photopost includes a files that does this automatically

1)install the plugin
2)tempate modification

template FORUMHOME find this code


<!-- /main -->
<br />
<br />


replace with


<!-- /main -->

<br />
$photopostfeature
<br />


remember to modify the path to inc_features.php(this is a PhotoPost file) if your photopost installation is different from mine

that's all

enjoy
all done no more modifications to the original vb files needed

possible problems
Question:After installation i get an error message like


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

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


Answer:This Could be because you did not set a value for the $ppdbprefix (database table prefix) Photopost uses.Open your config-int.php and set the correct value for the $ppdbprefix variable

You can also set this in your Photopost Administration panel under "edit integration" (PhotoPost Database Table Prefixes) field

question i don't know what my path should be can you help me ?


<?php
phpinfo(INFO_VARIABLES);
?>


and look at the value of $_SERVER['PATH_TRANSLATED']; this is the serverpath to the file you are currently vieuwing within your webbrowser when you are done remove this file from your server (security )

MP3
03-30-2006, 10:04 AM
coooooool ^_^

Install

Snake
03-30-2006, 11:56 AM
Nice work.

Thanks!

lazyseller
03-30-2006, 01:15 PM
Awesome!!!! no more file edits for this mod!!!!!

shadow smith
03-30-2006, 04:23 PM
Awesome. Thanks!

I'm new and it was easy to install.

Thanks!

steadicamop
03-30-2006, 06:58 PM
Been looking for this for ages - but doesn't work, get this error right at the top of the page:

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

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

Tried changing the path so it didn't have the "." but makes no difference. Any ideas?

Cheers

shadow smith
03-30-2006, 07:07 PM
I put in the full server path to my photopost directory:

/www/whatever/photopost/inc_features.php

I also had to uncomment out a couple lines in inc_features.php and insert the username/pw/database information as I use a different database to hold my photos.

Steve

steadicamop
03-30-2006, 07:17 PM
I put in the full server path to my photopost directory:

/www/whatever/photopost/inc_features.php

I also had to uncomment out a couple lines in inc_features.php and insert the username/pw/database information as I use a different database to hold my photos.

Steve

Thanks, no good though, still a no go, even when I add the DB details in, and change it to the full path - it would appear more a MySQL error than anything else.

Just not too up on MySQL yet ;)

Cheers

phill2003
03-31-2006, 04:57 PM
I put in the full server path to my photopost directory:

/www/whatever/photopost/inc_features.php

I also had to uncomment out a couple lines in inc_features.php and insert the username/pw/database information as I use a different database to hold my photos.

Steve


spot on thanks for that :)..

steadicamop
04-01-2006, 01:39 PM
Any chance of some support on this please?

Delphiprogrammi
04-01-2006, 02:22 PM
Any chance of some support on this please?

make sure you correctly edited inc_features.php and doublecheck the path to that file for example if you have it installed in a directory within the vbulletin directory "/forums/photopost" the path would be


include('./photopost/inc_features.php');


if you have called the directory which hold Photopost gallery it would be


include('./gallery/inc_features.php');

steadicamop
04-01-2006, 03:06 PM
Yep that is correct, I left it with the default - photopost, from the forum root.

It would appear to find the file correctly, but have issues with MySQL queries within that file - apparently I would be the only person with this problem!

Thanks for your help.


After a quick search for the exact same MySQL error, I found out where I was going wrong - my Photopost database is alongside the VBB one - and in the config.int.php file, the prefix wasn't set, which I set to "pp_" and now it's fine, just must be me, sorry for the hassle!

Roms
04-01-2006, 03:49 PM
^ I changed mine to the full path and it works great! Thanks

include('/home/yoursite/public_html/photopost/inc_features.php');

Delphiprogrammi
04-01-2006, 04:41 PM
Yep that is correct, I left it with the default - photopost, from the forum root.

It would appear to find the file correctly, but have issues with MySQL queries within that file - apparently I would be the only person with this problem!

Thanks for your help.


After a quick search for the exact same MySQL error, I found out where I was going wrong - my Photopost database is alongside the VBB one - and in the config.int.php file, the prefix wasn't set, which I set to "pp_" and now it's fine, just must be me, sorry for the hassle!


glad you got it working

rareclownfish
04-03-2006, 12:54 AM
I'm getting this error.

Warning: Unknown(./public_html/gallery/inc_features.php): failed to open stream: No such file or directory in /index.php(485) : eval()'d code on line 1

Warning: Unknown(./public_html/gallery/inc_features.php): failed to open stream: No such file or directory in /index.php(485) : eval()'d code on line 1

Warning: (null)(): Failed opening './public_html/gallery/inc_features.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /index.php(485) : eval()'d code on line 1

What should I do?

Delphiprogrammi
04-03-2006, 08:07 AM
I'm getting this error.

Warning: Unknown(./public_html/gallery/inc_features.php): failed to open stream: No such file or directory in /index.php(485) : eval()'d code on line 1

Warning: Unknown(./public_html/gallery/inc_features.php): failed to open stream: No such file or directory in /index.php(485) : eval()'d code on line 1

Warning: (null)(): Failed opening './public_html/gallery/inc_features.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /index.php(485) : eval()'d code on line 1


What should I do?

do not include your public_html directory there it should be


include('./gallery/inc_features.php');

phill2003
04-03-2006, 08:27 AM
Yes if your going to use the ./ directory pointer then take out the public html bit otherwise take out the ./ and replace it with the full path (not url) to the folder you want..


include('./gallery/inc_features.php');


or if that does not work



include('/path/to/your/file/gallery/inc_features.php');

rareclownfish
04-03-2006, 11:55 AM
<i>Parse error: syntax error, unexpected $end in /home/admin/public_html/forums/index.php(485) : eval()'d code on line 2</i>

This is the error I'm getting now.
Thanks

Delphiprogrammi
04-03-2006, 12:10 PM
Parse error: syntax error, unexpected $end in /home/admin/public_html/forums/index.php(485) : eval()'d code on line 2

This is the error I'm getting now.
Thanks

you need to be carefull when editing PHP most likely you forgot a ( or ) ' or ' or ; somewhere

phill2003
04-03-2006, 12:13 PM
or you could have put a spare " when you put your username password and database name into inc_features

rareclownfish
04-03-2006, 11:25 PM
Ok guy's maybe I'm not doing this right.
Am I supposed to mod the inc_features.php within photopost if so where in the file do I need to mod? or mod the Plugin PHP Code?
I have been moding the Plugin PHP Code this whole time. I still get the errors.

rareclownfish
04-04-2006, 12:30 AM
This is what's in my inc_features file

//$link = mysql_connect ("localhost", "userid", "password")

Should I take out the "" after I add the reall username and password?

Zachariah
04-04-2006, 01:08 AM
This is what's in my inc_features file

//$link = mysql_connect ("localhost", "userid", "password")

Should I take out the "" after I add the reall username and password?

Hello,

Do your have Photopost Pro installed and integrated into vBulletin ?
- If YES contenue reading :).

Are you VB database and Pro database the same ?
- If NO contenue reading :).


Here we go ! :bunny:
- Unhash these @ the top of the file
- Fill in the photopost DB info

// If you use the same userid/password to access both databases, you don't need to
// uncomment the mysql_connect - this is only if you require different ids to access
// the PhotoPost database.
//$link = mysql_connect ("localhost", "$dbuserid", "$dbuserpassword") or die('I cannot connect to the database.');
//mysql_select_db ("pp_database")or die("Could not select photopost database");

@ very botem of the file
// If you use PhotoPost in a seperate database from vB, you'll need to reselect the vB database!
//mysql_select_db ("vb_database");

rareclownfish
04-04-2006, 01:14 AM
Hello,

Do your have Photopost Pro installed and integrated into vBulletin ? YES I do.
- If YES contenue reading .

Are you VB database and Pro database the same ? Yes they are the same.
- If NO contenue reading .

Zachariah
04-04-2006, 01:29 AM
Are you VB database and Pro database the same ?
Yes they are the same.


ADMINCP => Plugin System => Plugin Manager => Photopost Feature Block
- Hook location: forumhome_complete

Default install:
include('./photopost/inc_features.php');

This needs your PATH to your Pro install folder.
If you do not know it off the top of your head you can look it up in the /photopost/config-inc.php file.

EX:
// Path to your PhotoPost installation - no end slashes
$PP_PATH = "/www/pp/pro";

This is the value that is Replace in the plugin.
include('/www/pp/pro/inc_features.php');

rareclownfish
04-04-2006, 01:40 AM
Well I'm not getting anymore errors, but I don't see this on the main forum.
https://vborg.vbsupport.ru/attachment.php?attachmentid=44958

The forum portal is blank.
www.rareclownfish.com

Zachariah
04-04-2006, 01:56 AM
Well I'm not getting anymore errors, but I don't see this on the main forum.
https://vborg.vbsupport.ru/attachment.php?attachmentid=44958

The forum portal is blank.
www.rareclownfish.com

**** Problems ***************** Answers ***************

Why do I get a header of the box and not images ?

- photopost/config-int.php

// If your PhotoPost tables have a prefix, put it here
// Example:
// pp_ = "pp_";
$pp_db_prefix = "pp_";

Default prefix.

Why do my images show up but only as black spots ?

Edit: photopost/config-int.php
- add the " / " slash @ the end of:

$data_dir = "http://www.website.com/photopost/data/";

In Red


If you still have problems yell ;)

rareclownfish
04-04-2006, 01:59 AM
Well I don't even get a header on the portal it shows up on the forums homepage.
Do I need to make my own box, or this code should have done eveything for me?

rareclownfish
04-04-2006, 02:03 AM
I have this code with in my cinfig-int.php file. $pp_db_prefix = "pp_";
Should I be adding or changing somthing?

rareclownfish
04-04-2006, 02:09 AM
**** Problems ***************** Answers ***************

Why do I get a header of the box and not images ?

- photopost/config-int.php

// If your PhotoPost tables have a prefix, put it here
// Example:
// pp_ = "pp_";
$pp_db_prefix = "pp_";

Default prefix.

Why do my images show up but only as black spots ?

Edit: photopost/config-int.php
- add the " / " slash @ the end of:

$data_dir = "http://www.website.com/photopost/data/";

In Red


If you still have problems yell ;)

Well the images don't show up at all, just the box.

rareclownfish
04-04-2006, 03:08 AM
Thanks works great, now only to get it on the portal page :)

phill2003
04-04-2006, 04:06 AM
The variable should work on the portal page at least it did on mine (vba) without anymore messing about..

rareclownfish
04-04-2006, 12:18 PM
The variable should work on the portal page at least it did on mine (vba) without anymore messing about..

????

phill2003
04-04-2006, 01:25 PM
I put this $photopostfeature in the adv_portal template

between

$header


$navbar


like this.

$header
$photopostfeature

$navbar


and it worked a treat, go and look at where it is on my site...

rareclownfish
04-04-2006, 02:41 PM
I'm not using VBA, i'm using VBportal

phill2003
04-04-2006, 02:54 PM
Well i know they use photopost so it may be worth your while to ask there how to do it on the portal..

rareclownfish
04-04-2006, 03:02 PM
Thanks got it to work

The Realist
04-04-2006, 06:43 PM
I cant get it to work, keeps saying cant connect to photopost database?

Delphiprogrammi
04-04-2006, 09:31 PM
I cant get it to work, keeps saying cant connect to photopost database?


did you field in the variables ......config.inc.php if you use seperted databases you need to loo at inc_features to

The Realist
04-05-2006, 07:06 AM
Both Photopost and VB are using the same database.



did you field in the variables ......config.inc.php if you use seperted databases you need to loo at inc_features to

The Realist
04-05-2006, 09:26 AM
Ok, finally got it to work.

My problem was the inc_features.php file that I needed to edit as follows:


//$link = mysql_connect ("localhost", "$dbuserid", "$dbuserpassword") or die('I cannot connect to the database.');
mysql_select_db ("XXXXXXXXXXXX")or die("Could not select photopost database");


You need to uncomment (remove the // before the above line) and you need to be replaced the above red X's with your database name.

Worked for me.

Laters.

morrow
04-09-2006, 06:10 AM
What if I have it installed like this:

Root
-vBulletin
-photopost

Where Photopost is not installed within my vBulletin Dir.

http://www.njflyfishing.com/vBulletin/index.php?

That's my path. Scroll to the very bottom.

For some reason, the addr is coming up like this:
http://www.njflyfishing.com/vBulletin/www.njflyfishing.com/photopost/showgallery.php?cat=506

Other than this path problem, It looks ok... I just don't see any photo's.

Delphiprogrammi
04-09-2006, 07:41 AM
What if I have it installed like this:

Root
-vBulletin
-photopost

Where Photopost is not installed within my vBulletin Dir.

http://www.njflyfishing.com/vBulletin/index.php?

That's my path. Scroll to the very bottom.

For some reason, the addr is coming up like this:
http://www.njflyfishing.com/vBulletin/www.njflyfishing.com/photopost/showgallery.php?cat=506

Other than this path problem, It looks ok... I just don't see any photo's.

your path is not correct with a setup like that you need to set the path to for example


/var/www/njflyfishing.com/public_html/photopost


don't know if that's one correct just an example.But you are better of to install Photopost inside vbulletins directory why ? otherwise ones the path is correct you might be affected by the "openbase_dir" restriction (this is a PHP security feature) so you need to set the path to your www root and then include a /photopost at the end

CAMS
04-11-2006, 01:47 PM
anyway to get rid of the rounded thumbnail borders on the images? and have no border atall?

phill2003
04-11-2006, 03:03 PM
If you look for this 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=\"\" />";

In inc-features and change the overlay round to whatever you want that should do it, or leave it blank if you dont want one..

CAMS
04-11-2006, 03:04 PM
sorted it bud , cheers

TunerNetwork
04-19-2006, 02:49 AM
Warning: Unknown: failed to open stream: No such file or directory in /index.php(488) : eval()'d code on line 133

Warning: Unknown: Failed opening './photopost/inc_features.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /index.php(488) : eval()'d code on line 133

Yep, thats the error im getting, any clue? Im bout to punch the screen,lol. thanks

What ive done so far is just upload the plugin, and i get that error right away, I didnt put any code in the FORUMHOME yet cause i wanna get this part fixed.

also, my path to my gallery is: public_html/forum/gallery/ that have something to do with it?

TunerNetwork
04-19-2006, 10:36 AM
bump bump, help please, thanks everyone!

Delphiprogrammi
04-19-2006, 10:54 AM
Warning: Unknown: failed to open stream: No such file or directory in /index.php(488) : eval()'d code on line 133

Warning: Unknown: Failed opening './photopost/inc_features.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /index.php(488) : eval()'d code on line 133

Yep, thats the error im getting, any clue? Im bout to punch the screen,lol. thanks

What ive done so far is just upload the plugin, and i get that error right away, I didnt put any code in the FORUMHOME yet cause i wanna get this part fixed.

also, my path to my gallery is: public_html/forum/gallery/ that have something to do with it?

yes that path is not correct it is impossible a path like that works you need to set the "FULL" path if you don't know what this value should be look at the

phpinfo();


output

it should tell you

TunerNetwork
04-19-2006, 09:26 PM
K, where do i change the path at? the plugin itself or a file already on the server? If you can just get a lil specific, sorry, i havent messed with the gallery too much yet

whitetigergrowl
04-23-2006, 01:51 AM
Change the path in the plug-in itself. If the path is correct and you still get that error, put another period in front of the slash. Works like a charm. Thanks!

TunerNetwork
04-23-2006, 11:04 PM
still gettin an error

phkk
04-24-2006, 02:48 AM
not working on me

wrang
04-24-2006, 05:34 PM
It dosent show in my page i haved set like this where my galley called galleri
include('./galleri/inc_features.php');
and put the $photopostfeature in the Forum Home template wher i want it but it dosent still came up

Both Photopost and Vbulletin is in the same database

What have i do wrong?

phill2003
04-24-2006, 05:39 PM
try the full path instead of that like /home/whatever/public_html/galleri

wrang
04-24-2006, 06:02 PM
try the full path instead of that like /home/whatever/public_html/galleri

Thanks for the help this worked!!

But it dosent show the latest picture

Se my picture
In the forum
46449

and from the gallery
46450

TunerNetwork
04-24-2006, 11:13 PM
k, when I put the full url in, I get the following:
Warning: Unknown: failed to open stream: No such file or directory in /index.php(488) : eval()'d code on line 133

Warning: Unknown: Failed opening '.http://www.tunernetwork.com/forum/gallery/inc_features.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /index.php(488) : eval()'d code on line 133

any thoughts?

Delphiprogrammi
04-25-2006, 07:12 AM
k, when I put the full url in, I get the following:
Warning: Unknown: failed to open stream: No such file or directory in /index.php(488) : eval()'d code on line 133

Warning: Unknown: Failed opening '.http://www.tunernetwork.com/forum/gallery/inc_features.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /index.php(488) : eval()'d code on line 133

any thoughts?

a path is not a url ...... you must supply the serverpath not the url

Delphiprogrammi
04-25-2006, 07:14 AM
It dosent show in my page i haved set like this where my galley called galleri
include('./galleri/inc_features.php');
and put the $photopostfeature in the Forum Home template wher i want it but it dosent still came up

Both Photopost and Vbulletin is in the same database

What have i do wrong?

then the path is not correct ...

Delphiprogrammi
04-25-2006, 07:16 AM
K, where do i change the path at? the plugin itself or a file already on the server? If you can just get a lil specific, sorry, i havent messed with the gallery too much yet

open the plugin XML and change the path to the value it should have for your setup

Delphiprogrammi
04-25-2006, 07:28 AM
hi people,

Since so manny people have trouble setting there path ....here's what you can do about it.In your favorite editor create a new PHP source file with this code


phpinfo(INFO_VARIABLES);


and look at the values of


$_SERVER['DOCUMENT_ROOT];
$_SERVER['SCRIPT_FILENAME'];
$_SERVER['PATH_TRANSLATED'] //complete serverpath to current file


change the path to the value it says you stimm may need to adjust it a little

wrang
04-25-2006, 10:48 AM
But it dosent show the latest picture

Se my picture
In the forum
46449

and from the gallery
46450

Delphiprogrammi
04-25-2006, 12:02 PM
But it dosent show the latest picture

Se my picture
In the forum
46449

and from the gallery
46450

inc-features.php


// which type of images do you want to show (random, most_view, latest)
$q_switch = "latest";

wrang
04-25-2006, 04:25 PM
Its strange in the gallery it says latest but in the forum it is not the latest

In the inc-features.php I have
// which type of images do you want to show (random, most_view, latest)
$q_switch = "latest";

dutchbb
04-30-2006, 05:15 PM
Cool no more index.php edits adter upgrades!

cavyspirit
05-07-2006, 12:27 AM
I'm getting:

Fatal error: Cannot redeclare pp_get_ext() in /home/mysite/public_html/photos/inc_features.php on line 70

junaid
05-07-2006, 12:15 PM
any body show code how to edit inc_features.php

YOimYO
05-07-2006, 02:10 PM
im getting this ...

Warning: Unknown(/var/www/html/TTCPhoto/inc_features.php): failed to open stream: No such file or directory in /index.php(485) : eval()'d code on line 322

Warning: (null)(): Failed opening '/var/www/html/TTCPhoto/inc_features.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /index.php(485) : eval()'d code on line 322

cavyspirit
05-07-2006, 03:11 PM
I'm getting:

Fatal error: Cannot redeclare pp_get_ext() in /home/mysite/public_html/photos/inc_features.php on line 70

Fixed my problem. I had already tried to install manually. Just had to remove what I had done.

Now it works great. Thanks.

Dark s.s. Trunk
07-27-2006, 07:24 PM
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 ); } // // Featured Photos Code // Follow down to End Feature Photos Code // switch ($q_switch) { case "most_view": $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.w idth,c.catname,c.photos,c.posts FROM {$pp_db_prefix}photos p LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0 ORDER BY views DESC"; break; case "latest": $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.w idth,c.catname,c.photos,c.posts FROM {$pp_db_prefix}photos p LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0 ORDER BY date DESC"; break; default: $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.w idth,c.catname,c.photos,c.posts FROM {$pp_db_prefix}photos p LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0 ORDER BY RAND()"; } $result = mysql_query($query); $counted = 0; $countcol = 0; $featured = ""; while (list($pid,$puser,$puserid,$pcat,$photo,$height,$w idth,$catname,$cphotos,$cposts) = mysql_fetch_row($result)) { if ( $ViewPerm[$pcat] == 1 ) continue; if ( pp_is_image($photo) ) { $temp_user = $puserid; if ( $height > $width ) $mthumb = ""; else $mthumb = ""; // One box for each feature $featured .= << $mthumb
by {$puser}
? ? ?
$catname
$cphotos photos
$cposts comments
PPPRINT; $counted++; $countcol++; } // If we've reached our limit, quit if ( $counted == $num_display ) break; // If we need to end the column, do so. if ( $countcol == $columns ) { $featured .= << PPPRINT; $countcol = 0; } } @mysql_free_result($result); // First part is for the featured photos // $photopostfeature not holds the Featured Photos box and $photopostcats (set below) holds the // gallery list $photopostfeature = << Featured Photos
$featured

PPPRINT; // // End Featured Photos Code // // If you use PhotoPost in a seperate database from vB, you'll need to reselect the vB database! //mysql_select_db ("vb_database"); ?> i did everything and that is what happends.. i found in my skins i dun have <!-- /main -->
<br />
<br />
i do have this <!-- main -->
$forumbits
<!-- /main -->

<!-- what's going on box --> that is the closest i canfind but i get errors

PSDPlayer
10-10-2006, 09:44 AM
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 ); } // // Featured Photos Code // Follow down to End Feature Photos Code // switch ($q_switch) { case "most_view": $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.w idth,c.catname,c.photos,c.posts FROM {$pp_db_prefix}photos p LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0 ORDER BY views DESC"; break; case "latest": $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.w idth,c.catname,c.photos,c.posts FROM {$pp_db_prefix}photos p LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0 ORDER BY date DESC"; break; default: $query = "SELECT p.id,p.user,p.userid,p.cat,p.bigimage,p.height,p.w idth,c.catname,c.photos,c.posts FROM {$pp_db_prefix}photos p LEFT JOIN {$pp_db_prefix}categories c ON c.id = p.cat WHERE c.cattype = 'c' AND p.cat != 500 AND p.storecat = 0 ORDER BY RAND()"; } $result = mysql_query($query); $counted = 0; $countcol = 0; $featured = ""; while (list($pid,$puser,$puserid,$pcat,$photo,$height,$w idth,$catname,$cphotos,$cposts) = mysql_fetch_row($result)) { if ( $ViewPerm[$pcat] == 1 ) continue; if ( pp_is_image($photo) ) { $temp_user = $puserid; if ( $height > $width ) $mthumb = ""; else $mthumb = ""; // One box for each feature $featured .= << $mthumb
by {$puser}
? ? ?
$catname
$cphotos photos
$cposts comments
PPPRINT; $counted++; $countcol++; } // If we've reached our limit, quit if ( $counted == $num_display ) break; // If we need to end the column, do so. if ( $countcol == $columns ) { $featured .= << PPPRINT; $countcol = 0; } } @mysql_free_result($result); // First part is for the featured photos // $photopostfeature not holds the Featured Photos box and $photopostcats (set below) holds the // gallery list $photopostfeature = << Featured Photos
$featured

PPPRINT; // // End Featured Photos Code // // If you use PhotoPost in a seperate database from vB, you'll need to reselect the vB database! //mysql_select_db ("vb_database"); ?> i did everything and that is what happends.. i found in my skins i dun have <!-- /main -->
<br />
<br />
i do have this <!-- main -->
$forumbits
<!-- /main -->

<!-- what's going on box --> that is the closest i canfind but i get errors

I keep getting the same output at the top of the forum.

dtdesign
10-11-2006, 01:44 PM
I know this will display latest or most viewed, but I'm using it with Photopost Pro Classifieds and was wondering could I use it twice and say call the latest ads in one block and the latest trade ads in another block ?

As you can see here I'm just including the latest ads - Clicky (http://www.driver.ie/forum)

phill2003
10-11-2006, 03:35 PM
In short----Yes.

you will need to change a couple of function names but once you do that yes it will work a treat.

roni1015
11-05-2006, 02:18 PM
Does anyone know if this will work in 3.6?

roni1015
11-05-2006, 07:56 PM
Never mind, it does work in 3.6. Well, sort of. It's not *technically* showing a picture though, it's showing everything except instead of an image, it's showing a black box where the thumbnail should be...any idea why??

roni1015
11-07-2006, 07:58 PM
Please? Any suggestions why it would only show black images instead of the actual photos?

cellarius
11-08-2006, 09:51 AM
I have the same problem: Only showing black images. Anybody out there?
vB 3.6.2, PP 5.5.

cellarius
11-08-2006, 10:25 AM
O.K., figured it out. For everybody having the same problem: Go to your PP Admin-Center -> Administration -> Edit Integration -> URL to your PhotoPost DATA directory -> add trailing slash at the end ("data/").

This worked for me.

roni1015
11-09-2006, 03:04 PM
WOOT! You rock!! THANKS!!!

cellarius
11-10-2006, 09:01 AM
You're welcome :cool:

m3site
11-28-2006, 05:43 PM
I installed the plug in but there is no pictures under feature gallery bar.

look at www.motorcycle-journal.com/forum

I am not getting any error...any idea?

stupidstu
11-29-2006, 10:34 AM
Anyone get this plugin worked with 3.6.4 ?

popmyzit
12-05-2006, 07:46 AM
**** Problems ***************** Answers ***************

Why do I get a header of the box and not images ?

- photopost/config-int.php

// If your PhotoPost tables have a prefix, put it here
// Example:
// pp_ = "pp_";
$pp_db_prefix = "pp_";

Default prefix.

Why do my images show up but only as black spots ?

Edit: photopost/config-int.php
- add the " / " slash @ the end of:

$data_dir = "http://www.website.com/photopost/data/";

In Red


If you still have problems yell ;)



Did both and I still have header with no images.... please help!

phill2003
12-05-2006, 01:31 PM
Are your photos all in the members albums? If they are then that is your problem this hack is designed by default not to take photos from members albums (cat 500).

budlite74
12-08-2006, 08:07 PM
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/path/tomysite/html/photopost/inc_features.php on line 67

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/path/tomysite/html/photopost/inc_features.php on line 143

any sugestions?

mcyates
01-05-2007, 08:19 PM
Are your photos all in the members albums? If they are then that is your problem this hack is designed by default not to take photos from members albums (cat 500).
well isn't that a bit stupid.

phill2003
01-06-2007, 01:24 PM
well isn't that a bit stupid.


Not really feel free to recode the hack to your liking though...

steadicamop
01-08-2007, 08:18 PM
Are your photos all in the members albums? If they are then that is your problem this hack is designed by default not to take photos from members albums (cat 500).

I have this way set up on mine, you can get round this, not sure if there's any side-effects but it seems to work fine on mine.

In the Photopost directory, edit the inc_features.php file and search for "500" (it should appear 3 times in total, around half way down the page) I changed these to "0" and refreshed and they appeared with no problems - I intend on leaving mine set up this way.

HTH

TotalCare
01-10-2007, 02:20 AM
In the Photopost directory, edit the inc_features.php file and search for "500" (it should appear 3 times in total, around half way down the page) I changed these to "0" and refreshed and they appeared with no problems - I intend on leaving mine set up this way.

Many thanks for this!

lthaus
01-11-2007, 12:41 AM
Anyone get this plugin worked with 3.6.4 ?

I'm stuck..

3.6.4
added the xml..
edited the path...
Plugin PHP Code
include('/home/webuser/photoshop/inc_features.php');
include('/home/webuser/photoshop/inc_photopost.php');

added

$photopostfeature
$navbar

But I still don't even get a blank feature box..
right now it just shows two navbars.. (second added just to be sure I was in the right template.

Photopost works if I go there, but I'm not having luck getting it up on 3.6.4
?? Any idea to what I may have missed. ??


EDIT

OK.. forgive me...
but..
Warning: Plugins are currently globally disabled in your options. In order for plugins and products to function correctly, you must enable the plugin system. Importing a product will do this for you automatically.

Plugin System
Title Hook Location Active Controls
Product : vBulletin
Photopost Feature Block forumhome_complete [Edit] [Delete]


I guess I assumed that installing the plugin would in fact enable the plugin system.
I was wrong...
BE SURE you turn on your plugin system..
Works like a champ.
Duh!..

Thx.!

Bree
03-13-2007, 01:14 AM
*Installed* I love it! Thanks so much! vBulletin: 3.6.5

Always, Bree
http://forum.SmnLikDat.com (if u wanna check it out)

magnaromagna
04-22-2007, 01:19 PM
hi,
installed, but in forum home the thumbnail is not visible:
www.baltazar.it/index.php?styleid=17
:confused:

magnaromagna
05-12-2007, 12:06 PM
hallo,
anyone could help me? forumhome shows black thumbnail....

phill2003
05-12-2007, 06:46 PM
hallo,
anyone could help me? forumhome shows black thumbnail....


Go into the photopost admin settings and on the data directory path add a / to the server path.

VViper
05-27-2007, 10:45 AM
Hi there, nice mod once again thanks for sharing.
Mine is appearing below the forum and not on top although i edited the style.

any thoughts?
I replaced it with this code, is that current for the latest build of VB?

<!-- /main -->

<br />
$photopostfeature
<br />

VViper
05-27-2007, 10:51 AM
All sorted, for some reason there was two <!-- /main --> in the style templates.

hope this helps some other dislexic person like myself :)

VViper
06-03-2007, 10:57 AM
Does this work with the latest version of VB3.6.7, i just updated and it stopped working. :(

Just confirming that it does and i need sleep.

I didnt edit the style and FORUMHOME template.

wrang
06-03-2007, 11:36 AM
Yes it works for me with 3.6.7

morrow
06-03-2007, 03:23 PM
Works for me on 3.6.7

dt-pain
08-19-2007, 06:26 PM
no matter what i do. I just get the header bar with no pictures. Ive tried every thing here with no luck. Please help.. Thanks

stuartn
11-06-2007, 08:37 PM
Okay, hopefully a easy answer to this one, installed it fine. However, if you wanted it to show on all pages and not just the forumhome. How would you do this ?

stuartn
11-09-2007, 02:22 PM
No takers :(

just77me
05-16-2008, 07:09 AM
Dows this work on 3.7 too??? and is a photopost connection in the profil available for 6.x not 2.4.x thank you.

JustJon
05-27-2008, 12:53 AM
I upgraded to vB 3.7 and it worked fine. I just upgraded photopost to 6.1 and now I get black thumbnails on my forum home. I read above and there is a / at the end of my data directory, so that's not it.

What can I do to fix this? Thanks.

WATW
06-06-2008, 12:48 PM
Not sure what the fix is, but I've got pp6.1 and vb371 with photopostfeature running ok on one site where the db is shared, but getting black images on another site where there's one db for vb and one for pp.

WATW
06-08-2008, 06:13 AM
just checked and the / wasn't in place in the $data_dir line in config-int.php, so I've added it and now eveything works OK

shadowdancer36
09-18-2008, 07:18 PM
Does this lil hack work for 3.7?

Mudcrutch
09-29-2009, 02:08 PM
Working on 3.7.2 for me.

joseduddy
07-13-2010, 06:51 PM
I have this photo post feature on my forum index. It use to change the picture after every refresh of the page with random pictures from members gallery. After all my upgrades it no longer changes. Can some one tell me which file to edit to have it randomly select pictures. I remember I had to change a line of code. Thanks in advance
Jose Duddy

jasbeanie
11-30-2010, 12:59 PM
hi i seem to be having problems.. i recently did a server migration and after that, when i add in new images to the gallery, it does not show up in the forum main...