Forum Replies Created

Viewing 15 replies - 136 through 150 (of 180 total)
  • Forum: Plugins
    In reply to: [Tera Charts] Not Working
    Plugin Author claudio

    (@calberti)

    Hi
    In order to be able to help you I need to know if
    1) have you tested the plugin on a fresh WP install? Conflicts with other plugins and themes may be the cause of troubles
    2) have you checked in the browser dev console if you have any jscript error messages?

    thanks
    regards,
    Claudio

    Hello Anes,
    I think this post
    http://blattchat.com/2013/01/14/building-a-rest-interface-with-wordpress/
    will help you in building a REST interface into your WP instance so that later you can invoke the WPBI functionality via REST web service calls.
    Once you have the REST interface functional, I can drive you to call the WPBI API that retrieves the JSON data.
    regards,
    Claudio

    I’m sorry Anes, but I don’t know how XML-RPC works and never used it to implement a WP plugin.

    Well writing the code for you of a function that is not supported by the plugin is not really in the scope of this support forum.
    first you should provide a description of exactly what you are trying to achieve.
    1) do you want to retrieve only the data in JSON?
    2) do you want to retrieve the whole chart as HTML page?

    no.2 is probably simpler, just create a WP instance with one page per chart you need and then retrieve the chart on the remote host with a simple HTTP get call.

    This should be fixed with release 1.0.5

    Hi Anes,
    please provide more details on the issue as I cannot understand what you are doing.
    thanks
    claudio

    Hi Anes,
    if the REST call you’re trying to implement is related to a specific plugin functionality. I suggest to create the service folder under the plugin directory.
    One of the error you get comes from inclusion of Translation/Entry.php.
    I don’t know what this is but probably it’s a file included by some plugin you have installed so please try to move the services directory under the WPBI root folder.
    Even the fatal error you get is due to wrong relative positions of files.
    Please implement your REST interface in a subfolder of the WPBI plugin.
    regards,
    Claudio

    Hi Anes,
    if the REST call you’re trying to implement is related to a specific plugin functionality. I suggest to create the service folder under the plugin directory.
    One of the error you get comes from inclusion of Translation/Entry.php.
    I don’t know what this is but probably it’s a file included by some plugin you have installed so please try to move the services directory under the WPBI root folder.
    Even the fatal error you get is due to wrong relative positions of files.
    Please implement your REST interface in a subfolder of the WPBI plugin.
    regards,
    Claudio

    Hi Anes,
    currently when you load a page with the chart some placeholders in the query are replaced with actual values.
    For example you can create a query using {{{userID}}} and this will be replaced by the actual userID when loading the page.
    This will enable user-specific charts.
    On the other hand if you want to dynamically change the structure of a chart you need to completely change how the charts are created. This can probably be done using AJAX calls that refresh the displayed data.
    To do so you need to:
    1) create an API to be called and retrieve the data
    2) create on the client side an ajax event that calls this service
    3) dynamically update using JS the placeholder with the data. For example in this example
    http://www.wpbusinessintelligence.com/line-chart/
    you need to update the content of nvd3Data_ph_Stocks_Multiline

    This is quite a heavy change in the plugin and will require some work.
    I hope this helps
    regards,
    Claudio

    Hello Anes,
    actually I found out that this happens because one serie has the same value as the other. It must be a bug with nvd3.js the chart library we use in the plugin. We’re currently looking into it.
    Anyway with other configurations of point the issue seems to be not present.
    I’ll let you know as soon as I find a solution.
    regards
    Claudio

    Hi Anes,
    I dont understand what you mean by “prepared statement”. Anyway dynamic chart configuration per user’s interaction is not supported at the moment. Unless you are modifying the code base.
    can you please elaborate on what you’re trying to achieve?

    Hi Anes,
    The behaviour is weird, I cannot reproduce it. Can you maybe try to set the dates in ascending order? I think that maybe having shuffled dates can have an impact on rendering.
    claudio

    Hi Anes,
    can you please post also the tabular data that you obtain when testing the query? I need to understand what’s the expected behaviour. I mean, are there values in the “goal” column of the result?
    thanks
    Claudio

    Thread Starter claudio

    (@calberti)

    Thanks Chouby for the detailed answer. I was finally able to obtain the desired result and this might be of interest for you. Actually I modified polylang to use the “pll_language” to store the current language and update it at each language selector click.
    I modified the function “the_languages” in core.php by modifying line 1024 as follow

    $output .= sprintf('<li class="%s"><a href="%s">%s</a>'."\n",
    						implode(' ', $classes),
    						esc_attr($slug),
    						esc_url($url),
    						$show_flags && $show_names ? $flag.' '.$name : $flag.$name
    					);

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    and then I added the JS for “updateCookie”. In this was any plugin can check the locale at any time and load the textdomain as needed. In my case it’s working pretty well.
    thanks again for the support.

    Thread Starter claudio

    (@calberti)

    Thanks Chouby for the detailed explanation, it looked promising at first sight, but when I actually tried, it broke all the site and no page was reachable any more. The other plugin I’m using has some default pages (e.g. shopping cart) that do not follow the logic of having the language code in the url.
    The thing is that when I add this line

    add_action( ‘parse_request’, array( &$this, ‘load_textdomains’ ), 1 );

    IT WORKS, but something goes wrong with the authentication mechanism and the switch from one language to another.
    I mean that the parts of the site that are not translated with the standard config, are actually translated if I add this line.
    I think I’m not too far, but don’t why loading text domains when “parse_request” is called breaks something.

Viewing 15 replies - 136 through 150 (of 180 total)