Fixed Titles on bookmark links are broken

keswick

Member
Bookmark links are not showing the correct title text on page load or when adding/deleting.

Only a few simple changes are needed to make this work.
1) In the bookmark_macros template, replace the regex #phrase\('bookmark'\)(?:\|for_attr)?# with ($content.isBookmarked() ? $editText|for_attr : $addText|for_attr).
2) In the bookmark_macros template, replace the regex #addClass:is-bookmarked, ({\$editText\|for_attr}|{\$editText})# with addClass:is-bookmarked, titleAttr:sync.
3) In the bookmark_macros template, replace the regex #removeClass:is-bookmarked, ({\$addText\|for_attr}|{\$addText})# with removeClass:is-bookmarked, titleAttr:sync.
4) In XF\ControllerPlugin\Bookmark::actionSaveBookmark, successful replies with the switchKey JSON parameter of bookmarked need to also set the text JSON parmater to \XF::phrase('edit_bookmark') while replies with the switchKey JSON parameter of bookmarkremoved need to also set the text JSON parameter to \XF::phrase('add_bookmark').
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.12).

Change log:
Adjust title attributes on bookmark links and buttons
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom