Archive for the 'Programming' Category

MODx: TinyMCE relative URL hack

MODx version: Revolution 2.0.0-beta-5 rev6224
TinyMCE: 3.2.7.0

There is a current bug that I have seen a lot of activity about in the forums regarding TinyMCE and relative paths, specifically when inserting images. Essentially, even though the path inside the image selector in TinyMCE says “/assets/images/xyz.jpg”, it changes it to “../../assets/images/xyz.jpg” upon inserting.

While this isn’t a very graceful fix, it is a noted bug, so hopefully this gets everyone through to the official patch:

  1. Navigate to /core/components/tinymce/tinymce.class.php
  2. Scroll down to line 134, and you will find:
  3. 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    
            /* Set relative URL options */
            switch ($this->config['path_options']) {
                case 'rootrelative':
                    $this->config['relative_urls'] = false;
                    $this->config['remove_script_host'] = true;
                break;
     
                case 'docrelative':
                    $this->config['relative_urls'] = true;
                    $this->config['document_base_url'] = $this->config['assets_url'];
                    $this->config['remove_script_host'] = true;
                break;
     
                case 'fullpathurl':
                    $this->config['relative_urls'] = false;
                    $this->config['remove_script_host'] = false;
                break;
            }
  4. This is looking for a system configuration variable called “path_options”. Who would think to change that, and what to change it to? Rather than making a square peg fit in a round hole, I preferred to just comment that whole statement out and replace it with:
  5. 1
    
            $this->config['convert_urls'] = false;
  6. TinyMCE will now stop converting /assets to ../../assets or whatever other craziness it was doing. A prickly but easy workaround until it is officially fixed.

Enjoy,

John

  • Share/Bookmark

List of Google Wave Gadgets, Bots, Extensions, Games and more …

Robots

(To use robots, add them as a contact, then add the robot-contact to a wave)

Chatbots

  • Eliza – ogenex@appspot.com – An implementation of the Eliza chatbot borrowed from the NLTK.
  • Elize – elizarobot@appspot.com – Is one of the first robots that was created by non Googler and is very useful if you are feeling alone in your Google Wave client.
  • Rude chatbot – notatory@appspot.com – An obnoxious chatbot borrowed from the Natural Language Processing Toolkit.
  • TooAngel WaveIn Progresstooangel-wave@appspot.com – A self learning robot, that will respond to a reply in a more humanoid way

Conversion

  • BotURL – boturl@appspot.com – A URL Linker that replaces full URLs with hyperlinks.
  • Calcbotcalcbot@appspot.comThis bot will do in place calculations for simple mathematical expressions and allow you to use user defined variables.
  • Cartoonycartoonybot@appspot.com – Replaces the text of every submitted blip with a cartoon balloon that contains the text instead. Colors the balloons based on username.
  • Dice Botdice-bot@appspot.com – Dice-rolling bot. Dice Bot will replace XdY (X is the number of dice; Y is the number of sides) with the results of those rolls.
  • Flippy – flippy-wave@appspot.com – Turns text upside-down.
  • Fnordlinkyfnordlinks@appspot.comReplaces “PMID <number>” with article information from PubMed.
  • Hearty Emobot – hearty-emobot@appspot.com – Replaces ASCII art with wingding characters.
  • i-croni-cron@appspot.com – Evaluates Python expressions. Looks at blips in event, searches for CALC() macros and executes Python code using exec().
  • Insulty – megabytemb123@appspot.com – Information Needed
  • IPA Botipa-bot@appspot.comChanges normal letters into special characters used for phonetics.
  • Piratifypiratify@appspot.com – Turns whatever you type into “Pirate Speak” .. Arrrr.
  • Plotzieplotzie@appspot.com – Plots sparklines from your data.
  • ShorteeWish – Change “c u l8r” to “see you later” etc.
  • Swedish Chefborkforceone@appspot.com – Changes english into Swedish-Chef Speak. Bork! Bork!
  • Syntaxykasyntaxy@appspot.com – Syntaxy does blip-by-blip syntax highlighting for a variety of languages including Python, Java, C, C++, html, css and javascript.
  • Watexy – watexy@appspot.comUse LaTeX mathematical language in your Waves!
  • Wikify – wikifier@appspot.comReplaces specific marked up text with a link to Wikipedia or a description relevant to the marked text.

