1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Add the content type and content id to the bbCode States array

Discussion in 'Closed Suggestions' started by xf_phantom, Mar 16, 2014.

  1. xf_phantom

    xf_phantom Well-Known Member

    It would be nice, if you would add the content type and content id to the bbCodeOptions States array.

    The problem with your current implemention is, that you're setting the contentType and contentIdKey in the extraOptions array, but they aren't available in the parser, only the states array is available, that's why it would be nice to have the contenttype and id there too.

    I have an addon extending the parser and there i need to know the content type.
    ATM i had to extend the xf views and add the additional data to the states array
      protected function _getBbCodeOptions($contentType$contentIdFieldName$canViewAttachments true$messageKey 'message'){
            return  array(
    'states' => array(
    'viewAttachments' => $canViewAttachments,
    'contentType' => $contentType,
    'contentIdKey' => $contentIdFieldName,
    'contentType' => $contentType,
    'contentIdKey' => $contentIdFieldName,
    'messageKey' => $messageKey,
    The easiest solution would be to add the data inside XenForo_ViewPublic_Helper_Message::getBbCodeWrapper to the states array, but i can#t do this with an addon because it's a static method
    Last edited: Mar 16, 2014
    pegasus likes this.

Share This Page