Radiant WoltLab Style

A Much Better, Clean and Elegant Premium WoltLab Style

VieCode Filebase

VieCode Filebase is a third-party WoltLab plugin which is somewhat similar to the official WoltLab Filebase app. When Radiant is installed in a site where this plugin is also present, there will be some inconsitencies on how it looks, and some parts will have a distorted layouts.

Follow the steps outlined below so that the VieCode Filebase app will look much the same with the appearance of the Radiant style.

Step 1: Add Custom SCSS

Go to ACP → Customization → Styles → Radiant → Advanced Settings → Own Declaration → Individual CSS and SCSS and add the following SCSS:

/* VieCode Filebase */
.contentFilebase > .section {
	padding: 0;
}

.filebaseLatestEntriesList {
	.containerHeadline > p {
		color: $wcfContentDimmedText;
		font-size: $wcfFontSizeSmall;
	}
	
	.entryDescription {
		margin: 5px 0;
	}
}

#tpl_filebase_entryList {
	.contentHeader {
		.contentTitle {
			font-family: $wcfFontPrimary;
			font-size: 16px;
			padding: 12px 10px;
			text-transform: none;
			
			@include screen-lg {
				padding: 13px 12px;
			}
		}
		
		& + .paginationTop {
			margin-top: 10px;
		}
	}
	
	.contentNavigation {
		background: $sectionHeaderBackground;
		border-radius: 0 0 3px 3px;
		border-top: 1px solid #e7edf5;
		box-shadow: inset 0 1px 0 0 #fff;
		margin: 0;
		padding: 0 10px 10px;
		
		@include screen-md-up {
			padding: 0 10px;
		}
		
		@include screen-lg {
			padding: 0 12px;
		}
		
		> nav,
		ul {
			margin-top: 0;
		}
	}
}

.filebaseCategoryList {
	> li.filebaseCategoryContainer {
		&:first-child {
			border-top: 0;
		}
		
		&:last-child {
			border-bottom: 0;
		}
		
		.filebaseCategory > .icon {
			box-shadow: inset 0 0 0px 1px #6dba3b, inset 0 0 0 2px #fff;
		}
	}
	
	.filebaseCategory {
		padding: 12px 10px;
		
		> .icon {
			background: #6dba3b;
			border-radius: 50%;
			color: #fff;
			font-size: 20px;
			height: 34px;
			line-height: 34px;
			margin-left: 0;
			width: 34px;
		}
	}
	
	.filebaseCategoryMain h3::after {
		line-height: 1;
	}
}

.filebaseMainCategory {
	&:first-child {
		border-radius: 3px 3px 0 0;
	}
	
	> header {
		background: #344b5b;
		border: 0;
		color: #a2b9ca;
		padding: 12px 10px 10px;
		
		@include screen-md-up {
			padding: 14px 10px 12px;
		}
		
		> h2 {
			font-family: $wcfFontSecondary;
			font-size: 16px;
			text-transform: uppercase;
		}
	}
}

.filebaseStats {
	line-height: 1;
	
	> dl:first-child {
		padding: 1px 0 5px;
	}
	
	.messageGroupListStatsSimple {
    	font-size: 14px;
    	min-width: 70px;
    	padding: 7px 10px 7px 9px;
	}
}

.filebaseLastEntry {
    color: $wcfContentDimmedText;
}

.filebaseEntryList {
	&.messageGroupList {
		th.columnMark > label::before {
			top: 0;
		}
		
		.columnAvatar > div {
			width: unset;
			height: unset;
		}
	}
	
	table {
		border: 0;
		
		th,
		td {
			border-right: 0 !important;
		}
	}
}

.filebaseEntry {
	.messageContent::before {
		display: none;
	}
	
	.filebasePreviewImage {
		margin: 3px 0 10px 0;
		
		@include screen-sm-up {
			margin: 4px 0 15px 20px;
		}
	}
}

.filebaseFileList {
	margin: 0;
	
	> .section {
		flex: 1;
		padding: 0;
		
		.sectionTitle {
			background: none;
			border: 0;
			margin: 0 0 10px;
			padding: 0;
			@include wcfFontCapital;
		}
		
		> ul {
			background: $sectionHeaderBackground;
			border: 2px dashed $wcfContentBorderInner;
			border-radius: 3px;
			padding: 7px 0;
			
			&.row {
				margin: 0;
			}
			
			> li {
				margin: 0;
				padding: 5px 10px;
				
				> div {
					line-height: 17px;
					
					> small {
						color: $wcfContentDimmedText;
					}
				}
			}
		}
	}
}

.recentActivityList > li.viecodeentry .containerContentType::before {
	content: "\f15b";
}

