Leiser
suggested this on July 06, 2010 03:35 pm
Prerequisites:
You will need a basic understanding of CSS and/or Basic Understanding of Javascript to use this feature effectively.


In RSS/ATOM schemas (the structure of your feeds) the "description" tag that we use to create the content view within the app does not contain header/title information.
For example, if your feed had
<title>My Title</title>
<author>Me</aothor>
<description>I was running to the doctor when....</description>
The description itself would not contain any of the title, or author information.
To resolve this issue we prepend the title and author information into the view of the iphone and wrap that content with html id properties.
<div id="appmakr-content-header">
<p id="appmakr-header-title">[title]</p>
<p id="appmakr-header-author">[author]</p>
<p id="appmakr-header-date">[date]</p>
</div>
(Check out some CSS example Snippets here)
If you wanted to not show any of this extra information in the view you can add this line to your CSS Snippet:
#appmakr-content-header {display:none}
(More information about CSS manipulation here)
You can add JS into the view screen by adding a JS snippet. JS snippets execute Javascript code when the view is activated.
For example, to append a smiley face to the end of header's title you could add the following code into the JS snippet for a feed:
var headerTitle = document.getElementById("appmakr-header-title");
var headerTitleText = headerTitle.innerHTML;
headerTitle.innerHTML = headerTitleText + ":)";
Within a feed is a set of entries. Each entry contains all the information your feed provides.
We pass a JS object to the view baed on that entries data so that you can manipulate it with a JS snippet
This is useful if you want to send information about the feed to a service or API you wish to use when a user reads the story. For instance a rating system, analytics, etc. Note: The "guid" is usually the unique identifier of the entry.
Comments latest first
@seven,
I tried the code on iPhone and it works great!
Must be a windows problem, I will report it to App Makr :-)
-Matt
@Matt
I tried the examples listed here: http://help.appmakr.com/entries/234317-more-snippet-examples
I just enabled the CSS feature on a tab and pasted the code
p {color:#333;background-color:#FFF;border:1px solid #CCC; margin:8px;margin-top:15px;padding:8px;-webkit-border-radius: 5px;}
p a {color:#AAA;font-weight:bold;text-decoration:none;border-bottom:1px dotted #CCC;}
#appmakr-content-header {border:1px solid #CCC;background-color:#EEE;padding:8px;margin:5px;}
#appmakr-header-title {color:#990000;font-weight:bold;font-size:23px;font-style:italic'}
#appmakr-header-author {font-size:10px;color:#CCC;text-align:right;}
#appmakr-header-date {}
Did the same with another tab and tried the other example
* {color:#FFF;}
body {background-color:#000;}
Thx
@seven,
What code are you using? It may be corrupted or like you said it may just not work.
-Matt
Need Help? -- Email Me @ MWFPRO@hotmail.com
App Uploader http://mwfpro.webs.com/apps/webstore/products/show/2525662
NEW Website http://www.apptigr.com
have anyone tried CSS on WP7? I tried both CSS examples and they didn't work. I tested on a device.
Hey Carlos,
Use the HTML tab to achieve this functionally
I want to put a button and when pressed to redirect to a link that tells you, which would have to wear?
How to change the colors of the main tab feed text with a CSS Snippet ?
Thanks
Can I have RSS feeds formatted Right to Left (RTL) on both titles and full text ? if yes, how?
Chris if it's a PhoneGap tab you're going to need to add your own custom header.
Would it be possible to display the custom header image I'm using on my other tabs with CSS? I added a tab to my mobile site and there is no header image. Should I program it into the html and upload the header image again with the index.html file?
Thanks in advance for your help.
Hello, I am having an absolute terrible time trying to get my RSS FEEDS to have some color. None of the snippets I have used are working, I build the app and test it out on the ipod, iphone and ipad and the RSS Feeds look the same, black text on white background. All I need to do is change the title color, the text color and the background color of the rss feed. Does ANYONE have a snippet they have used that has worked they would be willing to share? Thank you so much - Candice
HI, I am trying to integrate BigDoor's Minibar with my App. Ideally, I'd like to live in the bottom of my App. Below is the JavaScript. Can anyone tell me how to insert? I know this is for websites, but wondering if it would also work for my apps.
<!--start BigDoor MiniBar-->
<script src="http://js.bigdoor.com/branches/release/load.js"></script>
<script type="text/javascript">BDM.load("3751","www.mysite.com","3");</script>
<!--end BigDoor MiniBar-->
Sergio you can change the background like this:
* {color:#FFF;}
body {background-color:#2a61a3;}
In a larger example it would look like this:
#appmakr-header-date {display:none}
#appmakr-author-date {display:none}
* {color:#FFF;}
body {background-color:#2a61a3;}
p {color:#333;background-color:#FFF;border:1px solid #CCC; margin:8px;margin-top:15px;padding:8px;-webkit-border-radius: 5px;}
p a {color:#AAA;font-weight:bold;text-decoration:none;border-bottom:1px dotted #CCC;}
#appmakr-content-header {border:1px solid #CCC;background-color:#EEE;padding:8px;margin:5px;}
#appmakr-header-title {color:#990000;font-weight:bold;font-size:23px;font-style:italic'}
#appmakr-header-author {font-size:10px;color:#CCC;text-align:right;}
Hello again,
I fixed the error :D but I would like to know one thing. How to change the background of feed list?
Thank you.
Hello, I put this code but not work, Why?
p {
color:#333;background-color:#FFF;
border:1px solid #CCC;
margin:8px;margin-top:15px;
padding:8px;
-webkit-border-radius: 5px;
}
p a {color:#AAA;
font-weight:bold;
text-decoration:none;
border-bottom:1px dotted #CCC;}
img {max-width:300px;}
or this other
#appmakr-header-title {color:black;} #appmakr-header-meta{color:black;} #appmakr-header-date {color:black;} #appmakr-header-author {color:black;}
I have been tryied using JS and css to remove this class from a feed with no luck. Any help would be much appreciated.
Hi, been trying out AppMakr for WP7. This page says "We pass a JS object to the view" well what is the object? For example if I want to eliminate the appmakr_entry.title in each feed. Thanks!
Is there a way to change the list view of the feed? In the list view, I would like to just display the title of the post and not some of the content. I also do not want to post the date in that list view. The style sheets only seem to impact the item once selected. Is that right?
Has anyone been able to successfully implement the javascript to get the link from the RSS feed (Yahoo! Pipes) and post it as a link on the view page?
I can do something like this:
var mytext = "<a href="________">Read Full Article</a>";
document.write(mytext);
My problem is trying to figure out how to pull the URL link from the feed.
Please help. Thanks!
Dan,
Two things.
1. Can you publish the javascript 'alert' code you got to successfully work. No one has published any working examples.
2. I am simply trying to get the sample code from above (appending a smiley face to the title) to work. Can you see if you can get it to work? I've tried it and other code, nothing works.
MH
Hey guys I'm able create javascript alerts using the advanced tab. What exactly are you trying to build?
Per my earlier post, I have done the same thing. I have used their snippets without success. I have asked others if they have had success. No one has claimed success or provided examples.
MH.
The CSS-snippets work fine, but I can't get the Javascript-snippets to work. I tried first with the ones you provided (smiley for header text), and nothing happens. Testing is done in the built App on the iPhone, so that should not be the problem. Has anyone actually got these Javascript-snippets to work?
Hi
I have tried the below putting browser://www.blah.com/rss.xml in the advanced box but this doesnt work, any help on this??
Cheers
@ Corey -- try starting your URL with "browser" instead of "http", like so:
browser://www.google.com instead of http://www.google.com
oh common people, I have asked this question more than 4 times and you told me to check out the w3schools site. Obviously I am not a CSS expert and I have tried everything I could in order to do something about it but here I am asking you for help so please dont just ignore me by throwing me a link. Thank you.
Please check out this link for more examples.
is there any css command that actually works with the app that resizes or even shrinks the photos that the feeds include in order to show them properly?
@AppMakr Support - I have 2 things I need help with:
Thanks,
Chris
Does anyone have any examples of the Javascript 'snippets' working. Any examples would be appreciated? I have yet to get the simplest of statements to work. And the examples don't seem to work either.
Thank You.
CSS for font family and size... fairly basic CSS... I can't get it to work! Anyone else having a problem changing the font family and size? No matter what I do, it stays in the default Times Roman font. Is this a Bug or does Appmakr strip this CSS snippet out? If you are successful in changing the font family and size, can you please provide how you are doing it?
Thanks!
Sorry, I copied the lines of code into my entry above twice. The lines:
var headerTitle = document.getElementById("appmakr-header-title");
var headerTitleText = headerTitle.innerHTML;
headerTitle.innerHTML = headerTitleText + ":)";
are only in the snippet area once.
I have been unable to get any of the Javascript snippets to work. I have tried numerous statements and have even included the code from your example above without success.
var headerTitle = document.getElementById("appmakr-header-title");
var headerTitleText = headerTitle.innerHTML;
headerTitle.innerHTML = headerTitleText + ":)";
Any idea what I am doing wrong?
I have also tried to test and manipulate the object properties in YOUR example above without success.
For instance:
if (appmakr_entry.author == "(null)") appmakr_entry.author = "Unknown";
if (appmakr_entry.author == null) appmakr_entry.author = "Unknown2";
(As you can see from above, I am trying to get rid of the annoying "(null)" in the author when my feed does not have a value for author.)
How can I manipulate "Play" button at item page?
#appmakr-header-enclosure{margin:0em 0em;} ?
@Steve Quilala
Fantastic! That explains why date sometimes drop "off margin" (if the title is on more than one row) - the "image" in question is set as height="60px;"
@AppMakr Support
Why you assume that the author name (dc:creator) which include dot would actually be the same as the author www address. Shouldn't author link be activated in some other way (optional)...
@Cartabianca Publishing I also wanted to remove the header margin. I discovered that it's an freakin image of all things... this nukes it:
#appmakr-content-header img {display:none;}
@Neurons
You could use a JS snippet to get the author information (i.e. appmakr_entry.author) and append it to the header in the form you want it, i.e without link etc. And then hide/remove the header that is in there by default. Make sense?
@Cartabianca Publishing
Thanks, but I don't want to hide it.
If you haven't noticed the author will show as link if the author name is like "domain.com".
I know that I could use "text-decoration:none" but that still has clickable link...
So what I would like to have is that the author could still show as domain.com but without it being link
@ Neuron Ington:
>Additionally I would like to totally remove the link from the author.
Try
#appmakr-header-author {display:none;}
How could I remove the new margins from the title, author and date?
I tried to use:
#appmakr-header-title{margin:0em 0em;}
#appmakr-header-author{margin:.0em 0em;}
#appmakr-header-date{margin:0em 0em;}
but the the whole content header still has margins...
Additionally I would like to totally remove the link from the author.
Please not that there is bug in header section too: if the title is so long that it is in two rows the date (and even author is the title is on three rows) jumps to left (in other words no margins).
Thanks for having shared AppMakr's own CSS details with us developers. However, it would be useful to have also the other details to control the style and layout of the main RSS lists - i.e. the CSS data other than the 3 colours allowed in the Customize -> Appearance section.
Thanks!
See related post with more snippet examples here!
Note: Added additional sections to post:
Fantastic! Thanks!
FYI:
Added a
Controlling header information
Section to this forum post
All, see below for CSS Header tag info:
From my latest adhoc, have you guys started mapping styles to pubdate and item titles? Looking forward to seeing documentation :)
Has anyone tried Google analytics with the javascript snippet function? In theory wouldn't it work?
Hey, great to see this! I'd love it if each field in the feed could have an ID or class selector... so, for example, if I wanted to reformat just the date field at the very top of a post, I could have a selector like p.datefield { font-weight: bold; }
thanks--
Eric
The way I envisioned utilizing this feature when I first saw it was to use css to style rss items as a next level of a menu. so that the rss feed is the first level and the item is the second level of the menu but they render the same.
Once again, AppMakr comes through. Can't wait to see what you develop here!
I see the confusion. The title and the pub date are not in the description of the feed therefor not part of the content "tags" in that view. The content of those tags are in a sperate iphone view on the native app placed above the content view. The thought there was that we did not want to manipulate the feed contents by injecting extra data from one item node (i.e. title) into another item node (i.e. description).
That being said I see the confusion/problem and also see how that can now be confusing with the new CSS feature. We will have a fix/update by next week were we inject the data into the web view and give it ID's for JS/CSS access. I will post the tag information then.
Thanks for the feed back :)
@Nuerons Exactaly!
@AppMakr that answer is not sufficient. It shouldn't be that hard to figure out the complete answer. what tags are used to style the header, the pub date, a byline, etc. is the <p> tag used? basically, can you just show us the source code for an rss item within an AppMakr app? I don't know why you added this feature. It is very powerful but it remains useless without this information.
@AppMakr Support
What about item <title> and <pubDate>?
@Craig & @green
The structure of the feed content on the phone is identical to what it is in the feed. every thing in the <content>/<description> of the feed is is inserted into the <body> of the iphone view.
@ CL Yes: the view of the page on the phone is standard webkit and allows for all related CSS. For image sizes if you make the style:
img {width:100px}
the aspect ratio will be preserved relating to the un specififed height. You may also use max-width, and or % for width as some other options/ideas
Please check out sites like these to learn more:
http://www.w3schools.com/css/default.asp
http://qooxdoo.org/documentation/general/webkit_css_styles
+1 please post the html structure for the content as is so we know what selectors to use.
Can you post what the current html structure of the feeds is? It would be helpful to know, for example, if title are h1 or h2 tags, and what css selectors to use to modify the date info... perhaps you can just post a reference sheet somewhere...
Hi Leiser,
Is there a way to resize images that preserves the aspect ratio?
Thanks.
@ Corey -- try starting your URL with "browser" instead of "http", like so:
browser://www.google.com instead of http://www.google.com
@ Grant -- Adding the following CSS information below changes a basic text output (see attached plain text) in your iPhone view into a rounded corner list of floating modules for each paragraph tag (see attached rounded corners). Read more about CSS3 and web kit CSS.
p {
color:#333;background-color:#FFF;
border:1px solid #CCC;
margin:8px;margin-top:15px;
padding:8px;
-webkit-border-radius: 5px;
}
p a {color:#AAA;
font-weight:bold;
text-decoration:none;
border-bottom:1px dotted #CCC;}
img {max-width:300px;}
Any chance of putting some css and javascript example snippets up here somewhere?
Cool, Thanks for the update. Is there a way to tell a link to open in Safari Mobile instead of the built in browser? I have links that open up the App Store app and it doesn't work properly in the built-in browser.