×
Blue Eagle (1.5.0) for K5.1 is released (20 Jul 2018)

Please update the Kunena Blue Eagle to 1.5.0 if you use Kunena 5.1.
We made several bug fixes and improvements. Also Blue Eagle has now all the features from Crypsis.
Download: www.kunena.org/download/templates/category/blue-eagle-5

× Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Solved Can we embed SmugMug videos?

More
5 years 1 month ago #1 by Bjorn-SH
I have a member of my forum who would like to embed his smugmug video and we can't seem to get it to work. We've both tried the supplied embed links provided by smugmug, tried editing them a little with bb code e.g. changing <iframe> to [iframe] tried inserting as a generic video tried Flash and FlashVars video options with no luck. Can it be done?[video] tried Flash and FlashVars video options with no luck.

Can it be done?

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago - 5 years 1 month ago #2 by Bjorn-SH
It can almost be done :silly:

Tried adding this to 'libraries/kunena/bbcode/bbcode.php'
'smugmug' => array ('flash', 425, 240, 0, 0, 'https://api.smugmug.com/services/embed/%vcode%?width=425&height=240', '', '' ),

After line
$vid_providers = array (

Then inserted with
[video type=smugmug]video_code12341234[/video]

Video is blank and when right clicked shows 'Movie not loaded'.

Close...
Last edit: 5 years 1 month ago by Bjorn-SH.

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #3 by Bjorn-SH
I won't take credit for this at all, one of the mods on my site is pretty handy with php B)

Under this code...
if (!isset($params['query'])) $params['query'] = '';
		if (!isset($params['path'])) $params['path'] = '';

We added...
// convert SmugMug links to embedded player
// example https://api.smugmug.com/services/embed/2621813930_9w4RgRg?width=425&height=240
 
		if (strstr($url,'api.smugmug.com/services/embed/')){
			$width = 425;
			$height = 240;
			parse_str($params['query'], $query);
 
			if (!empty($query['width'])) $width = $query['width'];
			if (!empty($query['height'])) $height = $query['height'];
 
			return '<iframe frameborder="0" scrolling="no" width="'.$width.'" height="'.$height.'" src="'.$url.'"></iframe>';
		}

Paste your SmugMug code e.g.
https://api.smugmug.com/services/embed/numbers12341234?width=425&height=240

Voila you have an embedded video :woohoo:

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #4 by Bjorn-SH
Hey where did the post go that said this couldn't be done? :laugh: :whistle:

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #5 by sozzled
I removed my post because you proved us wrong.

The Kunena team cannot develop everything for everyone and, besides, the team has no interest in adding anything extra to K 2.0. You have shown how this can be done for K 2.0 and I'm sure that others, who want to use SmugMug videos for K 2.0 will thank you for sharing your hack.

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #6 by Bjorn-SH
It's all good sozzled, I didn't expect my every request to be developed buy you. I didn't actually realise you'd moved the thread to the User-written hacks section., cool.

I actually used the hack in K 3.0 ;)

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.143 seconds