TYPO3 News extension, image upload size - typo3

Im running TYPO3 v. 6.4 Fluid/Extbase.
Im working with the News (news) Extension and it's working fine, but i have a little problem.
When i make a new news and go to Relation and add an image (800x600) then it's resize it to 100x80.
What file do I look after, so i can changes the resize, so I get the size 800x600.
Have scanned the folder for the extension and can't find any place that handle the image udload.

SETUP
plugin.tx_news {
settings {
# only for DETAILS VIEW
detail {
media {
image {
maxWidth =
maxHeight =
}
}
}
# only for LIST VIEW
list {
media {
image {
maxWidth =
maxHeight =
}
}
}
}
}
greetings
maty

Related

YouTube video height is too small in WebView Jetpack Compose

I am playing around with Jetpack Compose, so I created an sample app that has only one webview that loads the YouTube URL. and When I play a video the height of the video is too small.
#Composable
fun MyScreen() {
val context = LocalContext.current
Surface {
AndroidView(
factory = {
WebView(context).apply {
settings.javaScriptEnabled = true
webViewClient = WebViewClient()
webChromeClient = WebChromeClient()
}
},
update = {
it.loadUrl("https://youtube.com")
},
modifier = Modifier.fillMaxSize()
)
}
}
You can set a custom aspect ratio to your layout by Modifier.aspectRatio(16 / 9f) (16:9 is the most common video aspect ratio).
Or if you want to see more content from the WebView you can just make the size larger or make it fillMaxSize().
If you actually want to create an app that uses YouTube webviews, I suggest looking at this library both for code reference and potentially just using it.
Also had this problem. As pointed by #Pylyp Dukhov, it doesn't happens when using XML. So what I did, for now, is inflate a XML with a WebView inside a Frame layout an pass that as the Android view's factory's return
I had the same problem. I still don't know why it behaves like that (I guess it's a bug) but in the end I got it working by using the Google Accompanist WebView.
val state = rememberWebViewState("https://youtube.com")
WebView(
modifier = Modifier.fillMaxSize(),
state = state
)
Here is a full example.
Edit:
Looking at the Accompanist WebView source code, you only have to set the WebView height and width to MATCH_PARENT. Like this:
AndroidView(
factory = { context ->
WebView(context).apply {
settings.javaScriptEnabled = true
webViewClient = WebViewClient()
webChromeClient = WebChromeClient()
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
loadUrl("https://youtube.com")
}
}
)

Binding Image URIs via Image.SetBinding() not working properly

I'm using the following code snippet to bind a image url to a image object (used as one element in a ViewCell object).
...
Image Picture = new Image()
{
Aspect = Aspect.AspectFit,
HorizontalOptions = LayoutOptions.StartAndExpand
}; // ImageSource.FromUri(new Uri("sImageUrl")))
Picture.SetBinding(Image.SourceProperty, "sImageUrl");
...
The images in the list, for which I'm using that cell view, are not loading always. I was not able to identify the exact reason for the problem, but I think the problem is the load-process (for loading the images from the url/internet)..
Maybe the problem could be solved by setting the url via new Uri(...) as described in the documentation
var webImage = new Image { Aspect = Aspect.AspectFit };
webImage.Source = ImageSource.FromUri(new Uri("https://xamarin.com/content/images/pages/forms/example-app.png"));
Now my question: is there a workaround for binding a uri object? e.g.
...
Image Picture = new Image()
{
Aspect = Aspect.AspectFit,
HorizontalOptions = LayoutOptions.StartAndExpand
}; // ImageSource.FromUri(new Uri("sImageUrl")))
Picture.SetBinding(Image.SourceProperty, ImageSource.FromUri(new Uri("sImageUrl")));
...
I'm working with xamarin studio (version 6.1.2, build 44, update channel "beta", os x).
Would be great if someone got a tipp.
Thanks a lot,
Alex
after some more trying I found a solution.. I'm not sure if it's a secure / professional way.. But for now, it seems to work.
What I did: I implemented my own class "AsyncSrcImage", derived it from Image and added another bindable property:
public class AsyncSrcImage : Image
{
private static String sDefaultURL = "";
public static readonly BindableProperty AsyncImgUrlProperty = BindableProperty.Create(nameof(AsyncImgUrl), typeof(String), typeof(AsyncSrcImage), sDefaultURL);
public String AsyncImgUrl
{
get { return (String)GetValue(AsyncImgUrlProperty); }
set { SetValue(AsyncImgUrlProperty, value); }
}
}
Additionally I adjusted the rendering process with a custom renderer. There I'm loading the image source via new Uri(...) as described in the documentation:
using Xamarin.Forms.Platform.Android;
using Xamarin.Forms;
using System;
[assembly: ExportRenderer(typeof(AsyncSrcImage), typeof(AsyncSrcImageRenderer))]
public class AsyncSrcImageRenderer : ImageRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
{
base.OnElementChanged(e);
AsyncSrcImage oImage = (AsyncSrcImage)Element;
if (oImage != null && oImage.AsyncImgUrl != "")
{
oImage.Source = ImageSource.FromUri(new Uri(oImage.AsyncImgUrl));
}
}
}
Maybe that helps other folks ;)

Create a new link stye in Typo3?

Is there a way to add a new style to the Insert Link dialog in Typo3?
Currently they are "internal-link", "internal-link-new-window", or no style.
I have tried putting various things in the Page tsconfig with no results at all...
I found this on another site which looks like it does what I want but I can't get it to do anything:
RTE.classesAnchor {
tollerLink1 {
class = button
type = page
titleText = Button
}
}
RTE.default {
classesAnchor:=addToList(button)
}
In your TsConfig (Home Page Properties - Resources - Page TSConfig)
RTE.default.buttons {
link.properties.class.allowedClasses := addToList(internal-link-new-window)
}

TYPO3 News Lightbox

TYPO3 6.2.13, News (tx_news) 3.2.2, Detail views.
Is there a setting to have pop-ups for any image in the detail views?
I see I may use TS plugin.tx_news.settings.detail.media.image.lightbox.enabled, but I am not sure about what it is supposed to output.
Moreover, is there a way/instructions to integrate something like lightbox into templates for News views?
thks
You can add configuration in your TypoScript setyp (fancybox example):
plugin.tx_news.settings.detail.media {
image {
lightbox {
enabled = 1
class = fancybox
width = 200
height = 200
rel = fancybox[myImageSet]
}
}
}
And in your JS file add:
$(document).ready(function() {
$(".fancybox").fancybox();
});
You will have to include appropriate JS files.
It helped me 3 years later. but there is something wrong in your code, detaildetail ... better for other people are also looking for that is, only one detail :-)
plugin.tx_news.settings.detail.media {
image {
lightbox {
enabled = 1
class = fancybox
width = 200
height = 200
rel = fancybox[myImageSet]
}
}
}

tt_news default image in single view

In tt_news, how can I display a default image when there are no images associated with the news? I tried
plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject = IMAGE
plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject {
wrap =
file = fileadmin/images/image.jpg
}
but it doesn't display the image.
It should work with this:
plugin.tt_news.displaySingle.image.noImage_stdWrap {
cObject = IMAGE
cObject {
file = fileadmin/news-image-default.jpg
wrap =
}
}
i guess there is a dot between "displaySingle" and "image" missing?
plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject = IMAGE
plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject {
file = fileadmin/images/image.jpg
}
This code works for me. Path to file must be correct and image file must exists otherwise Typo don't display anything.
plugin.tt_news.displaySingle.image.noImage_stdWrap {
cObject = IMAGE
cObject {
file = fileadmin/tt_news/default_image.jpg
wrap = |
}
}