Note: An easier way to achieve the same result is to use the 2nd option from the following documentation:
After you install the plugin by default the URL for the affiliates to signup/log into their account has the following URL:
First of all, this is not a mandatory step that you need to perform for the plugin to work. This instruction is here for any advanced user who wants to customize the affiliate view’s URL.
If you want to customize this URL (eg. you want your affiliates login page to be at http://www.your-domain-name.com/affiliates) then you can achieve this in two ways (Please note that a little bit of URL structure knowledge is required for this):
Option 1 (The Redirection method)
1. Download the ‘index.php‘ file that has an automatic redirection to the affiliates page.
2. Open the “index.php” file for editing and update the ‘www.your-domain-name.com’ text with your true domain name.
3. Upload this file to the directory where you want your affiliates to go and signup. (eg. www.your-domain-name.com/affiliates)
Now, when someone visits ‘http://www.your-domain-name.com/affiliates’ the visitor will automatically be redirected to ‘http://www.your-domain-name.com/wp-content/plugins/wp-affiliate-platform/affiliates/’
Option 2 (The Copy Method)
1. Copy the “affiliates” directory (this directory can be found inside the “wp-affiliate-platform” directory) and put it where you want it.
2. Update the ‘misc_func.php’ (located inside the affiliates directory) to have the correct relative location of the ‘wp-load.php’ file.
The ‘misc_func.php’ file uses a wordpress system file called ‘wp-load.php’ so you will have to update the ‘include’ statement at the top of the file (misc_func.php) and enter the correct path of the ‘wp-load.php’ file relative to the target URL. the ‘wp-load.php’ file is located on your wordpress installation directory.
So, for example if you want to move the affiliate URL to http://www.your-domain-name.com/affiliates and your wordpress is installed on the root directory then change the following:
include_once('../../../../wp-load.php');
to
include_once('../wp-load.php');
Please leave a comment if you don’t understand a step.
@David, Yes you can use the option 2 mentioned here to embed the affiliate area inside your WordPress page:
http://www.tipsandtricks-hq.com/wordpress-affiliate/setting-up-the-affiliate-viewarea-315
There is no advantage… it is more a matter of preference (some users like this option).
There is no consequence… You simply link to the page (from your front end of the site) that you want your affiliates to go to.
Hello,
I used the option 2. Then, I saw that you can integrate the plugin into your own design, by creating a page. If you crate a page with the name you want, what is the need for changing the URL of affiliate view ?
Another question, after doing the integration, I can see that people can access at the new page, but also at the other pages. What are the consequences ? (Datas are the same ?) And how can we avoid that ?
Thanks in advance
Don’t worry about deleting anything (it doesn’t matter if you have another copy of it inside the plugin).
Great and very simple to do. working with charm….But I am just wondering if it is safe to delete the original folder ‘affiliates’. I dont want affiliate page from 2 url one original and one at http://www.domain-name.com/affiliates
Please advise
The instructions seem a little complicated to someone without a lot of coding experience..;) But I decided to go with the more optimized option 2, and it turned out to be much simpler than I thought. It was an easy UPGRADE is you ask me.
Thanks a lot .
Adam.
Hi,
I’ve just completed this (using method #2), and thought I might add something to the tutorial….
At first I thought I’d done something wrong, as it wasn’t working when I clicked through the links in the (wp affiliate platform) login side widget…… (I’m a bit tired, and so it took me a few minutes to realise that the WIDGET LINKS REMAIN THE SAME after the customization….. Doh! – but when I manually inserted the new customized URL in my web-browser all was working as it should be….).
So I just thought I’d save someone else the time & frustration.
BTW, to create a side widget with the correct new links, I’ve done this:
– created a custom menu in WordPress, & called it “AFFILIATES”,
– then I inserted the affiliate links (Login, Register, Forgot password) manually into that new menu (using the “custom Links” option in the menus page ),
– and then I used the “Custom Menu” widget to display it in the sidebar.
(I may look at whether I can hard-code/edit the links in the official side widget if/when I get time, but this is a quick & easy work-around in the meantime, and probably the only/best option for any newbies, too…..)
Hope this helps!
Cheers, Karen.
I do have the spa.php file, I moved the folder, did not copy it, I guess the wording confused me a little bit, I imagined that copying it might create some complications,
I tried it now by copying it and it doesnt seem to show any problems,
thanks!
@Pedro, Can you go to the “affiliates/lang” folder on your server and see if you have a file called “spa.php”? Did you copy the “affiliates” folder as suggested in the instruction or did you completely move that folder to a new location?
Im attempting option 2, I moved the Affiliate folder to the root directory which is also the wp directory and updated the misc php file and changed
include_once(‘../../../../wp-load.php’);
to
include_once(‘../wp-load.php’);
but when I go to the site I get the following error
Warning: include_once(affiliates/lang/spa.php) [function.include-once]: failed to open stream: No such file or directory in /home/content/74/6804574/html/sites/boletosgdl/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 37
Warning: include_once() [function.include]: Failed opening ‘affiliates/lang/spa.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php’) in /home/content/74/6804574/html/sites/boletosgdl/wp-content/plugins/wp-affiliate-platform/wp_affiliate_platform1.php on line 37
Im not sure where it went wrong or what steps I need to take it to get it working
thanks in advance
Redo on method #2. Create a soft link to wherever you want the affiliates program.
ln -s /var/www/yoursite/wp-content/plugins/wp-affiliate-program/affiliates /var/www/yoursite/affiliates
Now access via http://www.yoursite.com/affiliates/ and everything works grand.
Both methods work brilliantly. Thanks for easy implementation tools.
Option #2 Modified – 2 Menu Tabs – One for Login – One for Signup
(1) Copy all of the files in the directory Affiliates under the plugin (leave the plugin alone!) to the actual directory that your url is pointing to. In my case /affiliate-signup/ for Signup and also /affiliate-login/ for Login – I wanted 2 separate tabs in my menu.
(2) Change the misc_func.php file. Using Notepad open the file and change the second line – include_once(‘../../../../wp-load.php’); to point to the correct directory.
Notice the ../../../../ The directions have you removing all but the last set, but in my case just removing 2 sets did the trick. I would suggest if you are having a problem with this working (locating the correct directory) that you remove one set at a time and test until you get the correct setting. You need to remove a complete set at a time which is ../
(3) Since I have 2 tabs going to 2 different directories I must change each misc_func.php file. Copy the code from the first working misc_func.php file – into the second and save and upload. Both of your menu tabs will now work with pretty URLs.
Note: If you use Filezilla to upload files this is really simple to copy files and edit them as well. Copy the affiliates directory to you hard drive. Right click on the misc_func.php file and modify. Then drag and drop back to you server all of the affiliate files (not the actual directory) into the directory that you want it to work in.
Then do it again for the second menu item and you are done!
Option 1 will probably be easier for you to follow. Does your hosting provider offer video tutorial showing you how to upload files? Most hosting providers will have video tutorials on this and that may be a good point to start.
Thank you for trying to help me through your answer. It may appear obvious to some, but nfortunately, I don’t quite understand what you’ve said. Of the two methods to shorten/modify the affiliate login URL, is there another place where I can find info on how to do it? I don’t have a lot of experience uploading files to where we host http://www.readermagazine.net, but I’d like to learn how to do this.
Thank you.
Chris
You don’t have to modify any “index” file. You only need to modify the “misc_func.php” file and since we are going to be using the relative URL you don’t need to hardcode your domain name either… Just specify the relative path to the “wp-load.php” file.
Once I open the “index.html” file (a Dream Weaver file when I open it), where do I go to find http://www.yourdomain.com” in order to rename it to the site where I want people to go, which in my case will be http://www.readermagazine.net.
Thanks
Obviously the path is not lining up in your case. I have a feeling you created a directory called “affiliates” then copied the “affiliates” directory inside it so the path is looking like the following:
example.com/affiliates/affiliates/
You don’t need to create a directory yourself just copy the “affiliates” directory and upload it where you want it then fix the path to the “wp-load.php” file in the misc_func.php file.
Hi ,
I just bought your plugin.
I can’t seem to get this to work. Option 2 sounds the best to me. I have the plugin installed in the WP directory. Where you put the plugins.
I made a directory called affliliates in the root. Do i only copy the afflilitates directory from the wp-plugin directory?
I also changed the misc_func file
I did that but got this error:
Warning: include_once(../wp-load.php) [function.include-once]: failed to open stream: No such file or directory in /home/wjilngcr/domains/socialsourcer.com/public_html/affiliates/misc_func.php on line 2
Warning: include_once() [function.include]: Failed opening ‘../wp-load.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /home/wjilngcr/domains/socialsourcer.com/public_html/affiliates/misc_func.php on line 2
Fatal error: Call to undefined function get_option() in /home/wjilngcr/domains/socialsourcer.com/public_html/affiliates/misc_func.php on line 45
Okay so I found out why the second version wasnt working. If you use a plugin for wordpress to allow syntax highlighting then you will not get errored code when pasted into an article.
Note:
include_once(’../wp-load.php’);
contains funny ‘ ‘ that are actually ’ ’ note the difference between the two!
If you copy this might work:
include_once(‘../wp-load.php’);
it should work.
I installed the plugin, made my settings, then copied the affiliates folder to my root directory and made the change to the misc_func file and it worked. 🙂 cheers
Can I get some more detail on the second solution. I definitely want my url to be pretty for the login page.
Do you just move the affiliate directory to the root folder, or do you move the whole plugin folder there?
Thanks
My goodness that´s so damn easy and fast…I just can´t believe it. Fantastic piece of work again.
Is it possible to run the affiliate platform as an iframe inside a regular WordPress page on my site?
MOST EXCELLENT! Works great!
BTW: Option 1 is easiest to do, but Option 2 won’t show the redirect in your address bar.
@Sheila, sure but in the meantime let me know what part in the instruction you are having difficulty and I will try to explain it more.
Any chance you might do a video to walk us through this and your other pluggins? It would be really helpful for those of us who don’t know where to find the folders you’re referring to. I can’t wait to get started but don’t know how.
Thanks
Hi James, is your WordPress installed in the “wp-directory” folder? If it is then you will need to include the following for your customization:
../wp-directory/wp-load.php
Admin,
Sorry it took me so long been on a bit of a break from this one of my sites. And not even working on the affiliate part yet I am working on the downloads but assuming they are similar because of the similar commands just need to edit different files. (tell me if the basics do not apply here please).
But LOL, (yes I am a dummy) I guess I need to be a little more specific,
Site Loads in….www.domain.com
Site Stored in… http://www.domain.com/wp-directory/
I want the plugins to load
http://www.domain.com/downloads/download.zip
http://www.domain.com/affiliate
Hi James, you can change the include once to the following (.. means one directory up):
../Wordpress_directory/wp-load.php
By the way i forgot to add that is for the copy method
Sorry
Lol me again,
What if WordPress is not in the root directory?
IE: http://www.Domain.com/Wordpress_directory/
and you want the affiliates in the root directory
IE: http://www.Domain.com/Affiliates
What would I change the include once too?
And do I edit the WP_Plugin affiliates or the NEW root Affiliates?