Keyword Management (Keyword Replace) [Deleted]

Is there any way I can use a non-standard url in the 'Replace words with links' application?
I'm trying to make a bitcoin address link that opens up a bitcoin wallet as below.


upload_2015-3-27_10-4-53.webp
 
Hey nice addon! Not too keen on the link icon and additional css, though.
Added to wishlist.
 
https://xenmade.com/forums/link-management.4/

An exception occurred: Array to string conversion in /home2/aulait/public_html/library/phc/KeywordManagement/Helper/KWMHelper.php on line 178

  1. XenForo_Application::handlePhpError()
  2. preg_replace() in phc/KeywordManagement/Helper/KWMHelper.php at line 178
  3. phc_KeywordManagement_Helper_KWMHelper::KWMSystem() in phc/KeywordManagement/Extend/ViewPublic/Threads.php at line 13
  4. phc_KeywordManagement_Extend_ViewPublic_Threads->renderHtml() in phc/HideLinks/Extend/ViewPublic/Threads.php at line 22
  5. phc_HideLinks_Extend_ViewPublic_Threads->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 227
  6. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 71
  7. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 586
  8. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  9. XenForo_FrontController->run() in /home2/aulait/public_html/index.php at line 13

    FtIL6WM.png
 
@au lait

Is there a maximum number of word replacements that one can do with this addon? I have hundreds of replacements I'd like to do, but I'll prioritize them if there is a limit.

Also, one feature request: A similar addon for vBulletin lets you draw replacements from a csv data file. This is super convenient because I can keep one such file updated with new replacement terms and upload that file to the forum root of any forum to update all the replacements for that forum.
 
In the KWM options, I'm having difficulty understanding the difference between "Max. number of replacing on Thread Page" (kwm_max_replace) and "Max. number of replacing in Post of Thread Page" (kwm_max_post_replace). On my test site, running KWM 1.5 and XF 1.4.6, they seem to do the exact same thing. Specifically, the software seems to only pay attention to which of those variables is smaller. It then does the replacements in the number of posts specified by the smaller of the two numbers. For example, I get the same thing when
kwm_max_post_replace=12
kwm_max_replace=3
as I do when
kwm_max_post_replace=3
kwm_max_replace=12
In both cases, it does the replacement in exactly 3 posts, as shown below. Am I missing something? What's the difference between those two options? Is this as designed?

(I've set Limit replace per Post=2, and it is doing what I would expect it to do - it only does 2 replacements per post.)

upload_2015-4-14_23-4-25.webp
 
For example:
When you want to replace "car" and link it to car.com but also want to replace "car.com" and link it to car.com
It is always going to replace the car that is in car.com and leave the .com
that doesn't look good.

Is there something we can do about this?
I hope you understand what I mean.
 
... simply change the order of your keywords from:

car
car.com


to

car.com
car


thats all and should run like you wish. :) You can do that easely with drag and drop.
 
Its not from me - au lait answers this on our german support site last days of the same question. ;)
 
Looking at the code, there doesn't appear to be any difference at all between kwm_max_post_replace and kwm_max_replace. They appear to do exactly the same thing.

Let me show you what I mean:
Code:
host2:library ptpn$ egrep -nR "kwm_max_(post_)*replace" phc
phc/KeywordManagement/Helper/KWMHelper.php:91:                    self::$_postCount == self::$_config->kwm_max_replace &&
phc/KeywordManagement/Helper/KWMHelper.php:92:                    self::$_config->kwm_max_replace != 0 ||
phc/KeywordManagement/Helper/KWMHelper.php:95:                        self::$_config->kwm_max_post_replace != 0 &&
phc/KeywordManagement/Helper/KWMHelper.php:96:                        self::$_postCount == self::$_config->kwm_max_post_replace

Here are lines 90-101 of phc/KeywordManagement/Helper/KWMHelper.php:
Code:
                if(
                    self::$_postCount == self::$_config->kwm_max_replace &&
                    self::$_config->kwm_max_replace != 0 ||

                    (
                        self::$_config->kwm_max_post_replace != 0 &&
                        self::$_postCount == self::$_config->kwm_max_post_replace
                    )
                )
                {
                    break;
                }
But isn't that exactly equivalent to the following? (I've stripped out some things and reorganized to make my point clearer)
Code:
if(
       ($max_replace == $postCount && $max_replace != 0)
   ||
       ($max_post_replace == $postCount && $max_post_replace != 0)
   )
{
    break;
}
To me, the above suggests that in this version (1.5), the kwm_max_replace and kwm_max_post_replace options do exactly the same thing. This makes one of them redundant.

Is this correct, @au lait? If not, would you please explain the difference?

(this post is a follow-up to a prior one.)
 
Top Bottom