XVideoSharing - Looking for a way to add a custom note like NOADS to display some code

Message
Author
Dundil
Posts: 1
Joined: Apr 22, 2020 11:52 am

Looking for a way to add a custom note like NOADS to display some code

#1 Postby Dundil » Apr 22, 2020 12:01 pm

Hello,

I would like to add a custom setting for some users using "usr_notes".
My aim is to make "MINADS" and "MAXADS" just like the implemented "NOADS".

For this:
1/ I added the HTML Code in the template (video_embed and video_embed_mobile) <TMPL_IF video_minads>[ads here]</TMPL_IF>
2/ In index_dl.pm I added the following:
if ($file->{usr_notes}=~/MINADS/i)
{
$file->{video_minads} = 1;
$file->{video_minads} = 0 if $file->{usr_notes}=~/NOADS/i;
}

Just under:
$file->{video_ads} = $c->{ads} ? 1 : 0;
$file->{video_ads} = 0 if $file->{usr_notes}=~/NOADS/i;

However, the ads are not showing.
Anyone has a guess why it does not work?

Thank you.

Return to “XVideoSharing”