w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Facebook meta property doesn't work
The Facebook crawler does cache everything he comes along. But I think you can override its cached data when using their debugger: https://developers.facebook.com/tools/debug

Categories : HTML

Get Custom Post's Post Id By URL doesn't work
You probably have to build your own query, so then you can use the following code: /* A custom Query (without global var) */ $query2 = new WP_Query( $args2 ); // looping through the query2 result, you may use some other code while( $query2->have_posts() ) { $query2->next_post();//here your next post is set echo '<li>' . get_the_title( $query2->post->ID ) . '</li>'; } // Restore original Post Data wp_reset_postdata(); //do not forget this line! This example code is taken from http://codex.wordpress.org/Class_Reference/WP_Query where you can find other examples and custom queries. Read especially this part of the page: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters, I think, it solves your problem.

Categories : Wordpress

TTS Engine Post to Speech doesn't work
Since it's a PHP Plugin, you can't reload it without refreshing. PHP runs at server side. However, you can examine the code of the plugin, understand how it works and make an AJAX call to a webpage that will load the plugin and return speech file (or however it works..) and load it to the page. Bottom line, you won't be able to do it without some custom coding. (assuming you talked about this plugin, as it's documentation doesn't state anything about ajax reloading.

Categories : PHP

register post type doesn't work
_cpCreateCustomPostType() needs to run on every request; not just when you activate the plugin. Hook into the init hook, or whichever hook is commonly used register custom post types.

Categories : PHP

GM_xmlHttpRequest POST doesn't work in event listener
The original idea is correct. However, you need to add a couple of things. Add the @run-at document-start meta, so that the loggin started prior to any ajax requests are sent by the page. You need to manipulate with XMLHttpRequest in the actual window scope (unsafeWindow) rather than in the sandbox. So the resulting code is: // ==UserScript== // @run-at document-start // @grant unsafeWindow // ==/UserScript== var unsafe = unsafeWindow; ... // keep your ajax queue code here var oldOpen = unsafe.XMLHttpRequest.prototype.open; unsafe.XMLHttpRequest.prototype.open = function(method, url, async, user, pass) { this.addEventListener("readystatechange", function() { if(this.readyState == 4) { alert(this.responseText); envoiData(this.responseText

Categories : Javascript

jquery ajax post json doesn't work in ie8
I hope you've resolved the issue. In case any other people hit this question, I'll provide an answer. You can you use EasyXDM ( http://easyxdm.net ) for you cross domain posts. It can be a little bit tricky to set up, but works a charm.

Categories : Jquery

JQuery doesn't work with components loaded by $.post()
The elements don't exist when your ready function fires. You need to use a delegate instead, as it allows binding to objects created after the handler is registered. $("#divCentral").on("click", "select", function() { alert("INPUT CLICK"); }); .on() | jQuery API Documentation

Categories : PHP

Facebook Graph API Notifcations POST Doesn't Work
Don't use the user-access token while making the call. (Since you can set the access token parameter only once, i.e. the App's token) Since you are not using the user's token, use the user id instead of me while making the call. /ID/notifications

Categories : Facebook

Post object, status_type property doesn't work?
status_type is set automatically. You can't set it yourself. In the case of the manual post, you added a photo. To do that in the API, you have to query /PROFILE_ID/photos. What you did through the API most probably is a post with a link, with the use of /PROFILE_ID/post with the link field filled. Hence, Daniel & Co shared a link. That's why it doesn't look the same. Some help for you to succeed at posting a photo: How-To: Use the Graph API to Upload Photos to a user’s profile Adding Photos to Stories Disable grouping of photos on the timeline Also note that you won't be able to post a photo with the link to image which is hosted on Facebook.

Categories : Facebook

ASP.NET MVC Model binding doesn't work with AJAX GET but works with Post
First, just to clear up misconceptions, POST doesn't mean change, necessarily. It's perfectly valid to request via POST when accessing a "function", for lack of a better word. For example: # Request POST /add-xy { "x": 2, "y": 2 } # Response 200 OK 4 Nothing has "changed", but POST is still the most appropriate HTTP verb. That said, there's a fundamental difference between GET and POST requests, namely the concept of a POST "body". A POST body can have a content type and therefore can be interpreted properly on the server-side as JSON, XML, etc. With GET, all you have is a querystring, which is just simply a string. The problem you're having is that with GET, the filter "object" is just a string, and since a string does not implement IFilter the modelbinder can't bind it. However, vi

