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 vBGallery to each forum (https://vborg.vbsupport.ru/showthread.php?t=111868)

Zachariah 03-31-2006 10:00 PM

Add PhotoPost vBGallery to each forum
 
/* ----------------- 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
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

Quote:

Originally Posted by threat
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

Quote:

- 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

Quote:

Originally Posted by lawahdy
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/vBulleti...splay.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

Quote:

Originally Posted by morrow
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/vBulleti...splay.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:
Code:

colspan="$foruminfo[vbgcat]"
To:
Code:

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

Quote:

Originally Posted by mikeclarke
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

Quote:

Originally Posted by Magle
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:
Code:

if (THIS_SCRIPT == 'showthread'){
$search_text = '$navbar';
$vbulletin->templatecache['SHOWTHREAD'] = str_replace($search_text,
$search_text.fetch_template('forumdisplay_vbgallery'),$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:


Quote:

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

Quote:

Originally Posted by Magle
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

Quote:

Originally Posted by Magle
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

Quote:

Originally Posted by Magle
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!

Delw 12-31-2006 05:05 AM

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

Quote:

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? :)

Delw 01-07-2007 06:29 PM

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

Delw 01-08-2007 08:31 PM

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
Code:

$globaltemplates  = array_merge($globaltemplates, array('adv_gallery_imagebit','forumdisplay_vbgallery',));
change line 41 to


Code:

$globaltemplates  = array_merge($globaltemplates, array('ppgal_imagebit','forumdisplay_vbgallery',));

line 170 was

Code:

                FROM " . TABLE_PREFIX . "adv_gallery_images AS images
Change line 170 to
Code:

                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?

Delw 01-12-2007 12:43 AM

yes if you follow these directions in post #30

https://vborg.vbsupport.ru/showpost....1&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.

Delw 02-11-2007 07:49 PM

<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.

Quote:

Originally Posted by Delw (Post 1153971)
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
Code:

$globaltemplates  = array_merge($globaltemplates, array('adv_gallery_imagebit','forumdisplay_vbgallery',));
change line 41 to


Code:

$globaltemplates  = array_merge($globaltemplates, array('ppgal_imagebit','forumdisplay_vbgallery',));

line 170 was

Code:

                FROM " . TABLE_PREFIX . "adv_gallery_images AS images
Change line 170 to
Code:

                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



All times are GMT. The time now is 02:25 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.03301 seconds
  • Memory Usage 1,841KB
  • 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
  • (11)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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