Games

  • Hangmanwavehangman@appspot.com – Play Hangman.
  • Roshambo – roshambowave@appspot.com – Play Roshambo (Rock / Paper / Scissors).
  • Speedy – Wish – Track the words per minute of all participants, competitive typing!

Groups

  • Groupygroupy-robot@appspot.com – Robot to manage groups.
  • Groupygroupy-the-bot@appspot.com – Robot to manage groups.

Integration

  • drop.iomikeswaverobot@appspot.com – Creates a drop and puts the info into the wave whenever the robot is added as a participant.
  • OpenAustrailia - In Progress – A robot to allow interaction with the OpenAustralia web site.
  • PlonieBot – In Progressploniebot@appspot.com – Brings wave document editing capabilities to the Plone CMS
  • PoppyIn Progresspoppywave@appspot.com – Helps bridge Google Wave conversations to email users outside the Wave.
  • Rssybotrssybot@appspot.comTurn google wave into an RSS reader!
  • Starifystarifybot@appspot.com – Lets you star waves, in sort of bookmarking style.
  • Tweety the Twitbot – tweety-wave@appspot.com – You can access your Twitter account.
  • Twiliobot – twiliobot@appspot.com – Transforms phone numbers into click-to-call links. If user clicks a link, a call is placed to his phone and to the number in the link. The call can be transcribed and inserted into the wave as text with a link to the audio.
  • Wave-EmailIn Progresswave-email@appspot.com – Provide an extension to Google Wave which will allow the integration of both sending and receiving emails.
  • Wave Live Messengerwavelivemessenger@appspot.com – Allows you to chat to your windows live messenger contacts from inside a wave.

Language

  • PhilBot – Wish – A suggested solution to the problem of waves with languages you can’t read.
  • Rosy Etta – rosy@wavesandbox.com – Translator (40 Languages).

Polling

  • Polly the Pollster - polly-wave@appspot.com – Poll Bot.

Search / Aggregation

  • Dr Maps – dr-maps@appspot.com – Updates a wave by inserting a map associated to an address.
  • Dr Weather – shiny-sky@appspot.com – Gives the weather for a City
  • Embedded Search Results – wave-sandbox@appspot.com – Web and Image searches inline.
  • FML Blipper – fmlblipper@appspot.com – displays random FML story from www.fmylife.com
  • Grauniady – grauniady@appspot.com – Searches the latest items from The Guardian for a given phrase.
  • Stocky – stocky-wave@appspot.com – Detects stock symbols from a wave and updates it with the live stock price.
  • Wavethingy – wavethingy@appspot.com – Searches Amazon for DVDs and books, and gives the author a cut of any purchases made off the links.
  • Yelpy – yelpful@appspot.com - Searches Yelp with a user defined location and category.

