Jump to content


[Tutorial] Collapse/Remove columns in MKPortal modules


  • You cannot reply to this topic
No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 22 May 2006 - 10:03 PM

[Tutorial] How to collapse or remove side columns in MKPortal modules

It is possible to collapse or remove columns in individual module pages. Here is an example of how to remove columns in the Blog module. This principle can be used in any module.


Collapse Columns
To collapse columns in the MKPortal Blog module look in /mkportal/modules/blog/index.php and edit all of the calls to the "printpage" function that you see. For example...

FIND:
$mklib->printpage_blog("1", "1", "{$mklib->lang['b_pagetitle']}", $output, "");
REPLACE WITH:
FIND:
$mklib->printpage_blog("1", "0", "{$mklib->lang['b_pagetitle']}", $output, "");
Changing the second "1" to "0" will collapse the right column.


Remove Columns
If you want to remove the right column completely you could add "$mklib->loadcolumnright = 0;" to each module function in which you don't want the column.

For example
FIND:
	function main_page() {
		global $mkportals, $DB, $mklib, $Skin, $mklib_board;
ADD BELOW:
	function main_page() {
		global $mkportals, $DB, $mklib, $Skin, $mklib_board;


		// Unload columns	
		$mklib->loadcolumnleft = 1;
		$mklib->loadcolumnright = 0;
If you only want to remove the right column you really don't need to add "$mklib->loadcolumnleft = 1;" but I used it here to show that you can also remove the left column this way.


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users