View Full Version : Add PhotoPost vBGallery to each forum
Zachariah
03-31-2006, 10:00 PM
/* ----------------- 3/31/2006 4:37PM -----------------
Add PhotoPost vBGallery to each forum.
This hack will allow you to select what catagories from vBGallery to display in a film strip format under the $navbar. This will show in every thread of the forum as well.
/* Tested: PhotoPost vBGallery 1.0.2 + vBulletin 3.5.4
1 query
1 template
1 File edit
1 file upload
3 plugins
5 phrases
DEMO (http://www.gzhq.net/forums/forumdisplay.php?f=780)
Subject: Science
Forum: 780
Gallery Catagories: 4,20
----------------------------------*/
Each forum extra options:
** Add vBgallery images on this Forum
- 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-01-2006, 02:31 AM
1st post FAQ
- Show Imagebit:
(Title, Description, Rating, Username, Views, Dimensions, and more.)
This works @ the moment like an On/Off switch per forum. With the current development of the hack there is not a choice of custom Imagebit setting per forum. You can however edit a core plug-in and change what fields show. This setting will show on all forums that have Show Imagebit enabled.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
I have not created a new adv_gallery_imagebit
- gallery_columns is still linked w/ main gallery.
PixelFx
04-01-2006, 06:05 AM
looks nice :D
threat
04-01-2006, 12:38 PM
I like this one, is there 1 I can use on the center, left or right side of forum yet?
Zachariah
04-01-2006, 01:02 PM
I like this one, is there 1 I can use on the center, left or right side of forum yet?
The left / right sides of the forums is only on the showthread.php and forumdisplay.php or is it site wide ?
What are you trying to do ?
sensimilla
04-01-2006, 05:42 PM
great addon Zachariah! thanks alot for it.
Betablocker
04-02-2006, 01:38 PM
Thanks Zach
Going to give this a go :cool:
lawahdy
04-03-2006, 10:45 PM
- Select Catagory(s):
(Here you can list catagories you wish to show images from. EX: 1,10,20)
excellent hack.. but can't we make this step easier.. i mean i always add new categories.. i really do'nt want to go through 40 forums to update them one by one.. :bunny:
isn't there another way of doing things.?
Zachariah
04-03-2006, 11:57 PM
excellent hack.. but can't we make this step easier.. i mean i always add new categories.. i really do'nt want to go through 40 forums to update them one by one.. :bunny:
isn't there another way of doing things.?
1)
When you create a new forum you have the option to add the gallery catagories at that time also.
2)
This is to add select image groups from the gallery to select forums.
EX From DEMO link:
In the 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.
3)
What did you need or have in mind ? :)
Reeve of shinra
04-04-2006, 02:20 AM
/me clicks install
This is a great mod and my users are loving it.
morrow
04-09-2006, 12:52 PM
Database error in vBulletin 3.5.4:
Invalid SQL:
SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
language.phrasegroup_forumdisplay AS phrasegroup_forumdisplay,
language.phrasegroup_inlinemod AS phrasegroup_inlinemod,
language.phrasegroup_adv_gallery AS phrasegroup_adv_gallery,
language.phrasegroup_global AS phrasegroup_global,
language.options AS lang_options,
language.languagecode AS lang_code,
language.charset AS lang_charset,
language.locale AS lang_locale,
language.imagesoverride AS lang_imagesoverride,
language.dateoverride AS lang_dateoverride,
language.timeoverride AS lang_timeoverride,
language.registereddateoverride AS lang_registereddateoverride,
language.calformat1override AS lang_calformat1override,
language.calformat2override AS lang_calformat2override,
language.logdateoverride AS lang_logdateoverride,
language.decimalsep AS lang_decimalsep,
language.thousandsep AS lang_thousandsep
FROM user AS user
LEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)
LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) INNER JOIN language AS language ON (language.languageid = IF(user.languageid = 0, 2, user.languageid))
WHERE user.userid = 265;
MySQL Error : Unknown column 'language.phrasegroup_adv_gallery' in 'field list'
Error Number : 1054
Date : Sunday, April 9th 2006 @ 06:39:38 AM
Script : http://www.njflyfishing.com/vBulletin/forumdisplay.php?f=12
Referrer : http://www.njflyfishing.com/vBulletin/index.php?
IP Address : 68.x.x.x
Username :
Classname : vb_database
-->
Zachariah
04-16-2006, 08:24 PM
Database error in vBulletin 3.5.4:
MySQL Error : Unknown column 'language.phrasegroup_adv_gallery' in 'field list'
Error Number : 1054
Date : Sunday, April 9th 2006 @ 06:39:38 AM
Script : http://www.njflyfishing.com/vBulletin/forumdisplay.php?f=12
Referrer : http://www.njflyfishing.com/vBulletin/index.php?
IP Address : 68.x.x.x
Username :
Classname : vb_database
-->
I would say you do not have PhotoPost vBGallery 1.0.2 installed.
Zachariah
04-17-2006, 08:58 PM
1st post updated.
Template Bug:
Edit: forumdisplay_vbgallery
Change:
colspan="$foruminfo[vbgcat]"
To:
colspan="$foruminfo[vbgcount]"
mikeclarke
04-21-2006, 01:35 AM
I did something bad. Now when I try to edit options in forum manager I get the error below. Any idea how to fix?
Fatal error: Field vbgcount is not defined in $validfields in class vb_datamanager_forum in \includes\class_dm.php on line 485
update: I uninstalled reinstalled works great.
Zachariah
04-21-2006, 04:37 PM
update: I uninstalled reinstalled works great.
Cool :)
Magle
04-26-2006, 08:12 PM
This looks like a great hack, but it would be nice with a setting so showing the strip in the threads would be optional, please. (Personally I'd like it to show on the forum display but not in the threads as well)
Zachariah
04-26-2006, 10:32 PM
This looks like a great hack, but it would be nice with a setting so showing the strip in the threads would be optional, please. (Personally I'd like it to show on the forum display but not in the threads as well)
Plugin: Add vBGallery - Main
Hook Location: global_start
Remove:
if (THIS_SCRIPT == 'showthread'){
$search_text = '$navbar';
$vbulletin->templatecache['SHOWTHREAD'] = str_replace($search_text,
$search_text.fetch_template('forumdisplay_vbgaller y'),$vbulletin->templatecache['SHOWTHREAD']);
}
- I'll add later w/ option in AdminCP to toggle per forum.
Magle
04-27-2006, 10:37 AM
Thanks :)
However, after installing there seems to be a serious conflict between this hack and VBSEO I believe. After installing (and re-installing without the edit from above above), most threads in the forum will not display and instead shows this:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /*path removed*/music-forums/includes/functions_gallery_store.php on line 23
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /*path removed*/music-forums/includes/functions_gallery_store.php on line 30
Warning: Cannot modify header information - headers already sent by (output started at /*path removed*/music-forums/includes/functions_gallery_store.php:23) in /includes/functions_vbseo.php on line 393
Warning: Cannot modify header information - headers already sent by (output started at /*path removed*/music-forums/includes/functions_gallery_store.php:23) in /includes/functions_vbseo.php on line 394
Reverting the edit to the init.php file brings things back to normal (but then the hack will of course not function).
Zachariah
04-27-2006, 11:38 AM
Thanks :)
However, after installing there seems to be a serious conflict between this hack and VBSEO I believe. After installing (and re-installing without the edit from above above), most threads in the forum will not display and instead shows this:
Reverting the edit to the init.php file brings things back to normal (but then the hack will of course not function).
You are running PHP5.x on your webserver ?
Magle
04-27-2006, 12:24 PM
Yes, PHP version 5.0.4
Zachariah
04-27-2006, 05:04 PM
Yes, PHP version 5.0.4
Try this new file please.
/forums/includes/functions_gallery_store.php
Magle
04-28-2006, 07:37 AM
That fixed the problem! Thanks!
Zachariah
04-28-2006, 12:46 PM
That fixed the problem! Thanks!
Cool beans.
The behavior of array_merge() was modified in PHP 5.
Unlike PHP 4, array_merge() now only accepts parameters of type array.
FleaBag
08-13-2006, 04:40 PM
Hiya Zach baby! Does this work with 3.6.0 out of the box?
bulbasnore
10-07-2006, 04:34 PM
Ever get an answer on 3.6?
Quarterbore
10-07-2006, 04:40 PM
I just got the newest Gallery version and I plan to upgrade one of my sites to 3.6.2... I hope this works but if not I will share any code changes that were needed as this looks like a must have for my site!
Zach.
On my test board this hack works fine. running 3.6.4
however on my live board 3.6.3 I get this error
Invalid SQL:
SELECT imageid, images.title, filename, thumbname, originalname, extension, images.catid ,images.userid, images.username, images.title, images.description, images.dateline
FROM vb3adv_gallery_images AS images
WHERE valid = 1
AND images.catid IN (4,13)
ORDER BY RAND()
LIMIT 4;
MySQL Error : Table 'xxxxxxx_vbulletin.vb3adv_gallery_images' doesn't exist
Error Number : 1146
Date : Sunday, December 31st 2006 @ 01:37:11 AM
Script : http://www.myforums.com/forums/showthread.php?t=49610
Referrer : http://www.myforums.com/
IP Address :
Username : Compa
Classname : vb_database
Magle
01-07-2007, 05:30 PM
I got the same error after upgrading vBgallery to 2.1. Had to disable this mod. Btw, I'm running vB 3.6.4.
Any chance this could one day be included in the vBGallery itself, like the forum home and profile mods? :)
Its really easy to fix to make it work in 3.6.4. I did it on my first try.
if Zach ( or an admin) gives me the ok I will tell the changes.
I dont know if its ok or not as I never redid someones stuff before and dont know how that works.
http://www.azbasszone.com/forums/forumdisplay.php?f=36
Delw
to make it work for vb 3.6.* - 3.6.4 and PhotoPost vBGallery v2.1
you just need only to change the xml file
line 41 was
$globaltemplates = array_merge($globaltemplates, array('adv_gallery_imagebit','forumdisplay_vbgalle ry',));
change line 41 to
$globaltemplates = array_merge($globaltemplates, array('ppgal_imagebit','forumdisplay_vbgallery',)) ;
line 170 was
FROM " . TABLE_PREFIX . "adv_gallery_images AS images
Change line 170 to
FROM " . TABLE_PREFIX . "ppgal_images AS images
do not upload the file functions_gallery_store.php as vbgallery already has this file in there in the version 2.1
just follow the org. directions omitting the functions_gallery_store.php upload
Delw
bulbasnore
01-09-2007, 04:43 AM
Stunning analysis Delw. Only change then is necessitated by the name change of the gallery tables. Nicely documented. Thank you so much!
TomC18
01-12-2007, 12:35 AM
Will this work on VB 3.6.4?
yes if you follow these directions in post #30
https://vborg.vbsupport.ru/showpost.php?p=1153971&postcount=30
rnmcd
02-10-2007, 09:15 PM
Does anyone know of a vb ver. 3.6.4 board with this installed that I could view?
The DEMO link doesn't seem to work.
<a href="http://www.azbasszone.com/forums/forumdisplay.php?f=37" target="_blank">http://www.azbasszone.com/forums/forumdisplay.php?f=37</a>
you can see it working at the above link.
A word of caution we found that using this in version 3.6.4 and with the new version of gallery doesn't work with polls. its a bug and Zach was working on it when he gets time.
if you use polls in the same forum as the pics , the polls will not work, however both work fine if not in the same forum.
Delw
rnmcd
02-11-2007, 09:22 PM
Thank you for the information and the caveat.
So you are saying that polls will not work on threads in
http://www.azbasszone.com/forums/forumdisplay.php?f=37?
Fenriz
07-12-2007, 10:31 AM
Is it possible to get it work on PhotoPost vBGallery 2.2? This hack doesn't work because there isn't any functions_gallery_store.php on this build. Please help to get it work.
Thanks in advance..
Zachariah
07-12-2007, 12:37 PM
I plan on doing a revise :)
Fenriz
07-12-2007, 02:00 PM
Zachariah, is there an option in vBGallery 2.3 to show the same image bar throught all the forum pages?
bulbasnore
09-15-2007, 04:56 PM
Once again, this is pretty cool. Works on 3.6.7_pl1. Zechariah, why not update this mod? ITs more comprehensive than the currently updated one. Such a small change to make this current.
to make it work for vb 3.6.* - 3.6.4 and PhotoPost vBGallery v2.1
you just need only to change the xml file
line 41 was
$globaltemplates = array_merge($globaltemplates, array('adv_gallery_imagebit','forumdisplay_vbgalle ry',));
change line 41 to
$globaltemplates = array_merge($globaltemplates, array('ppgal_imagebit','forumdisplay_vbgallery',)) ;
line 170 was
FROM " . TABLE_PREFIX . "adv_gallery_images AS images
Change line 170 to
FROM " . TABLE_PREFIX . "ppgal_images AS images
do not upload the file functions_gallery_store.php as vbgallery already has this file in there in the version 2.1
just follow the org. directions omitting the functions_gallery_store.php upload
Delw
Zachariah
09-15-2007, 08:10 PM
Once again, this is pretty cool. Works on 3.6.7_pl1. Zechariah, why not update this mod? ITs more comprehensive than the currently updated one. Such a small change to make this current.
Thanks for the bump, I was working on the RSS feed (http://www.photopost.com/forum/showthread.php?t=133305).
Blackhat
09-23-2007, 07:09 PM
what about 3.6.8 ?
Zachariah
09-23-2007, 09:15 PM
working on that
perhaps a few days.
Fenriz
09-25-2007, 08:43 PM
Zacharin, I need to show one random picture from vbgallery 2.3 in every forum page (would be better if it is overlayed). Please check this thread https://vborg.vbsupport.ru/showthread.php?t=154810
trackpads
05-23-2008, 07:43 PM
Has this been update or has anyone gotten it to work 3.7?
Zachariah
05-23-2008, 09:33 PM
Has this been update or has anyone gotten it to work 3.7?
No it's gana be part of the next version of the gallery :D
aviendha
09-25-2008, 05:21 PM
I finally found what i wanted long time ago!!!
Yeah i have vbgallery 2.2
and vbulleting 3.6.5
I got gallery working perfect, but i can't make work this hack, i did the changes in the xml to make it work with new table names, but still not working.
Ah i'm running mysql4 and PHP Version 4.4.1
Thankyou i'm your fan zack!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.