Customize wordpress media uploader button text - plugins

I've been working on a simple little plugin and needed an image loader. I wanted to use the default Wordpress one so it could access the library, that was all pretty simple. All I need is the ability to select an image, nothing else is wanted.
I've managed to remove the unwanted inputs using the attachment_fields_to_edit filter, and the unwanted gallery tab with the media_upload_tabs filter, but what I can't seem to be able to remove is the other stuff on the page, Specifically I'm talking about the "Use as featured image" link and the "Save all changes" button. I'd also really like to change the button text from "Insert into Post" to something more appropriate to what the plugin is actually doing.
I've googled and dug through the WP files but didn't see anything that would let me actually change that (while I'd prefer something gracefull I'd take a simple html filter before it sends the uploader output to the browser and use regular expressions to get the job done at this rate). Best I've been able to do is remove the "Inser into Post" line of options, which isn't very helpful as then there is no wat to actually select the image.
Has anybody done this before? I'm surprised theres not a simple hook that lets you change those (or that I couldn't find a hook if there is one).

Have a look at http://shibashake.com/wordpress-theme/how-to-hook-into-the-media-upload-popup-interface and section "4. Set Our Own Action". That seems to be exactly what you're after.

Related

Rainloop - How to access DKIM and other header information in the Message View

I have a heavily modified Rainloop install. Figured out a lot of ways to modify it, but having the following issue:
Rainloop shows a DKIM signature indicator (with it's own interpretation) as a green checkmark.
If you hover your mouse pointer over it (when shown), it will show a "tool-tip" of the text in that header.
The problem here is, on mobile you can't "hover", generally speaking. How can I access the header data via JS, or how can I talk to the element for the "tool-tip" for the DKIM header info so I can put a click-listener on the indicator?
It's nice they show it on the mouse-over, but I can't seem to find any way to reference it.
In addition, it would be really grand to show that info in the "info" expandable box.
This is all pertaining to the Message View in Rainloop specifically.
Really nice program. But there is no documentation on their API.
Anyone have ideas on this? I can't seem to get a handle on it through devtools.
If I could just get a solid CSS selector to reference it by that would be grand.
All I seem to be coming up with on searches are similar expressions.
Hoping maybe someone on Stack might have found a clue on this, because DKIM is important, and ordinary users need simple indications as to trust.
This is something to help other people, not just me, so if anyone has a way can you share?
Okay. So right after I posted, I did find it. Not sure how I missed it before, but the dkim results header data can be found in the "dkim icon"'s title attribute-- the "icon" is an tag (rainloop hijacks the tag as UTF8 icon containers).
So the tooltip apparently is an actual tooltip, whereas I thought it was something like a hidden div being shown on a mouse-over.
I wonder if there is a way to get it to show on a click instead of a hover (preferably using CSS).

confluence display content by user

I am trying to get specific content on a confluence cloud wiki to display content based on a specific user. The scenario here is that there are links on a page but only 1 should display, the one that displays is based on whom ever is logged in.
I have been told how a macro is the way forward, but I have read the documentation and I am at a loss. I do not understand what I have to do or how to write a confluence macro. could someone help me out with either an example or some links? I have searched like crazy, but maybe i am not asking the right questions but hopfully you can all help me out?
There's a plugin for this:
https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility
But I'm not sure how thoroughly it hides the content. It might still be visible if users view the page source. If you're trying to hide content which needs to be really protected, you'll probably need to do something else.
Depending on how many users are going to be using the page, you could also just make separate spaces for them, add the permissions to those spaces, and then use a page-include on your "main" page to display the content. If they don't have access it shouldn't show up. You might experience some formatting issues with that solution, however.
Finally, you could grab the username with jquery and display stuff based on that. This solution will be pretty easy if you are familiar with javascript/jquery.
Edit: Here are some helpful resources on how to use javascript and jquery within confluence:
https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence
https://developer.atlassian.com/confdev/confluence-plugin-guide/writing-confluence-plugins/including-javascript-and-css-resources

Facebook like generated button saying share instead

I'm developing an app and I noticed that on Chrome, their like button code generates a button that says share. If I choose the other option (recommend) it does indeed say recommend. On Firefox oddly it still says like and recommend. Personally, I'd like it to say like which is why I'm posting. Is there perhaps there is an undocumented change/method to get it to say like now.
Are you trying to make it say "like" instead of "share"? If so, you just need to find and replace the word "share" with the word "like".

change text button of the dialog request component

Considering the component (http://developers.facebook.com/docs/reference/dialogs/requests/), I would like know how to change the text of your button. I would like replace the "SEND REQUEST" to just "SEND".
Thanks.
Just a note: http://developers.facebook.com/policy/ states:
IV. Application Integration Points
4 Platform integrations, including social plugins:
d. You must not obscure or cover elements of our social plugins,
such as the Like button or Like box plugin.
Which I think applies to that button as well. There is a discussion over the like button here:
http://forum.developers.facebook.net/viewtopic.php?id=81844
that probably applies to this question. Other than that, with fbml and fbjs, there was a way to change it, but facebook is deprecating them soon, so it won't even be worth trying using that. I think the only way to go would be to try and get a hold of facebook and make a request to change it, but seeing as how they are always changing things, not sure how that's going to work. If you have an argument as to why, they might listen.
http://developers.facebook.com/docs/reference/fbml/
http://developers.facebook.com/docs/fbjs/

create hyperlink in sms in iPhone

Is it possible to create a hyperlink in an sms in an iPhone?
For example, if I want the word 'foo' hyperlinked in HTML then I'll write foo in a normal situation.
If I want to have a certain word in my sms to be hyperlinked to something, is there any way I can do this? Like "I have a surprise for you" and the receiver taps on the hyperlinked word 'surprise' which will take the user to the destined page.
Any suggestions as to how this can be done? Examples and samples welcome!
Thanks in advance :)
No, you cannot use html tags in sms / text messages. All you can do is insert the URL without the tag. It then depends on the receivers device whether the URL is presented to the user as link or as plain text.
I experimented with exactly this just yesterday. It seems you can't include a nicely formatted hyperlink, unfortunately. I hope to be proven wrong by somebody else, though :-)
However, as you've probably seen yourself, iPhone is able to recognize an URL and you can tap on it to open the URL in Safari (or tap the disclosure button next the message to get more options on what to do with the URL). As far as I can tell the only thing you can do is format your SMS accordingly: "I have a surprise for you: http://foo.com" even though that might spoil the surprise ;-)
No, you can't do this due to privacy issues. Apple thinks that giving you this ability would allow you to link users to malware and such. Sorry!
i don't think it's possible to create hyperlinks in SMS.
The only way is to send an URL, and the iPhone will convert it to a link...
Use a tiny url from tinyurl.
It doesn't allow you to do exactly what you are wanting but it at least can be used to cover up the long link.
This is the closest thing I figure out to do. I was wanting to use the "
No, you can not do this. However you could use tinyurl and format it like this
http://whateverYouWantToSay#tinyurl.com
Web browsers usually ignore anything before an # therefore you could effectively hide the actual site being linked to, as long as your friend does not know that.
What actually happens is the data before the # is submitted to the web site in the form username:password. However it must be a site that requires authentication to access, or the site will normally just ignore it.
If this helps, I've noticed that a custom hyperlink is possible on the OS X Messages app, but they have to be copied and pasted. To replicate this right click on a hyperlink in your browser and hit copy link. Then paste into Messages.
Uhhh this is possible here is a screenshot of an example - I copied a link from email and pasted in a new SMS - though it appears you cannot type html to create a link....