• We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

XF1 MG Album Block

Status
Not open for further replies.

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,630
Use the block with [BD] Widget Framework
  1. Go to your admincp > Appereance > Import Widgets.
  2. Import the xfa_xfmg_album_block-widgets.xml from the [bd] Widget Framework folder of the archive
  3. Once imported the two widgets (new and rand) are automatically displayed, you can edit them in the List Widgets page if you want to change the pages on which they shall be displayed. To change the number of albums displayed, the add-on is provided with different options accessible from your admincp.
 
Last edited:

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,630
Use the block with XenPorta 2
  1. Go to your admincp > Home > Widgets
  2. Install the Widget with the xfa_xfmg_albumblock.xml from the XenPorta 2 folder of the archive
  3. Once imported the widget appear in the list, you can then use it on your layouts. Multiple instance of the block can be used and customized as the widget comes with options. So you can create a set of options for each instance of the widget.
 
Last edited:

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,630
Use the block manually

It is very simple and works in the same way as the block provided with XenForo Media Gallery.
Add the following html to your templates after removal of the comments (text after starting with //).

PHP:
<div class="section">
<xen:include template="xfa_xfmg_albumblock">
    <xen:set var="$blockPhrase">{xen:phrase xfa_xfmg_albumblock_new_album}</xen:set> // Use either {xen:phrase xfa_xfmg_albumblock_new_album}, {xen:phrase xfa_xfmg_albumblock_random_album} or your own custom title
    <xen:set var="$blockId">XFMGMediaForumListSidebar</xen:set> // This can be changed but must be something unique.
    <xen:set var="$type">new</xen:set> // You can set this to 'rand' for a random selection.
    <xen:set var="$items">2</xen:set> // Any number. Number of albums that are visible in the slider.
    <xen:set var="$limit">20</xen:set> // Any number. Number of albums to be loaded (not all are visible).
    <xen:set var="$slideWidth">160</xen:set> // This is the width of each slide in the slider. The slides may not be exactly this width due to responsive design resizing them dynamically.
    <xen:set var="$isSidebarBlock">1</xen:set> // Sets the styling so it will look like a sidebar block
    <xen:set var="$noResponsive">1</xen:set> // Set to 0 for responsive, 1 for fixed. Responsive will show more images at a smaller size at narrower browser widths, fixed will keep the number of images set in $items at the same size whatever the browser width.
    <xen:set var="$hideAlbumBlock">0</xen:set> // Set to 1 to hide the album titles below the album thumbnails
</xen:include>
</div>
 
Last edited:
Status
Not open for further replies.