This plugin installs Million Dollar Script 2.1 into WordPress. No previous MDS install is required.
Visit the Million Dollar Script WordPress Installation documentation page for help getting started.
How To Use
Make sure you have the latest version of WordPress installed on your site.
Next download, install and activate the Million Dollar Script Two plugin.
Upon plugin activation you may be logged out of your WP install. This is normal and is explained in more detail below. Simply log back in with your regular WP admin account.
Once you install and activate this plugin it’ll add a new menu in WP admin on the side for Million Dollar Script. You can go to your WP admin to Million Dollar Script > Options and enable your desired options. These are explained below.
MDS Options Explained
MDS Install Path
This should be the path to your MDS installation. In the future I plan to make it possible to install Million Dollar Script from within this plugin instead but for now you can just upload it to a subfolder or a subdomain if you like. As long as WP can read the MDS config.php file it should be ok.
Now this integration plugin allows you to browse the Million Dollar Script admin from within the WP admin under Million Dollar Script > Admin. Currently this displays The Million Dollar Script admin inside an iframe on the page in WordPress.
When you install the plugin it will automatically install MDS and enable integration between MDS and WP. As part of this process you will be logged out of WordPress. This is because it installs a MU plugin into WordPress which adjusts the WordPress constants for COOKIE_DOMAIN, COOKIEPATH, and COOKIEHASH to match between Million Dollar Script and WordPress.
If you have these defined elsewhere for some reason then it may cause a conflict. They are defined in MDS/include/wp_functions.php if you have to adjust it from the Million Dollar Script side to match whatever you have them set to. This will allow them to share proper login cookies.
This plugin will also will integrate user accounts between MDS and WP. This is enabled by default when the plugin is installed. This also uses the MU plugin for setting some cookie related values as explained above.
Once enabled, if a user tries to login to MDS they will be shown the WP login page. They can create an account through WP. Any users that create an account or login through WP will have an account created for them in MDS. Once they login successfully the account will automatically be validated in MDS. You can change your login URL in WP admin under Million Dollar Script > Options > Login Page.
When users log out of WP they will be logged out of MDS. If they update their user information in WP it will also be updated in MDS. If an account is deleted in WP it will be deleted in MDS, however associated orders are not presently deleted but may be in the future. I may add an option for that.
You can enable WooCommerce integration in WP admin under Million Dollar Script > Options > WooCommerce Integration. Check this and save the options. This will automatically create a product and configure it and enable the proper payment module in MDS.
This allows you to use WooCommerce to handle orders. Therefore you can use any payment gateways that work with WooCommerce. By default it has PayPal support and some offline methods but you can add more plugins for additional gateways. There are a lot of them.
When WooCommerce integration is enabled products will have a Million Dollar Script Pixels type option on them. This is similar to Virtual or Downloadable but says Million Dollar Script Pixels instead.
You can select Million Dollar Script Pixels to ensure that it won’t appear in the shop or in the search and that the MDS functionality only runs on orders for MDS products to help prevent conflicts. If you have to make a product visible again edit it and on the top right side box you can edit the Catalog visibility.
Another thing this will do is cause it to also verify the quantity matches what it should when checking out. This way users can’t adjust the quantity in their cart after to get cheaper orders because it won’t allow them to checkout.
It’ll also mark orders as completed in MDS automatically when they are marked as completed in WooCommerce. If your orders are not completed, but stuck in processing then you will have to either automate that or manually adjust them. I may add an option for this in the future.
This option allows you to clear the WooCommerce cart when MDS products are added to it. This can be useful to prevent users from ordering too many accidentally or removing other products to prevent conflicts if they should arise.
You can also set Auto-approve to No in the payment module in MDS if you want it to only mark orders as complete in MDS once they are marked complete in WooCommerce. Note that you may have to manually set orders in WooCommerce as complete if they stay stuck in processing.
The page where users can modify their account details. If left empty will redirect to the default WP profile page. If WooCommerce integration is enabled it will go to the WooCommerce My Account page. Set the height to auto for the Buy Pixels/Users page to auto scale to fit in the height of the page. If using a custom login page such as with Ultimate Member then enter the full registration page URL here.
The page where users can register for an account. If left empty will redirect to the default WP registration page. Set the height to auto for the Buy Pixels/Users page to auto scale to fit in the height of the page. If using a custom login page such as with Ultimate Member then enter the full registration page URL here.
The page where users can validate their account. You should add the Million Dollar Script validation block/shortcode there. Set the height to auto for the Buy Pixels/Users page to auto scale to fit in the height of the page. If using a custom login page such as with Ultimate Member then you likely do not have to use this feature.
The login page to redirect users to. If left empty will redirect to the default WP login. Set the height to auto for the Buy Pixels/Users page to auto scale to fit in the height of the page. If using a custom login page such as with Ultimate Member then enter the full login URL here.
Forgot Password Page
The URL to the forgot password page. If left empty will redirect to the default WP forgot password page. Set the height to auto for the Buy Pixels/Users page to auto scale to fit in the height of the page. If using a custom login page such as with Ultimate Member then enter the full forgot password page URL here.
The URL to redirect users to after login.
Enable permission system for user roles and the following capabilities: mds_my_account, mds_order_pixels, mds_manage_pixels, mds_order_history, mds_logout
This allows using these capabilities to control access to their corresponding pages.
Delete data on uninstall?
If yes then all database tables created by this plugin will be completely deleted when the plugin is uninstalled.
Update – updates will be done normally like all other plugins.
Don’t update – no updates will be looked for.
Development – updates will be checked for in the development branch.
Creating Million Dollar Script Pages in WordPress
Once you install this plugin it will will enable some shortcodes that you can use to display MDS in your pages in WordPress.
It will also enable a new Million Dollar Script block for the built in WordPress block editor. This makes it a lot easier to add pages.
To add a block create a new page and click either the blue + sign on the top left or the black one in the page area. Search for Million Dollar Script and click it. Then you can edit the options. See the shortcodes below for recommended default values for each page.
Grid pages will display the grid image itself.
[milliondollarscript id="1" display_method="ajax" align="center" width="1000px" height="1000px" lang="EN" type="grid"]
The users page will link to the /users MDS page which allows users to login and order pixels.
[milliondollarscript id="1" display_method="iframe" align="center" width="100%" height="auto" lang="EN" type="users"]
The list page shows a list of all ads on all grids.
[milliondollarscript id="1" display_method="ajax" align="center" width="100%" height="auto" lang="EN" type="list"]
This displays a stats box showing sold and available pixels.
[milliondollarscript id="1" display_method="ajax" align="center" width="150px" height="60px" lang="EN" type="stats"]
This is used to thank users and complete orders properly. It is redirected to from after they come back from payment processors. The gateway parameter must be set to the appropriate payment gateway. Currently a separate page must be created for each payment gateway you use. This is only necessary if not using WooCommerce.
[milliondollarscript id="1" display_method="iframe" align="center" width="100%" height="auto" lang="EN" type="thankyou" gateway="PayPal"]
This page is required for users to validate their account after they register. This is only necessary if not using Users Integration.
[milliondollarscript id="1" display_method="iframe" align="center" width="100%" height="auto" lang="EN" type="validate"]
id – The grid id # as show in the MDS admin under Manage Grids.
display_method – Controls how to display the page. Valid values are ajax or iframe. Currently AJAX only works for the grid, list and stats. The rest are coming.
align – Controls the alignment. Valid values are left, right or center.
width and height – You can set these to any valid CSS values for width and height. Note that you can use auto for the height to adjust the height of the iframe automatically.
mds – This is optional. This is the URL to your Million Dollar Script installation. No trailing slash. If this is left out then it will determine this automatically.
lang – This is the language code to use for the page. The language code can be found in the MDS admin under Languages.
type – The type of page you want to display. Valid values are grid, users, list, stats, thankyou or validate.
gateway – This is only required on the thankyou type. Valid values are _2CO, authorizeNet, bank, check, CoinPayments, external, LiqPay, PayPal or VoguePay.
display – This is optional and can be useful in advanced situations where you want to adjust the file or page that MDS uses. For example on the users page you could set it to display=”users/order_pixels.php?” to make users start on the order page instead of the regular users starting page.