PhotoPlog

Go Back   PhotoPlog > PhotoPlog.com > Miscellaneous Foobar
Screens Demo Purchase Download Register

Reply
Attention: Last reply in this thread was more than 18 Years ago
 
Thread Tools
  #1  
Old 08-07-2006, 08:47 PM
MikeD's Avatar
MikeD MikeD is offline
Orange Plog
 
Join Date: Jun 2006
Location: Cologne / Germany
Posts: 487
Gallery: 10
Comments: 2
Question vB - How Does It Works?

Hi Morgan,
I have an answer about the vB Plugins or Products. I have read so many articles in the vB Programming Articles of vB Org, but I have nothing found in it. Also in the API documention, but I did not found what I need to know.

I'd like to know how vB can read the settings what every user makes. Here an example of vB settings.xml...

Code:
Content visible to registered users only.
Could you please teach me how we can read the selected option? Is this the variable $vboption?

Or how to read a Boolean expression like this...
Code:
Content visible to registered users only.
Or how to read a number like this...
Code:
Content visible to registered users only.
It would be wonderful if you can explain me how that works. The stupid thing is, that really nowhere a good book or info exists where someone like me can read how the most important things work. The most stupid is, that the API doc does only Online exists. So every user has to go in the Customer area where he can see that.

Could you help me out? Thank you very much in advance -Mike
Reply With Quote
  #2  
Old 08-07-2006, 10:44 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
Orange Plog
 
Join Date: Jun 2006
Posts: 104
Gallery: 2
Comments: 1
Default

I know exactly what you mean! It can be a steep learning curve.

A useful feature I only recently discovered for finding out vboption names is ... if you go to the admincp and find the option you want, and just hover the mouse on the title for that option, it'll pop up a little box with the option name in it.

For instance, if you wanted to find out what the option name for the "Legacy Feel" in PhotoPlog Pro is, just go to your PhotoPlog Settings cp, hover over the title for that option, and it tells you:

$vbulletin->options['photoplog_legacy_feel']

This covers stuff that is set as options one way or another, typically in the AdminCP.

If you are looking for usergroup permissions / settings, this will usually be in the userinfo['permissions'] array, such as ...

$vbulletin->userinfo['permissions']['photoplogmaxfilesize'];

... which obviously gives you the current users "photoplogmaxfilesize".

Unfortunately there is no easy way in the AdminCP of finding out the variable name to use for any given usergroup permission field, so you have to go look in the ./includes/xml dir (as you seem to have discovered), in the appropriate "bitfield" XML file.

Does this help? Or are you looking for stuff other than basic options and usergroup permissions / settings?

As long as Morgan doesn't mind us using his forums for this kind of stuff, I don't mind answering questions if I know the answers!

-- hugh
Reply With Quote
  #3  
Old 08-08-2006, 05:43 PM
Morgan's Avatar
Morgan Morgan is offline
Head Plog
Admin
 
Join Date: Dec 2005
Posts: 5,324
Gallery: 10
Comments: 25
Default

IMO Jelsoft didn't mean for you to know how to read or write XML plugin/product files. If you turn on debug mode in a test board, you'll see some new options for play. Though for understanding purposes, settings make varname vB options, displayorder is where to show the option on the ACP page, datatype is the type of data for the option, optioncode is how to make things like radio buttons and drop downs, and defaultvalue is how to add a prefilled value. If you use debug mode to make a modification, the XML is generated for you when you export the plugin/product file.
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote
  #4  
Old 08-08-2006, 09:53 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
Orange Plog
 
Join Date: Jun 2006
Posts: 104
Gallery: 2
Comments: 1
Default

Have you played with the Advanced Product Manager (APM) hack?

I find that with APM on a test board with debug mode enabled, certain tasks become almost painless. Like adding new options and optiongroups, where the APM adds all the required phrasing for you. If nothing else, just having everything from your product (templates, plugins, phrases, cron jobs, etc)collected in one place makes things easier to keep a handle on.

And I have to agree, it does kind of feel like vBulletin don't want us knowing some of this stuff! The last three months or so have been fairly intense. I've been teaching myself PHP, MySQL and vBulletin from scratch, in my spare time.

