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

Replace two boxes on the forum index page

Discussion in 'Styling and Customization Questions' started by Hilmer, Jun 29, 2012.

  1. Hilmer

    Hilmer Active Member

    Hi there

    On my index-page (when the visitors enter my page) I have two boxes
    the first is random images from the xfr-Useralbum mod and the second is latest images from the same mod.

    www.hilmer-koch.dk/forum

    I would like to change these two boxes, so that the latest images comes first??

    Anyone who know which template to edit?

    All the best
    Morten
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    library/XfRu/UserAlbums/EventListener/Template.php

    Swap the positions of the two red blocks:

    Code:
    			case 'forum_list_nodes' :
    				if ($options->XfRu_UA_displayLocations['forum_list_latest_images_before'])
    				{
    					$latestImages = $imagesModel->getLatestImages();
    					$viewParams = array(
    						'images' => $latestImages
    					);
    
    					$tpl = $template->create('xfr_useralbums_forum_list_latest_images', $viewParams);
    					$contents = $tpl . $contents;
    				}
    
    				if ($options->XfRu_UA_displayLocations['forum_list_latest_images_below'])
    				{
    					$viewParams = array(
    						'images' => (!empty($latestImages)) ? $latestImages : $imagesModel->getLatestImages()
    					);
    
    					$tpl = $template->create('xfr_useralbums_forum_list_latest_images', $viewParams);
    					$contents .= $tpl;
    				}
    
    				if ($options->XfRu_UA_displayLocations['forum_list_random_images_before'])
    				{
    					$randomImages = $imagesModel->getRandomImages();
    					$viewParams = array(
    						'images' => $randomImages
    					);
    
    					$tpl = $template->create('xfr_useralbums_forum_list_random_images', $viewParams);
    					$contents = $tpl . $contents;
    				}
    
    				if ($options->XfRu_UA_displayLocations['forum_list_random_images_below'])
    				{
    					$viewParams = array(
    						'images' => (!empty($randomImages)) ? $randomImages : $imagesModel->getRandomImages()
    					);
    
    					$tpl = $template->create('xfr_useralbums_forum_list_random_images', $viewParams);
    					$contents .= $tpl;
    				}
    				break;
    
    That should do it.
     
    Hilmer likes this.
  3. Hilmer

    Hilmer Active Member

    So perfect Jake - Worked perfect.
    Thanks a lot.
     

Share This Page