Author Topic: Customizing Your TubeX Categories Page  (Read 1261 times)

0 Members and 1 Guest are viewing this topic.

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Customizing Your TubeX Categories Page
« on: April 29, 2012, 01:52:28 PM »
The following code will allow you to effortlessly customize your TubeX categories.tpl page.  This code does two things for you;

1. Randomizes the display of category names for the purpose of adding some variety.

2. Grabs random images for display in each category that has at least one video.  If you have no videos in a category, the default 'no-preview' thumb will appear.  So you won't need to spend time searching for representative category images to upload.

SAMPLE PAGE

Code: [Select]
{foreach var=$category from=$categories counter=$counter}
    {videos var=$videos amount=1 category=$category.category_id sort=RAND()}
    {assign var=$video code=$videos[0]}
    <span class="video">
       <div class="video-container">
       <a target="_blank"  href="http://www.yoursite.com/tubex/category/{$category.url_name}/">
          <img src=&quot;{if $video.thumbnail}{$video.thumbnail}{else}{$g_config.no_preview}{/if}" class="video-thumb" title="{$category.name}" />
       </a>
         <div class="text-center">
           <a target="_blank" href="http://www.yoursite.com/tubex/category/{$category.url_name}/" class="fs110">{$category.name}</a> <br />
         </div>
       </div>
    </span>
{/foreach}
« Last Edit: September 02, 2013, 04:57:17 AM by a4evermedia »

Unofficial JMB Support Forums

Customizing Your TubeX Categories Page
« on: April 29, 2012, 01:52:28 PM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1073 Views
Last post May 21, 2012, 06:58:51 AM
by a4evermedia
0 Replies
1186 Views
Last post May 23, 2012, 06:14:47 PM
by a4evermedia
0 Replies
805 Views
Last post March 01, 2013, 08:18:35 PM
by remati
0 Replies
1075 Views
Last post June 14, 2013, 01:39:25 PM
by ewgagman
0 Replies
768 Views
Last post December 23, 2013, 09:40:04 AM
by punaniman

anything