1
antifmradio
Cloning a Block

i looked around for this one a bit but only came across MODULE cloning

how can i clone a block?

Im using NEW BB and have one of the blocks for it showing parts 1 2 and 4 of the message boards
i want to have a second block on my mainpage showing part 3 of the message boards

obviously because differing information is posted to that section so

how can i clone a block?

2
rasme
Re: Cloning a Block
  • 2008/1/31 22:20

  • rasme

  • Just popping in

  • Posts: 39

  • Since: 2005/5/9 6


open xoops_version.php file for module..

search for

$modversion['blocks'][1] = array(
        
'file' => "newbb_block.php",
        
'name' => _MI_NEWBB_BLOCK_TOPIC_POST,
        
'description' => "Shows recent replied topics",
        
'show_func' => "b_newbb_show",
        
'options' => "time|5|360|0|1|0",
        
'edit_func' => "b_newbb_edit",
        
'template' => 'newbb_block.html');


make copy then paste under it.

you can change "name" and "description"..

last update the module ---> "Modules Administration"

3
antifmradio
Re: Cloning a Block

seems like that worked spectacularly.

Thanks. Hope someone else finds this useful

4
noo-b
Re: Cloning a Block
  • 2008/2/1 5:19

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


there is an excellent tutorial in the FAQ
https://xoops.org/modules/smartfaq/faq.php?faqid=609
I Love Xoops

5
antifmradio
Re: Cloning a Block

actually i looked at and tried that one however the code it speaks of searching for does not exist in my copy of xoop_version.php

it says to look for this:

$modversion['blocks'][4]['file'] = "news_top.php";
$modversion['blocks'][4]['name'] = _MI_NEWS_BNAME5;
$modversion['blocks'][4]['description'] = "Shows recent articles";
$modversion['blocks'][4]['show_func'] = "b_news_top_show";
$modversion['blocks'][4]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][4]['options'] = "published|10|25|0|0|0|0||1||||||";
$modversion['blocks'][4]['template'] = 'news_block_top.html'// news_block_recent.html



below the BLOCKS comment

its not there

6
noo-b
Re: Cloning a Block
  • 2008/2/2 18:49

  • noo-b

  • Just can't stay away

  • Posts: 456

  • Since: 2007/10/23


the faq is just an example for news module and not newbb

read step by step.. i'm pretty sure it can be done....i've use this cloning method without fail....
I Love Xoops

7
antifmradio
Re: Cloning a Block

worked on one of my websites but now im trying this again on another site
When i goto update the module
i get this message

Got error 134 from storage engine

I even get it when i REMOVED the adjusted code leaving nothing but the original and update

Login

Who's Online

349 user(s) are online (260 user(s) are browsing Support Forums)


Members: 0


Guests: 349


more...

Donat-O-Meter

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

Latest GitHub Commits