PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old October 26th, 2009, 01:51 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
How to detect if vbgallery is installed in ACP

Hi there..
Michael or Chuck.. or anyone else..
I am just writing a facebook style toolbar for my vb, it should also integrate some gallery functions..
but i ran into a problem.
How can I detect if vbgallery is installed when i am in ACP... or on non gallery pages...
Example 1:
I am surfing in blogs or on some forum-pages. I will only have the gallery icons appear if vbgallery is installed.. as I am not in vbgallery i cannot use: THIS_SCRIPT

----
Until I found an automatic solution, i have a manual setting in ACP:
I am using vBgallery: YES / NO

I would though like to automate this..

MY QUESTION:
Is there a way.. in the options section of vbulletin, to check if vbgallery is installed?

Thx for any hint

Luc

[edit]
Well for forums and other pages I found a way:
Code:
Content visible to verified customers only.
still looking for ACP solution...
[/edit]

Last edited by Luciano; October 26th, 2009 at 04:59 AM.
Luciano is offline   Reply With Quote
Old October 26th, 2009, 12:01 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
well you should be able to define the admin the same way it all looks for the same option stuff

Code:
Content visible to verified customers only.
There is no way I know of except querying the database or checking to see if the gallery arrays exist.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old October 27th, 2009, 03:55 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
Thx for your reply, chuck..
But i want to keep it easy.. so what i am doing now... is:
A. for non ACP pages..( public pages) i check if ppg_options is there..
if($ppg_options && is_array($ppg_options))

and for acp i just add an option that says: If you have vbgallery installed then show special gallery options to users.... YES / NO

I was going to hide that option in acp if vbgallery is not installed...
but now, well, its only a dummy option if vbgallery is not installed...

thats ok..

(BTw: its going to be a facebook style tool bar.. on all pages.. with a modal window that handles lots of features with ajax) .. I'll set up a demo as soon as I got something to show...)

Thx again..
Luc
Luciano is offline   Reply With Quote
Old October 27th, 2009, 10:14 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
Got ya well $ppg_options is valid in the control panel as well is what I was saying.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old October 28th, 2009, 02:35 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
YES!!!!!!!! works.. tested in admin_global hook)
Thank you...
i had an error in my plugin...

but.. (just thinking) for performance, shouldnt it be better to not add those settings on non vbgallery pages? I mean not to include them? so that pages having nothing to do with vbgallery.. (all pages where no images are shown) would not even get near ppg_options or something else..
Luc
Luciano is offline   Reply With Quote
Old October 28th, 2009, 07:45 AM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
well if your not including them on non vb pages then you need to figure out other ways to figure out if vbgallery is there. remember we use option arrays and define statements to figure out where we are. The easiest way for you to really do something that says vbgallery is installed is add a global_start plugin where you can define vbgallery installed .
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old October 28th, 2009, 02:44 PM   #7 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
Quote:
Originally Posted by Chuck S View Post
well if your not including them on non vb pages then you need to figure out other ways to figure out if vbgallery is there. remember we use option arrays and define statements to figure out where we are. The easiest way for you to really do something that says vbgallery is installed is add a global_start plugin where you can define vbgallery installed .
yes.. thats what i did... added a plugin to :global_setup_complete
there i do the check for ppg_options.
it seems to work !

thx again..
Luc
Luciano is offline   Reply With Quote
Old October 28th, 2009, 03:01 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
Well it does not even need to be that complicated. If your vbulletin options array is available on all pages your plugin just needs to be

Code:
Content visible to verified customers only.
then in any plugin you can use an if clause like so

Code:
Content visible to verified customers only.
or if its in templates

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old October 28th, 2009, 03:38 PM   #9 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
either I lost you there.. OR we are talking about the same thing ( with different words...)

My actual plugin is:

Code:
Content visible to verified customers only.
does not matter if true OR yes.. But i haf to add a if clause because I do not know if vbgallery is installed... before checking $ppg_options

....
i check if is_array, because i ran into errors..(many many versions ago) where there were problems with $ppg_options not being an array...
(so if that kind of bug appears again.. i'm on the safe side)

Luc
Luciano is offline   Reply With Quote
Old October 28th, 2009, 09:05 PM   #10 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
We are talking kinda the same thing I was merely saying you really did not have to go checking arrays etc etc. You are the admin you know vbgallery is installed. You would add that line to your site I posted and then could simply use if clauses in php format or template format to add whatever your trying.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old October 29th, 2009, 01:51 AM   #11 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
Ohhhh ok-- now i understand...
Yes, you are right. i could do it without checking..

But if for example.. i post the product as hack here,

and a user installs it.., it works..
then for some reason he uninstalls vbgallery... because (for example he switches to photopost pro), he would still get links to vbgallery files and send his users to 404 pages.. thats why i want to do the check..
Luc
Luciano is offline   Reply With Quote
Old October 29th, 2009, 11:24 AM   #12 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 52,666
Got ya!
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now   Reply With Quote
Old November 11th, 2009, 10:48 PM   #13 (permalink)
Member
Verified Customer
 
jjj0923's Avatar
 
Join Date: Mar 2002
Posts: 109
Send a message via AIM to jjj0923
what does ACP stand for?
jjj0923 is offline   Reply With Quote
Old November 12th, 2009, 12:49 AM   #14 (permalink)
Member
Verified Customer
 
Join Date: Aug 2005
Posts: 464
ACP = Admin Control Panel (when you click the Admin link in the footer)
opposed to UCP = User Control Panel ( here its the top left link in the navbar called User CP)

Luc
Luciano is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installed VBGallery LakeAnna Installs and Upgrade - vBulletin 3.6x 1 January 3rd, 2009 09:38 AM
vbgallery installed, but controls in admincp not showing NICEGUY Installs and Upgrade - vBulletin 3.6x 1 September 28th, 2007 10:04 PM
Problem with Login in ACP Mastermaik Photopost Pro Installation & Upgrades 2 September 12th, 2005 08:41 AM


All times are GMT -5. The time now is 08:19 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0