Jump to content

Search the Community

Showing results for tags 'categorization'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Announcements
    • Business Discussion
    • Business Services
    • Sell and Buy
  • Themes & templates
    • KVS default theme
    • KVS tablet theme
    • KVS paysite theme
    • KVS basic theme 1
    • KVS basic theme 2
    • KVS basic theme 3
  • Educational / support
    • Technical Support
    • FAQ
    • Educational Series

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 5 results

  1. Migrating categorization In most cases you don't need to consider categorization, as it will be automatically migrated along with content. However if you want to migrate categorization details as well (such as model details, screenshots, or custom fields) the only way to do that is to use Migrator plugin in KVS. Migrator plugin will connect to another KVS database and will pull categorization that you choose to pull. There are certain important aspects that you should consider when using Migrator plugin: Migrator plugin only supports categorization for KVS migrator. Content migration should be done using export and import functionality, which has much more options. Migrator plugin needs direct connection to other project's database. This works fine if your other project is on the same server, but won't work if your projects are on different servers. One option is to ask admins to expose KVS database on the other project's server to be available for public connections, which is not good from security point. Another option is to create a temporary local database and import backup from the other project's database into it, then configure Migrator plugin to migrate from this local temporary database. Migrator plugin needs your new database to be fully empty (e.g. no new categorization objects in it), as it will migrate objects by using the same IDs and will replace any existing objects that have the same IDs that are migrated from the other project's database. WARNING! If you try using Migrator plugin on project where you already have some categorization, it can be lost. It is recommended that both projects have the same KVS version before you try migration. Otherwise it is not guaranteed to fully succeed. Having these in mind, if your other project is on the same server and your new project is just installed, you can easily pull up all categories, tags, models, content sources with all their data within 5 minutes. All you need is to specify database connection to the other project's database. If you don't know MySQL connection details, please open /admin/include/setup_db.php file to find them. Here is an example: NOTE: for the Old path please specify any existing empty directory path, you can specify path to /tmp directory in your www root. Manually migrating video or album content Use manual content export / import when you want to do a one time migration of all (or part) of your content from older project and then allow these projects run separately. If you want to constantly sync one project based on another project, you need to use feeds, which are explained in the next section. The idea is that you first export content data into a text file and then use this text file to import the exported content into another project. Export / import of albums and videos works in exactly same way, so we will describe on videos. You can access export function in Videos -> Export videos (Import videos for import). The important thing is to create a named pattern of export (and later import), so that you can return to it later if you do any mistakes with fields or options. The recommended way is to first export a dozen of test videos and then try importing them to test the whole scheme and that you get the result you need; and only after you are fine with the imported content you can do the full migration. Another important thing to consider is which video content types you have (file uploads, embeds, hotlinks, or mixed) and how you want them to be imported. The most common scenario is that you have file uploads (videos that store files in KVS storage) and you want to migrate them in the same way. Another possible scenario is that you have videos embedded from other sites and you want to migrate them in the same way. In these cases when you have ALL videos of the same content type, you just do one time export of them ALL and one time import of them ALL. However, there are rare cases when you have some videos uploaded to your servers, some more videos embedded and another set of videos just hotlinked. In this specific case you should do separate export and import for each content type that you have. This is needed because videos of different content types have different data structure. Video export GUI offers Loaded as filter that allows you separating videos by their content type. With regard to Field and Line separators it is recommended to leave them as default. This may not work only if you have videos with multiline descriptions, but in this case manual export and import won't work for you at all and you have to fallback to using KVS feeds. In general it is recommended to leave all export and import options to their default values, unless you need anything specific. The main area where you should put your effort is Fields for export (Fields for import). First of all you should be using the same Field and Line separators in both export and import, we recommend use them as set by default. Next you should make sure that you select the same sets of fields in both export and import. Many fields like title and description are obvious, how about the rest of them? Here is a short summary: Use Video ID only if you want to keep the same IDs across 2 projects. In most cases this is not needed. Use Directory only if you had some specific rules on directory generation or transliteration. In most case this is not needed as directory is usually generated from title. If you want to migrate rating, make sure you select both Rating and Rating (votes). If you want to migrate usernames of video creators, you can do that by selecting User field, but please note that this will only migrate the username, not the whole user data. KVS will create new fake users with the given usernames in new projects. Finally there is a set of fields under Content group, which are related to content structure. As we noted before, depending on video content type these fields structure will be different: For file upload content type, you should first get understanding which video formats you want to migrate. In many cases video formats on your new site will be configured in the same way as on your old site, so you will need to migrate all video formats. But in some cases your new site may have less formats, for example it could have no video preview format, or you occasionally want video preview to be generated differently on this new site. Based on this understanding you should export Video file "XXX" (for hotlink) field for each of the video formats you want to migrate. At the same time you should select the corresponding Video file "XXX" (without processing) field in import fields configuration. For embed content type, you should export and import these fields: Embed code (embedded video), Duration, Main screenshot number and Overview screenshots (sources comma-separated). For hotlink content type, you should export and import these fields: Hosted file URL (hotlinking), Duration, Main screenshot number and Overview screenshots (sources comma-separated). For pseudo video content type, you should export and import these fields: Outgoing URL (pseudo video), Duration, Main screenshot number and Overview screenshots (sources comma-separated). NOTE: if you have mixed content types, remember to do separate export and import for each content type with different set of content fields. NOTE: change Sorting to Video ID Asc so that videos are exported and imported in the same order as on the original site. IMPORTANT! When importing uploaded videos you should make sure that source site has video download protection disabled for the whole period of import. You can disable this in Settings -> Content settings -> Enable protection for video download script option. After import is fully completed, please enable it back. With regard to screenshots, for file uploads they are optional and it is up to you if you want to migrate them or not. In any way KVS will create new screenshots if needed. When migrating screenshots, please make sure that you export their source files, not files of any specific format. And also make sure you migrate main screenshot number. Here is example of how we selected fields in export and import to migrate some uploaded videos from one site to another: Automating content sync with feed You only need to use feeds if you plan to repeatedly sync other sites from the content of you primary site, or in case descriptions of your videos may contain line breaks, so that it is not possible to normally transfer them via manual CSV import. For a one time content transfer it is better to use manual import, as it provides more options and features. It also worth mentioning that only KVS Ultimate supports exporting feeds, so your primary project should have ultimate license. Importing feeds are supported in all KVS licenses. Also at the moment KVS doesn't support feeds for albums. Part 1: Exporting feed. You should start with creating exporting feed in your primary project, you can do that in Videos -> Exporting feeds. The most important section is Feed data and its Content type option. This option indicates which content details you want to expose in feed, and this depends on how you plan to sync your content into another KVS project (please find several examples of how to create site network from a single KVS site in How to build your tube empire with KVS article): Use Website link option if you want to migrate these videos as pseudo videos. Use Hotlink option if you plan to hotlink video files from this project on another projects. Use Embed option if you want to embed these videos on your another projects. Finally use Download link option if you are going to fully sync video files of videos of this project to your another projects. IMPORTANT! When using this option you should make sure that source site has video download protection disabled for the whole period of import. You can disable this in Settings -> Content settings -> Enable protection for video download script option. After import is fully completed, please enable it back. For other options make sure to enable all categorization data, screenshot and poster sources, custom and translated fields. Increase Max limit option to 10000, or bigger value that you want to use (see explanation below). If you plan to use embed codes or pseudo videos and you need some tracking of all traffic that comes to your primary site, you may also need to set some Traffic tracking parameters that you can later specify in feed builder. After your new exporting feed is saved, open its Feed access point to see feed builder form that provides ability to query the needed data from the feed. You should have Feed format set to KVS. Use Filters section if you want to sync only subset of content. If you are going to embed videos on another projects, check URLs and embeds section options. You will also need to specify details for any Traffic tracking parameters there if you enabled them. If you plan to hotlink video files on another projects, check Video files section that provides ability to select either quality factor for hotlinked URLs, or choose a specific video format to hotlink. In most cases you won't need anything specific for download mode, as it works fine by default. Another important thing to consider at this point is how many videos your feed would contain. If your database has less than 10k videos, you won't face any issue in most cases. More videos mean more memory and database load to generate all feed data, which will reach red line at one point and feed will stop working or hang for a long time. In order to solve this, you should use feed limit and pagination control to paginate over the whole list. E.g. import the first 10k videos with the first iteration, then import another 10k videos, and etc. In order to do that you should generate all feed URLs once, don't leave it for the latter time, as later you may forget which options you selected. Change Sorting to Biggest ID last so that videos are exported in the order as they were added. First specify Limit = 10000 and press Get videos button. It should open another tab with feed URL that queries the first 10k videos. Copy URL and save it to a text document. Then in feed constructor set Skip to 10000 and press Get videos button again. You will get another URL that queries the second 10k videos. Repeat the same by incrementing Skip by 10000 again and again until you finally get empty list that will indicate end of paginated data. You can try increasing limit to 20000 and see if feed works with more videos, so that you do less iterations. This will give you some set of URLs to query all your existing videos. Finally you need the last URL that will query some set of new videos for repeated sync. Change Sorting to Most recent first to make sure that now only new videos are in the feed. Set Limit to 1000 now and get URL for querying most recent 1000 videos that you will later use to sync new videos. Part 2: Importing feeds. Now you should go to admin panels of sites that you want to pull videos from your exporting feeds. Go to Videos -> Importing feeds and create a new importing feed. In Feed URL set the first URL of your URLs list that you created when using feed builder. Choose KVS (XML) parser. In Duplicates prefix specify domain name of your primary project you export videos from. If you create multiple importing feeds for the same project, please make sure that all share that same duplicates prefix, so that's why the best idea is to use source project domain name here. Under Interval field choose Run this feed only once and deactivate. Since you have paginated data (if source site contains more than 10k videos you will most likely end up with feed data split into 10k-volume pages), you will need to import each page separately. The proposed way is to first configure feed to import all videos from the first page, then wait for it to be deactivated and re-configure to import from the second page URL, and etc. until you import all pages with all existing videos. After that you should change Feed URL to the last URL you created that will pull latest 1000 videos and configure its Interval to how often you want feed to pull new videos. Then feed will automatically pull new videos for the rest of time. Under Feed data check all data fields you want to import. In Video data section set Video status to Active, Video screenshots to Use screenshots from feed, Video publishing dates to Use publishing date from feed. Finally in Video adding mode option you should choose whether you want to embed, or hotlink, or download videos. If you want to download, then in most cases you will need to set All formats that have match by postfixes (without processing) in Format option. However in order this option to work correctly, you should go to Settings -> Video formats in this project and make sure the formats are configured in the same way they are configured on source site. At least the formats that you want to be downloaded via feeds. When we say "in the same way", we mean that their postfixes and statuses should be set accordingly. For example if on source project you have 480p, 720p formats and MP4 preview format, then you should make sure your importing site also have these formats with the same postfixes. If you don't want, for example, to download MP4 preview format and you want it to be created on the importing project with some other options - create it with another postfix syntax and required status. Then importing feed should download 480p and 720p files only and KVS will auto-create your custom MP4 preview from them. NOTE: for testing purposes it is recommended to set Max videos per execution to some small number (e.g. 10-100) for the first iteration to make sure you configured importing feed correctly. Then you can remove this limit and run feed again allowing it importing the whole set of data.
  2. You can use KVS advertising feature in Website UI -> Advertising section to limit some parts of HTML code to be displayed for specific categories or to be excluded for specific categories. Go to advertising and create spot (Add Spot option). After creating a new spot, you will see its insert code that you should use in template where you need to display some advertising or HTML code of your choice: After inserting advertising spot into template, you can add advertising to it and select whether this advertising should be displayed only for specific categories or should be excluded for specific categories: These restrictions will include: Video lists for the given categories (e.g. these pages https://www.kvs-demo.com/categories/rock-music/) Video pages for all videos from the given categories (e.g. these pages https://www.kvs-demo.com/videos/181/boyce-avenue-dynamite/) Album lists for the given categories (e.g. these pages https://www.kvs-demo.com/albums/categories/rock-music/) Album pages for all albums from the given categories (e.g. these pages https://www.kvs-demo.com/albums/74/dan-mihai-b-lan/)
  3. When grabbing content from other sites it is possible that number of tags or categories for a specific content will be quite high, so that rendering them all will look bad for design. In this case it is very easy to fix theme templates to list only first N tags or categories and skip the rest. The same approach works for both videos and albums. For videos you should edit Website UI -> Pages -> View Video page -> video_view block template. For albums it will be Website UI -> Pages -> View Album page -> album_view block template. Both templates have the following foreach constructs to render list of tags and categories: {{foreach item="item" from=$data.tags}} <a ...>{{$item.tag}}</a> {{/foreach}} {{foreach item="item" from=$data.categories}} <a ...>{{$item.title}}</a> {{/foreach}} Add name="list" attribute to foreach construct in order to access list properties. If you want to display first 10 tags, wrap <a> tag with this condition: {{if $smarty.foreach.list.iteration<=10}}...{{/if}}: {{foreach item="item" from=$data.tags name="list"}} {{if $smarty.foreach.list.iteration<=10}} <a ...>{{$item.tag}}</a> {{/if}} {{/foreach}} Change 10 to 5 in order to limit list rendering to 5 items: {{foreach item="item" from=$data.categories name="list"}} {{if $smarty.foreach.list.iteration<=5}} <a ...>{{$item.title}}</a> {{/if}} {{/foreach}} That's it! WARNING: please make sure you do not forget the closing {{/if}} tag.
  4. KVS has multiple categorization entities, which all together are designed for specific needs and have specific functionality. Using correct categorization concept is crucial for a successful tube site and even a paysite. Please pay attention to this guide. Categories Categories are designed to be initially created by admins and thus they are designed to be limited. Use categories for your top level categorization. Depending on how you add your content (manually, import, grabbers) it is always possible to dynamically create categories on the fly and it is also always possible to make sure that no dynamic categories are created. Users will not be able to create new categories, they will only be able to use the existing set of categories you have defined in admin panel. Importing and grabbers will create missing categories by default, so in order to prevent that you should enable options that stop this: This becomes more important with tube scrappers when grabbing content from multiple tube sites. Each tube site has its own set of categories, some of them may be spelled differently but define the same meaning, e.g. Phones and Mobiles. If your videos are grabbed automatically and categories are allowed to be created on the fly, your tube will end up with dozens different categories having the same meaning. Fixing this will be possible, but will require much time spent in admin panel, so it is better to prevent by using the proposed strategy: Step 1. Define your categories manually based on your site's planned content. Step 2. Before enabling grabber that supports grabbing categories for each video, check the whole set of categories this site provides. Make sure to list these categories as synonyms of your existing categories, where no exact match is found. For example for category named Mobile Phones you can list such synonyms as Phones, Mobiles, Smartphones. When searching for existing categories KVS will also check their synonyms and instead of creating new category named Smartphones it will choose existing category named Mobile Phones, which defines Smartphones as a synonym. Synonyms can also be used in SEO, they are typically used as HTML keywords for your category pages, but can also be displayed anywhere where category name is displayed: This approach should work great if you correctly define all synonyms before using grabbers. But if the number of categories on the grabbed site is huge or you are not able to find their list, you will not be able to find out which synonyms should be added. There is another approach: import categories as tags first using the new option in grabber settings: Step 1. Not necessary needed to define your list of categories. Step 2. In grabber settings enable Categories as tags option. This will add all categories as tags in addition to original tags that may be available on grabbed site. Step 3. After importing much enough content, check your tags and sort them by the number of videos in them. Tags with most content are your potential categories and their possible synonyms! Now you can create your set of categories and specify their synonyms by looking into these tags. Step 4. Go to Plugins -> Category auto-selection and enable this plugin to process every video. Step 5. Go to Videos list and select Mass edit all videos... option in batch actions. You will see mass edit GUI. Enable Process videos with "Category auto-selection" plugin option. Make sure you do not select anything else and submit mass edit task. Now your videos will be auto-populated with categories based on their tags. For new videos this will happen automatically. You need to use mass edit only for the first time after you are able to populate your initial set of categories. But at any time you can repeat step 3 and step 5 when you import more content to create more categories and assign videos to them. Using either of these approaches will keep your categories tuned. Categories support custom fields, some of them are enabled by default and are used for HTML title, HTML description and SEO text displayed on category pages. We encourage you to fill them to get more SEO traffic to your site. Also categories can be used to bind site advertising to specific categories, e.g. show specific ads on specific pages only for specific categories. Here are some places where you can use this: Video / album pages: you can show ads specific to categories of the displayed video or album. For example for all videos having Mobile Phones category you can show only ads related to mobile phones and do not show other ads. Using this functionality can significantly increase your revenue. Category pages: you can show ads specific to the given category only. Category groups For some tube sites with complicated categorization it may be needed to group categories by certain areas. This is typically used in advanced search functionality, when users should be allowed to search by multiple criteria matching at the same time. KVS doesn't support category tree, but in most cases the same thing can be achieved by using category groups. For example if you have a tube site with travel videos, you may have the following grouping (simplified): - Countries --- USA, Canada, Australia, etc. - Activities --- Rafting, Hiking, Snorkeling, etc. - Production --- Professional, Amateur Then for each video users can select multiple categories from each of these groups. KVS default theme allows switching category selector to grouped one, which will display categories in the needed way automatically. It is also possible to display categories grouped in main category listing or at any page of your site, e.g. in sidebar or header (this is not supported by default KVS theme and will require redesign if needed). Categories grouping can also be used in advanced search function to search for content in the exact matching set of categories, e.g. only amateur videos about hiking in USA. In this case user should simply select 3 categories together: USA, Hiking, Amateur and all videos where these 3 categories are present will be displayed. Tags Tags are true dynamic categorization objects, they can be created by your site's users at their own discretion. Tags are typically used as keywords for content pages and can also help in text search and SEO for providing landings for specific search results. Our basic recommendation is that you don't try to limit them in any way. However KVS provides functionality to merge several tags into one and keep content correctly reassigned. This specific functionality is available as Rename function in tags list in admin panel. Tags can also support custom fields, which can be used for SEO, but usually this is not feasible due to their big amount. Content sources Content sources can be used in multiple scenarios. The initial idea behind content sources was to group videos / albums based on the source they are coming from. Here are some real world scenarios. Scenario 1. For a tube site if you advertise sponsor paysites, you are allowed in some cases to take premium content from their member area and add to your tube but with some duration restriction (for example truncate to max 5 minutes). So you can configure a content source for each of these paysites and you can also configure that all content from a specific content source is truncated to some duration specified in content source settings. In order to do that you should first go to Settings -> Customization and enable any free custom text field for content sources and name it as Duration limit: Then in Settings -> Video formats for all video formats, which are planned to be created for such videos, you can enable duration limit to be taken from that content source field: The idea is that if the uploaded video has a content source and this content source has Duration limit field specified, KVS will truncate all video formats of this video to this duration. All other videos (either from different content sources, or with empty content source) will not be truncated. Therefore using this functionality you will be able to ensure that you don't violate any duration policy required by content author / owner. But in order to have this, you should configure it from the beginning. Scenario 2. For a tube site if you advertise sponsor paysites, you can bind in-video and other video page advertising to advertising specific to content source. This is the widely used concept of showing "Download full video at XXXXX" banner under video player, or inside player. In order to do that you should also use custom content source fields. In Settings -> Player settings you can bind specific in-video advertising to a custom text (for HTML ad) or to a custom file (for video or image ad) field of video content source. In this case you should also specify some default HTML or file for the ad - just because some videos may have empty content source or some content sources may have empty custom fields: Default KVS theme also supports 2 image banners (one wide on top of video page and another under video player), these banners can be uploaded into predefined custom fields in content sources: Theme settings can be changed of cause, default theme just has 2 image banners predefined, but you can customize to display other banners, or to display HTML banners instead of image banners, or anything else. The template code is pretty straightforward. For View video page template (Website UI -> Pages -> View Video) showing HTML ad from custom field #5 with fallback to default ad: {{if $storage.video_view_video_view.content_source_id>0 && $storage.video_view_video_view.content_source.custom5!=''}} {{* check if video has content source and it has custom5 field specified -> show HTML from custom5 field *}} {{$storage.video_view_video_view.content_source.custom5|smarty:nodefaults}} {{else}} {{* this video either has no content source or its custom field #5 is empty -> show some default advertising spot (needs to be created prior of usage) *}} {{insert name="getAdv" place_id="spot_video_page_default_ad"}} {{/if}} Same code if used inside video_view block (Website UI -> Pages -> View Video -> video_view block): {{if $data.content_source_id>0 && $data.content_source.custom5!=''}} {{* check if video has content source and it has custom5 field specified -> show HTML from custom5 field *}} {{$data.content_source.custom5|smarty:nodefaults}} {{else}} {{* this video either has no content source or its custom field #5 is empty -> show some default advertising spot (needs to be created prior of usage) *}} {{insert name="getAdv" place_id="spot_video_page_default_ad"}} {{/if}} Each content source also has URL field, where you should specify click URL for that content source. KVS is able to track all outgoing clicks to content sources in its stats, but in templates you should render href of a specific format. For View video page template (Website UI -> Pages -> View Video): <a href="{{$lang.urls.out_sponsor|replace:"%DIR%":$storage.video_view_video_view.content_source.dir|replace:"%ID%":$storage.video_view_video_view.content_source.content_source_id}}" target="_blank">Click here to watch the full HQ video!</a> Same code if used inside video_view block (Website UI -> Pages -> View Video -> video_view block): <a href="{{$lang.urls.out_sponsor|replace:"%DIR%":$data.content_source.dir|replace:"%ID%":$data.content_source.content_source_id}}" target="_blank">Click here to watch the full HQ video!</a> Scenario 3. If you have a tube site or a paysite which aggregates content from several other paysites, you can show sites section allowing users to navigate content from different paysites. This is fully implemented in KVS default theme: http://kvs-demo.com/sites/ Scenario 4. In some cases if you grab content from multiple tube sites you may need to use content sources for simply grouping them. For example if you grab embed codes from multiple sites and suddenly one of the sites stops serving embed codes, or starts redirecting your traffic to their website, you will need to delete these videos. Then you can easily filter them all by content source in your admin panel. Each grabber settings provide ability to set all content grabbed from specific grabber to a specific content source: Summary. So the most common scenarios of using content sources in KVS are: Truncate duration for videos from specific source sites. Embed different watermark images for videos from specific source sites (similar to truncating duration). Show different in-video and video page advertising for videos from specific source sites. Provide users ability to navigate videos divided into separate sections based on their source sites. Provide ability for admins to easily filter videos based on which sites they were scrapped from. Content source groups Similar to category groups you can group content sources by your criteria. Can be used both for your admin panel needs and for showing grouping on website. Models Models are categorization objects designed to indicate people that are connected to any particular video or album. There is nothing specific about models, they are like categories but have more data fields in terms of 'people'. Flags Flags are categorization objects designed to be applied by your end users. Flags are typically used in Report video / album / playlist functionality. Based on your theme configuration, users can assign predefined flags to different objects (like videos, albums, playlists and some other). With flags they can also specify their message if your design allows doing this. So flags can be used for multiple features that require user feedback on content: Report copyright violation by specific content. Report inappropriate content. Name a model in a video or album. Vote content for being featured. Flags can also be used by admins to group videos or albums for specific reasons. Both videos and albums support so-called admin flag field, where you can select a single flag for a video or album. This field is filterable in admin panel and in site listings, so here are some example usage scenarios: Indicate specific set of content that should be displayed in specific site listing, e.g. manually predefined featured videos on index page. When content is being processed by multiple admins, they can use admin flags to move content between different approval phases. When you need to manually review content and move it to specific logical group that you can further filter by; you can just assign a specific admin flag and then filter all content by this flag.
  5. In KVS list_videos and list_albums blocks won't select categories, tags, models, user or content source information by default for each video / album. This is due to performance restrictions, since in most cases such data is not needed when rendering lists. However when needed it can be enabled and displayed. Each list_videos / list_albums (and some other list_xxx) block supports a set of show_xxx_info parameters to enable selecting any specific additional data you need: You should enable only the needed data loading, as it may significantly reduce your site performance. An issue here is that usually project contains multiple pages with list_videos / list_albums blocks. If you want this functionality to work consistently, you should enable the same options in almost all places. The most easy way to find pages with specific blocks is to search for block type, for example list_videos: You can see a plenty of list_videos blocks in your theme (Index, Common Videos List, Community, RSS, Sitemap, View Video pages and etc). Here are 3 places where you DON'T need this: RSS Videos (XML) [System] Sitemap (XML) [System] Player Related Videos In all other blocks you may need to enable the same set of options to load additional data. Or if you want this to be visible on specific pages only (e.g. Index), then enable only there. The next step is to update template code to render additional data for each video. This code should be normally put into Website UI -> Page Components -> include_list_videos_block_common.tpl, which renders all video lists in your theme. This component will have some template code on top with rendering list title / sortings / filters, and then 2nd part is the actual list rendering enclosed into the following {{foreach}} tag: {{foreach item="item" from=$data}} ... each iteration renders one item here ... {{/foreach}} You should put your rendering code inside this {{foreach}} if you want it to be rendered for every item. Here are ready codes you can copy-paste. However you should consider your own styling for this, as rendering such additional info is not supported by theme styling. NOTE: for categories, tags and models if you want to limit the max number of displayed items you should set this limit into {{assign var="max_limit" value="0"}} value. Using zero means no limit, e.g. the code will display even 10 or 20 tags if they are all attached to a video or album. 1. Categories: Categories: {{assign var="max_limit" value="0"}} {{assign var="index_limit" value="0"}} {{assign var="limit_over" value="0"}} {{foreach from=$item.categories item="category" name="categories"}} {{if $max_limit>0}} {{assign var="index_limit" value=$index_limit+1}} {{/if}} {{if $index_limit<=$max_limit}} <a href="{{$lang.urls.videos_by_category|replace:"%DIR%":$category.dir|replace:"%ID%":$category.category_id}}">{{$category.title}}</a>{{if !$smarty.foreach.categories.last}}, {{/if}} {{elseif $limit_over==0}} ... {{assign var="limit_over" value="1"}} {{/if}} {{/foreach}} 2. Tags: Tags: {{assign var="max_limit" value="0"}} {{assign var="index_limit" value="0"}} {{assign var="limit_over" value="0"}} {{foreach from=$item.tags item="tag" name="tags"}} {{if $max_limit>0}} {{assign var="index_limit" value=$index_limit+1}} {{/if}} {{if $index_limit<=$max_limit}} <a href="{{$lang.urls.videos_by_tag|replace:"%DIR%":$tag.tag_dir|replace:"%ID%":$tag.tag_id}}">{{$tag.tag}}</a>{{if !$smarty.foreach.tags.last}}, {{/if}} {{elseif $limit_over==0}} ... {{assign var="limit_over" value="1"}} {{/if}} {{/foreach}} 3. Models: Models: {{assign var="max_limit" value="0"}} {{assign var="index_limit" value="0"}} {{assign var="limit_over" value="0"}} {{foreach from=$item.models item="model" name="models"}} {{if $max_limit>0}} {{assign var="index_limit" value=$index_limit+1}} {{/if}} {{if $index_limit<=$max_limit}} <a href="{{$lang.urls.videos_by_model|replace:"%DIR%":$model.dir|replace:"%ID%":$model.model_id}}">{{$model.title}}</a>{{if !$smarty.foreach.models.last}}, {{/if}} {{elseif $limit_over==0}} ... {{assign var="limit_over" value="1"}} {{/if}} {{/foreach}} 4. Content source: Sponsor: {{if $item.content_source.content_source_id>0}} <a href="{{$lang.urls.videos_by_sponsor|replace:"%DIR%":$item.content_source.dir|replace:"%ID%":$item.content_source.content_source_id}}">{{$item.content_source.title}}</a> {{/if}} 5. Channel: Channel: {{if $item.dvd.dvd_id>0}} <a href="{{$lang.urls.videos_by_channel|replace:"%DIR%":$item.dvd.dir|replace:"%ID%":$item.dvd.dvd_id}}">{{$item.dvd.title}}</a> {{/if}} 6. User: Uploaded by: {{if $item.user.user_id>0}} <a href="{{$lang.urls.memberzone_profile|replace:"%ID%":$item.user.user_id|replace:"%LOGIN%":$item.user.username}}"> {{if $lang.memberzone.truncate_username_to>0}} {{$item.user.display_name|truncate:$lang.memberzone.truncate_username_to:"...":true}} {{else}} {{$item.user.display_name}} {{/if}} </a> {{/if}}
×
×
  • Create New...