WordPress.org

Ready to get started?Download WordPress

Forums

Updated CG-PowerPack 1.5b1 is available (29 posts)

  1. davidchait
    Member
    Posted 9 years ago #

    The usual location up on CHAITGEAR.

    Numerous minor revisions across the board, including some hack prevention code, new [meta] CG-Inline for displaying post meta/custom tags in the body of the post, blacklist update for CG-Referrer and CG-Antispam, CG-Feedread now plays nicer in the sidebar, and CG-Referrer got a bit of an overhaul. Not a required update, but wanted to get some work/fixes out to folks, and seems stable enough to call it 'beta' now. ;)

    Read the CHANGES.txt file for more details. Let me know if folks run into any issues.

  2. Macross
    Member
    Posted 9 years ago #

    David, I can't get the CG-Feedread to show up in my plugins bar, nor do I see the inline on my posts-writing page.

    My site is http://mattluria.com/test/

  3. davidchait
    Member
    Posted 9 years ago #

    Then they're working properly! (tongue-in-cheek...)

    Did you read the docs for the two plugins? CG-Feedread you just activate, then add the code to your sidebar to show a particular feed. CG-Inline also has no interface, you just use any of the inline/macros in your post and they'll show up transformed in the results.

    Feel free to post back here if the docs don't explain enough -- the Feedread stuff certainly should at this point, but Inline is still 'relatively new', meaning not enough people have asked questions about it (but I use it extensively on CHAITGEAR).

    A great example of the "CG-FeedRead-as-news-page" sample in the powerpack, extended to a particular site, is:
    http://www.realtechnews.com/blog/rtnews.php

    -d

  4. Macross
    Member
    Posted 9 years ago #

    So if I wanted to have a page, not a post, display news feeds from lets say, Slashdot and News.com, how would I go about doing that?

  5. davidchait
    Member
    Posted 9 years ago #

    At the moment, you'd have to be running phpexec or similar to do it. But I'm looking to add a new CG-Inline macro for CG-Feedread feeds, so that you can make a WP Page that is a bunch of feeds.

    At the moment, you have to do it as a separate PHP file, like the link I gave above, or the sample cgfeeds.php included in the CG-PowerPack distribution -- that way works right now, and works well.

    -d

  6. RaynerApe
    Member
    Posted 9 years ago #

    I am getting blank admin page for CGRef sub-page of the CGRef menu item in the admin section. It has header/footer but no content inside and I cannot see the refferrals. It used to work with 1.5a8. I also have problems with deleting _BOT_ refferals, I have to manually truncate the database because they cannot be removed via Purge.

  7. davidchait
    Member
    Posted 9 years ago #

    Scratch that, go grab 1.5b2 from the site.

    I've HEAVILY modded CG-Referrer specifically for this release. The main page is back, and I added another bunch of listing/admin panels as well, plus standardized output better across the panels, plus added quick color-coding to denote bots (green) and blocked access (red), plus default listing now shows bots and blocked referrals rather than hiding them.

    New 'Tag' panel will, when clicked, immediately try to process your entire referrer table to re-tag anything not-yet-tagged as a bot or blocked item, using the latest code and keywords to detect them.

    Updates to Purge should now allow you to COMPLETELY purge the database down to zero entries.

    Bots and Blocked panels to show more lists, Stats panel to show unique IP counts (for as much history as you have stored).

    Future versions I'll add options to Purge panel for WHAT to purge, as well as some kind of 'auto-purge' of items older than some time-delay...

    -d

  8. davidchait
    Member
    Posted 9 years ago #

    Also, I should note that both Wishlists and Wedding Registry ASINs seem to be working properly in show_wishlist_items, but at the moment Baby Registries aren't working (a problem on Amazon's end).

    -d

  9. eyetag
    Member
    Posted 9 years ago #

    david, installed your pack and followed all the instructions.
    still get various errors. think i´ll throw everything out again, after i was only interested in whattunes (which doesn´t seem to work without cg amazon?). installation appears to go quite deep into wp. also it´s breaking my admins tab navigation with all those extra buttons.
    anyhow, here are two actual errors i get:
    Warning: Invalid argument supplied for foreach() in /uneu/dumberg/subwww/eyetag/htdocs/weblog/wp-content/plugins/cg-plugins/cg-postorder.php on line 82
    (within the loop, frontend)
    Latest Track

    Fatal error: Call to undefined function: ctype_digit() in /uneu/dumberg/subwww/eyetag/htdocs/weblog/wp-content/plugins/cg-plugins/AmazonQueryMgr.php on line 633
    (at tunes, in admin)

    if there should be a quick fix for it, i could continue trying them out...
    thanks!

  10. davidchait
    Member
    Posted 9 years ago #

    hmmm. installation of the powerpack is like any other plugin or set of plugins, it just stores core code into its own subdirectory (because I share a bunch of files between plugins, and it makes it MUCH easier to manage that way). doesn't go any 'deeper' than other plugins.

    All you need activated to start with is CG-WhatTunes itself. Other CG plugins should be disabled. If that works, THEN turn on CG-Amazon to get the amazon lookups working. That's the two you'll want running.

    I'm not sure why the 'ctype_digit' error is coming up. That would only happen if you had a version of PHP before maybe 4.0.4. And since WP itself requires > 4.1, you shouldn't have something earlier running -- but for sanity, check whether you do...

    -d

  11. eyetag
    Member
    Posted 9 years ago #

    my php version is 4.1.2

  12. davidchait
    Member
    Posted 9 years ago #

    Huh. That's really strange. ctype_digit is an intrinsic function of PHP > 4.0.4, so should be there -- and it's more than worrisome that you have a PHP version that SHOULD have it, but doesn't... Makes me wonder what other functions are missing...

    I'll poke around some. I could write a custom function, but intrinsics are so much faster, and it really should be there. ;) I'll see if anyone on the web has seen such functions missing. Is this a custom PHP build, or a hosted provider?

    -d

  13. eyetag
    Member
    Posted 9 years ago #

    hosted provider.
    http://www.eyetag.de/weblog/test.php shows you the whole configuration

  14. fuelcell
    Member
    Posted 9 years ago #

    At the risk of sounding ridiculous I want to keep this simple and just say, "dude, your CG pack may not be playing nice with Firefox 1.0.4 and/or WP 1.5.1." I was getting a ton of odd behavior from WP (including pages admin pages not fulling loading, links loading in new tabs - just frustrating odd behaviors) which all went away when I deactivated CG pack.

    Perhaps it's something. Perhaps not.

  15. davidchait
    Member
    Posted 9 years ago #

    fuelcell -

    That's the first I've ever heard of 'a ton of odd behavior' of the CG 1.5-series PowerPack plugins. I assume you downloaded the 1.5.1.0 release, whose main change was to support the new plugin subpanel interfaces (1.5.1 changed the way you have to 'register' the subpanels...)?

    And, was there a particular plugin causing issues? I never just go and switch on a half-dozen plugins at once myself -- wouldn't expect anyone else to either... There have been some cases in the past where a particular CG plugin and particular third-party plugin had an interaction issue, but I haven't heard of such issues since maybe the Fall.

    As for FF1.0.4, can't give firsthand accounting to that, but the browser shouldn't be an issue.

    This ctype_digit thing does have me a bit off-kilter, as the PHP spec spells out pretty clearly that it's an intrinsic PHP function call... so if it's not there, I can't imagine what else might be missing. I haven't found any further references to it, and might try to add a detect-and-workaround, but awfully strange... :-/

    -d

  16. eyetag
    Member
    Posted 9 years ago #

    is there anything else i can do - send you some code or something..?

  17. davidchait
    Member
    Posted 9 years ago #

    I've read every spec I can find, and scoured the net, and don't see any references to ctype_digit missing from builds. Must be an anomaly of your host's build.

    So, rather than 'research' further, I have just tried to build a simple workaround (making my own version of ctype_digit if it doesn't exist)... you want to test it? Drop an email to cgcode at chait dot net, and I can send you one replacement file to try.

    If it works, I'll roll it into the next release.

    -d

  18. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    1. cg-amazon is having problems with e.g. german umlauts. they are shown as UTF, but if you use only ISO-8859-15 it's a problem.
    you can rebuild it using locales "de" and search for ASIN 3831760101

    2. how can i access extra fields like binding, publisher, author, ...? adding them to the array of $extraProductFields doesn't work, they are not shown. maybe because they are in their own "loop"? but it would be nice to be able to access them.

  19. davidchait
    Member
    Posted 9 years ago #

    1. I'll have to do some research. I had moved to UTF as that seemed to be the general direction most sites were going, and easy to translate everything INTO unicode. I think I have had some CG-FeedRead issues that are similar, though I thought I had addressed some such problems with CG-Amazon around the turn of the year. Hmmm. I might need another config pref for ISO vs UTF (since most every feed is UTF to begin with).

    2. I'll go test it out -- I myself haven't even used the extra fields stuff for almost a year, though it should all stil work. Certainly, there IS a bunch of extra data in the 'blob' for a given ASIN (though I think I've gone to a slightly-slimmer dataset from Amazon), it's just how to output it. I have thought a LOT about a 'template' schema for Amazon and FeedRead to allow folks to customize the output near-completely, but it starts getting really complex (and I don't want XSLT translations necessarily, something a BIT easier for folks!). Lemme go look and see if the extra field stuff is at least still working basically... ;)

    -d

  20. davidchait
    Member
    Posted 9 years ago #

    Ahh, okay. #2 works fine, IF you know where to change a 'false' into a 'true'... ;) But really, I just flipped it on, worked right off the bat. Doesn't look anything amazing (not a lot of formatting ability...), but the data is all there.

    The main CG-Amazon call, query_amazon, is now 'tucked away' behind show_amazon_items and show_wishlist_items as some folks found it a bit too tricky. Unfortunately, one of the things I 'lost' in that transition was passing through an option to enable/disable the extra fields.

    So, I guess there's two possible directions. One is to add show/no-show as an extra param to the current 'high level' calls into CGA. The other is to just show the extra fields whenever I'd normally be showing things like Price, etc. The former gives much more control to you, or at least it'll seem that way! ;)

    If you want to test it out and aren't TOO shy of PHP, you can go into cg-amazon.php, into whichever of the functions you are calling, and look for the query_amazon call. The third line of passed params looks like:
    $style, false, false, false, true,

    You want it to look like
    $style, false, true, false, true,

    If you are calling query_amazon 'old school' direct style, it is param #13 that needs to be true (not false) in order for the extra data fields to be pulled from the array and shown.

    I'm still looking/thinking about #1. ;)

    -d

  21. davidchait
    Member
    Posted 9 years ago #

    Okay, while I won't upload it immediately, I think I have a working solution in place for CG-Amazon, and hopefully translates instantly over to CG-FeedRead, for people NOT using UTF-8 like most of the world. ;)

    josepo (and anyone else), if you'd like to 'beta-test' it at some point, let me know. otherwise, it'll likely just roll out in a day or two.

    -d

  22. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    ok, #2 works but...

    you can access SalesRank or ListPrice, but there is nothing shown for Publisher, Author, PublicationDate, Binding, ...
    these items exist, i checked the cached file, but cg-amazon seems not to like them.
    i added them to the extra-field-array, made sure i spelled them right, still they are not shown.

  23. davidchait
    Member
    Posted 9 years ago #

    My bad... Amazon Web Services 4 TOTALLY changed the encapsulation of the XML data feed. So a bunch of the data is now 'hidden' a layer lower. I can give you a temporary workaround (I think the long-term approach is likely to 'promote' everything up one level...).

    In CG-Amazon.php, find the following toward the end of query_amazon:

    $info = $CurrentAmazonItem["$extraField"];
    if (!empty($info))

    Between those two lines, add the following line:

    if (empty($info)) $info = $CurrentAmazonItem['ItemAttributes']["$extraField"];

    That will try to look up any missing fields under the ItemAttributes data section. I just tried with publication date, and it worked (for those items that HAD one!).

    I added that 'workaround' into my version here, and also manually promoted "AverageRating" from the customer reviews section to the top so it can be accessed easily. At some point I'll have to add a 'rating stars' output routine, to get a graphical output of the rating of a product into the item block...

    Try that, let me know how it works for you. I'm actually excited to have someone pushing beyond the truly basic stuff!

    -d

  24. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    you asked what i'm missing, so i tell you ;-)
    the workaround is working. great job.
    but, i like to say "but" ;-), if you access the extrafield author there's a little problem. with only one author, everything is allright. but with two or more authors it prints "Array". i guess that's because the XML-structure is using a kind of array for more than one author.

  25. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    uuh, i forget: the umlauts are working - using UTF - ok in the sidebar. but not if i use cg-inline.
    it's a little bit strange. the umlaut is right in the title-attribute of a-tag, but it's not right in t-amazon-span under the image.

  26. davidchait
    Member
    Posted 9 years ago #

    AFTER the new line added above, try adding:

    if (is_array($info)) $info = implode($info, ', ');

    That should help the array issue... MAYBE. :)

    As for umlauts, they were ALWAYS working under UTF-8 encoding. UTF-8 is the native format of every piece of XML data internal to the CG systems (Amazon, RSS feeds, etc.). What I added was a re-encode (or decode) to 8859-1 of anything being output to the user, which should go for sidebar and inlines -- but possible CG-Inline is mucking with stuff directly... I'll make sure to address that for this 1.5.1.1 release I'm working on...

    (Hrm... no, Inline is doing the same as everything else. Maybe WP is re-translating the inlined info back into another format, or assuming it's in UTF-8, and it's blowing up there... If your site is all in UTF-8, does everything look right?)

    -d

  27. davidchait
    Member
    Posted 9 years ago #

    I just set my test blog to be 8859-15, inserted my test .de inline into a new post, and it came out fine.

    The only time there should be problems is if the client browser encoding is being force-set to something other than the page was tagged/delivered as. UTF8=>UTF8 has zero translation, -15=>-15 stores native in UTF8, but then detects the blog setting as -15 and transcodes before output. If you are using say FF and do View::Character Encoding::[some other encoding], unless it's an ISO=>ISO translation you'll likely see issues.

    And again, even transcoding to -15 should have some (half-doz) incorrect characters supposedly... without specific conversion tables in place, I can't magically fix those. ;)

    If you have a particular case still having issues, lemme know! ;)

    -d

  28. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    well, seems to have been a problem with switching from iso-8859-15 to utf-8... i tried with a new testinstall, using utf-8 from the beginning and it's working.
    so cg-inline is doing right, sorry for false alarm. but now i know i should stay with iso-8859-15 unless i have a lot of time to make the switch

    the implode-line is working. again great job.

    i have some other ideas, but i guess they are overkill for cg-powerpack... there's a plugin for MT what has many nice features http://www.majordojo.com/projects/BookQueueToo/ - i know, cg-powerpack is capable of most of them.

  29. davidchait
    Member
    Posted 9 years ago #

    Interesting. Aside from the obvious extra UI work, CG-Amazon is a decent match -- I've made it a good hybrid, partially for raw Amazon display (CG-Inline embedded, or wishlist sidebar, etc.), but also a decent tool for tracking a 'library' of products across any category of Amazon.

    Are there particular features of BQT that you like?

    Definitely feel free to drop me an email anytime at cgcode at chait dot net if you have ideas for stuff -- I'm always willing to listen. ;)

    -d

Topic Closed

This topic has been closed to new replies.

About this Topic