Categories : Asp Net Mvc

Google BigQuery API doesn't work with http post request
I'm not familiar with the guts of the authorization headers, but I'm not sure you're passing the OAuth token correctly. When you run the bq client, it turns the OAUth2 refresh token into an access token and passes that to the service. If you pass the raw refresh token, this is not acceptable for api access without turning it into a short-lived access token, as far as I know. Is there a reason you don't want to use the BigQuery java client? (javadoc for the query call here, the bigquery docs for query with java samples are here. )

Categories : Http

Header location doesn't work after post mail form
Try to add this line on the top of your php script: error_reporting(E_ALL); //it will show all errors Then you will see on the screen or in the php error log what is wrong. I bet that you will see: Warning: Cannot modify header information - headers already sent by ... etc. If it is your problem, read this to correct the problem: Headers already sent by PHP In the other case, please post the error message to better analyze your problem. T. B.

Categories : PHP

Get request doesn't work inside a Form with post method
To test, try using this on your href line to: <a id="1" href="{{ URL::to('admin/delete', array(1)) }}" onclick="return confirm('Are you sure you wish to delete?');"> It's just to make sure your view will render as it should. If it works you can get your previous code back, because your problem is in the controller that renders this particular view. You should have something like this there for it to work: class UrlController extends Controller { public function getDeleteUrl($id) { $url = URL::find($id); return View::make('View')->with('url', $url); } } Look, as you didn't posted your controller, I'm assuming you have a model called URL, if you don't, you should edit the code to support your model names. I'm also assumin

Categories : HTML

Sending HTTP POST request via HttpURLConnection in Java doesn't work
Thanks William, Updating the answer for everyone's reference: As per William's answer: Switch urlConnection.setRequestProperty("Content-Length", "" + queryString.length()); to ((HttpURLConnection) urlConnection).setFixedLengthStreamingMode(queryString.length()); That resolved the issue.

Categories : Java

Inserting data into MySQL using http-post and AsyncTask doesn't work
You got an error in the PHP: '$house must be '$house' Java code tested and working I just changed it a little bit import android.os.Bundle; import android.app.Activity; import java.util.ArrayList; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import android.os.AsyncTask; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; public class OrderSummary extends Activity { String streetValue; String numberValue; String cityValue; String

Categories : Java

Rails 3.2.13 link_to post request doesn't work links to the index page instead
It's confusing, you should take things one by one. First, I don't understand why you add this tag <%= javascript_include_tag :defaults %>. Normally you should have in you layout/application.html.rb file a line that look like this <%= javascript_include_tag :application %>. This line is the inclusion of your JS manifest and in a default configuration it should be enough. You can read more about assets pipeline and JS manifests in Rails guides (see links bellow) Second, about your link, I suggest this syntax instead: <%= link_to(line_items_path(product), :method => :post) do %> <%= image_tag(product.image_url) %> <% end %> As you can see I moved image_tag in a block, its much easier to read. Also line_items_path should work by passing directly the prod

Categories : Ruby On Rails

how can i store data from jQuery.post to a local variable so that i can work with it?
Do the following - this.formsValidation = function(form_id) { var fieldNames; jQuery.post('index.php','option=com_itcs_forms&controller=itcs_fields&task=getFieldsNameForValidation&tmpl=component&form_id='+form_id, function(data) { fieldNames = data; alert(fieldNames); }); return false; }

Categories : Javascript

Magento. Register variable doesn't work
This doesn't work because the Magento registry is not persistent on page load. And changing from CartController (/checkout/cart/) to OnepageController (/checkout/onepage/) means reloading the page so your g_addressType is not kept between the two. A better thing to do would be to use session like this : Mage::getSingleton('checkout/session')->setGAddressType($addressType) in CartController.php then Mage::getSingleton('checkout/session')->getGAddressType() in OnepageController.php Last reminder though: please make sure not to code this in Core Magento files. Please extend existing core classes.

