Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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.
Offline
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.
Offline
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
Offline
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
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…
Offline
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
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.
Offline
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
Offline
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
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.
Offline
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
Offline