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

Adding the XFMG Media Block to a sidebar or portal page

Optic

Well-known member
#21
I've been using this religiously, good stuff @Martok. :)

Is it possible to adapt this to show albums only instead of individual images?

e.g. to show the last three created albums.
 

Martok

Well-known member
#22
I've been using this religiously, good stuff @Martok. :)

Is it possible to adapt this to show albums only instead of individual images?

e.g. to show the last three created albums.
Yes. See the explanation in the code at the top of the resource on how to exclude certain or even all categories.
 
#23
Iam sorry for noob questions , but where do i add this code
Code:
<div class="section">
<xen:include template="xengallery_media_block">
    <xen:set var="$blockPhrase">{xen:phrase xengallery_new_media}</xen:set> // Use either {xen:phrase xengallery_new_media}, {xen:phrase xengallery_random_media} 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 images that are visible in the slider.
    <xen:set var="$limit">20</xen:set> // Any number. Number of images 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="$categories">all</xen:set> // Use a comma separated list to display images from selected categories e.g. 2,3,5,7. Set to 'all' to include all categories, 0 to exclude
    <xen:set var="$albums">1</xen:set> // Set to 1 to include images from albums, 0 to exclude
    <xen:set var="$isSidebarBlock">1</xen:set> // Sets the styling so it will look like a sidebar block
    <xen:set var="$captions">1</xen:set> // Set to 1 to show captions on hover, set to 0 to always hide.
    <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:include>
</div>
 
#25
There are detailed instructions in the main resource description, depending on where you intend to add it.
Ogh , i missed this part "Widget Framework
1.
ACP > Appearance > Templates
Create a new template (I called mine xengallery_media_block_sidebar but you can call it what you like) and paste in the media block code" idk whats wrong with me :coffee:
 

51463

Well-known member
#29
Is it possible to adapt this to show albums only instead of individual images?

e.g. to show the last three created albums.
Yes. See the explanation in the code at the top of the resource on how to exclude certain or even all categories.
It's not possible. It shows the latest and each individual image within all albums but not the "lastest created albums"
 

brstrm

Active member
#30
@Jaxel I've made design decisions on a client job that require Xenporta 2. Can you confirm whether this tutorial also works for Xenporta 2? Following this tutorial, the block doesn't show up. Instead, text inside any xen:set is being printed to the front-end.
 

Martok

Well-known member
#31
@brstrm this only works for XenPorta 1. New XenPorta widgets are required for XenPorta 2. I believe someone created one and posted it somewhere in the XenPorta 2 discussion thread.
 

Dadparvar

Well-known member
#32
Thanks. Great.

Is it possible to add auto sliding effect? it moves automatically one to left each 3 or 4 seconds.

Any opinion on how to do that will be appreciated.
 

Martok

Well-known member
#33
Thanks. Great.

Is it possible to add auto sliding effect? it moves automatically one to left each 3 or 4 seconds.

Any opinion on how to do that will be appreciated.
That is not related to this resource, which is only about adding the XFMG Media block to the sidebar or portal page.

You will need to post in the Media Gallery support section about this.
 

Martok

Well-known member
#35
Hi @Martok I need this! But I have xenporta 2, can I add a recent media section like this to the home page there?
As I said in an earlier post, this only works for XenPorta 1. New XenPorta widgets are required for XenPorta 2. I believe someone created one and posted it somewhere in the XenPorta 2 discussion thread.