It looks like its’ all working. I have used the random shortcode but the image is covering the text!
How can I fix this please?
]]>i’d very much like to use your plugin. Is it possible to use it with a given Oracle database? All the user accounts that need to login to my WP project are in that Oracle database, which is being maintained by some other Software out of the scope of this project.
I can query data from that Oracle database via PHP on the machine that will host the WP project, so i guess i could just write some script to match the salted WP password field entry with a password result that comes from the database. But i’d like your plugin to do the heavy lifting. Can it be customized to work with an Oracle database?
Thanks for your time,
Dom
I’m developing a webservice integrating Oracle Database to the WordPress Database, this code isn’t in the same wordpress server so I can’t use the wp_functions in general.
My code is pure SQL/PHP and i’m inserting posts with pure SQL queries, these posts have images that I scan a folder and insert them in the database.
I’m having trouble with the images metadata that I’ve insert previosly with pure SQL, in wordpress dashboard they apper with kind a noimage thumnail in Media section and I can’t regenerate the thumbnails.
The query I’m executing to include the metadata is:
"INSERT INTO wb_postmeta (post_id, meta_key, meta_value) VALUES ({$idPostImagens}, '_wp_attachment_metadata', 'a:5:{s:5:\"width\";i:{$imgWidth};s:6:\"height\";i:{$imgHeight};s:4:\"file\";s:24:\"produtos/{$SKU}/{$imgProduto}\";s:5:\"sizes\";a:20:{s:9:\"thumbnail\";a:4:{s:4:\"file\";s:17:\"{$filename}-150x150.{$fileExtension}\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:6:\"medium\";a:4:{s:4:\"file\";s:13:\"{$filename}-300x169.{$fileExtension}\";s:5:\"width\";i:300;s:6:\"height\";i:169;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:12:\"medium_large\";a:4:{s:4:\"file\";s:13:\"{$filename}-768x432.{$fileExtension}\";s:5:\"width\";i:768;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:14:\"post-thumbnail\";a:4:{s:4:\"file\";s:13:\"{$filename}-420x338.{$fileExtension}\";s:5:\"width\";i:420;s:6:\"height\";i:338;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:18:\"woostroid-thumb-xs\";a:4:{s:4:\"file\";s:11:\"{$filename}-81x65.{$fileExtension}\";s:5:\"width\";i:81;s:6:\"height\";i:65;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:17:\"woostroid-thumb-s\";a:4:{s:4:\"file\";s:13:\"{$filename}-150x150.{$fileExtension}\";s:5:\"width\";i:150;s:6:\"height\";i:150;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:22:\"woostroid-slider-thumb\";a:4:{s:4:\"file\";s:12:\"{$filename}-158x88.{$fileExtension}\";s:5:\"width\";i:158;s:6:\"height\";i:88;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:17:\"woostroid-thumb-m\";a:4:{s:4:\"file\";s:13:\"{$filename}-400x400.{$fileExtension}\";s:5:\"width\";i:400;s:6:\"height\";i:400;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:19:\"woostroid-thumb-m-2\";a:4:{s:4:\"file\";s:13:\"{$filename}-420x340.{$fileExtension}\";s:5:\"width\";i:420;s:6:\"height\";i:340;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:19:\"woostroid-thumb-m-3\";a:4:{s:4:\"file\";s:13:\"{$filename}-530x432.{$fileExtension}\";s:5:\"width\";i:530;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:23:\"woostroid-thumb-masonry\";a:4:{s:4:\"file\";s:13:\"{$filename}-420x236.{$fileExtension}\";s:5:\"width\";i:420;s:6:\"height\";i:236;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:19:\"woostroid-thumb-l-2\";a:4:{s:4:\"file\";s:13:\"{$filename}-768x315.{$fileExtension}\";s:5:\"width\";i:768;s:6:\"height\";i:315;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:23:\"woostroid-author-avatar\";a:4:{s:4:\"file\";s:13:\"{$filename}-190x190.{$fileExtension}\";s:5:\"width\";i:190;s:6:\"height\";i:190;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:32:\"woostroid-woo-cart-product-thumb\";a:4:{s:4:\"file\";s:13:\"{$filename}-191x237.{$fileExtension}\";s:5:\"width\";i:191;s:6:\"height\";i:237;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:41:\"woostroid-thumb-products-smart-box-widget\";a:4:{s:4:\"file\";s:13:\"{$filename}-317x393.{$fileExtension}\";s:5:\"width\";i:317;s:6:\"height\";i:393;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:36:\"woostroid-thumb-listing-line-product\";a:4:{s:4:\"file\";s:13:\"{$filename}-672x432.{$fileExtension}\";s:5:\"width\";i:672;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:32:\"woostroid-thumb-product-category\";a:4:{s:4:\"file\";s:13:\"{$filename}-436x432.{$fileExtension}\";s:5:\"width\";i:436;s:6:\"height\";i:432;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:21:\"woocommerce_thumbnail\";a:5:{s:4:\"file\";s:13:\"{$filename}-300x300.{$fileExtension}\";s:5:\"width\";i:300;s:6:\"height\";i:300;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";s:9:\"uncropped\";b:1;}s:18:\"woocommerce_single\";a:4:{s:4:\"file\";s:13:\"{$filename}-600x338.{$fileExtension}\";s:5:\"width\";i:600;s:6:\"height\";i:338;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:29:\"woocommerce_gallery_thumbnail\";a:4:{s:4:\"file\";s:13:\"{$filename}-317x393.{$fileExtension}\";s:5:\"width\";i:317;s:6:\"height\";i:393;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:12:\"shop_catalog\";a:4:{s:4:\"file\";s:13:\"{$filename}-300x300.{$fileExtension}\";s:5:\"width\";i:300;s:6:\"height\";i:300;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:11:\"shop_single\";a:4:{s:4:\"file\";s:13:\"{$filename}-600x338.{$fileExtension}\";s:5:\"width\";i:600;s:6:\"height\";i:338;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}s:14:\"shop_thumbnail\";a:4:{s:4:\"file\";s:13:\"{$filename}-317x393.{$fileExtension}\";s:5:\"width\";i:317;s:6:\"height\";i:393;s:9:\"mime-type\";s:10:\"{$imageMimeType}\";}}s:10:\"image_meta\";a:12:{s:8:\"aperture\";s:1:\"0\";s:6:\"credit\";s:0:\"\";s:6:\"camera\";s:0:\"\";s:7:\"caption\";s:0:\"\";s:17:\"created_timestamp\";s:1:\"0\";s:9:\"copyright\";s:0:\"\";s:12:\"focal_length\";s:1:\"0\";s:3:\"iso\";s:1:\"0\";s:13:\"shutter_speed\";s:1:\"0\";s:5:\"title\";s:0:\"\";s:11:\"orientation\";s:1:\"0\";s:8:\"keywords\";a:0:{}}}')"
Someone can help me? I’m stuck.
]]>Suddenly after this automatic update and/or in combination of migrating old followers from old blog, now my page https://www.sejustloveit.com will start to show you the static page plus it then adds the picture and title from a separate post on “STANDARD EDITION OPTIONS BUYABLE?”
Please can you tell me what is causing this issue, and how to fix this.
Thanks for your assistants
Ann
]]>is there a way to use a Oracle DB instead of MySQL?
I found old Topics discussing this, but WordPress improves and I’m wondering if this is now possible.
I found this code in an older topic, but I don’t know where to use it:
function MyOracleConnection ()
{
$conn = oci_connect('hr', 'tester', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
else {
echo '<p>Congrats: Oracle meets WordPress!</p>';
}
// Prepare the statement
$stid = oci_parse($conn, 'SELECT * FROM departments');
if (!$stid) {
$e = oci_error($conn);
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
// Perform the logic of the query
$r = oci_execute($stid);
if (!$r) {
$e = oci_error($stid);
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
// Fetch the results of the query
print "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
print "<tr>\n";
foreach ($row as $item) {
print " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "</td>\n";
}
print "</tr>\n";
}
print "</table>\n";
oci_free_statement($stid);
oci_close($conn);
}
]]>this function to make a connection, do a query and show the results (example uses the Resources schema that comes with Oracle Express):
function MyOracleConnection ()
{
$conn = oci_connect('hr', 'tester', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
else {
echo '<p>Congrats: Oracle meets WordPress!</p>';
}
// Prepare the statement
$stid = oci_parse($conn, 'SELECT * FROM departments');
if (!$stid) {
$e = oci_error($conn);
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
// Perform the logic of the query
$r = oci_execute($stid);
if (!$r) {
$e = oci_error($stid);
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
// Fetch the results of the query
print "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
print "<tr>\n";
foreach ($row as $item) {
print " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "?") . "</td>\n";
}
print "</tr>\n";
}
print "</table>\n";
oci_free_statement($stid);
oci_close($conn);
}
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]
You can then use this function in your WordPress template to do the magic.
You can read more about the use of OCI8 here:
https://php.net/manual/en/book.oci8.php