Utilities

  • AmazonBotamazon-withwaves-com@appspot.com – Enables social product research and shopping on Amazon.com. Wave participants can share products & reviews with contacts in real-time thanks to automatic queries by the AmazonBot against conversation keywords. The AmazonBot gadget can detect products and return inline product links or a custom full product browser.
  • Bloggy – blog-wave@appspot.com – Information Needed
  • Bit.ly Botbitly-bot@appspot.comShortens the url using bitly.
  • Botty – Wish - Will automatically add a set of useful bots to a wave according to a collection of bots (so they don’t have to individually be added when you use them all the time.
  • CountColoncountcolon@appspot.com – Adds text statistics to your blips (words, lines, etc.)
  • Companion Sphere – companionsphere@appspot.com – Collection of geek utils, first working verb is “lookup” for wikipedia/wiktionary one-line descriptions.
  • Databot – Wish – Will start as soon as the GData interface is published.
  • Emoticony – emoticonbot@appspot.com – Replaces text representations of emoticons with the relevant image.
  • JBREAKOUT BOT ADDED – jbreakout@appspot.com – Debug utility that reports event triggers.
  • Maisonmaison@appspot.com – Makes blips public at http://maison.appspot.com.
  • Multi – multi-wave@appspot.com – A quote collector. Reply a blip you want to quote with ‘quote this’ and randomly display a quote with ‘quote <wave@account.com>’. The bot is still being under development but you can try playing with it.
  • Natural Language Processing – knowledge-books@appspot.com – Adds blips with NLP analysis.
  • Nokar – lab2market@appspot.com – Has many features such as translations, image insertion, insert last tweets etc.
  • Posterous-robotposterous-robot@appspot.com – A robot for posterous.com user to post blog in Google Wave. Here is how to write a blog using Google Wave Robot for Posterous.
  • Publisher – wave-publisher@appspot.com – Information Needed
  • Skimmywave-skimmy@appspot.com – Converts text emoticons, from : ) to img. Has a bookmarklet which creates a popup menu to insert emoticons for which the code is unknown.
  • Smileysmiley-bot@appspot.com – Changes the smiley symbols to smiley images.
  • Smiley - In Progresssmiley-robot@appspot.com - Changes the smiley symbols to smiley images.
  • Style Chart Robot – stylechart@appspot.com – Inserts a chart into a wave

Wave Management

  • Bouncy – bouncy-wave@appspot.comAllows you to remove robots from a wave. Doesn’t seem to work on real people though, and laughs if you try to ask it to kick itself out. To get it to kick a bot out, type “bounce:name@domain.com”
  • Linear – Wish – Enforce all replies to be to the main wave. If a user replies to a reply, remove it and place it as a reply to the main wavelet.
  • Read Onliereadonliebot@appspot.com – Records the original wave content. Whenever it’s edited, the content is replaced with the original. Simple as that.
  • Seekdroidseekdroid@appspot.com – You can list Robots, add them and find them out, easy to use. In continuous development. Website with all the information seekdroid.appspot.com.
  • Sweepysweepy-wave@appspot.com – Remove empty, whitespace-only blips.
  • Taggytaggy-wave@appspot.com – Recognize #hashtags and add them as tags to the wave.
  • Tocgen – tocgen@appspot.com – Table of Contents auto-generated and updated based on the h1,h2,h3,h4 in a wave.
  • Twitusernamestwitusernames@appspot.com – Replaces all Twitter @username with links to the Twitter accounts.

Gadgets

(To use gadgets, once editing a blip, just click on the green puzzle piece,  and enter the url into the bottom text box)

