Youtube video

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
Moh Youba
Veteran Member
Posts: 145
Joined: 2017-03-12 09:31

Youtube video

Post by Moh Youba » 2020-02-16 12:47

Hello
I am looking for the best practice to add Youtube video on the login page, any help please.

I get the code from Youtube but do not know where and how to add

the code from youtube
<iframe width="560" height="315" src="https://www.youtube.com/embed/ItF8aCJe6jw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
youtube.jpg
youtube.jpg (152.68 KiB) Viewed 3632 times
Thank you

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1100
Joined: 2018-04-01 10:12

Re: Youtube video

Post by pböttcher » 2020-02-16 19:59

Hi,

you can try to edit the hooks/header-extras.php and add

Code: Select all

<?php
	$mi = getMemberInfo(); $url=basename($_SERVER['PHP_SELF'],".php");	
	if ($mi['group'] == 'anonymous' && $url == "index") {
		?>
		<script>
			$j(function(){
				$j('#login_splash').append('<iframe width="560" height="315" src="https://www.youtube.com/embed/ItF8aCJe6jw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>');
			})
		</script>
		<?php
	}
?>

Moh Youba
Veteran Member
Posts: 145
Joined: 2017-03-12 09:31

Re: Youtube video

Post by Moh Youba » 2020-02-17 10:50

Hi

Thank you for your support.

regards,

Post Reply