I am not sure if Wordpress has API to upload file but what I am looking for is very simple:
Context: I have another plugin that I need to modify so that user can upload file in the Admin area of that plugin
Solution:
1. Rewrite a new upload thru some specific path. This has nothing to do with Wordpress. I am fine doing this.
2. I prefer to use existing Media upload feature or some Wordpress upload API. I read this post but it was problematic because I want to change the text title of "Insert to Post" to "Finish Upload".
http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/
Can anyone help? Prefer to go with #2 but just need to change the text. How do I change it when it is a fanbox appearing when image button is clicked? And the "Insert to Post" doesn't come out until the image is done uploading. The issue is how to trigger a function to change that text when fancybox is shown and image uploading completed!!?
I put Post id into url and it solves problem
Related
My wordpress site is hosted on the openshift,and when I edit my site's code and push code to openshift,my file that upload to wordpress will be deleted,so I use some public image storage serves to save my image.But there are some function in wordpress must use the media library...So I want to add the image to the media library by url without upload..What should I do?thanks
p.s:I can edit the code of my wordpress site
Try some plugin like this one: https://wordpress.org/plugins/import-external-images/
It's the first i've found, i've never used it before, so look if there's something better.
I have looked high and low for this, but can't seem to find an answer... I have a wordpress site that used custom fields and can upload images to it and basic copy in a tinyMCE, but I was wondering if there's a way to have it so that a user could upload a background image to wordpress, and then have it appear on the site in the area that's designated?
I'm using Advanced Custom Fields to upload / edit fields.
One idea I have, is to have it so that a calls an absolute url that a user uploads stuff to... but the problem is that if a user uploads down the line, wordpress would change the url of where things are uploaded. For example, img src="october2013/backgroundimage", 2 months down the line it would be img src="december2013/backgroundimage".
Is there a way I can designate the url an image is uploaded to in wordpress?
Thanks
I found a solution to this! Just put it as a background image to the url.... like this:
<div style="background-image:url(<?php the_field('headerimagegraphic');?>); background-repeat: no-repeat;">
OK
I've actually spent 3 hours searching for how should I get images correctly on my drupal site so please don't get annoyed with this easy question. (sob...)
I want to upload an image to my front page as a button for redirecting to login page.
How CAN I achieve this?????I mean how should I store image as in Drupal and how can I get it in the position I want on the page???
I tried creating a content type called image and then created a View of block type but it doesn't seems correct to me.
What is the correct set of steps for storing and handling images in drupal??
Thanks
Create a block in your Drupal site and assign it to a region in the front page. Added the Image via PHP code there.
When clicking on images in my posts it takes me to the attachment post of the image. From there I have to click the image again to get the full size. Instead I want to go directly to the full size image in uploads. Is there a function that will do that?
In the Media Upload, if you choose "File URL", it will link to the full-sized image.
If you want this to be the default behavior, you can either by changing the options directly in the dashboard, or by adding some code to your theme.
To do it by changing the option in the dashboard, visit this link for instructions:
http://blog.aizatto.com/2010/05/04/changing-default-wordpress-media-link-url/
To do it by adding some code to your theme, check out this article:
http://andrewnorcross.com/tutorials/functions-file/stop-hyperlinking-images/
I have created a gallery in a WordPress post using WordPress's native media gallery and it shows me the images as gallery thumbnails in rows and columns which is exactly what I want.
But when I click on any of the thumbnail it opens the direct image link. I want that the image should be shown in my blogs environment. I would actually want it to show on the same page itself. but if not that I don't want it to open as a direct image. Is there a template file or something I could make for opening those images. I think image.php, but I have no idea how to go about it.
Help..?
Thanks
When you're inserting a gallery into your post, you can select how to link to the images. See screenshot: http://cl.ly/2yYA
Just select 'attachment page' and you'll get an individual page with commenting for that photo. Is that what you were looking for? You can edit the template of that page using attachment.php.