.recentActivityList > li.viecodeentryComment .containerContentType::before {
	content: "\f0e6";
}

Step 2: Template Moifications

The following template modifications are needed so that links (such as User Files, and Watched Files) will point to the URLs of VieCode Filebase instead of the official Filebase app URLs.

  1. Go to ACP → Customization → Templates and copy the filebase entryList template to Radiant(_*) Template Group.
  2. On Templates → Radiant(_*) → header template, find this code around LINE 111:
    {if $__wcf->getActivePage()->identifier == 'com.woltlab.wbb.UserThreadList' && !$userContentHeaderThreads|empty}{@$userContentHeaderThreads}{/if}
    
    then above it, add this code:
    {if $__wcf->getActivePage()->identifier == 'com.viecode.filebase.EntryList' && !$userContentHeaderFileEntries|empty}{@$userContentHeaderFileEntries}{/if}
    
  3. On Templates → Radiant(_*) → user template, find this code around LINE 316 - 318:
    {hascontent}
    	{content}{event name='menuSearch'}{event name='quickSearchItems'}{/content}
    {/hascontent}
    
    then below it, add this code:
    {if 'FILEBASE_INSTALL_DATE'|defined}
    	<li class="flexMenuItem userContentMenuFiles{if $__filebase->isActiveApplication()} active{/if}">
    		{if $user->filebaseEntries || $user->userID == $__wcf->user->userID}
    			<a href="{link application='filebase' controller='EntryList'}userID={$user->userID}{/link}">
    				<span class="flexMenuItemTitle userContentMenuItemTitle">{lang}filebase.entry.file{/lang}</span>
    				<span class="badge">{#$user->filebaseEntries}</span>
    			</a>
    		{else}
    			<div>
    				<span class="flexMenuItemTitle userContentMenuItemTitle">{lang}filebase.entry.file{/lang}</span>
    				<span class="badge">{#$user->filebaseEntries}</span>
    			</div>
    		{/if}
    	</li>
    {/if}
    
  4. On Templates → Radiant(_*) → userContentMennu template, find this code around LINE 37 - 47:
    {if $user->filebaseFiles || $user->userID == $__wcf->user->userID}
    	<a href="{link application='filebase' controller='UserFileList' object=$user}{/link}">
    		<span class="flexMenuItemTitle userContentMenuItemTitle">{lang}filebase.file.files{/lang}</span>
    		<span class="badge">{#$user->filebaseFiles}</span>
    	</a>
    {else}
    	<div>
    		<span class="flexMenuItemTitle userContentMenuItemTitle">{lang}filebase.file.files{/lang}</span>
    		<span class="badge">{#$user->filebaseFiles}</span>
    	</div>
    {/if}
    then replace with:
    {if $user->filebaseEntries || $user->userID == $__wcf->user->userID}
    	<a href="{link application='filebase' controller='EntryList'}userID={$user->userID}{/link}">
    		<span class="flexMenuItemTitle userContentMenuItemTitle">{lang}filebase.entry.file{/lang}</span>
    		<span class="badge">{#$user->filebaseEntries}</span>
    	</a>
    {else}
    	<div>
    		<span class="flexMenuItemTitle userContentMenuItemTitle">{lang}filebase.entry.file{/lang}</span>
    		<span class="badge">{#$user->filebaseEntries}</span>
    	</div>
    {/if}
  5. On Templates → Radiant(_*) → userMenuLinksContent template:
    • find:
      <li><a href="{link application='filebase' controller='UserFileList' object=$__wcf->user}{/link}">{lang}filebase.file.files{/lang}</a></li>
      
      then replace with:
      <li><a href="{link application='filebase' controller='EntryList'}userID={$__wcf->user->userID}{/link}">{lang}filebase.entry.file{/lang}</a></li>
      
    • find:
      WatchedFileList
      
      then replace with:
      WatchedEntryList
      
  6. On Templates → Radiant(_*) → userMenuLinksContentMobile template:
    • find:
      <li class="menuOverlayItem"><a href="{link application='filebase' controller='UserFileList' object=$__wcf->user}{/link}" class="menuOverlayItemLink">{lang}filebase.file.files{/lang}</a></li>
      
      then replace with:
      <li class="menuOverlayItem"><a href="{link application='filebase' controller='EntryList'}userID={$__wcf->user->userID}{/link}" class="menuOverlayItemLink">{lang}filebase.entry.file{/lang}</a></li>
      
    • find:
      WatchedFileList
      
      then replace with:
      WatchedEntryList
      
  7. On Templates → Radiant(_*) → filebase entryList template, find:
    {capture assign='contentTitle'}{lang}filebase.entry.userEntries{/lang}{/capture}
    
    then below it, add this code:
    {if $items}
    	{foreach from=$objects item=userFileEntries name=userFileEntry}
    		{if $tpl.foreach.userFileEntry.iteration == 1}
    			{capture assign='userContentHeaderFileEntries'}
    				<div class="userContentHeader{if MODULE_USER_COVER_PHOTO} userProfileUserWithCoverPhoto{/if}{if MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($userFileEntries->getUserProfile()->isAccessible('canViewTrophies') || $user->userID == $__wcf->session->userID) && $userFileEntries->getUserProfile()->getSpecialTrophies()|count} userProfileWithTrophy{/if}">
    					{if MODULE_USER_COVER_PHOTO}
    						<div class="userProfileCoverPhoto" style="background-image: url({@$userFileEntries->getUserProfile()->getCoverPhoto()->getURL()})"></div>
    					{/if}
    					<div class="contentHeaderIcon">
    						<span>{@$userFileEntries->getUserProfile()->getAvatar()->getImageTag(128)}</span>
    						{if $userFileEntries->getUserProfile()->isOnline()}<span class="badge green badgeOnline">{lang}wcf.user.online{/lang}</span>{/if}
    					</div>
    					<div class="userContentHeaderTitle">
    						<div class="userContentTitle">
    							<span class="userProfileUsername">{$user->username}</span>
    							{if MODULE_USER_RANK}
    								{if $userFileEntries->getUserProfile()->getUserTitle()}
    									<span class="badge userTitleBadge{if $userFileEntries->getUserProfile()->getRank() && $userFileEntries->getUserProfile()->getRank()->cssClassName} {@$userFileEntries->getUserProfile()->getRank()->cssClassName}{/if}">{@$userFileEntries->getUserProfile()->getUserTitle()}</span>
    								{/if}
    								{if $userFileEntries->getUserProfile()->getRank() && $userFileEntries->getUserProfile()->getRank()->rankImage}
    									<span class="userRankImage">{@$userFileEntries->getUserProfile()->getRank()->getImage()}</span>
    								{/if}
    							{/if}
    						</div>
    						<div class="contentHeaderDescription">
    							{if MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($userFileEntries->getUserProfile()->isAccessible('canViewTrophies') || $user->userID == $__wcf->session->userID) && $userFileEntries->getUserProfile()->getSpecialTrophies()|count}
    								{assign var='specialTrophies' value=$userFileEntries->getUserProfile()->getSpecialTrophies()|count}
    								<div class="specialTrophyUserContainer">
    									<ul>
    										{foreach from=$userFileEntries->getUserProfile()->getSpecialTrophies() item=trophy}
    											<li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32, true)}</a></li>
    										{/foreach}
    										{if $userFileEntries->getUserProfile()->trophyPoints > $specialTrophies}
    											<li><a href="#" class="jsTooltip userTrophyOverlayList" data-user-id="{$user->userID}" title="{lang}wcf.user.trophy.showTrophies{/lang}" role="button">{lang trophyCount=$userFileEntries->getUserProfile()->trophyPoints-$specialTrophies}wcf.user.trophy.showMoreTrophies{/lang}</a></li>
    										{/if}
    									</ul>
    								</div>
    							{/if}
    							<ul class="inlineList commaSeparated">
    								{if !$userFileEntries->getUserProfile()->isProtected()}
    									{if $userFileEntries->getUserProfile()->isVisibleOption('gender') && $userFileEntries->getUserProfile()->gender}<li>{@$userFileEntries->getUserProfile()->getFormattedUserOption('gender')}</li>{/if}
    									{if $userFileEntries->getUserProfile()->isVisibleOption('birthday') && $userFileEntries->getUserProfile()->getAge()}<li>{@$userFileEntries->getUserProfile()->getAge()}</li>{/if}
    									{if $userFileEntries->getUserProfile()->isVisibleOption('location') && $userFileEntries->getUserProfile()->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if}
    								{/if}
    								<li>{lang}wcf.user.membersList.registrationDate{/lang}</li>
    							</ul>
    							{if $userFileEntries->getUserProfile()->canViewOnlineStatus() && $userFileEntries->getUserProfile()->getLastActivityTime()}
    								<ul class="inlineList commaSeparated">
    									<li>{lang}wcf.user.usersOnline.lastActivity{/lang}: {@$userFileEntries->getUserProfile()->getLastActivityTime()|time}</li>
    									{if $userFileEntries->getUserProfile()->getCurrentLocation()}<li>{@$userFileEntries->getUserProfile()->getCurrentLocation()}</li>{/if}
    								</ul>
    							{/if}
    						</div>
    					</div>
    					{include file='userContentMenu'}
    				</div>
    			{/capture}
    		{/if}
    	{/foreach}
    {/if}