Welcome Guest ( Log In | Register )


> IPS Related Information

This section is focused on Invision Power Services products...

IPS, widely praised for the continuous efforts aimed to a stable, fast and efficient board system has brought to us Invision Power Board, but not only that..

Invision Power Gallery & Invision Community Blog allow the forum members :

  1. Host & publish images
  2. Host and link Blogs
  3. Integrate all that to the Invision Power Board

 
Reply to this topicStart new topic
> IPS Tutorials: Components and Modules > Create an IPB Components Public
RSS Bot
post 31 Dec 2008, 06:42 AM
Post #1


yourforum Robot
Group Icon

Group: Private Members
Posts: 196639
Joined: 12-July 05
From: RSS World
Member No.: 125



First to start off with open an ftp program / find your forums folder / sources / components_public
Download and open the file example.php as you can see Matt has a simple example.

Step 1. Open notepad copy the below text and save it as yourpage.php

<?php
  
      if ( ! defined( 'IN_IPB' ) )
      {
          print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
          exit();
      }
  
          class component_public
          {
                  var $output     = "";
                  var $page_title = "";
               var $nav        = array();
                  var $html       = "";
               var $ipsclass;
  
      /*-------------------------------------------------------------------------*/
      // Run Component
      /*-------------------------------------------------------------------------*/
  
          function run_component()
          {
              global $ipsclass;
              $this->ipsclass->load_language('lang_yourpage');
              $this->ipsclass->load_template('skin_yourpage');
              $this->base_url = $this->ipsclass->base_url;
  
                $this->main();
  
              $this->nav[]      = "<a href='{$this->ipsclass->base_url}autocom=yourpage'>{$this->ipsclass->lang['page_title']}</a>";
              $this->page_title = $this->ipsclass->lang['page_title'];
                  
              $this->ipsclass->print->add_output( $this->output );
              $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name']." - ".$this->page_title, 'JS' => 0, NAV => $this->nav ) );
          }
  
      /*-------------------------------------------------------------------------*/
      // Main
      /*-------------------------------------------------------------------------*/
          function main()
          {
              global $ipsclass;
  
              $this->output .= $this->ipsclass->compiled_templates['skin_yourpage']->main();
  
          }
  
  
      }
      ?>




Step 2. Open your AdminCP / LOOK & FEEL / Select your skin / Edit Template HTML / All Global HTML / down the bottom click Add Template Bit

New Template Bit Name: main
Or Create New Group: yourpage
Click Continue / In the text box copy and paste the below code into it and Click Save Template

<div class='borderwrap'>
      <div class="maintitle">{$this->ipsclass->lang['welcome_message']}</div>
      <table width='100%' cellpadding='4' cellspacing='1'>
      <tr><td class='row2' width='100%' align='left'>{$this->ipsclass->lang['welcome_message']} {$this->ipsclass->member['name']}
  
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla erat libero, posuere non, adipiscing vel, aliquam vitae, metus. Integer elementum viverra elit. Aenean quis odio at nisl viverra cursus. Phasellus nibh. Nulla tellus est, aliquam a, consequat ac, sodales elementum, arcu. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce mi. In hac habitasse platea dictumst. Nullam est erat, dapibus eu, tempor eget, molestie nec, massa. Mauris eu enim sit amet magna dapibus sodales. Nulla hendrerit mauris eget purus. Fusce enim magna, luctus placerat, ornare eget, venenatis sit amet, magna. Proin tellus.</td></tr>
      </table>
      </div>




Step 3. Open notepad and copy the following code, save this as lang_yourpage.php

<?php
  
      $lang = array
      (
  
      'page_title'      => "Your Page",
      'welcome_message' => "Welcome to Your Page",
  
      );
      ?>




Step 4. Upload all the files as described below
yourpage.php -> sources/components_public
lang_yourpage.php -> cache/lang_cache/en

Step 5. You can access your file from http://www.yourforum.com/index.php?autocom=yourpage View the full article
Go to the top of the page
 
Bookmark this: Post to Del.icio.usPost to DiggPost to FacebookPost to GooglePost to SlashdotPost to StumbleUponPost to TechnoratiPost to YahooMyWeb
+Quote Post
sarawestlander
post 18 Nov 2009, 08:29 AM
Post #2


Newbie
Group Icon

Group: Members
Posts: 9
Joined: 17-November 09
Member No.: 38823
Gender: I'm a 0!



USMLE step 1 and step 2 This is what helped me survive http://usmlereview.net
usmle step 2
usmle
Go to the top of the page
 
+Quote Post
sarawestlander
post 19 Nov 2009, 10:52 AM
Post #3


Newbie
Group Icon

Group: Members
Posts: 9
Joined: 17-November 09
Member No.: 38823
Gender: I'm a 0!



USMLE step 1 and step 2 This is what helped me survive http://usmlereview.net
usmle step 2
usmle
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th March 2024 - 04:11 PM
Skin and Graphics by Dan Ellis and Anubis. Hosting by Forums & More © 2005-2011.
InvisionGames - Your #1 Arcade Games Repository | AllSigs - Signatures for all | Rock Band + Guitar Hero = RockHero ! | The Remoters - Remote Assistance | FileMiners - You ask, We find