Customizing SMF > Tips and Tricks

Make a simple SMF blog using 3 existing mods

(1/9) > >>

Mick.:
Per request on how i made 3 mods to work together to create an actual blog.

 http://www.chevyavalancheclub.com/index.php?action=blog

For SMF 2.0 only!

Mods needed and installed:
SSI Multiple Board News
SMFBlog
Custom Action

Creating the category and boards

1. Let's create our new forum category by going to:
    admin---->forum---->create new category     

    a. Name it: ie, "Blog"

2. Lets create a few boards inside the newly created category. ... (for blog categories purposes)
    admin----->forum---->add board

   a. board #1
   b. board #2
   c. board #3
   d. board #4
   e. board #5
   f. make sure to checkmark: "Use this board as a blog?".

3. Lets hide the "Blog" category from the forum:
    admin---->features & options--->Blog

    a. checkmark: "Hide blog boards?".



Creating the custom actions

1. Lets create the main "blog" page.
    admin---->features & options--->custom actions

   a. Action Name: Blog
   b. Action URL: blog
   c. Type: PHP
   d. Permissions Mode: Visible to everyone
   e. Enabled: yes

2. The code.

   a. rename ('board' => array(1,2,3,4,5)) with the actual board ID's you want to use.
   b. rename "yourforum.com" with your own URL
   c. rename the board category and action.

   
--- Code: ---echo'
<div align="center"><table width="915px" border="0" cellpadding="2" cellspacing="2" bgcolor="f9f7f5">
<tr valign="top">
<td>
<div> <h3 class="titlebg grid_header"><span class="left"></span>
Blog Home - blog description goes here
</h3>
<div class="roundframe grid">';
$parameters = array(
  'limit' => 10,
  'board' => array(1,2,3,4,5),
  'board_disp' => false,
  'category_disp' => false,
  'length' => '300',
  'attachments' => 'none', 
);
ssi_multiBoardNews($parameters);
echo'
</div>
</td>
<td>
<div>
<h3 class="titlebg grid_header"><span class="left"></span>
Categories
</h3>
<table class="tborder" width="100%">
<tr class="windowbg">
<td><li><a href="http://www.yourforum.com/index.php?action=blog">Blog Home</a></li>
<hr />
<li><a href="http://www.yourforum.com/index.php?action=category1">category 1</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category2">category 2</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category3">category 3</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category4">category 4</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category5">category 5</a></li></td></tr>
</table>
<br />

echo'
<span class="lowerframe"><span><!-- // --></span></span>
<br class="clear">
</div>
</td>
</tr>
</table></div>';
--- End code ---


3. The code for the second, third, fourth, fifth category.

1. Lets create the main "category 1" page.
    admin---->features & options--->custom actions

   a. Action Name: Category 1
   b. Action URL: category1
   c. Type: PHP
   d. Permissions Mode: Visible to everyone
   e. Enabled: yes

2. The code.

   a. rename ('board' => array(99999,1)) with the actual board ID's you want to use. (leave 99999 alone)
   b. rename "yourforum.com" with your own URL
   c. rename the board category and action.

   
--- Code: ---echo'
<div align="center"><table width="915px" border="0" cellpadding="2" cellspacing="2" bgcolor="f9f7f5">
<tr valign="top">
<td>
<div> <h3 class="titlebg grid_header"><span class="left"></span>
Category 1 - category 1 small description goes here
</h3>
<div class="roundframe grid">';
$parameters = array(
  'limit' => 10,
  'board' => array(99999,1),
  'board_disp' => false,
  'category_disp' => false,
  'length' => '300',
  'attachments' => 'none', 
);
ssi_multiBoardNews($parameters);
echo'
</div>
</td>
<td>
<div>
<h3 class="titlebg grid_header"><span class="left"></span>
Categories
</h3>
<table class="tborder" width="100%">
<tr class="windowbg">
<td><li><a href="http://www.yourforum.com/index.php?action=blog">Blog Home</a></li>
<hr />
<li><a href="http://www.yourforum.com/index.php?action=category1">category 1</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category2">category 2</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category3">category 3</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category4">category 4</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category5">category 5</a></li></td></tr>
</table>
<br />

echo'
<span class="lowerframe"><span><!-- // --></span></span>
<br class="clear">
</div>
</td>
</tr>
</table></div>';
--- End code ---


3. The code for the second category.

1. Lets create the main "category 2" page.
    admin---->features & options--->custom actions

   a. Action Name: Category 2
   b. Action URL: category2
   c. Type: PHP
   d. Permissions Mode: Visible to everyone
   e. Enabled: yes

2. The code.

   a. rename ('board' => array(99999,2)) with the actual board ID's you want to use. (leave 99999 alone)
   b. rename "yourforum.com" with your own URL
   c. rename the board category and action.

   
--- Code: ---echo'
<div align="center"><table width="915px" border="0" cellpadding="2" cellspacing="2" bgcolor="f9f7f5">
<tr valign="top">
<td>
<div> <h3 class="titlebg grid_header"><span class="left"></span>
Category 2 - category 2 small description goes here
</h3>
<div class="roundframe grid">';
$parameters = array(
  'limit' => 10,
  'board' => array(99999,2),
  'board_disp' => false,
  'category_disp' => false,
  'length' => '300',
  'attachments' => 'none', 
);
ssi_multiBoardNews($parameters);
echo'
</div>
</td>
<td>
<div>
<h3 class="titlebg grid_header"><span class="left"></span>
Categories
</h3>
<table class="tborder" width="100%">
<tr class="windowbg">
<td><li><a href="http://www.yourforum.com/index.php?action=blog">Blog Home</a></li>
<hr />
<li><a href="http://www.yourforum.com/index.php?action=category1">category 1</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category2">category 2</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category3">category 3</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category4">category 4</a></li>
<li><a href="http://www.yourforum.com/index.php?action=category5">category 5</a></li></td></tr>
</table>
<br />

echo'
<span class="lowerframe"><span><!-- // --></span></span>
<br class="clear">
</div>
</td>
</tr>
</table></div>';
--- End code ---



Continue creating more custom action.  That's it! Have fun ;)





   



Masterd:
This is great! :D

Mick.:

--- Quote from: Masterd on January 20, 2011, 12:52:06 PM ---This is great! :D

--- End quote ---
thanks.  I do have a better code.  I'll post it tonight.

Masterd:
I can't wait to see that.

Chair:
This tutorial doesn't work at all on my site :( I tried it 10 times and I don't see what I'm doing wrong...



Parse error: syntax error, unexpected '<' in /home/speed64/public_html/Sources/Load.php(2185) : eval()'d code(20) : eval()'d code on line 1

I'm using smf 2.0 rc4, emulated the SSI_boardnews mod install for 2.0rc3

Navigation

[0] Message Index

[#] Next page

Go to full version