• Do know you can set variables in a array? :) Example,

    $value_1 = $_SESSION[‘Numberone’]

    $first = array($value_1)

    and so on. :)

  • @Noah

    Ehm… I know what array is and how to pack stuff in it. Look, there are some arrays in example code above. :)

    What specific part of this stuff you are getting at?

    PS I’ve cut like hundred lines of excessive code from first version today btw… will update on weekend after ensuring I hadn’t broke anything. And of course there is probably hundred things not yet working in it. :)

  • Ah, I was just checking, cause you didn’t use variables in the arrays :) Trying to be helpful hehe :)
    So you’re going to put on the site ? Cool. How does WP work? I’ve never used it, blogger is free, and the other sites I have are all business related.

  • @Noah

    Actually some of methods have to accept mixed input and distinguish between single value and array of values. Needed to get multicolored stacked bars for example.

    I’ve kept example basic (and cute :).

    WordPress is blog/CMS engine in pure PHP. It can be easily extended with plugins (which can be basically any PHP code plus some stuff to make WP recognize it).

    So this class is packed as simple WP plugin. While it is enabled in WP, I can use it in other plugins, theme code and (with some extra effort to bypass default security) inside posts.

  • Ah, I love PHP. Favourite language, I just like the syntax.

    Ah, I see. So a sort of website builder? Sounds good for quickly setting up a blog. I like the thing you have on the top of page, it might just be the best in-site advertising for posts.

  • @Noah

    Yep, it is about perfect to get blog up and running fast. Like in few minutes – upload WP, launch quick install routine to hook with database, upload some theme for design (plenty of both free and paid around).

    Getting deeper however can be challenging, code base is… peculiar. :) And a moving target, stuff gets changed between versions.

    I have mixed feelings about that slideshow. :) Effect is nice but the only plugin that fits my needs took hours to get it working and validating properly. It also eats bandwidth by fetching local images through HTTP requests. And developments is quite dead.

    I’ll have to re-code it from scratch :( for new theme I am slowly working on.

  • Hehe, sounds fun. You should take a look at trying to set up your own custom cart while using paypal to pay for it. It’s a complete nightmare.

    Ah, I suppose. Still, as bandwidth becomes less and less of a problem, it’s probably worth it :)

    Do the google ads make your site pay for itself? My cousin swears by them, and what I’ve seen so far, it’s all good.

  • @Noah

    Heh, anyway you can look through WordPress tag or hit me in email/IM if you need firsthand info on WP. :)

    As for Google ads they are making twice old hosting cost, and infinitely more than current hosting cost (free :). Another thing that needs serious attention and optimization in new theme. This one completely sucks for ads and it doesn’t help that I was barely interested in that aspect during all of first year.

  • Ah, nice :)
    I’ll have a go at setting one up sometime, when I’m not so busy.

    Oh, nice. My cousin tells me that the best plan is buy a empty server with a name that people search for a lot, and then you get something like £20 ( ~ $30) per click on a ad.

    I guess the trick is to trick your followers to click on the ads, as if they are a part of your site and links to other things on your site :)

  • @Noah

    My cousin tells me that the best plan is buy a empty server with a name that people search for a lot, and then you get something like £20 ( ~ $30) per click on a ad.

    Has he actually tried this and millionaire by now? :)

  • Pretty much :)

    And now I want a share of the profits! Hehe.

  • […] Yesterday I started up all that mess of software, that is essential for my work/fun/whatever process. And suddenly I was unable to find Notepad++. I knew it was there, knew I had just killed few more lines of code from google charts class. […]

  • I am trying your script but i get this php error:
    PHP Warning: implode() [function.implode]: Invalid arguments passed in google_chart.php on line 733

    line 733= $url .= ‘&chem=’ . implode( ‘|’, $this->chem );

    any idea?

  • @erd

    Hmm… It shouldn’t be added if not set and if it’s set then why error…

    chem is about icon markers, are you adding any? Can you add an example? Please email me at contact@rarst.net if that is more convenient for you than comments.

  • Vitaliy Kaplich

    Good job! Thank you for this library!

    I’ve found a small issue:

    The ‘chart title’ should be URL encoded otherwise for instance if the title contains character – “#” all URL parameters following after this character will be treated as HTML anchor and will not be process correctly by Google Chart API.

    Method: SetTitle
    Line: 973
    $this->title = ‘&chtt=’ . urlencode($title);

  • @Vitaliy Kaplich

    Noted, thank you. :)

    This code is kind of in a limbo at moment. I no longer work on project this was originally developed for. On other hand I am more interested into making more polished and full-featured WordPress plugin out of it… but no estimates on when will I get to that.

  • Tran Ngoc Nhat


    Your replace code : if (is_array($this->chem)) $url .= '&chem=' . implode( '|', $this->chem );

Comments are closed.