HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Youtube comcode tag assistant doesn't work

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#108109 (In Topic #21070)
Avatar

Fan in action

Hi,

it seems when I add a youtube video using comcode assistant  shows an empty space.

Why doesnt the youtube video show?

Thanks
Back to the top
 
Posted
Rating:
#108110
Avatar

It works fine for me, but the Youtube tag is a Custom Comcode tag added during installation and provided as a sample. Over the years Youtube have change their URL formats a bit, and it may be you have an old installation or you installed from an integration that hasn't refreshed the sample in the database.

Or, it might be some weird URL structure we've not seen before. In which case, please share.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108116
Avatar

Fan in action

ok so this is what happens…when I add this url in the comcode then the video doesn't show FC Barcelona training session before Spanish Cup final against Athletic Club - YouTube

however if I add this code aA1hII1MRrw instead then the video works.

Is there a way to fix this? Because the users are not that computer savy I would like it to be as simple as a copy paste of the url.

Thanks
Back to the top
 
Posted
Rating:
#108121
Avatar

Works fine for me.

Make sure the Replacement text for the youtube Custom Comcode tag is:

Code

{$SET,VIDEO,{$PREG_REPLACE,(https?://.*\?v=)?(https?://youtu.be/)?([\w\-]+)(.*)?,$\{3\},{$STRIP_TAGS,{content}}}}<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/{$GET*,VIDEO}?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{$GET*,VIDEO}?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108122
Avatar

Fan in action

Chris Graham said

Works fine for me.

Make sure the Replacement text for the youtube Custom Comcode tag is:

Code

{$SET,VIDEO,{$PREG_REPLACE,(https?://.*\?v=)?(https?://youtu.be/)?([\w\-]+)(.*)?,$\{3\},{$STRIP_TAGS,{content}}}}&lt;span width=&quot;480&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/{$GET*,VIDEO}?fs=1&amp;amp;hl=en_US&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;span src=&quot;http://www.youtube.com/v/{$GET*,VIDEO}?fs=1&amp;amp;hl=en_US&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;480&quot; height=&quot;385&quot;&gt;&lt;/span&gt;&lt;/span&gt;


Hi Chris...I changed the code and it doesnt work....did you provide the correct code?


Last edit: by Jaap
Back to the top
 
Posted
Rating:
#108124
Avatar

Community saint

Admin Zone > Setup > Custom Comcode

Edit custom comcode tag, edit youtube, and it's the replacement text there.
Back to the top
 
Posted
Rating:
#108125
Avatar

Fan in action

KingBast said

Admin Zone > Setup > Custom Comcode

Edit custom comcode tag, edit youtube, and it's the replacement text there.

what code do you have there? Unfortunately Chris's doesnt work for me
Back to the top
 
Posted
Rating:
#108127
Avatar

Community saint

Deafult install with no bugfixes:-

Code

{$SET,VIDEO,{$PREG_REPLACE,(https?://.*\?v=)?(https?://youtu.be/)?([\w\-]+)(.*)?,$\{3\},{$STRIP_TAGS,{content}}}}<span width="480" height="385"><param name="movie" value="http://www.youtube.com/v/{$GET*,VIDEO}?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><span src="http://www.youtube.com/v/{$GET*,VIDEO}?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></span></span>

I will try the 2 different ways of posting a youtube video and let you know if it works or not for me.
Back to the top
 
Posted
Rating:
#108128
Avatar

Jaap said

ok so this is what happens…when I add this url in the comcode then the video doesn't show FC Barcelona training session before Spanish Cup final against Athletic Club - YouTube

however if I add this code aA1hII1MRrw instead then the video works.

Is there a way to fix this? Because the users are not that computer savy I would like it to be as simple as a copy paste of the url.

Thanks
Perhaps if you can post a quick jing video showing how you add the tag, and what you see, it may give us a clue.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Item has a rating of 5 (Liked by KingBast)  
Rating:
#108129
Avatar

Fan in action

works fine....I am such an idiot....thanks guys!
Back to the top
 
Posted
Rating:
#108130
Avatar

Community saint

Same result either way for me, both show the video and not the link.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: