User Upgrade Payment Options

timgos

New member
I attempted to view the demo to figure this out but reviewed an error when click "User Upgrades" and just wanted to confirm.

Can I specify different payment methods for different upgrades? For example if I wanted upgrade 'A' to you Paypal email x@x.com and upgrade 'B' to use y@y.com?

And somewhat related, does the admin area of the demo install have all options available? I was looking into an area where I could convert some of my vbulletin plugins (not products) but couldnt' find the correct area. This thread has a video with a seemingly more full featured admin area so I was hoping to get some clarification.
 
Last edited:
Can I specify different payment methods for different upgrades? For example if I wanted upgrade 'A' to you Paypal email x@x.com and upgrade 'B' to use y@y.com?
Yes. You would create multiple payment profiles and then associate the one(s) you want with particular user upgrades.

And somewhat related, does the admin area of the demo install have all options available? I was looking into an area where I could convert some of my vbulletin plugins (not products) but couldnt' find the correct area. This thread has a video with a seemingly more full featured admin area so I was hoping to get some clarification.
It has everything that's available out of the box, though not everything is fully usable because of the nature of it, such as installing add-ons (since you don't have access to upload your own files).

The video you linked to is developer oriented. Those features require using debug mode which you have to opt-into via a config file change, as it's not targeted for production sites. (That video is also based on XF 1.0 or 1.1. 2.0 is very different and there are many more functions in the control panel than in the version shown in the video.)

I'm not sure what you mean about converting plugins. The code and architecture of XenForo is very different and thus any coding would need to be done using the XenForo framework.
 
Mike, thanks for getting back to me. To clarify on my second question. So in vBulletin 3.8 there are products (just upload the xml file and you're good to go) and then plug-ins which is a list of PHP code snippets (often having do to with the products) that get inserted at certain "hook locations" in the templates or code. My question was regarding the plug-ins.

I wrote a few custom ones specific to my site where I check a certain cookie or user field, do some manipulation and use the results in say the post template to show a certain number or something. I didn't see an obvious area in XF where I could do that unless we can just put PHP right in the templates in XF 2?
 
You wouldn't ever be able to execute arbitrary PHP within XF unless you had access to the file system (to upload files). This is generally an intentional decision with security (and performance) in mind. So you wouldn't really be able to test/check any of that on the demo. (Plus that is all part of the debug mode-tied "development" section, which isn't enabled on the demos.)

There are various code events that you can attach to and there is a system to let you extend various classes at run time, but these are all done using callback definitions or new classes in specifically named files (based on commonly used PHP autoloader rules). This is a huge topic, but there are some developer docs here, including an example add-on tutorial: https://xenforo.com/xf2-docs/dev/
 
Thanks Mike. So quick question that I'm guessing you could answer easily. Let's say I have a custom user field called start_date that I import from another database. I want to run a mktime call on that to figure out a period of years so I could show it under a user's title or somewhere in the postbit.

In vB, I add a "plugin", hook it to postbit_display_start and just put something like this in the "Plugin PHP Code" box
Code:
if($post['field9'] > 0 && $post['field8'] > 0)
{
$years_playing =  round((time()-mktime(0,0,0,$post['field9'],1,$post['field8']))/31536000,1);
}

How would that be accomplished in XF? I have a bunch of basic things like that on my forum that I'd like to bring over.
 
Back
Top Bottom