Keyword Replace by Waindigo [Deleted]

@Waindigo This is a fantastic addon. We have an custom addon http://www.nzwarriors.com/stats/ that has player stat values. I wanted to replace the player names with a link to their player profiles using this addon however it doesnt seem to work outside of threads. How to enable it for other areas of the site ie pages?
 
How do you handle the search and replace? On a post creation or on the render? like if you replace 'cat' with 'dog' does dog go into the database or is it cat in the database and then your add on executes around the same time as (or possibly with) the bbcode renderer? Just wondering if it's extra queries or what happens with the content upon uninstall.
 
How do you handle the search and replace? On a post creation or on the render? like if you replace 'cat' with 'dog' does dog go into the database or is it cat in the database and then your add on executes around the same time as (or possibly with) the bbcode renderer? Just wondering if it's extra queries or what happens with the content upon uninstall.
It happens at the same time as the bbcode renderer. Search and replace does not require database queries to be run, so there are no extra queries. On uninstall, it no longer makes replacements so it just goes back to normal.
 
Error Info
PHP:
ErrorException: Undefined index: limit - library/Waindigo/KeywordReplace/Helper/String.php:130
Generated By: Unknown Account, 1 minute ago
Stack Trace
PHP:
#0 /home/www/public_html/forums/library/Waindigo/KeywordReplace/Helper/String.php(130): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/sociall1/...', 130, Array)
#1 /home/www/public_html/forums/library/Waindigo/KeywordReplace/Helper/String.php(67): Waindigo_KeywordReplace_Helper_String::buildKeywordReplaceArrays(Array)
#2 /home/www/public_html/forums/library/Waindigo/KeywordReplace/Extend/XenForo/BbCode/Formatter/Base.php(26): Waindigo_KeywordReplace_Helper_String::keywordReplaceString('Socially Uncens...')
#3 /home/www/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(513): Waindigo_KeywordReplace_Extend_XenForo_BbCode_Formatter_Base->filterString('Socially Uncens...', Array)
#4 /home/www/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(492): XenForo_BbCode_Formatter_Base->renderString('Socially Uncens...', Array, 0)
#5 /home/www/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(469): XenForo_BbCode_Formatter_Base->renderTreeElement('Socially Uncens...', Array, 0)
#6 /home/www/public_html/forums/library/XenForo/BbCode/Formatter/Base.php(449): XenForo_BbCode_Formatter_Base->renderSubTree(Array, Array)
#7 /home/www/public_html/forums/library/XenForo/BbCode/Parser.php(505): XenForo_BbCode_Formatter_Base->renderTree(Array, Array)
#8 /home/www/public_html/forums/library/XenForo/BbCode/TextWrapper.php(117): XenForo_BbCode_Parser->render('Socially Uncens...', Array)
#9 [internal function]: XenForo_BbCode_TextWrapper->__toString()
#10 /home/www/public_html/forums/library/SimplePortal/Helper/Item.php(40): strpos(Object(XenForo_BbCode_TextWrapper), '<!-- end -->')
#11 /home/www/public_html/forums/library/SimplePortal/Helper/Item.php(18): SimplePortal_Helper_Item::prepareMessage(Array, Object(XenForo_BbCode_Parser), Array)
#12 /home/www/public_html/forums/library/SimplePortal/ViewPublic/Index.php(12): SimplePortal_Helper_Item::getTemplates(Object(WidgetFramework_XenForo_View1), Array, Object(XenForo_BbCode_Parser), Array)
#13 /home/www/public_html/forums/library/XenForo/ViewRenderer/Abstract.php(227): SimplePortal_ViewPublic_Index->renderHtml()
#14 /home/www/public_html/forums/library/XenForo/ViewRenderer/HtmlPublic.php(67): XenForo_ViewRenderer_Abstract->renderViewObject('SimplePortal_Vi...', 'Html', Array, 'simpleportal_in...')
#15 /home/www/public_html/forums/library/XenForo/FrontController.php(572): XenForo_ViewRenderer_HtmlPublic->renderView('SimplePortal_Vi...', Array, 'simpleportal_in...', NULL)
#16 /home/www/public_html/forums/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#17 /home/www/public_html/forums/index.php(13): XenForo_FrontController->run()
#18 {main}
Request State
PHP:
array(3) {
  ["url"] => string(40) "http://www.sociallyuncensored.eu/forums/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
I had the same issue and it finally stopped erroring although it created 100s of errors in the log in a few minutes.
 
The overlay only works if the link is designed to be displayed in an overlay
Example ?

A newcomer wants this:
upload_2013-10-23_9-59-40-png.59665


http://xenforo.com/community/threads/xf-addons.61964/
 
Something like:
HTML:
<a title="Your lord and perverted master">DoN</a>

This works great, thank you :)

Is there a way to keep the replacements from applying to smilie codes when using the above example?
For example, on our forum members use acronyms such as "bfa" for blue-fronted amazon. We happen to have a smilie for that as well, using the code :bfa: Using the above example works great to identify what it means when hovering over the text, but breaks the smilie image.
 
This works great, thank you :)

Is there a way to keep the replacements from applying to smilie codes when using the above example?
For example, on our forum members use acronyms such as "bfa" for blue-fronted amazon. We happen to have a smilie for that as well, using the code :bfa: Using the above example works great to identify what it means when hovering over the text, but breaks the smilie image.
Smilies allow for hover over text anyway, so probably best just not to include a replacement for that and to put your description as the name of the smilie instead.
 
Thanks for the reply :) Im not trying to replace anything for the description of the smilie itself, just for the acronym. However adding the replacement for the text is also affecting some of the smilies (apparently because they use the acronym in their code, wrapped with a colon on either end).

Im having a hard time explaining so I'll try to show whats happening.

This is what it looks like without the replacement:
bfa-noreplace.webp

What we are wanting is for the text "BFA" on hover to show "blue-fronted amazon" (normally both are not used together, Im just showing what happens to the image with/without the replacement).

This is what I have:
bfa-replace1.webp
smilie code here:
bfa-smilie.webp

This is the result:

bfa-replace2.webp
Is there a way to make it so that it doesnt affect the smilie but still shows the expanded text for the acronym?
 
Top Bottom