brad8985
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WPDB manager with secure site (https)any ideas?
Forum: Fixing WordPress
In reply to: Next / Previous Post PreviewThanks, worked great.
Forum: Fixing WordPress
In reply to: wpdb on a separate pageIts a processing page… as in the link or form submit (either) points to the processing page at which point the DB is updated and then the user is redirected to the page. Ajax is an option but as far as I know you still have the processing page setup in the same way.
Forum: Fixing WordPress
In reply to: wpdb on a separate pageYea I did fix that just pasted wrong code… Ah yes I will try a different command but I am concerned as to why the page is breaking with the code at the start and at the end. As soon as I delete those two chunks the variable echos fine…
Forum: Fixing WordPress
In reply to: wpdb on a separate pageOK. I have this…
<?php define('WP_USE_THEMES', false); require('../.././../wp-blog-header.php'); $id = $_GET["ID"]; $newvalue = $_GET["count"] + 1; echo $newvalue; global $wpdb; $wpdb->update( $wpdb->posts, array('likecount' => $newvalue) array( 'ID' => $id )); ?>
Note that the “echo $newvalue;” is just to make sure the variables are being passed correctly, which they are, but they do not echo unless I delete everything except for…
$id = $_GET["ID"]; $newvalue = $_GET["count"] + 1; echo $newvalue;
Forum: Fixing WordPress
In reply to: wpdb on a separate pageSorry the forum had a fit and double posted and I cannot delete so I am editing this post to read as this.
Forum: Fixing WordPress
In reply to: wpdb on a separate pageStill not working… even tried creating a custom page template so I KNOW everything is linked correctly but I am still not getting any results.
Forum: Fixing WordPress
In reply to: wpdb on a separate pageWould including the WP header files in the php page help?
Forum: Fixing WordPress
In reply to: wpdb on a separate pageThanks duck_boy. Still no luck. I don’t need both the post title AND the ID as I am only updating the “likecount”. So I only need the ID OR the post_title to identify the correct row.
Nevertheless I tried your sample and it unfortunately has not worked… not sure why.
The following does work when placed on the single.php template but as soon as I place it on a blank .php page that has been created purely for this purpose it does nothing…
<?php $id = $_GET["ID"]; $newvalue = $_GET["count"]; global $wpdb; $wpdb->query("UPDATE $wpdb->posts SET likecount=$newvalue WHERE ID='$id'"); ?>
Forum: Fixing WordPress
In reply to: wpdb on a separate pageThis is driving me crazy. The following code works on the single.php page but as soon as I put it on a static page it does not work…
<?php $id = $_GET["ID"]; $newvalue = $_GET["count"]; global $wpdb; $wpdb->query("UPDATE $wpdb->posts SET likecount=$newvalue WHERE ID='$id'"); ?>
I have checked the variables and they are fine. I also tried with static values instead of variables and no luck. What is changing when I move this code to a static page. I have used global $wpdb; which I thought was all that was needed to use this hook on a static page.
Forum: Fixing WordPress
In reply to: wpdb on a separate pagestill no luck. This is from a static page in my template folder if that helps.
Forum: Fixing WordPress
In reply to: wpdb on a separate pageThanks I will give it a go.
Seriously… this must be do-able?
How do you just display the full sized version rather than linking to it?
As the thumbnail version is cropped I need to display the full sized version so I can see the whole thing.
Forum: Fixing WordPress
In reply to: RSS only updates onceI have also checked for empty spaces at the end of my functions and config files as well as disabling plugins… still no different.