×
Kunena 5.1.5 Released - Security Release (14 Oct 2018)

The Kunena team has announce the arrival of Kunena 5.1.5 [K 5.1.5] which is now available for download as a native Joomla extension for J! 3.8.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a Security release.

× 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 3 months 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 3 months ago - 5 years 3 months 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 3 months ago by Bjorn-SH.

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

More
5 years 3 months 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 3 months 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.

  • sozzled
  • Visitor
5 years 3 months ago #5 by sozzled
Replied by sozzled on topic Can we embed SmugMug videos?
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 3 months 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.167 seconds