Jump to content

- - - - -

What data is returned for getdata function of the left column modules?

template 2.3.1 template update

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1   nomail_forme

  • Members
  • 17 posts

Posted 28 May 2012 - 11:27

I'm recreating a template of 2.2 in 2.3.1. The Left column php in removed in 2.3.1 and instead modules are introduced. For the categories module I see this function -
What exactly should be returned to this function?

I see it is a string. What should the string contents be?

Edited by nomail_forme, 28 May 2012 - 11:29.

#2   DunWeb


    The Censored One

  • Members
  • 13,084 posts

Posted 28 May 2012 - 11:49


The content is pulled from the database.

A template should NOT require you to change the categories functions.

:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

#3   nomail_forme

  • Members
  • 17 posts

Posted 28 May 2012 - 11:56

This is what is originally returned

$data = '<div class="ui-widget infoBoxContainer">' .
			  '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_CATEGORIES_BOX_TITLE . '</div>' .
			  '  <div class="ui-widget-content infoBoxContents">' . $categories_string . '</div>' .
	  return $data;

The <div class=> is what i want to change here.

If i don't modify the function then how should i change the look of the categories column?

#4   nomail_forme

  • Members
  • 17 posts

Posted 28 May 2012 - 12:13

This is the case :
in 2.2 the template simply used a custom box class defined in the boxes.php called infoBox2 . In the categories.php it simply created a object of this class in the end of the categories.php to generate the categories column. The categories list is being passed to the class constructor . The code pertaining to it is shown below.
$info_box_contents = array();
$info_box_contents[] = array('text' => '<ul class="categories">' . $categories_string . '</ul>');
new infoBox2($info_box_contents);

In 2.3.1 obviously i can't just create the object without breaking the grid structure( which i managed to maintain so far) AND the module like functionality.


any Approach or atlernative ideas would be appreciated.

-Thanks for your answers so far

I forgot to mention that there are almost NO differences between the 2 versions in the rest of the file. The only differences are that 2.3.1 is using the functions to add module functionality whereas 2.2 doesn't have the functions and the same code is just spread out through out the file AND the template has the last part of the code extra as mentioned above..

Edited by nomail_forme, 28 May 2012 - 12:22.

#5   nomail_forme

  • Members
  • 17 posts

Posted 28 May 2012 - 13:12

The discussion is moved.I have started a new topic for this.
Please post any further Replies HERE - http://forums.oscomm...egories-column/

Edited by nomail_forme, 28 May 2012 - 13:12.

#6   nomail_forme

  • Members
  • 17 posts

Posted 28 May 2012 - 19:20

Solved it! /biggrin.png' class='bbc_emoticon' alt=':D' /> /biggrin.png' class='bbc_emoticon' alt=':D' />
I did it by converting the HTML code generated by creating object to a string and passing that string to the function. I did it by output buffering in PHP. I was struggling with this all day . Finally done. The code is as follows.
new infoBox2($info_box_contents);
$data = ob_get_clean();
return $data;