Categories : Magento

The variable doesn't work as a global var in jquery
The problem is you made Counter a new local variable and since you are using a type that is passed by value, it will not make changes to the global variable. $.fn.ChangePic = function (Counter) { <-- Declaring Counter here makes it a local variable MAX_numberOF_Images=3; if (Counter > MAX_numberOF_Images) { Counter = 1; <-- setting local variable, not global } this.css("background-image", "url(" + 'Images/' + Counter + '.jpg' + ")"); } The fix is do not pass in counter. Since it is global, the method ChangePic can read it.

Categories : Javascript

Expansion of a variable in a regex pattern doesn't work
In PowerShell strings have to be in double quotes (") for variable substitution. Single quoted (') strings do not perform variable substitution. In your script (in which I suggest you indent the content of code blocks to make the structure easier to follow): $replace_regex = '"$filedate" $_' where the string is single quoted, so no variable substitution. This can be fixed by remembering the back-quote (`) character can be used to escape double quotes embedded in a double quoted string: $replace_regex = "`"$filedate`" $_" But remember: $ is a regex meta-character, so if you want to include a $ in a regex in double quotes it will need to be escaped to avoid PSH treating it as the start of the variable name. Any regex meta-characters in the variable will have their regex meaning

Categories : Regex

Listbox ScrollIntoView doesn't work for variable height items
I think I have found the problem. Variable height items are not calculated until displayed. So I add a timer to call the ScrollIntoView function. But even that didn't work well, so I used the VisualTreeHelper to find the ScrollViewer object and force it to the specific row. Here is the code. System.Windows.Threading.DispatcherTimer dTimer = new System.Windows.Threading.DispatcherTimer(); dTimer.Interval = new TimeSpan(0, 0, 0, 0, 200); // 200 Milliseconds dTimer.Tick += new EventHandler( (seder, ea) => { //Verses.ScrollIntoView(Verses.Items[itemIndex]); for (int i = 0; i < VisualTreeHelper.GetChildrenCount(Verses); i++) { DependencyObject depObj = VisualTreeHelper.GetChild(Verses, i); if (dep

Categories : Wpf

php global variable doesn't work inside included file
It may be an issue with a variable scope. Try to use $GLOBALS['available'] instead of $available in your client.php. So it will be defined in global scope. At the definition section also: $GLOBALS['available'] = "false"; and $GLOBALS['available'] = "true";

Categories : PHP

Create meta fields "on-the-fly" in a wordpress post
I don't know if you're asking for specific code to do the above, but if its more of a general question I would recommend the Types plugin It has loads of features, but it lets you choose what post types groups of custom fields appear on, what page templates they appear on, and, importantly for your question, they also have conditional display based on other field values. I'm not sure how useful this might be without a slightly more specific question, and I'm sorry its not a code-y answer, but hope it helps.

Categories : PHP

Custom Post Meta Search Template
You checking incorrect variable in if so try removing that one, query_posts('meta_value='.$s); while ( have_posts() ) : the_post(); echo '<li>'; the_title(); echo '</li>'; endwhile;

Categories : PHP

Converting CSV table to Wordpress Post Meta
WP Ultimate CSV Importer allows for the best importing. (trust me here) If a meta table exists it is available to assign a column to it per each row during import. http://wordpress.org/plugins/wp-ultimate-csv-importer/

Categories : Mysql

$post_id or $post->ID in wordpress meta box construction
The action hook save_post returns the $post_id. show_custom_meta_box is not a WordPress hook, but a custom function. It uses get_post_meta and that function requires a $post_id. There is no need to give the $post. You can just edit the code so it uses the ID, not a post Object: function show_custom_meta_box($post_id) { $meta = get_post_meta($post_id, 'custom_meta_class', true); }

Categories : Wordpress

Sort WP_Query result by post meta
From the codex at WP_Query's page: 'meta_value' - Note that a 'meta_key=keyname' must also be present in the query. Note also that the sorting will be alphabetical which is fine for strings (i.e. words), but can be unexpected for numbers (e.g. 1, 3, 34, 4, 56, 6, etc, rather than 1, 3, 4, 6, 34, 56 as you might naturally expect). Use 'meta_value_num' instead for numeric values. 'meta_value_num' - Order by numeric meta value (available with Version 2.8). Also note that a 'meta_key=keyname' must also be present in the query. This value allows for numerical sorting as noted above in 'meta_value'. $my_query = new WP_Query( array( // 'post_type' => 'post_type_name', 'meta_key' => 'key_name', 'orderby' => 'meta_

Categories : Wordpress

WordPress: How do I show the parent category in the post meta?
Try this: (taken from this post: Wordpress function to get top level category of a post?): put this in your functions.php file at the bottom before the closing ?> tag function get_top_category() { $cats = get_the_category(); // category object $top_cat_obj = array(); foreach($cats as $cat) { if ($cat->parent == 0) { $top_cat_obj[] = $cat; } } $top_cat_obj = $top_cat_obj[0]; return $top_cat_obj; } Amend your content.php: <?php $top_cat = get_top_category();?> <?php printf( __( 'Posted in %1$s', 'underground_sound' ), $top_cat->slug .' - '.$categories_list ); ?>

Categories : Wordpress

Struggling to get custom meta data to show in wordpress post
I think I see a couple of syntax errors in your code, such as the way you want to print the custom field's values and so on. I would recommend this approach as opposed to the approach you are using, and I'll explain why in a bit, after the code. PHP WordPress Loop with get_post_meta(); <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <!--This is a conditional statement to see if the value of the custom field has something, and if it does then it shows it, otherwise it doesn't render anything--> <?php if ( get_post_meta($post->ID, 'cf-size', true)):?> <h1>Custom Field Value: <?php echo get_post_meta($post->ID, 'cf-size', true);?></h1> <?php endif;?> <?php endwhile; endif; ?> You can notice that cf-size is

Categories : PHP

how to join post meta and taxonomy table wpdb mysql
Try with INNER JOIN and join the post_meta table with the additional field meta_key so it will join only the respective rows SELECT * FROM `wp_posts` wp INNER JOIN `wp_postmeta` wm ON (wm.`post_id` = wp.`ID` AND wm.`meta_key`='repeatable_fields') INNER JOIN `wp_term_relationships` wtr ON (wp.`ID` = wtr.`object_id`) INNER JOIN `wp_term_taxonomy` wtt ON (wtr.`term_taxonomy_id` = wtt.`term_taxonomy_id`) INNER JOIN `wp_terms` wt ON (wt.`term_id` = wtt.`term_id`) AND wtt.taxonomy = 'location' AND wt.`slug`IN ('berlin','canada') AND wp.post_status = 'publish' AND wm.meta_value LIKE '%July%' ORDER BY wp.post_date DESC

Categories : PHP

Can't save meta box data in Wordpress using custom post types
Problems with your code: Unnecessary block (it's not related to the goal at hand): $values = get_post_custom( $post->ID ); $text = isset( $values['my_meta_box_text'] ) ? esc_attr( $values['my_meta_box_text'][0] ) : ”; $selected = isset( $values['my_meta_box_select'] ) ? esc_attr( $values['my_meta_box_select'][0] ) : ”; $check = isset( $values['my_meta_box_check'] ) ? esc_attr( $values['my_meta_box_check'][0] ) : ”; You're saving testimonial_text with: update_post_meta( $post_id, 'testimonial_text', $testimonial_text ); but getting _my_meta_value_key with: $value = get_post_meta( $post->ID, '_my_meta_value_key', true ); Change the get_ to testimonial_text. A textarea doesn't have value, the content goes inside the open/close tags: echo '<textarea id="test

Categories : Wordpress

wp_Query with 4 post meta feald arguments gives 500 internal server error
I found solution to my problem by replicating the whole setup to my local server. Everything worked fine query executed normally. And the bug was memory allocated for PHP execution which i come to know by comparing the local and live server. So for that I declared two lines in the header part of the file. set_time_limit(0); ini_set("memory_limit", "1024M");

Categories : Wordpress

Record the time/date of a post meta field change WordPress
Well without modifying wordpress core or overriding the update_field() function in your theme functions.php you cant get in a smooth way the time when a record has been added to the database. But what can i advice to you: 1) If your application highly depends on seconds:milliseconds when post_meta has been modified, you should use advanced technique: database transactions. 2) If your application are fine with a small delay between writing up 1st meta and the second just add it with add_post_meta() right below the update_field() performed p.s If you think that overriding the function with functions.php is the way you prefer just ping me a comment, i'll try to help you with by editing the post. Cheers! EDIT Right after your manipulation with allready_aired field performed $alread

Categories : PHP

How to auto-assign custom meta boxes based on post category in WordPress?
Try the Advanced Custom Fields plugin. It will let you create custom metaboxes and assign them to show up on certain types of posts dependent on a variety of criteria, including category.

Categories : Wordpress

Using PHP site to post javascript code and it translates the code, resulting code doesn't work
I've revised your code. This should work <script language="javascript" type="text/javascript"> //<![CDATA[ var counting = 0; var totaltime; var audio; var timeout; function start_playing(a,b){ audio = document.getElementById(b); counting++; audio.play(); if(counting == 2){ document.getElementById(a).value = "No Plays Left"; document.getElementById(a).disabled = true; }else{ document.getElementById(a).value = "Playing"; document.getElementById(a).disabled = true; totaltime = Math.round(audio.duration)*1000; timeout = setTimeout("enable_button('"+a+"')",totaltime); } } function enable_button(a){ document.getElementById(a).value = "Play"; document.getElementById(a).disabled = false; } //]]> </scr

Categories : Javascript

$.post with serialize doesn't send post variables and values
hi can you please try this in your jquery code $(".calc").submit(function(event) { event.preventDefault(); $.post( 'process.php', $(".calc :input").serialize(), function( data ) { $(".result").append(data); } ); });

Categories : PHP

Two $.post requests one after the other.Second $.post request doesn't get executed
$.post() is an abbreviated form of the $.ajax() structure. I usually prefer to use the $.ajax() structure because: It's easier to see if I've missed anything I can more easily add additional params, such as asynch: false, When new to ajax I found it considerably easier to troubleshoot this structure In your case, you might find your problem easier to solve in a $.ajax() structure, since it would be easier to see that a second ajax call (that depends on the outcome of a first ajax call) must happen in the success function of the first ajax call. Here is a standalone example (too bad jsFiddle cannot handle ajax...): TESTER.PHP <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="

Categories : Ajax

Wordpress query with multiple meta meta keys
You can not include if condition in array. Whatever you are trying to achieve with above code is you can achieve with this following code. $args2 = array( 'posts_per_page' => 10, 'post_type' => 'nekretnine', 'paged' => $paged, ); if ($lokacija != '') { $args2['meta_query'] = array( array ( 'key' => 'lokacija', 'value' => $lokacija.'' ), ); }

Categories : Wordpress

WP_Query - multiple custom post types and sort by custom meta
use orderby instead of order_by $warsztaty_q = new WP_Query(array( 'post_type' => array('kalendarium', 'warsztaty'), 'orderby' => 'meta_value', 'meta_key' => 'data_start', 'order' => 'ASC' )); refer codex for more details

Categories : Wordpress

post variable containing XML data to a web-server using POST in iPhone
If by "specify XML for a variable" you mean send an XML string as part of multipart/form-data, then it's easy. You just have to append your XML string to your request body like you do, but additionaly encapsulate it between boundaries and add a content header. NSURL *remoteURL = [NSURL URLWithString:@"http://someurl"]; NSMutableURLRequest *imageRequest = [[NSMutableURLRequest alloc] initWithURL:remoteURL]; //A unique string that will be repeated as a separator NSString *boundary = @"14737809831466499882746641449"; //this is important so the webserver knows that you're sending multipart/form-data NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [imageRequest addValue:contentType forHTTPHeaderField: @"Content-Type"]; NSMutableData *body =

Categories : Iphone



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.