4460 pointsLike some sort of WPMU DEV God"Mindblowingly helpful memberLifetime member
Barry
Developer
—
12th March 2011
Hi gang
Version 2.2 of the affiliate plugin has just been uploaded - it fixes a couple of issues with network activation but also adds the following shortcodes:
affiliatelogincheck - place this at the top of the page that you are planning on using the rest of the shortcodes on and it will display a login message if the user isn't logged in.
affiliateuserdetails - mirrors the affiliate details form from the admin area (yellow box)
affiliatestatstable - mirrors the large click statistics table
affiliatevisitstable - mirrors the referrers this month table
affiliatetopvisitstable - mirrors the top referrers table
affiliatestatschart - mirrors the main statistics charts
affiliatevisitschart - mirrors the referrers charts
If the user isn't logged in then none of the shortcodes will output anything (except for the top one).
The styles and output of the shortcodes can be customised, and i'll put together some details on that in the docs and another post.
Version 2.2 of the affiliate plugin has just been uploaded - it fixes a couple of issues with network activation but also adds the following shortcodes:
affiliatelogincheck - place this at the top of the page that you are planning on using the rest of the shortcodes on and it will display a login message if the user isn't logged in.
affiliateuserdetails - mirrors the affiliate details form from the admin area (yellow box)
affiliatestatstable - mirrors the large click statistics table
affiliatevisitstable - mirrors the referrers this month table
affiliatetopvisitstable - mirrors the top referrers table
affiliatestatschart - mirrors the main statistics charts
affiliatevisitschart - mirrors the referrers charts
If the user isn't logged in then none of the shortcodes will output anything (except for the top one).
The styles and output of the shortcodes can be customised, and i'll put together some details on that in the docs and another post.
but I dont the admin area on the main site under the super admin area.
It should now be in the Network admin area as you had network activated.
I think we switched something on your install to force it to use a certain table prefix - I'll track back and see what I can find so we can get it back like that again.
Hi can you replace your affiliateadmin.php file (affilaiteincludes/classes) with the one attached below and then go to the admin area of your affiliate plugin.
Hi Barry,
I've been getting some errors in my logs like the following:
[28-Mar-2011 05:36:39] WordPress database error Table 'pbs_wrdpr.wp_358_affiliatereferrers' doesn't exist for query SELECT * FROM wp_358_affiliatereferrers WHERE user_id = 13 AND period = '201103' ORDER BY referred DESC LIMIT 0, 15 made by wp_dashboard, do_meta_boxes, call_user_func, affiliatedashboard->dashboard_aff_report
[28-Mar-2011 05:36:40] WordPress database error Table 'pbs_wrdpr.wp_358_affiliatedata' doesn't exist for query SELECT * FROM wp_358_affiliatedata WHERE user_id = 13 ORDER BY period DESC LIMIT 0, 18 made by do_action, call_user_func_array, affiliatedashboard->ajax__aff_getdashstats
The best I can tell is that it happens when the super admin visits a blog and they are not specifically added as a user? I have one blog I set up myself and am in there as a user - the error doesn't get logged. Another site where my super admin is not listed in the users, the error happens.
Doesn't seem to visibly break anything but it fills up the logs on me. :) I couldn't see any way to add a check before that SELECT line.
But maybe check for site admin before and do something different? or check to see if the user is a user on this site before trying to go to the database?
On another note... I am still reluctant to upgrade to 3.1 because of all the things that need to change so I had to add my fix for the menu placement as mentioned by georgef
In affiliateadmin.php lines 341-345 just add a fallback after the check for is_network_admin:
Responses (12)
Member — 13th March 2011 #
Great work Barry!
That fixed my error on subscribers seeing the admin area, but I dont the admin area on the main site under the super admin area.
My previous affiliate data is also gone (no biggy) but will that affect the users affiliate links or will they still be the same?
I'm assuming that it created new tables or something.
Developer — 14th March 2011 #
It should now be in the Network admin area as you had network activated.
I think we switched something on your install to force it to use a certain table prefix - I'll track back and see what I can find so we can get it back like that again.
Developer — 14th March 2011 #
@georgef - can you edit the config.php file and switch the setting in there from "no" to "yes"
Member — 15th March 2011 #
@Barry thanks. I tried yes and no, here's what's happening..
The affiliate settings that use to go under the Super admin area doesnt appear their at all.
The main affiliate graph seems to be visible in both the main admin dashboard as well as for community members on their subblogs.
Also saw a double http:// on my account, but not the other for some reason.
Developer — 15th March 2011 #
Ah - that'll be the problem I think - this version has a lot of WP 3.1 specifics 3.1 - looks like you are still on 3.0.5 (super admin goes in 3.1).
Member — 18th March 2011 #
Cool, busy with a server move (the biggest solution to my problems) and upgrading in the process. Thanks Barry.
Member — 23rd March 2011 #
Hey Barry,
Just triple checked and the affiliate plugin is not tracking anything.
I've upgraded to 3.1.
In network admin, there are some old stats present, but nothing is showing on the subblogs.
We've checked the tables are in the global db and tables added in db-config.
Other than that not sure what to check?
Thanks.
Member — 25th March 2011 #
I know Barry is a busy guy, any other takers on this?
Member — 25th March 2011 #
Here is my screenshot of cookie
Developer — 25th March 2011 #
Hi can you replace your affiliateadmin.php file (affilaiteincludes/classes) with the one attached below and then go to the admin area of your affiliate plugin.
Note: removed attachment as no longer needed.
Member — 26th March 2011 #
Awesome working like a charm! Thanks again Barry!
Member — 28th March 2011 #
Hi Barry,
I've been getting some errors in my logs like the following:
[28-Mar-2011 05:36:39] WordPress database error Table 'pbs_wrdpr.wp_358_affiliatereferrers' doesn't exist for query SELECT * FROM wp_358_affiliatereferrers WHERE user_id = 13 AND period = '201103' ORDER BY referred DESC LIMIT 0, 15 made by wp_dashboard, do_meta_boxes, call_user_func, affiliatedashboard->dashboard_aff_report
[28-Mar-2011 05:36:40] WordPress database error Table 'pbs_wrdpr.wp_358_affiliatedata' doesn't exist for query SELECT * FROM wp_358_affiliatedata WHERE user_id = 13 ORDER BY period DESC LIMIT 0, 18 made by do_action, call_user_func_array, affiliatedashboard->ajax__aff_getdashstats
The best I can tell is that it happens when the super admin visits a blog and they are not specifically added as a user? I have one blog I set up myself and am in there as a user - the error doesn't get logged. Another site where my super admin is not listed in the users, the error happens.
Doesn't seem to visibly break anything but it fills up the logs on me. :) I couldn't see any way to add a check before that SELECT line.
But maybe check for site admin before and do something different? or check to see if the user is a user on this site before trying to go to the database?
On another note... I am still reluctant to upgrade to 3.1 because of all the things that need to change so I had to add my fix for the menu placement as mentioned by georgef
In affiliateadmin.php lines 341-345 just add a fallback after the check for is_network_admin:
becomes:
Become a member