Free Forever. Our themes will always be free. Forever. Period.

Make a simple SMF blog using 3 existing mods

Mick in Tutorials
Jan 23, 2011


Make a simple SMF blog using 3 existing mods. Per request on how i made 3 mods to work together to create an actual blog.

 Chevy Avalanche Club | Blog Home | ChevyAvalancheClub.com

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.

   
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="[url=http://www.yourforum.com/index.php?action=blog">Blog]yourforum.com[/url] Home</a></li>
<hr />
<li><a href="[url=http://www.yourforum.com/index.php?action=category1">category]yourforum.com[/url] 1</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category2">category]yourforum.com[/url] 2</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category3">category]yourforum.com[/url] 3</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category4">category]yourforum.com[/url] 4</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category5">category]yourforum.com[/url] 5</a></li></td></tr>
</table>
<br />

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


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.

   
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="[url=http://www.yourforum.com/index.php?action=blog">Blog]yourforum.com[/url] Home</a></li>
<hr />
<li><a href="[url=http://www.yourforum.com/index.php?action=category1">category]yourforum.com[/url] 1</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category2">category]yourforum.com[/url] 2</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category3">category]yourforum.com[/url] 3</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category4">category]yourforum.com[/url] 4</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category5">category]yourforum.com[/url] 5</a></li></td></tr>
</table>
<br />

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


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.

   
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="[url=http://www.yourforum.com/index.php?action=blog">Blog]yourforum.com[/url] Home</a></li>
<hr />
<li><a href="[url=http://www.yourforum.com/index.php?action=category1">category]yourforum.com[/url] 1</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category2">category]yourforum.com[/url] 2</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category3">category]yourforum.com[/url] 3</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category4">category]yourforum.com[/url] 4</a></li>
<li><a href="[url=http://www.yourforum.com/index.php?action=category5">category]yourforum.com[/url] 5</a></li></td></tr>
</table>
<br />

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



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





   



Tagged with: blog tip script php mods 


Mick

Mick G

Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded idesignSMF in 2009 to which he is dedicated full time and has a weakness for Tacos and Pizza.

Website: https://www.idesignsmf.com/

    


9 Comments

Brack1
Jul 21, 2011
Hey BD long time no see.

Would I be correct in saying this still works?

Can more than 1 person use it?

Could users blogs be shown on simple portal?

Is there a menu tab?
1

Mick
Aug 13, 2011
Yes , yes, yes, yes  ;)
2

Brack1
Aug 13, 2011
Hello Stranger

iFor some unknown reason I kept getting an error related to the Custom tab mod so had to say goodbye to it.

I would gladly have it back again once that is sorted.

I left a message on the tips/tricks board on smf regarding this.
3

spider boy
Oct 11, 2011
In short, I am a great fan of you and learning many smf customization from your site . But this particular thread I am following for many days. In smf community forum you have shared this tutorials too. But I have tried this many times on my forum and exactly with same versions of smf as you have mentioned but in vein; it shows syntex errors.
One guy on community forum have mentioned this problem and there you have replied that you have forgot to insert "echo" somewhere. You have also said that you'll update when you will have time. Since then month over months passed by and you haven't updated.
I need this blog system with 3 mods, I have tried exactly and it shows error-
" unexpected T_CLASS, expecting ',' or ';' on line 40 ". When checked in line 40 it was this-
echo'
 <span class="lowerframe"><span><!--></span></span>
   <br class="clear">

Please tell me where the mistake is and how to correct? Please at least give hints.
I have also checked your code through online syntax validator from- http://www.developphp.com/php_syntax_validator/
To understand my problem, I suggested you to paste your code there (with php tag) and check.
4

Mick
Oct 12, 2011
Spider boy thanx for bringing this thread back to life. Yes, there is an error in the code but I don't remember where.
I now have free time to work on this but not the moment as im at work. I will look thru it tonite.

Mick.
5

bobmundo123
Oct 28, 2011
hey!

Chevy Avalnche looks great!

I am having a lot of problems doing this. I tried installing all of the plugins, but the "Multiple" plugin isn't compatible with 2.0. And i am just in general lost. I'm kind of a noob but what you are showing to do is exactly wha i need to know and i can't fnd anywhere else that shows how its done. If you could help me out that would be awesome! possibly make a video tut? =)
6

saks
Apr 08, 2012
Hi Bluedevil!
I am installing blog system how you write in this topic, but have same problem :

Parse error: syntax error, unexpected T_CLASS, expecting ',' or ';' in /home/saks1/koritssa.ru/docs/Sources/Load.php(2171) : eval()'d code(20) : eval()'d code on line 36

I install code in Template Code

please help me how may be fix this error ?


P.S. if I type action HTML, and insert code in it I have louout with right block categories , look the picture in attachment

(and you'r captcha is very strong for me, may be disable it for my account?)
7

Mick
Apr 11, 2012
Saks remove the last echo' in my code. That's my mistake.
8

saks
Apr 20, 2012
I have one more question. how to add Continue Reading... inscription?
9



Connect with us:


Improve SMF

If you wish to contribute to the development of SMF you can contribute to the coding discussions taking place on Github. You are also welcome to suggest features which you would like to see added to the software in the Feature Requests board.

  Receive our monthly newsletter right in your inbox.


Advertisement  






go up