Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#46 2018-04-24 10:39:32

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

Sorry, I am not a programmer, thus even do not know where and how to insert you code ;-)

Anyway, there is not a problem now, when I know what happen. On.lt is not very intensive publication, there is not difficult to append non-default string with an ending </div> for now.

I have switched production status to “Debugging”, and did not found the error message for an empty field. A non-default video article is parsed as follows:

| <txp:article form="filmai" limit="99" />
| 	[filterAtts ignored]
| 	[SQL: SELECT Form FROM txp_form WHERE name = 'filmai' ]
| 	[Rows: 1]
| 	[Form: 'filmai']
| 	[Nesting forms: 'filmai']
| 	<txp:if_article_list>
| 		[<txp:if_article_list>: false]
| 		<txp:if_description>
| 			[<txp:if_description>: true]
| 			<txp:meta_description format="" />
| 		</txp:if_description>
| 		<txp:author link="1" />
| 		<txp:posted />
| 		<txp:title />
| 		<txp:oui_if_player>
| 			[<txp:oui_if_player>: true]
| 			<txp:oui_player wraptag="div" class="grotuvas" />
| 		</txp:oui_if_player>
| 		<txp:body />
| 			<txp:oui_player provider="vimeo" play="22202388" width="580" height="435" />
| 		<txp:article_image class="vaizdas" html_id="gale" />
| 			[SQL: SELECT * FROM txp_image WHERE id = 272 ]
| 			[Rows: 1]
| 		<txp:if_excerpt>
| 			[<txp:if_excerpt>: true]
| 			<txp:excerpt />
| 		</txp:if_excerpt>
| ...
| 	</txp:if_article_list>

What the statement oui_if_player means — existence of the defined video? Defined in both custom field or in an article body, nevermind?

Offline

#47 2018-04-24 10:56:18

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311358:

Sorry, I am not a programmer, thus even do not know where and how to insert you code ;-)

Just click the plugin name in the Plugins tab, then click the textarea, find the oui_if_player function (cmd/Ctrl+f), replace the whole function with the provided code and save.
I’m working on a version 2 but I need more time to get it work well, if I can’t publish it soon I’ll release a v1.4 including last fixes.

What the statement oui_if_player means — existence of the defined video? Defined in both custom field or in an article body, nevermind?

It should check the video provider/URL provided through attributes or prefs against defined values/schemes. It fails in our case because of the empty field.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#48 2018-04-24 10:58:42

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311358:

I have switched production status to “Debugging”, and did not found the error message for an empty field.

Yes, I didn’t know/notice you were using the oui_if_player tag around oui_player when I mentioned this error message.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#49 2018-04-24 11:12:33

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

Done, succeeded! Thank you very much, dear Nicolas, for your help and for the excellent plugin!

Now I’m rushing to remove all unnecessary appended </div>s :-)

Offline

#50 2018-04-24 11:14:34

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311361:

Done, succeeded!

Glad it works!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#51 2018-04-24 11:58:08

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

URL is not accepted from custom field now, even from the default provider (Youtube), in default HD format. The same videos defined in an article body are playing.

Offline

#52 2018-04-24 12:32:27

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311365:

URL is not accepted from custom field now […]

Ok, sorry, I’ve updated my previous code. ‘Seems to work fine…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#53 2018-04-24 12:52:45

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

Please give me an older code ;-)

I have fixed a few dozen of articles, removing redundant </div>, and after upgrade all of them are broken now again. Sorry, I have not saved the previous code.

Offline

#54 2018-04-24 12:55:16

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311368:

Please give me an older code ;-)

Does the updated code not work? You can update the plugin from the GitHub release at anytime.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#55 2018-04-24 13:22:28

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

The plugin adds unnecessary duplicated outer non-ending div, as was in v1.3.0:

<div  class="grotuvas" />
 <div class="grotuvas"><iframe ...></iframe></div>

This outer <div> vithout </div> brokes HTML code of a webpage (<div /> is invalid, browsers treat it as <div>). Invalid custom field is not a fatal error, I can wait for the next release without it.

Last edited by Vienuolis (2018-04-24 13:28:39)

Offline

#56 2018-04-24 13:28:27

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Did you apply my updated code or not?


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#57 2018-04-24 13:31:02

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

Yes, I have downloaded and reinstalled your last code from Github not long ago.

Offline

#58 2018-04-24 13:35:59

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311372:

Yes, I have downloaded and reinstalled your last code from Github not long ago.

I mean this code from the forum thread. As I told you, I updated it.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#59 2018-04-24 13:38:09

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 328
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

Yes, I have replaced your code from the forum (without saving previous, sorry) before upgrading from Github.

Offline

#60 2018-04-24 13:43:51

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

What I need to know is if you applied the code to your current 1.3.1 install.

Last edited by NicolasGraph (2018-04-24 13:51:23)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB