1
Mazar
Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/9/30 7:08

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


Can i use a block within a block with this hack? i am creating a html block with XOOPS custom blocks. i want to put another block within this block using <{block id=15}> but it is only printing <{block id=15}> this.

can anyone tell me if i can do something like this?
i even put the smarty plugin in plugins directory i made it work on theme but not in a custom html block

2
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/5 7:26

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


is this possible. ? bump...

i tried but its not working

any clue?

tab within/inside tab

3
ghia
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/5 8:08

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think it can only be done in a PHP block by incorporating the code of the block to add.
In the HTML block, you can only put HTML. I assume for your purpose, there would be needed a third type: a Smarty template block.

4
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/5 8:33

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


Quote:
a Smarty template block.


that will be great if it can be include in next release

any quick fix/hack ?

5
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/5 8:42

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


if we put {X_SITEURL} it will printhttp://xxxxxxxxx

so <{block id=15}> will display the block

where is this smarty tag for custom blocks are defined ?

6
Mazar
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/5 8:56

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


It may would work if we find where we can define it.
Let me know if you make it work

7
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/5 9:03

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


kernel/block.php

8
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/6 5:04

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


anyone ?

9
Mazar
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/6 11:00

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


If anyone can put it in this function to get it work.

function getContent($format 'S'$c_type 'T')
    {
        switch (
$format) {
            case 
'S':
                if (
$c_type == 'H') {
                    return 
str_replace('{X_SITEURL}'XOOPS_URL '/'$this->getVar('content''N'));
                } else if (
$c_type == 'P') {
                    
ob_start();
                    echo eval(
$this->getVar('content''N'));
                    
$content ob_get_contents();
                    
ob_end_clean();
                    return 
str_replace('{X_SITEURL}'XOOPS_URL '/'$content);
                } else if (
$c_type == 'S') {
                    
$myts =& MyTextSanitizer::getInstance();
                    
$content str_replace('{X_SITEURL}'XOOPS_URL '/'$this->getVar('content''N'));
                    return 
$myts->displayTarea($content01);
                } else {
                    
$myts =& MyTextSanitizer::getInstance();
                    
$content str_replace('{X_SITEURL}'XOOPS_URL '/'$this->getVar('content''N'));
                    return 
$myts->displayTarea($content00);
                }
                break;
            case 
'E':
                return 
$this->getVar('content''E');
                break;
            default:
                return 
$this->getVar('content''N');
                break;
        }
    }

10
demian
Re: Blocks anywhere hack by trabis works within custom html blocks?
  • 2009/11/8 11:53

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


bump

Login

Who's Online

182 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits