Request for Guidance on Implementing Related Content (Videos, Files, Photos, Posts etc ) in UNA

Hello,

I am working with UNA and I am looking to implement a feature that would display related content like videos, files, photos, post etc on a module page. In the past, Dolphin CMS had a built-in functionality for this, but I have found that this feature is no longer available in UNA.

Could anyone provide guidance or a solution for implementing related content in UNA? Specifically, I need to:

  • Fetch and display related videos based on tags or categories.
  • Display related files, photos , posts etc in a similar manner.
  • Ensure that the content is fetched dynamically and rendered correctly in the module page template.

I understand that UNA may have a different structure than Dolphin, so I would appreciate any advice on where to add this functionality or if there are existing methods or services in UNA that I can utilize for this purpose.

I identified some changes that need to be added to create an HTML block for related videos in the UNA script. Here's how you can implement it:In video en.xml:

```xml

    <string name="_bx_videos_menu_item_title_system_entries_related">string>
    <string name="_bx_videos_menu_item_title_entries_related">string>```

and english en.xml

```xml

    <string name="_cmt_load_more_comments_related">string>
    <string name="_cmt_load_more_replies_related">string>
    <string name="_adm_block_cpt_related">string>
    <string name="_adm_lmi_cpt_related">string>
    <string name="_cmt_browse_related">string>

```

In enable.sql:

```sql

-- PAGE: related entries
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
('bx_videos_related', '_bx_videos_page_title_sys_entries_related', '_bx_videos_page_title_entries_related', 'bx_videos', 5, 2147483647, 1, 'videos-related', 'page.php?i=videos-related', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
('bx_videos_related', 1, 'bx_videos', '_bx_videos_page_block_title_related_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_related";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);

```

In BxVideosConfig.php:

```php

// Page URIs
'URL_RELATED' => 'page.php?i=videos-related',

```

In BxVideosSearchResult.php:

```php

case 'related':
  $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_RELATED']);
  $this->aCurrent['title'] = _t('_bx_videos_page_title_browse_related');
  $this->aCurrent['rss']['link'] = 'modules/?r=videos/rss/' . $sMode;
  $this->aCurrent['sorting'] = 'related';
  break;

```

In BxBaseModTextSearchResult.php:

```php

case 'related':
  $aSql['order'] = ' ORDER BY `' . $sTable . '`.`' . $CNF['FIELD_VIEWS'] . '` DESC';
  break;

```

This should successfully add a "Related Videos" page and block functionality to the UNA platform. Can someone help me identify what I did wrong and what might be missing? To display the results, they need to be generated dunamicaly based on tags and categories ad related keywords. At what level should the PHP code responsible for generating these results be implemented? A list o files wil be nice

Thank you in advance for your help!

  • 951
  • More
Replies (0)
Login or Join to comment.