I would like to know if this is possible to add special character into the CRM (4.0) SiteMap entity (SiteMap XML files). I mean when we modify the menu located on the left I would like to have some HTML encoded character. By example ® or some other special characters.
I tried to do the following:
<Area Id="MyArea" Icon="/_imgs/resourcecenter_24x24.gif">
<Titles>
<Title LCID="1033" Title="Title english ®"/>
<Title LCID="1036" Title="Title french ®"/>
</Titles>
<Descriptions>
<Description LCID="1033" Description="Description EN ®"/>
<Description LCID="1036" Description="Description FR ®"/>
</Descriptions>
<Group Id="MyArea_Group">
<SubArea Id="mySubArea"
Url="https://toMyWebSite/Page.aspx" AvailableOffline="false" >
<Titles>
<Title LCID="1033" Title="My Item"/>
<Title LCID="1036" Title="My Item French"/>
</Titles>
</SubArea>
</Group>
</Area>
This actually show "Title English ®" in my left menu area instead of "Title English ®".
Does anyone have a solution?
(Note: I already tried to put the character directly with "alt-0174" but it didn't worked.)
EDIT: My initial response was incorrect. Use the numbered HTML escape (in this case ®) to get those characters into the sitemap.
Just put ® instead of what you have. The & is being escaped and then it just outputs the characters reg; because that isn't an HTML escape code.
Related
I am trying to modify the language of an apk. I changed all the strings. the app has 2 languages chinese and english. I was able to change the values of chinese to arabic language. But the issue is I dont know from where I can modify the selection text. Now if I choose chinese it will change to arabic. But the selection still says chinese and english.
Language selection
Now I have found some clues but I am not good at coding so I need help.
I found this code 'bg_language_text_unfocsed.xml':
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true">
<bitmap
android:src="#ref/0x7f070068" />
</item>
<item
android:state_focused="false">
<shape>
<stroke
android:width="dimension(1073741873)"
android:color="#ref/0x7f05009a" />
</shape>
</item>
</selector>
I have been using Mendeley's Microsoft Word plugin to easily reference papers in my Mendeley Desktop library.
However, I've noticed that the IEEE format for the bibliography/citation is incorrect with regards to referencing conference proceedings and theses.
On the IEEE citation guide: http://www.ieee.org/documents/ieeecitationref.pdf
It shows that the city of the conference should be included in the citation of a conference paper. However, Mendeley's IEEE CSL file does not include this detail.
<macro name="event">
<choose>
<if type="paper-conference speech" match="any">
<choose>
<!-- Published Conference Paper -->
<if variable="container-title">
<group delimiter=", ">
<group delimiter=" ">
<text term="in"/>
<text variable="container-title" font-style="italic"/>
</group>
<text variable="event-place"/>
</group>
Should be changed to:
<macro name="event">
<choose>
<if type="paper-conference speech" match="any">
<choose>
<!-- Published Conference Paper -->
<if variable="container-title">
<group delimiter=", ">
<group delimiter=" ">
<text term="in"/>
<text variable="container-title" font-style="italic"/>
</group>
<text variable="publisher-place"/>
</group>
Since event-place is not a keyword that maps to the "city" field in Mendeley; the correct variable is "publisher-place".
Two options, use this formatted one that I just made, or follow the steps I did to make this change in the CSL Visual Editor.
Just use the corrected file
While in Mendeley Desktop, go to View menu, "Citation Style ->" and click "More Styles..."
Click on the tab "Get More Styles", and enter the following link into the "Download Style:" text box, then click Download
http://csl.mendeley.com/styles/451326401/ieee-CS-edited
Done!
Make your own corrections
While in Mendeley Desktop, go to View menu, "Citation Style ->" and click "More Styles..."
Right Click on IEEE and choose "Copy Style Link"
Open up a web browser, and paste the link and hit enter, it should download a file called "ieee.csl"
Open up a web browser that isn't Chrome, as this doesn't work in Chrome, and go to the page http://csl.mendeley.com/visualEditor/
Login using your Mendeley credentials
Click on the "Visual editor" tab at the top if it's not already selected.
Hover over "Style" and choose "Load Style..."
Browse and select the "ieee.csl" file that was downloaded earlier.
Under "STYLE INFO" and "Info", rename the Title to something new.
Navigate to the following
BIBLIOGRAPHY
->Layout
-->Conditional
--->Else-of paper-conference OR...
---->Group
----->event (macro)
------>Conditional
------->If paper-conference OR speech
-------->Conditional
--------->If container-title
--------->Group
----------->event-place (variable)
Click on event-place (variable) and in the editable section to the right, change the variable from "event-place" to "publisher-place"
Then go back to the Style menu and choose "Save Style As..."
Save this style, and it should automatically add it to your Mendeley Desktop
Done!
Mendeley does not show the thesis citations correctly in IEEE format. It should be like this:
[1] J. K. Author, “Title of thesis,” M.S. thesis, Abbrev. Dept., Abbrev. Univ., City of Univ., Abbrev. State, year.
[2] J. K. Author, “Title of dissertation,” Ph.D. dissertation, Abbrev. Dept., Abbrev. Univ., City of Univ., Abbrev. State,
year.
However, the thesis type and department name are not showing!!
This StackOverflow answer suggests that you should use HTML entry content and use a standard <img> tag to link to your images.
<content type="html">
<![CDATA[
<a href="http://test.lvh.me:3000/listings/341-test-pics?locale=en">
<img alt="test_pic" src="http://test.lvh.me:3000/system/images/20/medium/test_pic.jpg?1343246102" />
</a>
]]>
</content>
I have also found something called the Yahoo media extensions here which allows you to add custom additional elements.
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
<!-- ommitted -->
<entry>
<!-- ommitted -->
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="path_to_image.jpg" />
</entry>
</feed>
Google also seems to have its own similar extensions. See here.
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0">
<!-- ommitted -->
<entry>
<!-- ommitted -->
<g:image_link>http://www.google.com/images/google_sm.gif</g:image_link>
</entry>
</feed>
My own intuition tells me I should simply be able to add links to images like so:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<!-- ommitted -->
<entry>
<!-- ommitted -->
<link rel="enclosure" type="image/png" length="1337"
href="http://example.org/image.png"/>
</entry>
</feed>
What is the correct approach for maximum compatibility?
The best practice is to do what Wordpress RSS 2.0 feeds do — if you want your post image to appear in feedly for example, put the <p><img...></p> at the top of the content. My eleventy setup has post header image inside article, but outside content variable's contents which are used in the feed. I solve the problem adding the image back:
<item>
...
<content:encoded>
<![CDATA[<p>{% include "src/components/partials/post-hero-img.njk" %}</p>{{ post.templateContent | textDeletePresentationDivs | htmlToAbsoluteUrls(absolutePostUrl) | safe }}]]>
</content:encoded>
source in git
I checked, neither Atom nor RSS 2.0 feeds have post images set anywhere as standalone tags. They're simply at the top of the article's content.
With regards to your examples...
The "vanilla" Atom RSS feed has a schema xmlns="http://www.w3.org/2005/Atom" and its documentation is defined in RFC4287.
According to it, "vanilla" Atom RSS feed strictly can have <logo> which is the 2:1 ratio image, the logo of the feed. Sadly, it is placed in the root of XML (notice atom:logo in the spec, it's not atom:entry:logo). Practically, this means, you can put a picture of your RSS feed itself, but not per-article. If you do put <logo> inside <entry>, the feed won't pass the validators and post image won't appear in feedly (I tried).
Also, spec defines <icon> which is vaguely defined as a small, square image, also placed in the root. Feedly seem to detect the website's favicon anyway, although it doesn't hurt to set this tag up in rss explicitly.
That's all there is — Atom spec doesn't officially define a way how to put images per-article.
Here's where additional namespaces come in (or RSS 2.0, different spec, different XML). You mentioned xmlns:media="http://search.yahoo.com/mrss/" in example. I tried it, post images won't show in feedly. Plus, spec link http://search.yahoo.com/mrss/ is not showing any specs.
Google namespace you quoted, xmlns:g="http://base.google.com/ns/1.0" also doesn't work, post images don't show up in feedly.
The link approach, <link rel="enclosure" type="image/png" length="1337" href="http://example.org/image.png"/> would be promising except length is meant to state the filesize in bytes. In Eleventy that's problematic value to get, for example.
To sum up, the best practice is put post header image at the top of the content, inside <content>.
First of all, hello,
With SwiftMailer, i'm sending HTML+PLAIN emails.
On outlook, when displaying this email as plain text, this is not my plain text part showing up, but a automatic parsed version of the HTML.
Does anyone know how to force Outlook to use the text/plain part of message when displaying plain text?
My code does the following:
$plain_body = convert_html_to_text($body);
$message->setBody($body, 'text/html')
->addPart($plain_body, 'text/plain');
$body has some formatting and images:
vardump($body);
<html>
<head>...</head>
<body>
<img src="logo.png" alt="Company name" /><br />
<img src="border.png" alt="border" /><br />
<img src="face.png" alt="Mr Somebody" /><br />
<p>Hello Ninj!
You requested a confirmation by email...</p>
<img src="footer.png" alt="footer" />
</body></html>
$plain_body contains a very clean text (thanks javon):
vardump($plain_body);
"Hello Ninj!
You requested a confirmation by email..."
But in the plain text version viewed in Outlook, i see instead all the alt attributes of pics of the HTML version, one by line, then some lightly formatted text:
Company Name
border
Mr Somebody
Hello Ninj!
You requested a confirmation by email...
Footer
Thank you by advance for everyone able to help :)
Can't do that. Outlook keeps all 3 body flavors (HTML, RTF, plain text) in sync. This is done on the store provider level.
When it receives a MIME message, it uses the HTML body (if available). When the message is saved, the store provider uses the HTML body to generate the plain text body (PR_BODY property).
If any body else have solution on this please replay.
I'm using Struts2 and getText method to fill i18n and text tags.
For example I use:
free.text.search.label=české On-line Hledat
č is a HTML code for special character č (Czech Republic). I want to use in properties file.
But in my JSP, I get : české On-line Hledat instead of české On-line Hledat
I use this to display text on my JSP:
<s:label for="searchInput" value="%{getText('free.text.search.label')}" />
So what's the error? Actually this problem i am facing for label as well for button.
Use \u010D instead of č
.properties
free.text.search.label=\u010Deské On-line Hledat
.jsp
<s:label key="free.text.search.label" />
Output
české On-line Hledat
How I solved it?
Just paste české On-line Hledat into .properties file in my IDE (Eclipse).
Or
See
Unicode Character 'LATIN SMALL LETTER C WITH CARON'
(Encodings > C/C++/Java source code)
A to Z Index of Unicode Characters
Unicode Character Search
Well i am not able to understand your issue properly
but few points i would like to mention here
<s:label for="searchInput" value="%{getText('free.text.search.label')}" />
use key in place of this to make this more easy to read and maintain
like
<s:label for="searchInput" key="free.text.search.label" />
also since meta tags are no longer applicable to struts2 so you can try using this
<%# page contentType="text/html;charset=UTF-8" %>
<%# taglib prefix="s" uri="/struts-tags" %>
May be this will help you to display special characters correctly