11
phppp
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/23 21:30

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Before CBB 1.0, newBB 2.0x, the forum ids are separated by ","
In new version, "|" is used

12
JamesSAEP
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/23 22:40

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Ok, here is my code for the xoops_version file:
Quote:

$modversion['blocks'][5]['file'] = "newbb_block.php";
$modversion['blocks'][5]['name'] = _MI_NEWBB_BNAME5;
$modversion['blocks'][5]['description'] = "Shows recent Social Issue topics";
$modversion['blocks'][5]['show_func'] = "b_newbb_show";
$modversion['blocks'][5]['options'] = "10|0|time|0";
$modversion['blocks'][5]['edit_func'] = "b_newbb_edit";
$modversion['blocks'][5]['template'] = 'newbb_block.html';


I have changed the line:
$modversion['blocks'][5]['options'] = "10|0|time|0";
to
$modversion['blocks'][5]['options'] = "10|0|time|68,72,69,70";

This is the format that is stated in the "readme_first.txt" file of the newbb module:
Quote:

//$options = "TheNumberToDisplay|ViewMode(0?1?2?)|time_Or_reviews_Or_replies|ForumId1,ForumId2,ForumId3";


What have I done wrong?

13
phppp
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/23 23:15

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


I recommend you to test CBB 1.13 with XOOPS 2.010

14
JamesSAEP
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/23 23:21

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


I'm downloading it now and will test. Thanks for your help! 1. I'm assuming that CBB will do what I want?
2. Will CBB import/keep my forums?

Thanks.

15
JamesSAEP
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/25 15:33

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


phppp -
I have downloaded and installed the cbb module in a test site.
The administration of the module is very nice.
But I still can't get the "Recent Blocks" to clone correctly. I need 6 additional "Recent Blocks" based on time for each category.

I'm duplicating the code for the "Shows recent topics in the forums" that is in the xoops_version.php file and changing the "'name' => _MI_NEWBB_BNAME1" to reference each new block:
'name' => _MI_NEWBB_BNAME12,
'name' => _MI_NEWBB_BNAME13,
'name' => _MI_NEWBB_BNAME14,
'name' => _MI_NEWBB_BNAME15,
'name' => _MI_NEWBB_BNAME16,
'name' => _MI_NEWBB_BNAME17,

Is this the right way to do it? If not, can you show me the code?

16
phppp
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/26 20:06

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


@Jamescne, I got you message.
Sorry for not responding the post in time.

Modifying xoops_version.php would be a solution but the right way is
https://xoops.org.cn/modules/newbb/viewtopic.php?topic_id=1574

FAQ re NewBB blocks could be:

With NewBB 2.0 you can add blocks on-fly as following.

1 Enter 'Administration Menu'=>"block admin"=>"Add new block"

2 In the "Add a new block":

2.1 Block Type: choose anyone as you prefer
2.2 Weight: input any valid value as you prefer
2.3 Visible: select any one as you prefer
2.4 Visible in: set any one as you prefer
2.5 Title: input any valid text as you prefer
2.6 Content:
include_once(XOOPS_ROOT_PATH '/modules/newbb/blocks/newbb_block.php');
$options "time|10|*|0|1|1|2|3|4|5|6";
b_newbb_custom($options);

Quote:

// options[0] - Citeria valid: time(by default)
// options[1] - NumberToDisplay: any positive integer
// options[2] - reserved
// options[3] - DisplayMode: 0-full view;1-compact view;2-lite view
// options[4] - Display Navigator: 1 (by default), 0 (No)
// options[5] - SelectedForumIDs: null for all


2.7 Content Type: MUSTBE "PHP Script"
2.8 Cache lifetime: choose any one as you prefer
2.9 Preview, Submit: press any one as you prefer, BE SURE press at least one time "submit" before leaving block admin


You could add any type of blocks following the same way

17
JamesSAEP
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/26 20:17

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Cool, thanks - I'll try this for Newbb2 and CBB 1.13.

Thanks for the url to the support forum. I went to the site, but wan't able to read anything.

18
phppp
Re: how to Clone Most Viewed Topics block in newbb2
  • 2005/5/26 20:26

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Quote:

Jamescne wrote:
Thanks for the url to the support forum. I went to the site, but wan't able to read anything.


It is the same stuff I posted above.

Login

Who's Online

349 user(s) are online (237 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