vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Add PhotoPost Pro to each forum. (https://vborg.vbsupport.ru/showthread.php?t=112105)

Zachariah 04-03-2006 10:00 PM

Add PhotoPost Pro to each forum.
 
/* ----------------- 4/03/2006 4:37PM -----------------
Add PhotoPost Pro to each forum.

This hack will allow you to fill-in catagories from Photopost Pro to display in a film strip format under the $navbar. This will show in every thread of the forum as well.

1 querry
  • 1 template
  • 4 Fields
  • 1 file upload
  • 3 plugins
  • 5 phrases

Tested on:
  • vBulletin 3.5.4
  • PhotoPost Pro 5.21


Each forum extra options:


- Image Count:
(How many images would you like to show ?)

- Image Order:
(Enter 1 for newest, 2 for most viewed, 3 for most comments, 4 for highest rated, 5 for random.)

- Select Catagory(s):
(Here you can list catagories you wish to show images from. EX: 1,10,20)

- Show Imagebit:
(Title, Description, Rating, Username, Views, Dimensions, and more.)

+-+-+-+-+-+-+-+-+-+-+-+-

Zachariah 04-04-2006 12:07 AM

What if VB and PhotoPost are in different DB's ?

inc_vbcat.php

- Unhash these @ the top of the file
Code:

// 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");


- Fill in the photopost DB info

@ very botem of the file
Code:

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

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

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

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

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

- photopost/config-int.php

Code:

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

Default prefix.

Zachariah 04-04-2006 12:08 AM

There are 2 templates:
  • $feature
  • $customfeature (no image info)

Extra Image Info:
  • photopost/inc_vbcat.php

Code:

$feature .= <<<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}">$sthumb</a></td>
        </tr>
        </table>
<font size="1" face="verdana,arial"><!--{$ptitle}<br />-->
        by {$puser}<br />
        &middot; &middot; &middot;<br />
        <a href="{$url_path}/showgallery.php?cat={$pcat}">$catname</a><br />
        $cphotos photos<br />$cposts comments<br /></font>
    </td>
PPPRINT;

1) Add Title of Image
Find and remove RED:
Code:

<!--{$ptitle}<br />-->

FAQs:

HC. 04-04-2006 12:41 AM

Great
just what I was looking for the new site
Thanks

IrPr 04-04-2006 01:20 AM

Thanks Zach !

COBRAws 04-04-2006 01:36 AM

There is a "Show photos from category" and we have to enter Category IDs there, how can I disable that and make it so any PP category pic will show in this hack?

Zachariah 04-04-2006 02:15 AM

Quote:

Originally Posted by COBRAws
There is a "Show photos from category" and we have to enter Category IDs there, how can I disable that and make it so any PP category pic will show in this hack?

This Hack is to add selected image group(s) from the gallery to select forums.

EX:

In a forum we talk about Science and the images that show are from 2 science catagories in the gallery. This could work on any subject (forum) that you need image interaction.

+-+-++-+-+-+-+-+-+-+-+-+-+-++-+-+-+
- What did you need or have in mind ?

* Image Order - newest, random, most viewed, top rated, most comments
* Image Count - enter value
* Number of Columns - enter value
* Exclude Catagories - enter value(s)
* Only Catagories - enter value(s)

On every page or just a select few ?

Deska 04-04-2006 12:05 PM

Very nice hack:)

I have question:
How to add all images categories without have to type image category ID one by one?

SaN-DeeP 04-04-2006 12:07 PM

thats great. thanks

trackpads 04-04-2006 07:30 PM

Excellent!!

b6gm6n 04-05-2006 01:55 AM

Awesome mod, cheers

-b6

COBRAws 04-05-2006 10:07 AM

Quote:

Originally Posted by Zachariah
This Hack is to add selected image group(s) from the gallery to select forums.

EX:

In a forum we talk about Science and the images that show are from 2 science catagories in the gallery. This could work on any subject (forum) that you need image interaction.

+-+-++-+-+-+-+-+-+-+-+-+-+-++-+-+-+
- What did you need or have in mind ?

* Image Order - newest, random, most viewed, top rated, most comments
* Image Count - enter value
* Number of Columns - enter value
* Exclude Catagories - enter value(s)
* Only Catagories - enter value(s)

On every page or just a select few ?

I just wanted to know if there was an easy way of just showing any PhotoPost category on the forums. but its good as it is. very useful!

The Realist 04-05-2006 10:18 AM

Im getting this error: Fatal error: Field ppgcount is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 485

Any ideas?

Zachariah 04-05-2006 02:42 PM

Quote:

Originally Posted by The Realist
Im getting this error: Fatal error: Field ppgcount is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 485

Any ideas?

AdminCP => Plugin System => Plugin Manager

Hook Location: forumdata_start
Plugin: Add PhotoPost Pro - ForumDisplay

This is not working right.
- Perhaps not Active ?
- Perhaps not There ?

There should be 4 lines of code there. I have seen @ times on import of plugins a large amount of space saved before the code in a plug-in. If there is you can remove the extra space or reinstall again over.

The Realist 04-05-2006 02:49 PM

The plugin installed ok M8, but I had to remove it because it was saying the same error code when I tried to edit/manage other parts of my forum.

The Realist 04-05-2006 03:12 PM

Tried all ways and still getting:

Fatal error: Field ppgcount is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 485

Not my day.

Zachariah 04-05-2006 04:52 PM

Quote:

Originally Posted by The Realist
Tried all ways and still getting:

Fatal error: Field ppgcount is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 485

Not my day.

Weird
- Just did an install here.
http://www.socalrailfan.com/forums/f...splay.php?f=13

Think there is something else installed that might gum up the works ?

b6gm6n 04-05-2006 11:53 PM

Great mod made even greater if an option was available to remove thumbs from threads and show just on forum display...either or etc...can be a little distracting from users posts, as an intro to a forum its great tho...

-b6

Zachariah 04-06-2006 12:16 AM

Plugin: Add PhotoPost Pro - Main
Hook Location: global_start

Remove:
Code:

if (THIS_SCRIPT == 'showthread'){
$search_text = '$navbar';
$vbulletin->templatecache['SHOWTHREAD'] = str_replace($search_text,
$search_text.fetch_template('forumdisplay_ppgallery'),$vbulletin->templatecache['SHOWTHREAD']);
}


- I'll add later w/ option in AdminCP to toggle per forum.

b6gm6n 04-06-2006 01:59 AM

cheers

-b6

The Realist 04-06-2006 07:16 AM

Well I'll just have to leave this one for now until a fix is found.

Laters

Quote:

Originally Posted by Zachariah
Weird
- Just did an install here.
http://www.socalrailfan.com/forums/f...splay.php?f=13

Think there is something else installed that might gum up the works ?


vbreal 04-23-2006 10:45 PM

what about recent gallery submissions on profile

Zachariah 04-23-2006 10:47 PM

Quote:

Originally Posted by Real Talk
what about recent gallery submissions on profile

I'll cook one up and post the code.

phkk 04-24-2006 02:49 AM

Im getting this error: Fatal error: Field ppgcount is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 485

dutchbb 04-30-2006 03:55 PM

superb

fosman 05-15-2006 06:03 PM

Everything is working okay other then the thumbs. The thumbs are just blank black.. There's nothing in there. What am I doing wrong? :confused:

Screen attached

xavierspl 05-15-2006 07:58 PM

The install for this seemed to be pretty straight forward, but when I installed, I got nothing. No errors, and no changes. I've double checked the install process, and can't find anything I've missed. Any ideas?

Zachariah 05-15-2006 08:06 PM

Quote:

Originally Posted by fosman
Everything is working okay other then the thumbs. The thumbs are just blank black.. There's nothing in there. What am I doing wrong? :confused:

Screen attached

Go to your photopost/config-int.php and verify this:

Code:

data_dir = "http://www.website.com/photopost/data/";
verify that the " / " slash (in red) is at the end of the url

fosman 05-16-2006 12:26 PM

Thx for your reply mate

I've tried what you suggested .... but with no luck :surprised: It still not showing the thumbs :-(

fosman 05-19-2006 06:23 AM

Hi mate

I figured out what the problem is! Images thumbs are showing at forumhome, but not the thumbs for video clips. Does anyone what to do, so thumbs for videos also show? :o/

Zachariah 05-19-2006 11:07 AM

I think default a image (some media icon) vs. a freezframe clip is placed as a thumbnail.

fosman 05-24-2006 05:16 AM

I saw in inc_features.php and inc_vbcat that the codes didn't fetched medie other then image formats like *jpg, gif and so on. I've added my self mpg. mpeg, avi and wmv. These files are now showing in forumhome, but without thumbnails :confused:

Zachariah 05-24-2006 12:21 PM

Quote:

Originally Posted by fosman
I saw in inc_features.php and inc_vbcat that the codes didn't fetched medie other then image formats like *jpg, gif and so on. I've added my self mpg. mpeg, avi and wmv. These files are now showing in forumhome, but without thumbnails :confused:

I'll have to look @ that. I did not test on non-images. :o

puregraf 05-27-2006 11:34 PM

hi, i got a global error after i installed the hack when trying to go to the vba main page and photopost main page.. so i disabled the hook_location global start for the add photopost pro admin and add photopost main and it fixed it.. did i do something wrong? id like to get the hack working, thanks in advance

Zachariah 05-28-2006 12:42 AM

Quote:

Originally Posted by puregraf
hi, i got a global error after i installed the hack when trying to go to the vba main page and photopost main page.. so i disabled the hook_location global start for the add photopost pro admin and add photopost main and it fixed it.. did i do something wrong? id like to get the hack working, thanks in advance

What was the error ? :surprised:
Also take a look @ post 2,3 for setup info, it could be simple opps.

Yell if ya still need help. :cool:

puregraf 05-28-2006 07:16 PM

Quote:

Originally Posted by Zachariah
What was the error ? :surprised:
Also take a look @ post 2,3 for setup info, it could be simple opps.

Yell if ya still need help. :cool:

hi, i also posted this on the photopost site, whichever gets answered first :knockedout:


---

this is what i have
Hook Location : global_start
Add PhotoPost Pro - AdminCP Add PhotoPost Pro to each forum [Edit] [Delete]
Add PhotoPost Pro - Main Add PhotoPost Pro to each forum [Edit] [Delete]


in the admin cp add photopost pro i have:


print_table_header($vbphrase['ppg_title']);
print_input_row($vbphrase['ppgcount'], 'forum[ppgcount]', $forum['ppgcount']);
print_input_row($vbphrase['ppgorder'], 'forum[ppgorder]', $forum['ppgorder']);
print_input_row($vbphrase['ppgcat'], 'forum[ppgcat]', $forum['ppgcat']);
print_yes_no_row($vbphrase['ppginfo'], 'forum[ppginfo]', $forum['ppginfo']);


and in the main add photopost pro i have:

include('/home/puregraf/public_html/graffiti-gallery/inc_vbcat.php');

if ($foruminfo['ppgcat']){
include('/home/puregraf/public_html/graffiti-space/inc_vbcat.php');

if (THIS_SCRIPT == 'showthread'){
$search_text = '$navbar';
$vbulletin->templatecache['SHOWTHREAD'] = str_replace($search_text,
$search_text.fetch_template('forumdisplay_ppgaller y'),$vbulletin->templatecache['SHOWTHREAD']);
}
if (THIS_SCRIPT == 'forumdisplay'){
$search_text = '$navbar';
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($search_text,
$search_text.fetch_template('forumdisplay_ppgaller y'),$vbulletin->templatecache['FORUMDISPLAY']);
}
}


also, step 4, i didnt understand what to do? it says: 4)
Forums & Moderators => Forum Manager => Edit forum => Add PhotoPost Pro on this Forum
- Leave "Select Catagory" blank to not show images

but i dont get it? i went to Forums & Moderators, then Forum Manager, then Edit Forum?? which one am i clicking edit for? i tried clicking edit for one of them, but there was no "add photopost pro on this forum" option? please help, thanks

UtahNissans 05-29-2006 01:09 AM

This work with photopost 5.11?

Zachariah 05-29-2006 10:42 AM

Quote:

Originally Posted by UtahNissans
This work with photopost 5.11?

ya I do not see a problem. I do not think the DB has changed.

TheOutdoors 06-07-2006 08:05 PM

I've reinstalled this 3 times and I'm getting the same error. When I go to edit a forum to update the settings, and click Save, I receive the error "MySQL Error : Unknown column 'ppgcount' in 'field list'"

I uncommented out the lines in inc_vbcat.php to point to my PP database (it's separate from my VB database), but I still get this error.

It's like the database table wasn't updated properly with the new fields...what do I do next?

chriszep 07-17-2006 01:51 PM

hello
I have photopost 5.30 & vb 3.51
I see in my admin cp the options for inserting photopost
I done all step but in my forum I see nothing (no black thumb, nothing )
I used a fresh style (just change colour)

I edit the
Quote:
Quote:

Edit: Plugin
Hook Location : global_start
Add PhotoPost Pro - Main

thanks


All times are GMT. The time now is 06:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01391 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete