Image cropping tool of DCE in TYPO3 not working - typo3-10.x

Here is the configuration of my Image field.
<config>
<type>inline</type>
<foreign_table>sys_file_reference</foreign_table>
<foreign_field>uid_foreign</foreign_field>
<foreign_sortby>sorting_foreign</foreign_sortby>
<foreign_table_field>tablenames</foreign_table_field>
<foreign_match_fields>
<fieldname>{$variable}</fieldname>
</foreign_match_fields>
<foreign_label>uid_local</foreign_label>
<foreign_selector>uid_local</foreign_selector>
<overrideChildTca>
<columns>
<uid_local>
<config>
<appearance>
<elementBrowserType>file</elementBrowserType>
<elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg</elementBrowserAllowed>
</appearance>
</config>
</uid_local>
</columns>
<types type="array">
<numIndex index="2">
<showitem>--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</types>
</overrideChildTca>
<minitems>0</minitems>
<maxitems>99</maxitems>
<appearance>
<useSortable>1</useSortable>
<headerThumbnail>
<field>uid_local</field>
<width>45c</width>
<height>45</height>
</headerThumbnail>
<enabledControls>
<info>1</info>
<dragdrop>1</dragdrop>
<hide>1</hide>
<new>0</new>
<sort>0</sort>
<delete>1</delete>
</enabledControls>
<createNewRelationLinkTitle>LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
</appearance>
<behaviour>
<allowLanguageSynchronization>1</allowLanguageSynchronization>
</behaviour>
<dce_load_schema>1</dce_load_schema>
<dce_get_fal_objects>1</dce_get_fal_objects>
</config>
And the code for the Image is this:
<f:for each="{field.bgimage}" as="image" iteration="iterator">
<div class="banner" style="background-image: url('fileadmin{image.identifier}');" ></div>
</f:for>
The problem here is that the cropping tool/ Image manipulation tool, which appears in the back end, is not working.
image is here
I can crop the image with this, but no change is happening with my image.
If anyone knows pls help.
Thanks.

Use this
<f:for each="{field.bgimage}" as="image" iteration="iterator">
<div class="banner" style="background-image: url('{f:uri.image(src: '{image.uid}', treatIdAsReference:1, width: '1920c')}');"></div>
</f:for>

Related

Layout trouble with CUBA screen designer

I am testing the Cuba-Platform and I have trouble understanding the layout options within the screen designer.
I am trying to spread tables and twincolumns evenly and aligned over the screen. (And add a label on top of each)
The simplest task of stretching the containers (vbox and hbox) is difficult.
When I set height/width to 100% the items within are evenly distributed within the space. When I now try to set the height of the table within the vbox to 100% (hoping it would stretch) it gets reset to 100px.
I also tried the grid component, but when I set it to 100% the columns are have all the same hight (no good for label)
Maybe my understanding (coming from xaml/c# and the ms-components) is completely wrong. Please tell me, how can I create a view and ensure:
that the components are at the same height (stretched if need be)
that the components are aligned
that the whole screen is filled
label label
table twincolum
okcancel
As requested a simple image - of what by now drives me crazy..
Id like to add some code I eventually came up with - Its not yet the ideal thing:
<layout>
<hbox id="hboxexpand"
expand="assignTwinCol"
height="100%"
spacing="true"
width="80%">
<table id="userTable"
height="100%"
**width="auto"**>
<columns>
<column id="value1"
caption="msg://1"/>
<column id="firstName"
description="msg://firstNameHeader"/>
<column id="lastName"
caption="msg://nameHeader"/>
<column id="active"
caption="msg://activeHeader"/>
</columns>
<rows datasource="userDs"/>
</table>
<twinColumn id="assignTwinCol"
addAllBtnEnabled="true"
height="100%"
optionsDatasource="myDs"/>
</hbox>
</layout>
Please note: When I use the designer the **** part width=auto will be reset to 200px every time! I can only change that in the xml designer
Table does not have full support of AUTO width because width of columns can be adjusted by content, so I would recommend using fixed or relative width for a table.
<layout>
<hbox expand="twinColumn"
height="100%"
spacing="true"
width="100%">
<table id="userTable"
height="100%"
width="400px">
<columns>
<column id="firstName"/>
<column id="lastName"/>
<column id="active"/>
</columns>
<rows datasource="usersDs"/>
</table>
<twinColumn id="twinColumn"
addAllBtnEnabled="true"
optionsDatasource="usersSelectDs"
height="100%"/>
</hbox>
</layout>
If you want to set headers for TwinColumn columns you can use unwrap methods and Vaadin API of TwinColSelect:
public class Screen extends AbstractWindow {
#Inject
private TwinColumn twinColumn;
#Inject
private Table<User> userTable;
#Override
public void init(Map<String, Object> params) {
super.init(params);
TwinColSelect colSelect = twinColumn.unwrap(TwinColSelect.class);
colSelect.setLeftColumnCaption("Header Left");
colSelect.setRightColumnCaption("Header Left");
Layout tableComposition = userTable.unwrapComposition(Layout.class);
tableComposition.setCaption("Table Header");
}
}
We need to align our headers of the Table and TwinColumn. Table caption does not have padding-bottom 0.3em that TwinColumn headers have. We can add padding using stylename for the table:
<table id="userTable"
height="100%"
width="400px"
stylename="padding">
<columns>
<column id="firstName"/>
<column id="lastName"/>
<column id="active"/>
</columns>
<rows datasource="usersDs"/>
</table>
Then we create theme extension using Studio and add CSS definition to halo-ext.scss file:
.v-caption.v-caption-padding {
padding-bottom: 0.3em;
}
Now restart the application and our headers are aligned!
CUBA Team are planning to add caption and leftColumnCaption/rightColumnCaption attributes for components in the next minor release and you will be able to assign them from XML/Screen Designer.
See also:
https://doc.cuba-platform.com/manual-6.2/webComponentsHelper.html
https://vaadin.com/api/com/vaadin/ui/TwinColSelect.html

Xpages and Bootstrap - Pager is not aligned

My pagers will not align correctly on an Xpages view. The blank table cells on the left and right are huge.
Any help would be greatly appreciated:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<div
class="panel panel-default">
<!-- Default panel contents -->
<div
class="panel-heading">Panel heading</div>
<xp:viewPanel
rows="30"
id="viewPanel1"
viewStyleClass="table"
var="rowData">
<xp:this.facets>
<xp:pager
partialRefresh="true"
layout="Previous Group Next"
xp:key="headerPager"
id="pager1" />
</xp:this.facets>
<xp:this.data>
<xp:dominoView
var="view1"
viewName="(PC)" />
</xp:this.data>
<xp:viewColumn
id="viewColumn1">
<xp:this.value><![CDATA[#{javascript:""}]]></xp:this.value>
<xp:link
escape="true"
id="link1"
value="">
<xp:this.text><![CDATA[#{javascript:rowData.getColumnValue("serialNumber");}]]></xp:this.text>
<xp:eventHandler
event="onclick"
submit="true"
refreshMode="complete">
<xp:this.action>
<xp:openPage
name="/xpPCForm.xsp"
target="openDocument">
<xp:this.documentId><![CDATA[#{javascript:rowData.getDocument().getUniversalID()}]]></xp:this.documentId>
</xp:openPage>
</xp:this.action>
</xp:eventHandler>
</xp:link>
<xp:viewColumnHeader
id="viewColumnHeader1"
sortable="true"
value="Serial Number" />
</xp:viewColumn>
</xp:viewPanel>
</div>
</xp:view>
=============================================================
I am still getting a space where I don't want it. Not horrible, but I do not like not knowing why something is occurring.
As you can see there is space to the left of the pager. It is a table column. I tried Bryan's suggestion and used several of the other facets, but that didn't work either. If I put the pager in northWest, then the first column of the table was extremely wide.
Oliver's suggestion shrunk the margin for top and bottom (so closer to the button and closer to the start of the view, but no change to the left column).
Just baffled as to why it is doing this?
You should use a different facet for the pager on the view panel. Sven Hasselbach had a good blog post explaining the layout of the various viewPnael facets: http://hasselba.ch/blog/?p=793. These additional facets explain why you can see empty table cells in firebug.
So you could try using the North or Northwest facets, instead of the headerPager facet:
<xp:this.facets>
<xp:pager
partialRefresh="true"
layout="Previous Group Next"
xp:key="north"
id="pager1" />
</xp:this.facets>
UPDATE:
If sticking with the headerPager facet and viewStyleClass="table", you could work around the spacing in a few ways.
Make that first empty TD invisible
.panel > .table > tbody > tr:first-child > td:first-child {
display:none;
}
Or re-style the pager to alter its position:
<xe:pagerSizes id="pagerSizes1"
xp:key="headerPager"
style="left:-20px;position:relative;">
</xe:pagerSizes>
In both cases, adding Oliver's suggested margin change helps too.
Usually I add this to my CSS:
.pagination {
margin: 0;
}
Though I've never seen those big spaces...

ModX Eform: Captcha not generating image

I am trying to get CAPTCHA working on the eForm plugin. I have added the input form field:
<label for="cfCaptcha">Captcha:<br />
<img src="[+verimageurl+]" alt="verification code"><br />
<input id="vericode" name="vericode" class="text" type="text">
and I have added
&vericode=`1`
to the eForm call.
and have added the Template Variable [+verimageurl+] to my template.
However, when I preview the form all I see in the image area is <img src="" alt="verification code">
Would anyone know what I am doing wrong?
Did you get this fixed?
Check that you ended the label code. Run it through w3c code checker too.
A few times I have left a element un-closed and it breaks the whole thing.

Giving Caption in zurb orbit plugin for slideshow with haml

I am using orbit for slideshow requirements, however I am not able to add captions.
The documentation says this :-
<div id="featured">
<img src="overflow.jpg" alt="Overflow: Hidden No More" />
<img src="captions.jpg" alt="HTML Captions" data-caption="#htmlCaption" />
<img src="features.jpg" alt="and more features" />
</div>
<!-- Captions for Orbit -->
<span class="orbit-caption" id="htmlCaption">I'm A Badass Caption</span>
I am using haml and doing something like this :-
.container
.row
.two.columns
=render "left_navigation"
.ten.columns.destination_tabs
.contianer
.row
.ten.columns
%h3 Featured Destination
%hr
-if #preferred.blank?
%h5 No Featured destinations currently
-else
#featured
-#preferred.each do |destination|
-destination.destination_photos.each do |photo|
=image_tag(photo.picture.thumb_large.url, :alt =>"html captions", :data-caption => "#htmlCaption")
.orbit-caption#htmlCaption
="sfsdf"
This obviously gives error because I cannot give a syntax like :data-caption I tried lot of stuff but couldn't get it right yet can anyone help?
You can use arbitrary strings as symbols by simply quoting them:
:"data-caption" => "#htmlCaption" #note the quotes around data-caption

Craigslist API - how to post with RSS data?

http://www.craigslist.org/about/bulk_posting_interface - it says, "New postings are submitted to craigslist in RSS format with additional craigslist-specific elements via HTTPS POST"
How do I post a form passing rss data?
I was hoping to just have something like this:
<form action="https://post.craigslist.org/bulk-rss/post" type="post">
<input type="hidden" name="area" value="richmond" />
<input type="hidden" name="category" value="free" />
<input type="hidden" name="reply-email" value="x#y.com" />
</form>
But, it says I have to supply the data in RSS format.
So is it something like this?
<form action="https://post.craigslist.org/bulk-rss/post" type="post">
<input type="hidden" value="{all the RSS data goes here??}" />
</form>
Any help is super appreciated. Eventually I'd like to build an android app that posts to Criagslist, but, just want to get a simple html form to test for proof of concept for now. Thanks!
I've been trying to figure this out, too, but from what I have read about this RSS interface it is only available for non-free categories like employment and real estate postings. Those categories require you to purchase blocks of posting credits.
IMO this is a good reason not to use Craigs List. If anything, they should open up the RSS interface to all categories and perhaps limit the rate of posting for free ads and/or let people buy blocks for other categories.
The format of the request will look like this
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:cl="http://www.craigslist.org/about/cl-bulk-ns/1.0">
<channel>
<items>
<rdf:li rdf:resource="NYCBrokerHousingSample1" />
</items>
<cl:auth username="Vusername#gmail.com" password="password" accountID="14" />
</channel>
<item rdf:about="NYCBrokerHousingSample1">
<cl:category>fee</cl:category>
<cl:area>nyc</cl:area>
<cl:subarea>mnh</cl:subarea>
<cl:neighborhood>Upper West Side</cl:neighborhood>
<cl:housingInfo price="1450" bedrooms="0" sqft="600" />
<cl:replyEmail privacy="C">bulkuser#bulkposterz.net</cl:replyEmail>
<cl:brokerInfo companyName="Joe Sample and Associates" feeDisclosure="fee disclosure here" />
<title>Spacious Sunny Studio in Upper West Side</title>
<description><![CDATA[posting body here]]></description>
</item>
<item rdf:about="NYCBrokerHousingSample2">
<cl:category>fee</cl:category>
<cl:area>nyc</cl:area>
<cl:subarea>mnh</cl:subarea>
<cl:neighborhood>Chelsea</cl:neighborhood>
<cl:housingInfo price="2175" bedrooms="1" sqft="850" catsOK="1" />
<cl:mapLocation city="New York" state="NY" crossStreet1="23rd Street" crossStreet2="9th Avenue" latitude="40.746492" longitude="-74.001326" />
<cl:replyEmail privacy="C" otherContactInfo="212.555.1212">bulkuser#bulkposterz.net</cl:replyEmail>
<cl:brokerInfo companyName="Joe Sample and Associates" feeDisclosure="fee disclosure here" />
<title>1BR Charmer in Chelsea</title>
<description><![CDATA[posting body goes here]]></description>
<cl:PONumber>Purchase Order 094122</cl:PONumber>
<cl:image position="1">/9j/4AAQSkZJRgABAQEASABIAAD/4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUA
AAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAA
A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