Not quite as bad as it sounds, as I've been doing similar stuff for about 25 years, and PHP is really just where perl, HTML and C++ got together and had a b*astard child. And one object oriented API is pretty much like another. But the nitty gritty details can get fairly tough, especially with the lack of any really coherent vB developer docs.

The best collection of references I've found so far is here. if anyone has any other useful links, I'd love to see them!

-- hugh
Reply With Quote
  #5  
Old 08-09-2006, 04:53 AM
Morgan's Avatar
Morgan Morgan is offline
Head Plog
Admin
 
Join Date: Dec 2005
Posts: 5,324
Gallery: 10
Comments: 25
Default

Learning curves, yahoo, but I don't think it's that Jelsoft doesn't want us to know, rather more that we don't have to know in order to make plugins/products. I haven't used APM but it sounds neat, and thanks for the link to the tutorial index. Have you seen the vB online manual? There is some data manager info in the appendix if interested.
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote
  #6  
Old 08-09-2006, 04:17 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
Orange Plog
 
Join Date: Jun 2006
Posts: 104
Gallery: 2
Comments: 1
Default

Code:
Content visible to registered users only.
Ah, my bad, I mis-interpreted your meaning. Although I still feel like they could do a lot more by way of documenting the API and providing developer resources / coding examples. Especially as it is very much in their interest to encourage well written and compliant mods.

Code:
Content visible to registered users only.
The APM is here. It really is worth a try, IMHO.

I was going to attach a screenshot, but it tells me I've exceeded my quota.

Could you take a look at that? AFAIK I only have the one attachment (that userstrip mod ZIP) to my name.

Code:
Content visible to registered users only.
Yup. It was actually via the appendix that I accidently stumbled on the main API docs, which are now my main reference source - along with cribbing from other peoples work, LOL! Nothing like working examples of similar code to give you a head start, then reading up on the specific vB functionality they use in the API.

BTW, do you know if the API docs have been updated for 3.6? I don't think they have, but I may be wrong.

-- hugh
Reply With Quote
  #7  
Old 08-11-2006, 04:23 PM
Morgan's Avatar
Morgan Morgan is offline
Head Plog
Admin
 
Join Date: Dec 2005
Posts: 5,324
Gallery: 10
Comments: 25
Default

Not sure, but User Infractions appears here so maybe.

BTW, attachment limit has been increased for your group.
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote
  #8  
Old 08-13-2006, 11:36 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
Orange Plog
 
Join Date: Jun 2006
Posts: 104
Gallery: 2
Comments: 1
Default

Code:
Content visible to registered users only.
Ah, well spotted. Although I could have sworn I couldn't find it when I last looked, and it didn't look like the cron format had been changed yet either. Maybe they've updated them since I looked.

Speaking of the Infraction Manager ... any chance of getting 'plog integrated with it? I'm as likely to want to hand out infactions on pictures and/or comments as I am on forums postings. I played aorund a bit with the blog software I'm testing, and was able to more or less getting it going just with some template mods, and hook to get the $show[infractionlink] permission set accordingly. Starting with the global cangiveinfraction permission, then checking things like infracting oneself, not infracting admins, etc.

But that's just for providing the infraction button and have it link to the main Give Infraction page, providing a userid rather than a postid. As far as I can see, the only complications might arrive if I wanted to actually fully integrate blogs entries, i.e. adding a backref from the blog entry to the infraction entry. And then handle the garbage collection (i.e. timeouts on infractions).

But for now, just being able to easily jump to the infraction page from Red Card image on the 'plog postbit(s) would be good enough. I'll add this as a feature request somewhere appropriate. I think you said to start a 2.1.3 request thread for anything that hadn't already been discussed for 2.1.2.


Code:
Content visible to registered users only.
Thank you!

-- hugh

PS - I like the New Look.
Reply With Quote
Reply

« Previous Thread | Next 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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Switched Server's, Forum Works Except For Admincp sacredfire Troubleshooting & Problems 3 10-09-2008 09:37 PM
Style problems. Works in FF, but not IE gatorenvy Troubleshooting & Problems 2 04-04-2007 06:39 PM
I need a gallery that works! dklassen Pre-Sale Questions 7 11-07-2006 03:56 PM


All times are GMT. The time now is 04:14 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.