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: 228
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 4426 times
Thank you

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Youtube video

Post by pbottcher » 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
	}
?>
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Moh Youba
Veteran Member
Posts: 228
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