Tumblr Photoset not working - tumblr

The theme I've chosen has decided to reduce photosets to the first frame, instead of giving the full photoset. I want a consolidated photoset shown on my page, instead of the first, single. I have no idea how to do this. I've tried looking on here, using this:
{block:Photoset}
{block:Photos}
<img src="{PhotoURL-500}" class="photoset-img" />
{/block:Photos}
{/block:Photoset}
It worked, sort of. All the photos of the set were there, but they were large and connected together. The images in the photoset are now stacked vertically atop one another instead of side by side and are taking up a lot of space.

The theme block / variable below will generate an iframe containing the images, laid out, as they were set on the dashboard.
{block:Photoset}
{Photoset-500}
{/block:Photoset}

Related

How can I use a Tumblr photoset with the Twitter gallery card?

I'm trying to use Twitter's gallery card to show off a Tumblr photoset. This is the relvant portion of the code, and everything validates just fine with Twitter:
{block:Photoset}
<meta name="twitter:card" content="gallery">
{block:Photos}<meta name="twitter:image" content="{PhotoURL-500}"/>{/block:Photos}
{block:Photos}<meta name="twitter:image0" content="{PhotoURL-500}"/>{/block:Photos}
{block:Photos}<meta name="twitter:image1" content="{PhotoURL-500}"/>{/block:Photos}
{block:Photos}<meta name="twitter:image2" content="{PhotoURL-500}"/>{/block:Photos}
{block:Photos}<meta name="twitter:image3" content="{PhotoURL-500}"/>{/block:Photos}
{block:Caption}<meta name="twitter:title" content="Photo Gallery"/>{/block:Caption}
{/block:Photoset}
However, if you look closely you may see my problem. I can't figure out how to get unique URLs to each image. {PhotoURL-500} always just returns the same image. According to my apparently incorrect reading of the Tumblr docs (http://www.tumblr.com/docs/en/custom_themes#photoset-posts) it seems like {block:Photos} within {block:Photoset} should cycle through.
What am I missing?
Also - yes, I'm aware I've hard coded the content for twitter:Title.
It isn't possible as of right now.
The issue is that {block:Photos} will iterate over each photo and render the markup inside that tag, but you can't manually control that to pinpoint a single photo.
What your code is doing is that for each photo it renders the Twitter markup 4 times; it wouldn't be a problem if Twitter accepted multiple images without requiring them to be explicitly declared like image0, image1, etc like OpenGraph does (what you want is possible with OpenGraph, just put a single meta tag in a Photos block and it'll be rendered for each photo), but looking at how Twitter is being more and more hostile towards developers leaves little hope for a fix on their side.

frame doesn't work in gwt app

i have gwt app, and one of the 'page'(or display) has a iframe whose url point to google web page, however when deploy the app, google page doesn't show up. here is the code
<g:HTMLPanel styleName="{style.ctntBox}">
<div id="contactForm">
<g:Frame url="http://www.google.com/"></g:Frame>
</div></g:HTMLPanel>
if i replace the google webpage with a static image stored locally, it show up fine:
<g:HTMLPanel styleName="{style.ctntBox}">
<div id="contactForm">
<g:Image url="img/myImg.jpg"></g:Image>
</div>
</g:HTMLPanel>
can anyone tell me why it won't work with external link? Thanks
Answered on the GWT group: https://groups.google.com/d/msg/google-web-toolkit/nwlTBBVGJSA/pho1SVeviQEJ
Copied here for convenience:
Google refuses to be displayed in a frame using the X-Frame-Options HTTP header.
See http://code.google.com/p/google-web-toolkit/issues/detail?id=7055
The code you provided creates the UI, including the frame, just fine. The thing you're not doing is setting a height and width for your frame, so it's effectively invisible. Change your code to the following and you'll see your frame.
<g:HTMLPanel styleName="{style.ctntBox}">
<div id="contactForm">
<g:Frame url="http://www.google.com/" height="150px" width="150px" />
</div></g:HTMLPanel>
The reason you didn't have to specify the height and width for an image is because they are implicitly defined by the image itself. There's no way for GWT to know how big you want an iframe to render on your page, so you have to explicitly set the size.

Question on fluid layout

I am designing a fluid layout and am thinking on the right approach to code the layout ..Below is the structure which i am thinking;
<body>
<div id=container>
<div id=col1></div>
<div id=col2></div>
</div>
</body>
For the CSS, I am thinking of coding the container as {width:90%;margin:0 auto;overflow:hidden}
For the 2 cols, they would be floated left with some % widths..
As you can see, since i want a fluid layout, i am not using px value anywhere..
My other requirements are;
1 It should adjust based on viewport automatically e.g. Same html page when viewed on desktop or iPad (to some extent mobile phone) should adjust proportionally with respect to viewport..
2 It shoukd be compatible across most of the desktop browsers and iPad with easily extensible in future for other tablets..
3 The page should appear center aligned (not sure if There would be enough space for this on iPad)
Pleasepoint any issues you may think can Be caused by the above structure or css..
Please suggest if my HTML and CSS code (specially the container) are coded correctly..I am a bit aprehensive about getting this right, as the same is going to be applied to almost 500+ htmls...So woukd not want to get into any kind of major issues at a later stage..
Please suggest as many ideas..I am open to all of them..
Thank you..
You could do that quite easily in terms of it being flexible:
(I have left the styles inline because i'm lazy right now!)
<div id="container" style="width:90%; margin:0 auto; overflow:hidden">
<div id="col1" style="float:left; width:50%; background:#f90">COLUMN1</div>
<div id="col2" style="float:left; width:50%; background:#f00">COLUMN2</div>
</div>
The 90% width on the container with be 90% of the viewport. The columns will be 50% of the calculated 90% width whatever that may be.
I would use masterpages or similar so if you did indeed need to change things around you would have to apply it across each html page :)
Also although the columns will be fluid your content could determine minimum widths - e.g. if you have an image in one column that is 500px wide then the minimum width of that column will be 500px when resized and might cause you issues. In short you need to consider the type of content you will have of the site and how that could potentially affect layout.

uiwebview wrap problem with long words

i have a webview in my application and it works fine. it fits horizontolly (not scrolls) and scrolls vertically. but any word which is longer than 320 pixel makes it scrolls horizantally and makes the font larger. i don't would like horizontal scroll. i would like it to be continued in new line. how can i do?
thanks.
The problem you have is actually not related to the UIWebView in itself. What the web view does is just display any html you provide. This means that you have to format the html to do as you want. One way to accomplish that is to use a div as follows.
<div style="width: 320px; word-wrap: break-word">
text with looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongword goes here
</div>
Caveat: I don't know very much about html and css so there might be better ways of accomplishing this.

facebook like box stream height

How to control the facebook like box stream part height alone. Its normal to reduce height of whole box but if tries to control it fans images are not shown.
The css .fan_box .page_stream{ ...,width:300px} to .fan_box .page_stream{...,width:150px}
i'm asking because the stream box inside iframe
There isn't a way to change the height. Facebook doesn't provide a way to change the height and there isn't a way to change the height using JavaScript and CSS.
Why can't I do it with JavaScript and CSS?
CSS just doesn't apply through an iFrame because thats how an iFrame works -- its basically a window to another page with its own CSS.
Javascript won't allow you to access the content of an iFrame if the URL of the iFrame is different than the page that contains the iFrame. Doing:
document.getElementById('iframeID').contentWindow.document
Will give you the following warning in Chrome.
Unsafe JavaScript attempt to access frame with URL... Domains, protocols and ports must match.
The reason for this is to prevent XSS. Here's more on the Same Origin Policy.
I saw this on the Like Box page and figured I'd respond that you can use the 'data-height' attribute:
data-height="250"
Worked for me. Here's my example:
http://www.skonet.com/Resources/Articles/Index.aspx
you can reduce the height of the encasing div, hide its overflow and if you want push the top of it underneath an absolutely positioned element with a higher z-index like so:
<div style="position:absolute;z-index:2;top:0;left:0;width:300px;height:130px;background-color:#c0c;opacity:0.5;filter:alpha(opacity=50);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";"></div>
<div style="height:140px;width:140px;overflow:hidden;background-color:#0c0; margin-top: 60px;color: #fff;padding: 30px;font-family:arial;">
facebook like box goes here - only the green part will be visible if you make the pink box white and take out the 0.5 opacity and the bottom will get cut off so you can just display whatever part you want
</div>
I suppose you guys still need it and this is the most acurate trick I can provide and its also promising to work with the every day changing of the facebook like box by facebook.
Its a bit tricky but will work for you guys..
create two seprate like box of the same page, and close them in seprate div right in my case
<div class="up1">
facbook like box 1 code
<div class="up2">
facbook like box 2 code
Now in the css
use position absolute to class up1
.up1 {
position:absolute;
z-index:99999;
background-color:white;
}
and in up2
.up2 {
padding-top:87px;
}
What it does it will put the box 1 over the box 2 hiding its facebook like and bla bla making it feel like you have one box that contain picture and streaming of your desired lenght
I was looking around cos I had a problem like this one. Facebook has no standard way of customizing the stream if the faces and header are checked.
The solution is to take them differently. If you need the stream as long as 1000px, just uncheck everything except the stream. This will change its height from the default 300px to whatever value you type in the height field.
See an example below:
<div class="fb-like-box" data-href="https://www.facebook.com/MadeinHeavenEvents" data-width="800" data-height="2000" data-colorscheme="light" data-show-faces="false" data-header="false" data-stream="true" data-show-border="true"></div>
Then if you still need the one with faces, get a new code and set the height differently, then uncheck the others. Below is an example:
<div class="fb-like-box" data-href="https://www.facebook.com/MadeinHeavenEvents" data-width="800" data-height="500" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
Don't forget to add the SDK before these codes.
I know it's a long time since this was posted, but here is the solution that helped me today
Yes the data-height to 250 will work as it reduce the outside iframe
Now try to set data-height to 1000 - it is still 300px height,
because the inner div inside the iframe hard coded to 300px and
you can not control that as it is in a cross domain iframe...
<div class="fb-like-box" data-href="http://www.facebook.com/example" data-width="292" data-height="250" data-show-faces="true" data-stream="false" data-header="false"></div>
Adjust the height in this code to what works best for you.