PermaLinks :: Chaining

By jenolan - August 21, 2013

I am pondering re-starting my affiliate link system, already have the permalink system installed but there is going to be a problem is both the CALM (Affiliate) and PermaLink plugins are loaded as both are going to want to parse/despatch links to redirect them.

CALM could load the Permalink code if it doesn't have a match, but that could end up causing issues. Do you reckon that a hook point should be provided in the '404' code so that if PermaLink was about to '404' a link I could hook in see if I wanted to take over, if not return and allow PermaLink to continue with its '404' processing. Reasoning is that the PermaLink side is likely to be 'hit' more than CALM and it would be better to allow what would be the main process handle the 99% and only trigger the affiliate processing when it might be needed.

Of course, if the user doesn't have PermaLink then CALM will be directly despatching the links and handling the '404' condition. Still early days I have JLogica up and ssl'd with an under construction page still flat out like a lizard drinking with the other project that I have been helping out with, but hopefully I may get to do some of my coding again by the end of the year (well maybe).

---



Peace and Long Life

Hi Larry,

Have you had a chance to try running the two plugins side by side yet? If you have did you run into any specific problems?

As both plugins do very similar things it might be worth suggesting on the product description that users don't run both plugins side by side, and use one or the other.

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Hi Larry,

You could get users of both plugins to add a function to the permalinks_notFound404.php page that redirects or runs a function for the CALM plugin. The permalinks_notFound404.php file already calls the viewer_functions file. So any functions you added to the CALM plugin would be available on the permalinks_notFound404.php file. Then you'd just need to add instructions to the CALM plugins readme.txt for users who have both plugins.

We've done something similar in the permalinks plugin that explains to users who have both wordpress and CMS Builder on the same server how to get both to use the URL redirect system correctly. 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com