valchy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to add image to a postI wrote some code:
include "wp-includes/plugin.php"; include "wp-admin/includes/media.php"; include "wp-admin/includes/file.php"; $file = "http://image_address/Rock_of_Ages_2012.jpg"; $post_id = 1; $desc = "testare upload"; media_sideload_image($file, $post_id, $desc);but I get this error:
Fatal error: Call to undefined function __() in C:\xampp\htdocs\wp-admin\includes\file.php on line 11
Forum: Fixing WordPress
In reply to: How to add image to a postI try to write a php code to create posts from outside wordpress admin panel, so I need to add an image to the media library. I keep trying to figure out how but I haven’t managed to find something that I want.
I’m trying something like this:
1. download the image from the source website (curl) – done.
now, the image is on the folder “wp-content/2012/07/” and the name of the image is image.jpg.
2. what I need now is the php code to enter this image in the media library so it can be seen from the admin panel.
i know i need to create an array with the image data and insert it into the database but I don’t know how. I’m not an expert in php …Forum: Fixing WordPress
In reply to: HELP with this pleaseWhen you write a new post, above the zone where you write you see some buttons “b” “i” “link” “b-quote” … There is a button with the “more” text on it.
Forum: Fixing WordPress
In reply to: HELP with this pleaseThe message shown on your post I think that depends on the wordpress theme.
Forum: Fixing WordPress
In reply to: HELP with this pleaseJust place the cursor where you want the text of your post to stop showing and click the “more” button on the buttons line.
Forum: Fixing WordPress
In reply to: How to add image to a posti know that. I need a small code to create image metadata. Something like:
include file.php
metadata (var1,var2,var3);
…Forum: Fixing WordPress
In reply to: Php guidance with theme optionsWhat exactly do you need to change? Usually the theme has it’s own options and can be setted directly from the admin panel.
Forum: Fixing WordPress
In reply to: LOGIN PROBLEMIt may be from your webhost which doesn’t respond right or your website may be hacked and is redirecting you to something else. If you have a fresh backup of the entire site try to restore it. It takes only few minutes to do this.
Forum: Fixing WordPress
In reply to: Write posts with ENTER press with codeOk. I’ve solved it. Thank you very much.
Forum: Fixing WordPress
In reply to: Write posts with ENTER press with codeCan this be done when using a variable instead of the exact text?
I mean:
$sql = "INSERT INTO mytable (myfield) VALUES ('$article');How $article can be made?
Forum: Fixing WordPress
In reply to: Write posts with ENTER press with codeOk. Thank you very much.
Forum: Fixing WordPress
In reply to: Write posts with ENTER press with codeI want to insert a new post with my own script outside wordpress that looks like the example above.
Forum: Fixing WordPress
In reply to: Write posts with ENTER press with codeI don’t know if I said everything right:
What I meant is:
my post text looks like this:main body post
this is the blank line
rest of the body post.In the edit.php from admin post I obtain this blank line by pressing ENTER. Inside mysql on the field wp-post the text looks exactly the same (I mean no /n or something like this).
The text post looks like this:main body text
rest of the body post.
How can I do this? I mean to insert into mysql the text this way?
Thank you again.Forum: Fixing WordPress
In reply to: Write posts with ENTER press with codeThank you for the answer. This “apply_filters()” is a stand-alone function or shhould I get it from wordpress? Because if I’m outside of admin panel I cannot use it.