Jump to content

Custom Banner Type


v.zhakov

Recommended Posts

Hello!

I need modify banner fields (storage) and banner view (client's html).

One way, that I see - create custom banner type. How I can add fields (image, text) to my custom banner?

So, I've added this fields to form. But they are not saved(((

Can somebody help me?

 

 

<?php

require_once MAX_PATH . '/lib/OA.php';
require_once MAX_PATH . '/lib/max/Plugin/Common.php';
require_once LIB_PATH . '/Extension/bannerTypeText/bannerTypeHtml.php';
require_once MAX_PATH . '/lib/max/Plugin/Translation.php';

class Plugins_BannerTypeHTML_domHtml_domHtmlComponent extends Plugins_BannerTypeHtml {

    /**
     * Return type of plugin
     *
     * @return string A string describing the type of plugin.
     */
    function getOptionDescription() {
        return $this->translate("My HTML Banner");
    }

    function buildForm(&$form, &$row) {
        parent::buildForm($form, $row);

        $form->addElement('text', 'text1', "Text Title");

        addUploadGroup($form, $aBanner, array(
            'uploadName' => 'upload',
            'radioName' => 'replaceimage',
            'imageName' => '$imageName',
            'newLabel' => $GLOBALS['strNewBannerFile'],
            'updateLabel' => $GLOBALS['strUploadOrKeep'],
            'handleSWF' => true
        ));
    }

}

 

Thanks!
Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...