Jump to content

How to enable link on description


Tim Hasting

Recommended Posts

Please go to Website UI -> Pages -> View Video page -> video_view block template.

Find this:

<em>{{$data.description|replace:"\n":"<br>"}}</em>

And change like this:

<em>{{$data.description|replace:"\n":"<br>"|show_links}}</em>

By default it will create the following link:

<a href="https://google.com" rel="nofollow" target="_blank">https://google.com</a>

If you want to remove rel="nofollow", then change the code to this:

<em>{{$data.description|replace:"\n":"<br>"|show_links:false}}</em>
  • Thanks 1
Link to comment
Share on other sites

In this case you would better use bbcode to have this.

First you need to modify the following file on server filesystem (using FTP client or server File manager):

/admin/include/bbcode.php

This file has the following line commented out:

//$bbcode["|\[a *href *=[ '\"]*([^ '\"\]]*)[^]]*](.*)\[/a]|si"] = '<a href="\\1">\\2</a>';

You need to remove the first //:

$bbcode["|\[a *href *=[ '\"]*([^ '\"\]]*)[^]]*](.*)\[/a]|si"] = '<a href="\\1">\\2</a>';

Then in template that you have just changed you need to use bbcode modifier instead of show_links:

<em>{{$data.description|replace:"\n":"<br>"|bbcode}}</em>

And in video description you can specify link like this:

[a href=https://google.com]Download[/a]

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...