ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Creating an XML front end for Flash Banner: What should I Use ? Extention, Module or plugin?

January 15, 2010 6:31am

Subscribe [4]
  • #1 / Jan 15, 2010 6:31am

    Crowds

    21 posts

    Moderator’s note: Moved to Howto

    Hi I have created a Flash banner that dynamically loads content from an XML file. I want to give the clients the ability to change or alter the content on whim.
    Obviously I don’t want them messing around with the actual xml file. So I want to create a page within the CP where they can alter things themselves without doing any damage to the XML structure. The XML structure would be like this…

    <images>
    <image src="---" tag="---" cont="---">
    <image src="---" tag="---" cont="---">
    <image src="---" tag="---" cont="---">
    <image src="---" tag="---" cont="---">
    <image src="---" tag="---" cont="---">
    <image src="---" tag="---" cont="---">
    </images

    So pretty basic
    And I would need three input fields (scr, tag and cont) for each <image tag >.

    My question(s) is..
    Should I create it as a Module, Extension or Plugin ?

    Also,is there any tutorials, guides or pointers towards developing third party interfaces for beginners ?

    Cheers
    Crowds

  • #2 / Jan 15, 2010 12:39pm

    Crowds

    21 posts

    Ahhh found the developers section !
    And decided module was the best path.
    Followed the tutorial for the “Fortune Cookie”
    I have to to a stage where I want to test installation….. and well it installs (i have looked at database to check) but the mod name never turns blue and it never updated to"remove” from install !

    What’s causing this ?

    if i strip the code right back to…

    <?php
    
    if ( ! defined('EXT'))
    {
        exit('Invalid file request');
    }
    
    
    class fxmlgen_CP {
    
        var $version        = '1.0';
        // ----------------------------------------
        //  Module installer
        // ----------------------------------------
    
       function fxmlgen_module_install()
        {
            global $DB;        
            
            $sql[] = "INSERT INTO exp_modules (module_id, 
                                               module_name, 
                                               module_version, 
                                               has_cp_backend) 
                                               VALUES 
                                               ('', 
                                               'fxmlgen', 
                                               '$this->version', 
                                               'y')";
                                               
            $sql[] = "CREATE TABLE IF NOT EXISTS `exp_fxmlgen` (
                     `fxmlgen_id` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
                     `fxmlgen_img` TEXT NOT NULL ,
                     `fxmlgen_tag` TEXT NOT NULL ,
                     `fxmlgen_text` TEXT NOT NULL ,
                     PRIMARY KEY (`fxmlgen_id`));";
        
            foreach ($sql as $query)
            {
                $DB->query($query);
            }
            
            return true;
        }
        // END
        
        
       // ----------------------------------------
        //  Module de-installer
        // ----------------------------------------
    
        function fxmlgen_module_deinstall()
        {
            global $DB;    
    
            $query = $DB->query("SELECT module_id
                                 FROM exp_modules 
                                 WHERE module_name = 'fxmlgen'");   
                      
            $sql[] = "DELETE FROM exp_modules 
                      WHERE module_name = 'fxmlgen'";
                      
                      
            $sql[] = "DROP TABLE IF EXISTS exp_fxmlgen";
    
            foreach ($sql as $query)
            {
                $DB->query($query);
            }
    
            return true;
        }
        // END
    
    
    
    }
    // END CLASS
    ?>

    It still does it !

    Any help greatly appreciated

  • #3 / Jan 16, 2010 10:28am

    Crowds

    21 posts

    Do I need to add something to exp_actions ?

  • #4 / Jan 18, 2010 11:19am

    Jarno F

    20 posts

    I created a weblog with few fields asking for image/video or what ever, then I created xml template printed those fields there and pointed my flash to read it.

  • #5 / Jan 19, 2010 12:32am

    ChiefAlchemist

    913 posts

    Pardon me for asking but what does the Flash bit do? Might it be doable with jQuery? That would make you life much easier, no?

  • #6 / Jan 19, 2010 5:14am

    Crowds

    21 posts

    The flash loads a series of images into a wall like structure. Then each image scales up to incorporate the whole of the banner while relevant text appears. It then returns to it’s original position before another screen starts the process.

      Don’t really think it’s doable with jqeury.

  • #7 / Jan 19, 2010 10:29am

    ChiefAlchemist

    913 posts

    Got a linky? Can we see?

  • #8 / Jan 19, 2010 11:09am

    Crowds

    21 posts

    It’s still in development. Nothing much to look at, just code.

  • #9 / Jan 19, 2010 12:58pm

    ChiefAlchemist

    913 posts

    Let me see if I have this right ...

    - There’s a grid of images. Let’s say 8 columns and 5 rows.

    - A hover over an image will enlarge that image, as well as display a caption or some sort of associated text as entered in that image in EE

    - Clicking? Any clicking?

    - Effects? Any other “flashy” effects on the drawing board?

    Is this right?

  • #10 / Jan 19, 2010 3:14pm

    Crowds

    21 posts

    Essentially yes that’s right.
    No clicking however, automated with a random order.
    But it’s really not the flash I’m having a problem with.

    The module I’m trying to create to handle the XML backend is not installing correctly.
    It installs in as far as all the correct tables are created in MySQL but it never says it’s installed in the modules section and the module name fails to turn into a link like it does in say, the referrer module.

  • #11 / Jan 19, 2010 3:44pm

    ChiefAlchemist

    913 posts

    Well in that case IMHO, you don’t need Flash. And if you don’t need Flash then the XML file read becomes a non-issue, no?

    The hover to enlarge can be done with CSS. If you want some sort of “ease” on the expand / shrink then I’d bet there’s a bit of off the shelf jQuery for that.

    For that it’s worth, for me, this is what makes EE such a power tool. When the dynamic of a DB driven site a combined with CSS+jQuery some really nice things start to happen. Honestly, I’m not a fan of Flash. It does some nice things but it’s usually over used and/or more difficult to work with. I personally try to steer clear.

  • #12 / Jan 19, 2010 4:35pm

    Crowds

    21 posts

    Sorry, thanks for taking the time to look into this.
    I have not really given Jquery any serious thought (mainly as I don’t really use javascript that much) I didn’t realise it could be used as an alternative to flash.
    I always thought it was more suited to creating nice in page tabs without the need for a page reload.

    While I also agree that flash can be over done I have worked with this client for a number of years and have made similar things in the past to embed images and video to show products that are available. And they have always been pleased…

    So before I scrap all the work I have done so far and look into Jquery I should just check..

    Can I manipulate a string of text one char at a time and apply blur, alpha as well motion easing ?
    What video formats can it handle ?
    How will Jquery help me with the issue I’m having with the creation of a module ?

    Cheers
    Jim

  • #13 / Jan 19, 2010 5:34pm

    ChiefAlchemist

    913 posts

    Hey Jim

    First, I’m not jQuery guru. I look around see something I like, bookmark it, and then reach for it wnen I need it. I haven’t hacked any jQuery code, I just find a plugin and have thus far used it “as is”. Look on SmashingMagazine.com they always have some nice “Best of” there.

    As I said, I just find that the combination of CSS + jQuery + EE to be deadly. Yes, there are tons of things Flash can do but integrating that - this thread being proof - is a bxtch, eh?

    I like jQuery cause it’s light weight and can give a site some cool effects as it coordinated well with CSS without be locked in with Flash. To each his own, no doubt. But if its been a while them maybe it’s time to teach an old dog (that’s you 😊 some new tricks?

  • #14 / Jan 20, 2010 3:35am

    Crowds

    21 posts

    But if its been a while them maybe it’s time to teach an old dog (that’s you 😊 some new tricks?

    I totally agree, in fact I did look at Jquery last night and downloaded the latest version to have a play with when I get time.

    Yes, there are tons of things Flash can do but integrating that - this thread being proof - is a bxtch, eh?

    If only that was the case, but as I have said, I’m not having an issue with flash. It’s purely EE.
    I could quite easily write a some php to handle the generation of the XML and store all the relevant info on MySQL and create a seperate backend so the client can edit the content on whim. But it seems logical to want to include that with EE and not have to tell the client that they are going to have to log into a seperate area just to edit the banner.

    I love EE from what I have seen of it so far. The speed at which you can build is an absolute joy. So when I say I’m having an issue, I’m not taking issue… more like the issue is my brain, wood for the trees and all that 😊

  • #15 / Jan 20, 2010 8:57am

    ChiefAlchemist

    913 posts

    For what it’s worth, I have problems with my brain too.

    Once you stumble into jQueryland I think you’ll find that EE plays quite nicely there. Why? Because jQ is HTML+CSS based. At that point you’re just using EE to serve up the content to fuel that fire.

    Good luck. Let me know how it goes.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases