I am trying to show the last time someone uploaded/changed a file in TYPO3 backend.
I tried something like this
<span class="download__specs-item"><f:format.date>now</f:format.date></span>
but this is obviously not what i want, i want to see the date that the given file was last modified.
I am not sure how/where to look after something like this
ps: I don't know how to google properly, lol.
Thank you.
Regards,
a TYPO3 beginner.
If anyone is still looking for the answer, this is how I solved it.
<f:debug>{_all}</f:debug>
On your page, and click through your available properties.
Here is how it worked for me.
<span class="yourclassisprobablyhere">
<f:format.date format="d M Y">
{file.originalFile.properties.modification_date}
</f:format.date>
</span>
Related
None of the bind examples in the documentation work - https://fancyapps.com/docs/ui/fancybox/api
The standard constructor examples work great, but anything that requires binding does not work. There is no error, but the gallery lightbox doesn't work - clicking an image just opens the image as a link. Here is the exact example code with markup:
<div id="gallery">
<a href="https://lipsum.app/id/1/800x600">
<img src="https://lipsum.app/id/1/300x225" />
</a>
<a href="https://lipsum.app/id/2/800x600">
<img src="https://lipsum.app/id/2/300x225" />
</a>
</div>
<script>
Fancybox.bind("#gallery a", {
on : {
ready : (fancybox) => {
console.log(`fancybox #${fancybox.id} is ready!`);
}
}
});
</script>
That console log never fires.
I'm importing FancyBox like this:
import { Fancybox } from '#fancyapps/ui';
I've tried searching around, but very little info on FancyBox 4 other than official docs and it's frustrating as they don't work. I've tried some of the examples in showcase also, and the same deal. If it's binding, it won't work and no errors are shown. Anyone have any insight into this?
Thanks,
Tom
It works perfectly fine. Since you did not provide a live demo (or at least a full HTML code), then it just not possible to help you.
It is so frustrating to read comments like this, no demo, no useful info, nothing. Maybe you did not include JS file, I do not know ... I would love to help you and to improve documentation, but, sorry, your comment is not helpful at all.
Fancybox is designed to be as easy to use as possible, all you have to do is:
Include two files - CSS and JS file (to get Fancybox object).
Add data-fancybox attribute to your links (or to call Fancybox.bind("YOUR_SELECTOR");)
Thats it! It can not be any simpler.
Sorry, it should have been a much clearer question. I didn't include a demo because it's a big wordpress site in production. It was giving me no useful feedback or errors or anything like that. I build websites day in and day out, so assumed it wasn't just me making some incredibly stupid mistake like a typo or something. I genuinely spent a lot of time on this, it wasn't me being lazy and just posting on stack overflow straight away...
It was me being stupid though.
In the process of making a demo to show you, I found the problem and (as you already know!) it's my mistake. I was able to make fancybox work by instantiating it straight away in my js, but binding (and therefore galleries etc) was not working.
The reason was the javascript was included in the head of the html document before the markup instead of at the bottom of the html document before the closing body. There was nothing for the js to bind to when it was executed.
I wouldn't normally include javascript in the head either but it's a wordpress project and because of some plugin, it's required there. Fancybox 3 worked with js in the head, but I suspect it might be jquery being more forgiving than native js with it's binding to DOM elements?
So, yes, entirely my fault. I was following the steps of the installation and startup guide almost exactly, but that inclusion of the js file in a slightly unusual (or bad practice at least) place was what caused all the issues.
I need to add a hr-like tag in the TCA of my Extension Backend or a linebreak. Is this possible in some way?
I've tried --linebreak-- in my palettes, but this did not work. Checked for the changes in Admin->Configuration. There comes the --linebreak-- but it does not do anything in the Ext-Backend.
Any help is highly appreciated, thanks.
Example:
Can you tell us the reason for the <hr> tag you need?
One simple way would be to use the USER type of the TCA where you are able to render any HTML. It is described here https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/User/Index.html
I am trying to figure out something using angularjs. Basically, today I decided to add a time/date stamp in my form. In other words, when someone is trying to post something, the time and date will appear.
Since I have a form with a live preview, I was trying to connect the time on the live preview. Afterwards, the time stamp would get published so that I could orderBy the comments from most recent to less recent.
I have two plunkers. For some reason, I couldn't get the code to properly work. Instead of showing up in the live preview as it should, it doesn't at all. It will on the form though. The first plunker has the bare minimum code, and is shown in the following link, while the second plunker is at the bottom of this message.
http://plnkr.co/edit/zgqXGGpoOw3UY90qT23H?p=catalogue
I will still display a portion of the code here, which is where my problem lies:
<blockquote ng-repeat="review in product.reviews | orderBy:'date'">
<b>Date: {{review.date}}</b>
</blockquote>
<form name="reviewForm" ng-controller="ReviewController as reviewCtrl" ng-submit="reviewForm.$valid && reviewCtrl.addReview(product)" novalidate>
<blockquote>
<b>Date: {{reviewCtrl.review.date}}</b>
<br/>
</blockquote>
<!-- DATE AND TIME -->
<!-- The other time formats are at the bottom of this page -->
<div ng-controller="timecontoller" ng-init="init();">
<div ng-model="reviewCtrl.review.date" ng-repeat="date in dates">
<b>Date: {{date.date1 | datetime}}</b>
</div>
</div>
</form>
While the second plunker has the whole viewable portion so that you can visually see the form (I removed certain elements though to make it easier to see). You'll have to click on the word "Review" first.
http://embed.plnkr.co/hHm1OPHk1uFD6YP2Roju/preview
If i followed your code correctly, it seems that you are trying to assign the review date with this line:
ng-model="reviewCtrl.review.date"
but its really not being given a data model or binding. If you truly wanted to transfer your timecontroller time update to the reviewController then I would recommend not using that as a controller, but instead refactor it as a service. Learn more here. Of course, you could also just open up your timeController scope and use a click event to transfer the data or something like that, but it doesn't seem like it should really be a controller to begin with.
Now i think I ended up changing your code more than it will really help you at all. But here is a quick implementation of how it can be done by making your timeController a service.
Plnkr
Just curious, why do you prefer this to $scope? It was giving me some trouble. Never really dealt with that before.
Since a couple of days I've been getting this strange error while using Zend_Markup Bbcodes. In simple words, the content which I'm trying to render will return with a lot of html elements. To be precisely, after all the < p > tags and all the 'n\' new lines are getting replaces by it.
When I'm dont render my content with the Zend_Markup renderer, its all good without any extra additional < br > tags.
I've been searching the interweb for a good fix, but it looks like no one else had this problem before :P. I'm guessing it had something to do with the filtering...
Example:
<p>Helloworld</p>
<p>And again Helloworld</p>
Will get returned as follow
<p>Helloworld</p>
<br>
<br>
<p>And again Helloworld</p>
<br>
<br>
Again, if turned off... everything goes like it should! But with out the great 'Bbcode' rendering functionality :'(
Thanks in advance guys!
Oke, after many hours debugging and doing tons of research and Google queries. I finaly solved my problem (for now and a bit dirty). It appeared to be a bug in the Zend Markup library cause of the fact that it was some last quick and rushed code right before one of the releases of ZF1. http://www.dasprids.de/blog/2010/02/28/why-i-am-not-using-zend_markup
Solution:
Comment out rule 312 in the Zend_Markup_Renderer_RendererAbstract class.
I will move in a little deeper into this subject when this project is finished. A quite a relief is that the Zend_Markup bug is or will get fixed in ZF2.
Does anyone know how to use filter "Activity Feed" ?
For instance on this page I want to display only french entries (links on the website that include the subdirectory /fr/):
The problem is if I put the filter="/fr" then nothing is displayed whereas they exist.
Here is the code:
<script src="http://connect.facebook.net/fr_FR/all.js#xfbml=1"></script><fb:activity site="www.alexandra-lloyd.com" width="428" height="260" header="true" font="verdana" border_color="" recommendations="true" filter="/fr"></fb:activity>
Thank you
There's no filtering in that free Activity Feed plugin. You will need to write your own to do filtering. Start here: http://developers.facebook.com/docs
I don't know if its the same issue but it appears there are more people with the same issue.
https://developers.facebook.com/bugs/325192644188145/?browse=search_4f1e10ebdb8141869509439