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

Unmaintained [TH] Add Username To Attachment by ThemeHouse 1.0.0

Prepend an attachment with the user's name when they download if they are in a specified user group.

  1. Jon W

    Jon W Well-Known Member

    Waindigo submitted a new resource:

    Add Username To Attachment by Waindigo (version 1.0.0) - Prepend an attachment with the user's name when they download if they are in a specified user group.

    Read more about this resource...
     
    faeronsayn likes this.
  2. faeronsayn

    faeronsayn Well-Known Member

    This is a great resource, I was wondering how easy it would be to customize this to make it have your site's name appended to the attachment's name.
     
  3. Jon W

    Jon W Well-Known Member

    Very easy.

    In the file library/Waindigo/AddUserToAttach/ControllerPublic/Attachment.php, replace line 30:
    PHP:
    $response->params['attachment']['filename'] = '['.$visitor['username'].']'.$response->params['attachment']['filename'];
    with:
    PHP:
    $response->params['attachment']['filename'] = '['.$xenOptions->boardTitle.']'.$response->params['attachment']['filename'];
     
    faeronsayn likes this.
  4. BenForum

    BenForum Active Member

Share This Page