How can I hide certain services (like Facebook) in Filepicker.io? - filepicker.io

I'm building a business app and having Facebook, etc in the file dialog is not so cool. How can I hide it? I thought it might be possible with custom CSS and a "visibility: hidden" style , but the services don't have individual class names. Only other way is with nth child, but that would be very messy...
Thanks,
Graeme

You can specify it as an option:
filepicker.pick({services: ['DROPBOX','BOX',…]}, ....);
https://developers.filepicker.io/docs/web/#pick
or:
<input type="filepicker" data-fp-services="BOX,COMPUTER">
https://developers.filepicker.io/docs/web/#widgets-pick

Related

how to apply a custom css class on a magento 2 customer forget password page

i want to apply some css for a customer forget password page only like for title. if i apply any css then it reflects on all pages but i want to apply only on a single page. can some one guide pls?
I am using m2.3.5p1
thanks
The easiest way to achieve this is to look at the <body> of the specific page you want to modify. Every page's <body> has a unique class you can root your css selector to.
In case of the forgot password page, the body's class is customer-account-forgotpassword. So, in case of the page title, just add
body.customer-account-forgotpassword h1{
//yourstyle
}
to your _extend.less or wherever you manage your css.

Liferay Theme, show component only in welcome page

I'm editing a Liferay Theme. By editing the portal_normal.vm, I want to conditionally show or hide a component
#if ($is_welcome_page)
<span class="lang">
$taglibLiferay.language("fm",null,"languageId",1)
<br>
<div class="my-menu">
...... lots of irrelevant stuff here
</div>
</span>
#end>
How can I make that $is_welcome_page variable become true only if the current page is the Portal's Welcome page ?
I guess I could get the friendly Url and check it, but I'm not sure how I can do that. Any working code would be much appreciated!
Edit: using Liferay 6.1.0 if that helps
Generally customising themes per-page is a bad practice (theme should be global or customized for a specific site). To do it correctly, you should just add language portlet on your main site instead of hardcoding it within a theme template.
Anyway, if you really want to do it, you have access to the layout object (directly or via $layout = $theme.getLayout()), which in Liferay is a representation of a page (for example it has getFriendlyURL() method). Check Liferay Wiki for the list of all variables accessible from Velocity, there are lots of others properties you could use, for example the_title.
This is a theme customization, so a good practice is to put all custom settings within Theme Settings. You can read how to do it in Liferay's documentation.
I did it, thanx to #Krzysztof Gołębiowski
#set($testPageName = $theme.getLayout().getFriendlyURL())
#set($layout = $theme.getLayout())
#set($currPageName = $layout.getFriendlyURL())
#set($isWelcomPage = $currPageName == "/home")
#if ($isWelcomPage)
<span class="lang">
$taglibLiferay.language("fm",null,"languageId",1)
<br>
#end

Add Tumblr Like Button to non-Tumblr Page?

Is it possible to add a button like the nice one done by ThinkingStiff in the example here ?
That one is designed to be used on Tumblr pages. I'd like to get the same functionality on a page that is outside of Tumblr.
Yes, I already have a method to get the {ReblogURL} and the {PostID} values it needs.
Thanks for your help!
Ah, solved myself. Just replace {ReblogURL} and {PostID} in original code:
<div class="my-like" data-reblog="{ReblogURL}" data-id="{PostID}" title="Like"></div>
with the new vars (from whichever method you use to get them) and replace that div.
Example:
<div class="my-like" data-reblog="3Pbn6aNA" data-id="12345678901" title="Like"></div>
Note: Those vars are not a live Tumblr post.

Opening URI in overlay, not main page

On my page, overlays are loaded by inserting their content with jQuery and then fading in.
What I want to do is this:
When you click to open an overlay, an URI is loaded (e.g. news/12, where news is the category and 12 is the id of the item to load).
Except, instead of loading it in body, it should be loaded in the overlay.
In other words, I want to achieve something like on facebook, where you open an overlay, the url changes, but the main page stays the same.
I'm guessing you need ajax for this, but I have no idea whatsoever how to do it.
Thanks
It sounds like you want to use the new history.pushState(...) and history.popState(...) browser API.
This SO post might help you out: Change the URL in the browser without loading the new page using JavaScript
Use Boxy. See http://onehackoranother.com/projects/jquery/boxy/tests.html#
AJAX example:
<a href='#' onclick='Boxy.load("test-1.html");'>Test 1</a>
See this question: Ajax - How to change URL by content
I solved it thanks to Lethargy's answer.
.pushState() is exactly what I need to have the URL reflect the contents of the overlay that is dynamically created with jQuery.
With some tweaking around and debugging I managed to get it all working.
Now my overlays (or popups, dialogs, whatever) are search engine ready, and the url is copy-pastable for users :)

Clean AddThis / Facebook Like / Recommend Button without Social Text?

I've been desperately seeking a way to disable the facebook social text right next to the "Recommend" button. Is it possible, to simply render a "Recommend" button, without anything else (no counter, no text, JUST the button)?
The problem is, CSS wont be applied since all the elements are inside the iframe, so I cant just hide the element itself using CSS (which in this case would be a td).
Also, I cant just put everything in a div and give it overflow:hidden and a fix width, since the pop up which appears when actually clicking the "Recommend" Button would then not be fully visible.
My current implementation comes via AddThis:
<a class="addthis_button_facebook_like" fb:like:size="small" fb:like:layout="none" fb:like:action="recommend" fb:like:width="10"></a>
Any ideas?
Thanks
Alex
Facebook polcy IV 4 d:
You must not obscure or cover elements of our social plugins, such as the Like button or Like box plugin.
So if you can't do it by using their like button creation tool you shouldn't do it.
Using the Add This Facebook Like button you can avoid the count using this attribute
fb:like:layout="button"
So in your case you would have
<a class="addthis_button_facebook_like" fb:like:size="small" fb:like:layout="button" fb:like:action="recommend" ></a>
"Recommend" with a counter comes closest to your request. I too don't like the social text (e.g. "57 people like this. Be the first of your friends"), yet I do like the naked counter. The code that I use is:
<a class="addthis_button_facebook_like" fb:like:layout="button_count" fb:like:action="recommend" fb:like:width="135"></a>
See AddThis own documentation here.