FusionBB

Please See the FusionBB End Of Life Announcement

FusionBB Review (large)
FusionBB SWAG!

FusionBB golf shirts, t-shirts, mousepads and more.

Tagging
Article by Chris Peterson    (10-03-07 12:51 AM)
http://www.fusionbb.com/forum/skins/Crisp/indicators/attach.png



(Applies to: versions 2.2 and newer of FusionBB)





Beginning with FusionBB version 2.2, it's very easy to customize your site by adding your own custom particle boxes.





To add a custom particle box, go to:


AdminCP >> Edit >> Edit Portal Layout


There are two example particle boxes already created that you can use as templates for building your own.

  • Example_With_Code
  • Example_With_Out_Code


By using the information on these two examples you have a template with which to begin building your own custom particles.

It is recommended NOT to edit these aside from viewing the examples they contain.




To add a custom particle box, click on the Add Particle Box button at the bottom of the page.

In the title box enter a unique title for the particle box you are creating. The title will be referenced in the code and won't be visible to your users.

The body section is for your HTML code. It is required for your particle box to function.

There are three buttons here that will insert commonly used HTML code to help you build your particle.



The Table button will insert the basic design to mimic existing particles. The name of your particle box needs to go between the following tags:


Code:

 <th class='theader'>Name of your particle box</th






And the main body of your particle goes between these tags:


Code:

 <td align='left' valign='top' class='color1'>Body goes here.</td





The {$lang_str['STRING']} button will allow you to insert language strings and the <!--VARIABLE--> button will allow you to use the variables that are used in the FusionBB software.

Please note: The particle box coding section is available for more advanced particles and is NOT required . It will enable you to create complex boxes using If, While, For, and SQL calls. You should be versed in PHP Coding to use this.




The "Current State" section determines whether your particle box is visible (Published) or still being worked on (Composing).




The "Cache Time" will determine how often your particle box is "re-built" and cached into your portal or sidebars.





The "Pull from Forums" option determines which forums you will be pulling the data from. Basically it lists the forums and when you click it lists the forum ID numbers as an easy place to find them. (This is an optional step.)




The "Type of Data" section will eventually allow you to pull forums that are built with these data types directly. it is not finished and is an optional step.(This is an optional step.)





The "Particle Box Placement" settings will allow you to determine where the particle box is placed on your portal page, or on the forums and in which position: left, right, or center.




Click the "Add Particle Box" button when finished to return to the Edit Portal Layout page.







Visit the FusionBB Dev forums for more custom particle boxes ideas.



Here is an Example of a Particle Box that Pulls from a Forum and Displays the Results. Returns a List of Users who have Posted in this Forum or Topic


Body Section:

Code:

 <table border='0' cellpadding='3' cellspacing='{$skin['cellspacing']}' width='100%'> <tr> <th class='theader'>People to Post Lately in this <!--STUFF_TITLE--></th> </tr> <tr> <td align='left' valign='top' class='color1'><!--STUFF--></td> </tr> </table





Code Section:

Code:

 if(!empty($fid) && is_numeric($fid)){     $STUFF_TITLE 'Forum';         $result mysql_query" select distinct(topic_username) from {$conf['table_prefix']}topics WHERE forum_id = '".$fid."' order by topic_first_post_time DESC  "  ); while ($row mysql_fetch_assoc($result)) { $my_info[]=$row;}      $STUFF '';     foreach($my_info as $my_info_row){         $STUFF .= $my_info_row['topic_username'] . '<br>';     } } if(!empty($tid) && is_numeric($tid)){     $STUFF_TITLE 'Topic';     $result mysql_query" select distinct(user_id) from {$conf['table_prefix']}posts WHERE topic_id = '".$tid."' order by post_posted ASC  "  ); while ($row mysql_fetch_assoc($result)) {      $result2 mysql_query" select info_display_name from {$conf['table_prefix']}user_info WHERE user_id = '".$row['user_id']."'"  ); list ($row['username']) = mysql_fetch_row($result2);  $my_info[]=$row;}      $STUFF '';     foreach($my_info as $my_info_row){         $STUFF .= $my_info_row['username'] . '<br>';     } }  






(This topic is still being edited for content.)



 
Icon Legend Permissions Topic Options
Print Topic


1635 Views
Calendar
SMTWTFS
 1234
567891011
12131415161718
19202122232425
262728293031 
Current Quote
"I know I've seen some features that [Name Removed] has refused to incorporate and that should bring quite a few people over to here in order to switch. The user control panel is MUCH more user friendly than anything else I've seen or use."
~ Greg
FusionBB™ Version 3.2 | ©2003-2014 InteractivePHP, Inc.
Execution time: 0.21 seconds.   Total Queries: 66   Zlib Compression is on.
All times are (GMT-4). Current time is 11:15 PM
Top