Posts by Delpierooo

29 posts
  • Has been a member for 3-4 years
Delpierooo says

This is what I get in the Console:

XMLHttpRequest cannot load http://marketplace.envato.com/api/edge/XXXXXXX/YYYYYYY/verify-purchase:550e8400-e29b-41d4-a716-446655440000.json. Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers.

Any idea?

P.S. I am using the right username and api key, just didn’t insert it here on the forum.

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi,

yes I am using the right username and api. If I open the js in a browser the json file is displayed ok. And if are put that content in a local file(was trying this on my localhost) it works ok. It seems that something is missing if using a JSON file from other server. Read something about that, but none solution worked. Any idea for the fix?

TNX!

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi.

I am trying to verify the purchase code of an item using: http://marketplace.envato.com/api/edge/USERNAME/API-KEY/verify-purchase:550e8400-e29b-41d4-a716-446655440000.json

In the javascript code I am using:

var url='http://marketplace.envato.com/api/edge/USERNAME/API-KEY/verify-purchase:550e8400-e29b-41d4-a716-446655440000.json';

$.getJSON(url, function(jd) {     
 var entire_purchase = jd["verify-purchase"];     
 var buyer_name = entire_purchase.buyer;         
 alert(buyer_name);
 });

I have the api key and username inserted but still can’t get it to work. So somewhere taht adding ?callback=? in the end of the url would help but it doesn’t.

Any idea what I am doing wrong? The code itself work ok if I have the json file localy for example, but need to read that one.

TNX!

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi,

that simply isn’t going ok, since I dont have the item or am missing something.

Menu filter:

add_filter( 'wp_nav_menu_items', 'custom_menu_function', 10, 2 );

Then the filter functions starts like this:

 function custom_menu_function ( $items, $args ) {

 $dom = new DOMDocument();
        $dom->loadHTML($items);
        $linkNodes = $dom->getElementsByTagName('a');
        $classes= $dom->getElementsByTagName('li');
        $count = $linkNodes->length;

        for($i = 0;$i < $count;$i++)
        {

How to get the page id's here for each menu item, not the id that the menu item has.
  }
}  

So if I have created page Test that has id=2 and I have tbhis item in the menu. How to get it’s id(2) in the menu filter above?

Am I missing some basic thing?

Tnx.

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hello.

Have a question and hope someone can help me. I have a filter added to my wordpress menu. Is there a way to get the page id for each menu item inside this filter? Is this possible? If yes, I would be very pleased if someone can help me out with this.

Tnx.

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi.

I have one question regarding building up a wordpress theme. Let say I have a template for a blog item. With this template I can create as many blogs as I want. Is there a way to have a custom field(when creating a page) that I could then take to the single.php page? For example: I have two blogs: blog1 and blog2 and for them I set the custom field to “Blog 1” and “Blog 2”. I can read the blog templates very easy. But how would I get this variable to the single.php page? Is this possible or will I have to asing this to each post? So the sinbgle page would “somehow” know that he “came” from blog1 or blog2.

Many thanks for all the answers.

Best regards,

Pego

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi all.

I have one question. If I have multiple blogs in my WP theme and there single items are opened using ajax. The close button is an ajax anction situated in the single.php file. How can I know to wich blog the opened item goes/which blog item needs to be closed.

Can I pass a variable to the single page? Is there any other/better solution.

Thanks for the answers.

Delpierooo

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Is there anythins specific that I should take notice at javascript? Maybe what not do use? Like said, it works ok on iPad2.

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi all.

Is there anything specific that should not be used in the page coding(js/php/html, ..), because it makes the iPad3 Safari browser crash. The thing works ok on all PC browsers(including Safari) and on iPad2 as well. What is so special or can be an issue on iPad3 that it crashes Safari?

Really appreciate all the help.

29 posts
  • Has been a member for 3-4 years
Delpierooo says

Hi, tnx for the reply.

I have done that. But that just doesn’t refresh the page when posting a comments. Wher you log in/log out.., the page still refreshes. Also the posting comment needs the page to be refresh to view it. Any suggestions on that?

Best regards,

Pego

by
by
by
by
by
by