Overmind_

+Clients
  • Content count

    10
  • Joined

  • Last visited


About Overmind_

  • Rank
    core_member_rank_44

Overmind_'s Activity

  1. Overmind_ added a post in a topic: Help me with Plugin Block   

    I'm trying to export my template (from AC->Block Managment->Export Plugin Templates), but in the end I see:
    [#11CCS19] We could not find the template bit to export.
    however, in the /other/my_app/xml/ I have a file plugin_block_templates.xml with my single template, something like this:


    <?xml version="1.0" encoding="utf-8"?> <blockexport> <blocktemplate> <template> <tpb_name>block__on_main</tpb_name> <tpb_params><![CDATA[$title = "", $records = ""]]></tpb_params> <tpb_content><![CDATA[ <h3>ololo</h3> ]]></tpb_content> </template> </blocktemplate> </blockexport>
  2. Overmind_ added a post in a topic: Help me with Plugin Block   

    Thanks, and I have for you one more question :smile:
    about the link that you gave me, I was able to solve the problem with a template so:


    public function returnPluginInfo() { return array( ... 'templateBit' => 'block__custom', ); } and then public function executePlugin( $block ) { ... $html = $this->registry->output->getTemplate('ccs_global')->on_main_news($records); ob_start(); $_return = $this->registry->output->getTemplate('ccs')->block__custom( $block['block_name'], $html ); ob_end_clean(); return $_return; } } then, i go to the /admin/applications_addon/ips/ccs/xml/plugin_block_templates.xml and see there: <template> <tpb_name>block__custom</tpb_name> <tpb_params><![CDATA[$title="",$content=""]]></tpb_params> <tpb_content><![CDATA[<div class='general_box'> <h3>{$title}</h3> <div> {$content} </div> </div> <br />]]></tpb_content> But all my attempts to change this block__custom lead to nowhere. I tried to create a file plugin_block_templates.xml in my application directory /xml with some_my_template and use it so: public function executePlugin( $block ) { ... ob_start(); $_return = $this->registry->output->getTemplate('ccs')->some_my_template( $block['block_name'], $records ); ob_end_clean(); return $_return; } } but IPB could not see some_my_template... By the way, watching your (KC3X) Site Poll Block... done by analogy I could not get: "my_template" template I created! public function executePlugin( $block ) { ... $templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id']; $html = $this->registry->output->getTemplate('global')->my_template( $records ); ob_start(); $_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $html ); ob_end_clean(); return $_return;
  3. Overmind_ added a post in a topic: Help me with Plugin Block   

    Thanks, and one more question:
    the documentation says (http://community.invisionpower.com/resources/documentation/index.html/_/documentation/administrator-control-panel/ipcontent/blocks-r177) that the plug-in should I put into
    /ips/ccs/sources/blocks/plugin/
    But, can I create a folder /other/some_my_app/sources/blocks/plugin/my_block_plugin/ and and put there my plugin.php?
    I tried to do that, but after that IPB could not see my plugin
  4. Overmind_ added a post in a topic: Help me with Plugin Block   

    (guys, sorry for my english)
    In the standard plug-ins (which are in /admin/applications_addon/ips/ccs/sources/blocks/plugin/) in the method returnPluginInfo() we can see something like this:



    $_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $active ); - here we call template, which is indicated in 'templateBit' => 'block__online_users'? Am I right?

    So, my question: I make a plugin-block and i want to use my template, wich i have created in AC in "Block Templates". But if i will do so:
    'templateBit' => 'name_of_my_block', - it doesn't work (name_of_my_block - is T emplate name )
    How can that be?
    public function returnPluginInfo() { return array( 'key' => 'online_users', 'name' => 'ololo', 'description' => 'ololo', 'hasConfig' => false, 'templateBit' => 'block__online_users', ); } 'templateBit' => 'block__online_users' - here we give the name of the template you created in AC in "Block Templates"? Or what is it? Further, in the method executePlugin( $block ) we can see something like this: public function executePlugin( $block ) { ... $pluginConfig = $this->returnPluginInfo(); $templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id']; ob_start(); $_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $active ); ob_end_clean(); return $_return; }

About Me

Status Feed