No announcement yet.

How to access the conversation variable from bbcode_attachment_list

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to access the conversation variable from bbcode_attachment_list


    I am trying to do add certain conditions to view attachments on articles. One of the conditions is whether the visitor has liked the post or not.

    I've narrowed where I need to make the change down to the "bbcode_attachment_list", however, I can't seem to access the $conversation variable from this template. After doing some searching the code I need to change is:

    4468                         // Show image attachments first, then nonImage
    4469                         $attachments = array_merge($imgAttachments, $nonImgAttachments);
    4470                         $attach_url = "filedata/fetch?id=";
    4471                         if ($this->renderImmediate)
    4472                         {
    4473                                 $text .=  vB5_Template::staticRender(
    4474                                         'bbcode_attachment_list',
    4475                                         array(
    4476                                                 'attachments' => $attachments,
    4477                                                 'attachurl' => $attach_url,
    4478                                         ), false);
    4479                         }
    4480                         else
    4481                         {
    4482                                 $text .= vB5_Template_Runtime::includeTemplate(
    4483                                         'bbcode_attachment_list',
    4484                                         array(
    4485                                                 'attachments' => $attachments,
    4486                                                 'attachurl' => $attach_url,
    4487                                         )
    4488                                 );
    4489                         }
    However, if I upgrade, then I will need to remake the changes. Is there a way to do this properly without having to redo changes each time I upgrade?

Related Topics


  • AnatoliyOFF
    Broken attachments
    by AnatoliyOFF
    Several years ago I lost post attachments while moving my forum to another server. I beleve that broken images hurt my forum raiting in search engiines and would like to delete them from posts. Is there...
    Tue 27 Dec '16, 3:22am