Utilities

  • Ajax Animator GadgetIn Progress – http://antimatter15.com/ajaxanimator/wave/manifest.xml – A fully integrated multi-user web based vector graphic animation authoring environment.
  • AmazonBot Gadgett – http://amazon-withwaves-com.appspot.com/gadgets/AmazonProductList.xml - The AmazonBot gadget can detect products and return inline product links or a custom full product browser.
  • Bidder – http://wave-api.appspot.com/public/gadgets/bidder.xml – Simple Auction.
  • Checky – http://wave-gadgets.appspot.com/checky.xml – Basecamp-like checklists with drag-and-drop.
  • Click mehttp://wave-api.appspot.com/public/gadgets/hellowave.xml – Shows a button with a counter. Each time the button gets clicked, the counter is incremented by one. Shows off how the state interaction works.
  • HTML- http://wave-ide.appspot.com/html.xml – Embed any HTML into a wave.
  • <iframe> – http://wave-ide.appspot.com/iframe.xml – Embed any web page (as <iframe>) into a wave.
  • iWavehttp://gadget.wave.to/iWave/iWave.xml – Allows you to create a profile on wave to make wave just a little more personal. Uses facebook connect to retrieve your details if you sign in.
  • LicensingIn Progress – http://wave-license.appspot.com/license_gadget.xml – Creative Commons RDF Embedding – Planning Stage.
  • Maps – http://hosting.gmodules.com/ig/gadgets/file/101415471413908368316/mappy.xml -Embed Google Map.
  • Napkin – http://my-wave-gadgets.appspot.com/wave/NapkinGadget.xml – Example of Flash/Flex Wave Gadget, similar to Whiteboard gadget above – source on Google Code.
  • QuakeBot – In Progress – Server information on the Quake 3 protocol.
  • Rafflyhttp://raffly.googlecode.com/svn/trunk/sandbox/raffly-xml1/raffly.xml – Insert this gadget to select a random participant from your wave to be the winner. The winner of what? Well that’s up to you :-)
  • Ratings – http://google-wave-resources.googlecode.com/svn/trunk/samples/extensions/gadgets/ratings/ratings.xml – Lets participants rate and review a topic (movie, restaurant, etc) in a wave and shows a tally of the result.
  • Slashdot Gadget – http://www.m1cr0sux0r.com/slashdot.xml – Loads latest Headlines from Slashdot.
  • Troco – An experimental peer-to-peer currency –  http://troco.ourproject.org/gadget/org.ourproject.troco.client.TrocoWaveGadget.gadget.xml – Aims to provide a decentralized complementary community currency system, that is, a peer-to-peer currency system. Also you can see it as an IOU or promissory note based system. More info click here.
  • Vector Editor – http://jsvectoreditor.googlecode.com/svn/trunk/wave/vectoreditor.xml – A cross platform collaborative real time vector graphics editor.
  • Whiteboard gadget – http://vps.michaelrose.id.au/canvas.xml – Draw on a virtual whiteboard.
  • Who is Coming? – http://wave-api.appspot.com/public/gadgets/areyouin/gadget.xml -Show a list of all people that have said whether they will come or not.

Games

  • Backgammon – WishRemove all of one’s own checkers from the board before one’s opponent can do the same. [Wikipedia]
  • Battleship – Wish – Displays different board based on user.
  • Boxes – In Progress – Connect lines to make boxes and win.
  • Cards – http://wave-cards.googlecode.com/svn/trunk/cards.xml – Play card games.
  • Chess – http://gerculanum.appspot.com/gadgets/com.example.chessgadget.client.ChessGadget.gadget.xml – Play chess.
  • Connect 4/Four-in-a-row – In Progresssdunster@wavesandbox.comhttp://www.sdunster.com/wave/four.xml – 2 users + observers, turn locking, just waiting to write win-detection code.
  • Floodithttp://gadget.wave.to/floodit/game.xml – 2 player race to fill a board with colors.
  • Magnetic Poetry – http://hosting.gmodules.com/ig/gadgets/file/107558585548952247431/fridge-11.xml – Re-arrange random words to form poetry.
  • Match them colors!In Progress – Match 3 / gem matching game.
  • Othello – Wish – Play Reversi.
  • Sudoku – http://blah.appspot.com/wave/sudoku/sudoku.xml – Play Sudoku.
  • The Button – http://hyperthese.net/wave-gadgets/the-button.xml – A useless (I mean USELESS) game.

Hooks

  • CVS integration – Wish – CVS history can be converted into a wave with playback.
  • GIT integration – Wish - GIT history can be imported and played back (dffs).
  • SVN integration – Wish - SVN History can be converted into a wave with playback.
  • Share/Bookmark

Magento … how I love/hate thee …

Oh, Magento …

For those of you that are still living in the Stone Age (or those of you who don’t spend their free time researching open-source e-commerce platforms), Magento is a groundbreaking piece of software that basically splits the gap between the dated, functionality-deprived open-source platforms and the big, sexy (read: expensive) enterprise systems. Magento lands at a nice spot in the mid-market sector and having been downloaded 600,000+ times since it’s alpha release in the beginning of Q2, has certainly made quite the buzz in the e-retail community.

