Hello
I had a script maker develop a plugin for us, but they have since disappeared. I have developed the cosmetic aspect of the plugin and have adjusted some of the less complicated code to suit our needs, but I am a bit stuck with the following.
The plugin works very well, but a problem has just been reported that we were completely unaware of until now. The plugin was developed for use on and in conjunction with an existing script - it is permitted under the licence.
Our plugin uses a standard template and creates pages for individuals from that template, giving the their own 'affiliate' page. Their user name is automatically inserted into the relevant areas of the page using $_GET[refid].
The page that is created by our plugin is called user_name.php (where user_name is the actual member's unique user ID). The full URL for credit is then domain.tld/pages/user_name.php?refid=user_name.
All of this works fine, however part of the core script (over which we have no control) refreshes the page after a visitor has clicked on certain links - it is a feature of that script. On refreshing, the '?refid=user_name' is removed and replaced with '?startpos....' . This invalidates the $_GET[refid] from our plugin. This is not too much of a problem when only one of these pages is being viewed by any particular user, but when someone has more than one affiliate page open and clicks links from more than one page at a time, the refid is taken from the last one in the browser's cache. This means that user_nameA.php's page can display the refid's of user_nameB. Whilst this doesn't affect the links on the pages (the correct links still show on the correct page), cosmetically it looks very unprofessional and some users 'think' they are being cheated.
I think the solution I need is; Can the $_GET[refid] have a variable so that if '?refid=user_name' is present, all is good, but if it cannot be found in the URL, then that field is left empty on the page?
Here are a couple of examples of it's use in the page:
<title><?= $_GET['refid'] ?> 's <? site_name(); ?> Affiliate Page</title>
<a href="/pages/index.php?refid=<?= $_GET['refid'] ?>"><? echo $sitebanner; ?></a>
<?= $_GET['refid'] ?> Recommends
I have been searching for information all day and have little to show for it, but at least I now have an idea where the problem is. I just don't know how to fix it. I realise that all the experts here will get a laugh out of something potentially simple, but any assistance would be gratefully accepted.
I hope my explanation wasn't too confusing, just trying to explain the situation in as much detail as possible.
Best Regards
Tony