TinyMCE insert wrong code - joomla2.5

I'm trying to insert video to an article. I'm using TinyMCE. For example I want to insert video with url http://techslides.com/demos/sample-videos/small.mp4 and HTML5 type. Tiny generates code
<video width="320" height="240" preload="none" src="http://techslides.com/demos/sample-videos/small.mp4">
<object width="320" height="240" data="/media/editors/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf" type="application/x-shockwave-flash">
<param name="src" value="/media/editors/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf" />
<param name="flashvars" value="url=http%3A//techslides.com/demos/sample-videos/small.mp4&poster=/" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="true" />
</object>
</video>
It doesn't show video player.
There is no console errors. Urls to .js scripts are correct.
What's wrong?

this works for me with TinyMce, but I don't have the same results. Instead of :
<video width="320" height="240" preload="none" src="http://techslides.com/demos/sample-videos/small.mp4">
I have this 2 lines :
<video width="320" height="240" controls="controls" autoplay="autoplay" name="media">
<source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4" />
Maybe you have to configure tinyMCE (extensions/manage plug-in and filter to find tinyMCE, mine is set to extended), or install a more permissive and configurable editor like JCE

Related

Consistently show "Play" button on all browsers for MP3 Object

I'm using XHTML 1.1 plus MathML 2.0 plus SVG 1.1 (and I'd like to stick with it.)
I have some object elements to play music. For example:
<object id="Music_Player" type="audio/mp3" data="./Recordings/Hymns_2022/hymn22_02_20_justasiam.mp3">
<param name="filename" value="./Recordings/Hymns_2022/hymn22_02_20_justasiam.mp3" />
<param name="autoplay" value="false" />
<param name="autoStart" value="0" />
<param name="loop" value="false" />
</object>
In Firefox and Pale Moon, the media player has a little "play" button; in Chrome that button only SOMETIMES shows up, and in Edge I don't see it at all and the file cannot be played. How can I get the play button to show up consistently? For example, is there a "playbutton" parameter?

My App downloaded from the playstore fails to call web service

