Resource icon

Adding the XFMG Media Block to a sidebar or portal page

@Martok I have implemented this on my Widget Framework list widget but nothing appears.

Have I got some setting error? Please see this:
RB4tz3.jpg


Thank you Martok
Double check each of the steps in the guide, including creating the template first. It should work if you follow everything correctly.
 
Is there a way to use this on the main page of my website, so outside the code of the forum/gallery itself? Basically as a independent included block/div I can add to the index-page of my website (which is not part of the forum-code itself).

Raymond
 
Is there a way to use this on the main page of my website, so outside the code of the forum/gallery itself? Basically as a independent included block/div I can add to the index-page of my website (which is not part of the forum-code itself).

Raymond
No, the code is specific to XenForo.
 
great article, but my portal (xenporta 2 ) do not show this.:cry:
This resource only supports XenPorta 1, not XenPorta 2 (the resource description states which portals this resource supports). You will have to ask in the discussion thread for that add-on for support with getting the media block to show in the XenPorta 2 sidebar.
 
Thanks Martok for the guide. I have been using this on my home page for a long time now.

There is one think that I am desperate to know, is there any way you can make it just display one specific user's album?
 
There is one think that I am desperate to know, is there any way you can make it just display one specific user's album?
This resource just replicates what the standard XFMG media block does, it doesn't (and can't) add additional functionality. The answer therefore is no.
 
I'm using the original XenPorta, and I just can't get this to work. I don't know if I've done something wrong, but the block simply does not display from the portal page. Help would be much appreciated!

Screenshot of block edit:
2IlY0T3.png


Code:
Code:
<div class="section" align="center">
<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">24</xen:set> // Any number. Number of images that are visible in the slider.
    <xen:set var="$limit">200</xen:set> // Any number. Number of images to be loaded (not all are visible).
    <xen:set var="$slideWidth">860</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>
 
Remove the code and replace it with the word Test, then save. Can you now see the block? If not, it's not related to the code. Double check the other steps in the guide for XenPorta 1. If it still doesn't work, it's a XenPorta 1 issue, in which case you will need to ask the author for support.
 
Remove the code and replace it with the word Test, then save. Can you now see the block? If not, it's not related to the code. Double check the other steps in the guide for XenPorta 1. If it still doesn't work, it's a XenPorta 1 issue, in which case you will need to ask the author for support.

Thanks for the quick response! Yeah, the "Test" text didn't do anything. It's odd though that blocks like Recent Threads show up just fine. I don't know enough about it to know why, but I'm more sad than anything, seeing as it's unmaintained, and the update is too high a Xenforo version to go with the current software I'm using. :(
 
Hello
Thanks a lot for this resource, I use this code to display videos in a widget through widget framework and it works very well. I just have one problem : one of the video suddenly disppeared from the selection. The only difference I can see between this video and others is that it received a rating. I tried to remove the rating, but the video is still absent.
How can I fix this ?
Thanks !
 
Hello
Thanks a lot for this resource, I use this code to display videos in a widget through widget framework and it works very well. I just have one problem : one of the video suddenly disppeared from the selection. The only difference I can see between this video and others is that it received a rating. I tried to remove the rating, but the video is still absent.
How can I fix this ?
Thanks !
I've just tested this and adding a rating does not affect whether a media item appears or not (all of the ones I rated remained visible). There must be some other reason for it to disappear. Double check the template code. Also check to see if it was moved to a category or album that is not listed in the template code. Beyond that, I can't think of any reason why the video wouldn't be displayed.
 
Thanks for your answer.
I forgot to say that ratings are not allowed to users except admins. Could be a reason ?
 
Thanks for your answer.
I forgot to say that ratings are not allowed to users except admins. Could be a reason ?
Permissions for ratings shouldn't make any difference. Besides, ratings aren't shown on media in the sidebar block.
 
Hello !
Would it be possible to add a condition in the widget code to select media according to a media custom field value ?
 
Hello !
Would it be possible to add a condition in the widget code to select media according to a media custom field value ?
That is beyond the scope of this guide. The code itself was provided by @Chris D and I don't think that data is exposed to be able to do this (if it was, you'd be able to do it in the built-in sidebar block that comes with the XFMG add-on).
 
Top Bottom