Having used Magento since it’s first public beta, I feel like I have been raising a child not unlike myself: absentmindedly-sophisticated-with-a-hint-of-logical-defiance. My relationship with Magento is the epitome of love / hate. We have had our beautiful moments when I realize my checkout process is just screaming high conversions and plugging-in with a third-party service is as simple as supplying API credentials. Other times, the only thing I’ve hated more then Magento are the software it was built to replace (read: x-cart, OS Commerce).

Magento makes the complex tasks simple and the straightforward tasks absolutely torturous .. for example:

Want to create a turn-key multi-channel e-retail store with guided navigation, single-page AJAX checkout, dynamic merchandising, complex promotions and a powerful data input/output engine? NO PROBLEM!!

Want to remove test orders from the database / backend? NO PROBLEM ……… just run this SQL query against your database:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SET FOREIGN_KEY_CHECKS=0;TRUNCATE `catalogsearch_query`;  -- added
 
TRUNCATE `catalogsearch_result`;  -- added
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_quote_payment`; -- added
TRUNCATE `sales_flat_quote_shipping_rate`; -- added
TRUNCATE `sales_order`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_tax`;  -- added
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `wishlist_item`;  -- added
-- reset customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
TRUNCATE `log_customer`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
-- Reset all ID counters
-- Some payment gateways need a unique transaction reference for every order,
-- reseting your order ID may result in future transaction errors!
-- (so only do this if you are sure it wont be a problem)
-- TRUNCATE `eav_entity_store`;
SET FOREIGN_KEY_CHECKS=1;

No folks, not kidding.

(This criticism isn’t completely fair … but …) I suppose you cannot expect a company whose revenue model is built off support to make their product too easy to use.

At the end of the day, it is still an great piece of open-source software that is only getting better and will pave the way for many new and established e-commerce properties. I for one will continue our box-of-chocolates / Freddy Krueger relationship until something better comes along.

  • Share/Bookmark

Google Learns to Crawl Flash – Designers Rejoice

A blog post from the powers that be over at the search giant have explained the development of new algorithms to crawl embedded Adobe Flash and pull out textual content.

In the past, web designers faced challenges if they chose to develop a site in Flash because the content they included was not indexable by search engines. They needed to make extra effort to ensure that their content was also presented in another way that search engines could find.

Now that we’ve launched our Flash indexing algorithm, web designers can expect improved visibility of their published Flash content, and you can expect to see better search results and snippets. There’s more info on the Webmaster Central blog

about the Searchable SWF integration.

Flash has been an SEO black hole since it was introduced, and this is certainly a major development in the ability to mix the interactive technology with SEO-friendly sites.

Read full article

  • Share/Bookmark

The New Virus (For Mac Folks)

From the site:
Spice up your colleagues’ day with our Newton Virus, the first virus to introduce gravity to your laptop, causing the desktop icons to fall down as if subject to the gravitational pull from the real world.

Newton Virus comes on a USB key for manual infection. Simply plug the key into a computer and the virus will automatically copy itself on the hard drive.

The virus will then hit at random, but only once. It will not replicate itself, mail itself to your friends or destroy any of your files, but instead provides you with moments of blissful surprise and magic.

  • Share/Bookmark

Google Analytics releases new tracking code / features

Google Analytics, our favorite free website analytics system, has recently released an update to their tracking code which brings with it a number of new features.

The code has gone through an update from this:


To this:


What changes can we expect from implementing this new code? The Official Google Analytics blog reports:

  1. Compare two metrics against each other to see how they correlate
  2. Support for the long awaited Tracking API
  3. New e-commerce tracking features
  4. Support for six additional languages: Thai, Filipino, Indonesian, Czech, Hungarian, and Portuguese (Portugal)
  5. And more…
  • Share/Bookmark