News:

Wondering if this will always be free?  See why free is better.

Main Menu

How to: Add extra info/options to boards

Started by etdwh, July 05, 2006, 11:22:18 PM

Previous topic - Next topic

etdwh

Hi..

What im trying to do is:
-add special notes to each boards individually, which will be displayed at the top when members are viewing the board. Kinda like special rules for individual boards
-add the special notes at the board option page in the admin panel (Modify Boards)
To get an idea, i have modified the Modify Board template to show what im trying to do:


And if the rules option is enabled for this board, i will be shown below the global announcement, based
on the super-sticky tip.


What i need to know is:
-How do i modify ManageBoards.php to load and save the extra information im trying to add for each board?
I think thats what i have to modify anyway..

Help is much appreciated.
Thanks

etdwh

Well, after some mucking around in the code, i managed to do something like what i wanted.
I will list the places i made the changes, but post my changes later, as i need to make sure i didnt break any other feature.

Source/Sub-Boards.php
function getBoardTree()

  • append b.show_rules, b.board_rules to end of SELECT sql list of columns
  • add show_rules and board_rules to $boards array

function modifyBoard($board_id, &$boardOptions)

  • added checking to see if show_rules and board_rules is set in $boardOptions
  • is set then add to $boardUpdates[]

Source/Load.php
function loadBoard()

  • added b.show_rules, b.board_rules to end of SELECT sql list of columns
  • add show_rules and board_rules to $board_info array
  • parse_bbc for board_rules

Source/MessageIndex.php
function MessageIndex()

  • copy show_rules and board_rules from $board_info to $context

[theme]/MessageIndex.template.php

  • Check if show_rules is == 1 and board_rules !=''
  • Display board rules below global announcements

Well, that works for me, will post the code changes i made later. Im sure it will be messy, this is my first experience doing php codes  :o

Advertisement: