Fusion Scripts Documentation Glossary   
Search  
   
Browse by Category
Fusion Scripts Documentation .: Garage Module .: Tips / Addons .: Adding IPDL Content Boxes for Garage v2.0.2

Adding IPDL Content Boxes for Garage v2.0.2

As of Garage v2.0.2 it has built in support for IPDL content boxes. This will not work on earlier versions of the Garage.


PLEASE NOTE: These instructions are only for Garage v2.0.2 with IPB 2.0.x!

These instructions will show you how to add all the IPDL content boxes available, however you may want to selectively choose which ones to add so you don't clutter up your IPDL page ;)

>>> Step 1


Open ./sources/ipbportal.php and Find near the top:


class ipdl {

var $output = "";
var $html = "";
var $template = "";
var $site_bits = array();
var $parser = "";
var $articles = array();
var $recent = array();
var $bad_forum = array();
var $good_forum = array();
var $raw = "";
var $topic = "";



Add after that:


// Garage MOD edit
var $garage_lib = "";
var $garage_config = array();
// END Garage MOD edit



And then find:


require_once( ROOT_PATH."sources/lib/post_parser.php" );

$this->parser = new post_parser( 1 );



Add after that:

// Garage MOD edit
$ibforums->lang = $std->load_words($ibforums->lang, 'lang_garage', $ibforums->lang_id);

require ROOT_PATH."sources/lib/garage_functions.php";
$this->garage_lib = new garage_functions(&$this);

$DB->query("SELECT * FROM ibf_garage_config");
$this->garage_config = $DB->fetch_row();
// END Garage MOD edit




And then find:


$this->site_bits['affiliates'] = $this->_show_affiliates();



Add after that any or all of these site_bits:


// Garage MOD edit
$this->site_bits['featuredvehicle'] = $this->garage_lib->show_featuredvehicle(1);
$this->site_bits['lastupdatedvehicles'] = $this->garage_lib->show_lastupdatedvehicles(1);
$this->site_bits['lastcommented'] = $this->garage_lib->show_lastcommented(1);
$this->site_bits['lastupdatedmods'] = $this->garage_lib->show_lastupdatedmods(1);
$this->site_bits['mostmodded'] = $this->garage_lib->show_mostmodded(1);
$this->site_bits['mostmoneyspent'] = $this->garage_lib->show_mostmoneyspent(1);
$this->site_bits['mostviewed'] = $this->garage_lib->show_mostviewed(1);
$this->site_bits['newestmods'] = $this->garage_lib->show_newestmods(1);
$this->site_bits['newestvehicles'] = $this->garage_lib->show_newestvehicles(1);
// END Garage MOD edit



Save and upload ./sources/ipbportal.php




>>> Step 2: Modify the Template

Now you need to insert the site bits into your IPB Portal skin. You may place these anywhere in the template you wish, perhaps down the left column, or a right column. It's all up to you. Follow table 1 below to see what you need to add to the template:

site_bit

Template Code

featuredvehicle
<!--CS.TEMPLATE.FEATUREDVEHICLE-->
lastupdatedvehicles
<!--CS.TEMPLATE.LASTUPDATEDVEHICLES-->
lastcommented
<!--CS.TEMPLATE.LASTCOMMENTED-->
lastupdatedmods
<!--CS.TEMPLATE.LASTUPDATEDMODS-->
mostmodded
<!--CS.TEMPLATE.MOSTMODDED-->
mostmoneyspent
<!--CS.TEMPLATE.MOSTMONEYSPENT-->
mostviewed
<!--CS.TEMPLATE.MOSTVIEWED-->
newestmods
<!--CS.TEMPLATE.NEWESTMODS-->
newestvehicles
<!--CS.TEMPLATE.NEWESTVEHICLES-->

Table 1: site_bit to Template Code lookup



In your Skin Manager edit the following Template Bit: (in your skin set, not the imported Garage skin set)
"IPB Portal" -> "csite_skeleton_template" and find:



<!--CS.TEMPLATE.AFFILIATES-->



Add after that any or all of the above Template Codes from Table 1 above:


<!--CS.TEMPLATE.FEATUREDVEHICLE-->
<!--CS.TEMPLATE.NEWESTVEHICLES-->
<!--CS.TEMPLATE.NEWESTMODS-->
<!--CS.TEMPLATE.MOSTMODDED-->
<!--CS.TEMPLATE.MOSTVIEWED-->
<!--CS.TEMPLATE.LASTUPDATEDVEHICLES-->
<!--CS.TEMPLATE.LASTUPDATEDMODS-->
<!--CS.TEMPLATE.MOSTMONEYSPENT-->
<!--CS.TEMPLATE.LASTCOMMENTED-->




Remember that each content box you add will increase the load time by a little bit for your IPDL front page, so choose which ones and how many carefully.

And like magic you should now have some new content boxes.


How helpful was this article to you?

Related Articles

article Adding IPDL Content Boxes for Garage v2.0.3
Garage Module v2.0.3 has adopted the new IPB...

(No rating)  10-5-2005    Views: 1132   
article Manually adding garage button to posts
Under normal circumstances skin inheritence...

  12-7-2004    Views: 2660   
article What is the Garage?
The Garage is a vehicle database/registry...

(No rating)  12-6-2004    Views: 1552   

User Comments

Add Comment
No comments have been posted.


.: Powered by Lore 1.5.6
Copyright © 2005 Fusion Scripts. All Rights Reserved