I recently developed a cordova App that is uploaded to google play store. I tested this app on my mobile and simulators for weeks and everything works fine. However, when i download the same app from the playstore it fails to call any of the web services and such doesn't display any content.
cordova : 9.0.1
npm : 6.10.1
cordova-android : 7.0.0
I have gone through every line of code and i can't seem to find the problem, i replaced every single call to window.localStorage to a global variables just to be able to fix what i thought would be the problem.
<?xml version='1.0' encoding='utf-8'?></code>
<widget defaultlocale="en-US" id="com.test.fr" version="1.0.6" android-versionCode="100050" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps">
<content src="index.html" />
<access origin="*" />
<preference name="SplashScreen" value="screen" />
<preference name="windows-target-version" value="8.1" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<platform name="android">
<icon src="www/res/icon/android/fr_mobile_icon.png" density="ldpi" />
<icon src="www/res/icon/android/fr_mobile_icon.png" density="mdpi" />
<icon src="www/res/icon/android/fr_mobile_icon.png" density="hdpi" />
<icon src="www/res/icon/android/fr_mobile_icon.png" density="xhdpi" />
</platform>
<plugin name="cordova-plugin-device" version="2.0.2" />
<plugin name="cordova-plugin-websql" version="0.0.10" />
<plugin name="cordova-plugin-dialogs" version="2.0.1" />
<plugin name="cordova-plugin-file" version="4.3.3" />
<preference name="target-device" value="handset" />
<preference name="BackupWebStorage" value="local" />
<preference name="android-targetSdkVersion" value="28" />
<preference name="android-minSdkVersion" value="17" />
<preference name="android-maxSdkVersion" value="29" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<plugin name="cordova-custom-config" spec="5.1.0" />
</widget>
Worst part.... No error shown on the device, it just doesn't work.
First of all, you need to figure out what is the output of this error. To allow debug on a release build use android:debuggable on application tag at AndroiManifest.xml (https://developer.android.com/guide/topics/manifest/application-element).
Then, plug the device to your computer and in dev settings (on your device) enable usb debugging. Then, navigate to chrome://inspect/#devices - your device should be appearing and will be a link to your webview.
With the inspector openned, do the request and look to the error on console tab.
I think there's a high chance that the error is a CORS error, may your production server has CORS eabled and then you need to use cordova-plugin-whitelist correctly to send a origin to the server, read more about cordova-plugin-whitelisthere: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/
Try adding android:usesCleartextTraffic="true" to the <application> in the AndroidManifest.xml or as below using config.xml
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
</platform>
android:usesCleartextTraffic Indicates whether the app intends to use cleartext network traffic, such as cleartext HTTP. The default
value for apps that target API level 27 or lower is "true". Apps that
target API level 28 or higher default to "false". More info
Cleartext is any transmitted or stored information that is not
encrypted or meant to be encrypted. When an app communicates with
servers using a cleartext network traffic, such as HTTP, it could
raise a risk of eavesdropping and tampering of content which is why in latest Android devices, it's set to false by default.

ionic2: how to display google map in android device?

i'm trying to impelement google map in my project, so everything is fine in browser, but once i would generate it to apk, in the android device it will show a blank display. what would i do ?
androidManifest.xml:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.ionicframework.map678510" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/icon" android:label="#string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="#android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />
</manifest>
config.xml :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.map678510" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>map</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html"/>
<access origin="*"/>
<allow-navigation href="http://ionic.local/*"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
<platform name="android">
<allow-intent href="market:*"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
</platform>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="FadeSplashScreenDuration" value="300"/>
<preference name="SplashShowOnlyFirstTime" value="false"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
<plugin name="cordova-plugin-console" spec="1.0.5"/>
<plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
<plugin name="cordova-plugin-device" spec="1.1.4"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
</widget>
index.html:
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Ionic App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCcrLbMklPcdfCJmCVNDBR-o3c5x6zF7ck&callback="
type="text/javascript"></script>
<!-- cordova.js required for cordova apps -->
<script src="cordova.js"></script>
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script>-->
<link href="build/main.css" rel="stylesheet">
</head>
<body>
<!-- Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script>
<!-- The bundle js is generated during the build process -->
<script src="build/main.js"></script>
</body>
</html>

is it possible to have a new file for each new day with log4cXX

I know the rollingPolicy parameter for log4cxx config file, but I can't manage to have the config file which can tell the logger to create a new file each new day, how could I achieve this result ?
Yes. Using rolling style of Composite like this:
<appender name="LogAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4j.Util.PatternString" value="LogFile.log" />
<appendToFile value="true" />
<rollingStyle value="Composite" />
<datePattern value="yyyyMMdd" />
<maxSizeRollBackups value="7" />
<maximumFileSize value="100MB" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{ISO8601}: [%2thread] %-5level %logger: '%P{network}.%P{node}' %message%newline" />
</layout>
</appender>
Ref.:
Short introduction to Apache log4cxx
log4net Config Examples
I think the following appender will do the stuff ( can't test it on this pc )
<!-- the following appender with the name "TimeBasedLog.log", every night a few seconds after
12::00PM the old log will be renamed with append the date in filename, and a new log file
with the name "TimeBasedLog.log" will be create.
notice the RollingFileAppender is under "org.apache.log4j.rolling" namespace
-->
<appender name="MyRollingAppenderDaily" class="org.apache.log4j.rolling.RollingFileAppender">
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="FileNamePattern" value="TimeBasedLog.%d{yyyy-MM-dd}.log"/>
<param name="activeFileName" value="TimeBasedLog.log"/>
</rollingPolicy>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} %x [%p] (%F:%L) %m%n"/>
</layout>
<param name="file" value="TimeBasedLog.log"/>
<param name="append" value="true"/>
</appender>
I am wondering if it is possible to combine inside an appender both timebasedrollingpolicy and MaxFileSize/MaxBackupIndex feature ?
<param name="MaxFileSize" value="5KB"/>
<param name="MaxBackupIndex" value="5"/>

cfchart pie chart with dataLabelStyle

According to this page http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-792e.html you can use a dataLabelStyle which can be "none", "value", "rowLabel", "columnLabel" or "pattern". However whenever i use "rowLabel", "columnLabel" or "pattern" the image doesn't show. There is no error, just a blank canvas where the image should be. Does any one know how to work around this?
Thanks
I had the same problem, and I found that when I add the legend attribute placement, that is when the chart disappears. The legend shows with the placement indicated, but no chart.
I finally figured out what to do, I started from scratch with the bare minimum pie chart with examples from this page:
WebCharts3D Piecharts
And I discovered that the order of the elements in the XML file was the issue.
This is how my XML file is now and it works:
<?xml version="1.0" encoding="UTF-8"?>
<paint paint="Plain" />
<title>
<decoration style="None"/>
</title>
<dataLabels style="Pattern" font="Arial-16-bold">
<![CDATA[
$(value), $(colPercent)
]]>
</dataLabels>
<legend placement="Right" font="Arial-16">
<decoration style="None"/>
</legend>
<insets left="10" top="10" right="5" />
<elements action="" shape="Area" drawOutline="false">
<morph morph="Blur" /> <!-- other options: grow, none -->
<series index="0">
<paint color="#E48701" /> <!-- orange -->
</series>
<series index="1">
<paint color="#A5BC4E" /> <!-- lime -->
</series>
<!-- ...(etc) -->
</elements>
</pieChart>
This test of the five(5) styles works fine for me.
Maybe it is your code? Probably not a version problem as dataLabelStyle was introduced back in MX7 .
<cfloop list="value,rowLabel,columnLabel,pattern,none" index="style">
<cfchart format="png" scaleFrom="0" scaleto="30">
<cfchartseries type="bar" dataLabelStyle="#style#">
<cfchartdata item="bar" value="25">
<cfchartdata item="foo" value="10">
</cfchartseries>
</cfchart>
</cfloop>