Jump to content

Blog 1.2 (Now w/ Custom Pages!)


Recommended Posts

Changes from version 1.1

  • Added custom pages (Let's you create WHMCS custom pages just like a blog post)
  • Added "teasers" (Short description instead of truncated post)
  • Added Bookmark/ social network sharing
  • Added IP blocking (Let's you block IPs from making comments)
  • Added RSS feed for all posts & by category.
  • Fixed special chars in comments

 

$25 (includes all future upgrades and added features)

Order It! | See it in action

 

###############################################################################
#                                                                             #
#                    WHMCS Blog v1.2      By TJ Phippen                       #
#                                                                             #
###############################################################################




INSTALL -----------------------------------------------------------------------

1. Unzip all files.

2. Upload all files to their appropriate locations:
 - "blog.php" > yoursite.com/whmcs/blog.php
 - "includeblog.php" > yoursite.com/whmcs/includeblog.php
 - "pages.php" > yoursite.com/whmcs/pages.php
 - "modules/admin/blog/blog.php" > yoursite.com/whmcs/modules/admin/blog/blog.php
 - "templates/portal/blog.tpl" > yoursite.com/templates/yourtemplate/blog.tpl
 - "templates/portal/blog-category.tpl" > yoursite.com/templates/yourtemplate/blog-category.tpl
 - "templates/portal/blog-post.tpl" > yoursite.com/templates/yourtemplate/blog-post.tpl
 - "templates/portal/blog-page.tpl" > yoursite.com/templates/yourtemplate/blog-page.tpl

3. Add the following to your language file:

$_LANG["blogtitle"] = "Blog";
$_LANG["latestposts"] = "Latest Posts";
$_LANG["latestblogposts"] = "Latest Blog Posts";

4. Login to your WHMCs administrative area and navigate to Utilities > Addon Modules > Blog

5. Click "Install Blog"

-------------------------------------------------------------------------------




Sidebar -----------------------------------------------------------------------

Add the following to your footer.tpl after the last "Quick Navigation link:

     <li><a href="blog.php" title="{$LANG.blogtitle}"><img src="templates/{$template}/images/icons/blog.gif" alt="{$LANG.blogtitle}" width="16" height="16" border="0" class="absmiddle" /></a> <a href="blog.php" title="{$LANG.blogtitle}">{$LANG.blogtitle}</a>
{if $sidecategories}
       <ul style="margin-left:18px;">
{foreach from=$sidecategories item=sidecat}
         <li>- <a href="{if $seofriendly}blog/{$sidecat.id}/{$sidecat.seo}{else}blog.php?category={$sidecat.id}{/if}">{$sidecat.name}</a></li>
{/foreach}
       </ul>
{/if}
     </li>
{php}include("pages.php");{/php}
{foreach from=$allpages item=navpage}
     <li>{if $navpage.icon}<a href="{$navpage.url}" title="{$navpage.title}"><img src="{$navpage.icon}" alt="{$navpage.title}" width="16" height="16" border="0" class="absmiddle" /></a>{/if} <a href="{$navpage.url}" title="{$navpage.title}">{$navpage.title}</a></li>
{/foreach}

-------------------------------------------------------------------------------




Include Blog ------------------------------------------------------------------

1. Navigate to Utilities > Addon Modules > Blog > Settings

2. Select "Enable Include Blog", set "Number of posts to include" & Save.

3. Add the following to your homepage, or anywhere within WHMCS you wish:

<h2>{$LANG.latestblogposts}</h2>
{php}include("includeblog.php");{/php}
{foreach from=$posts item=post name=post}
<p><a href="{if $seofriendly}blog/{$post.id}/{$post.seourl}{else}blog.php?postid={$post.id}{/if}">{$post.title}</a> - {$post.date}<br />{$post.content|strip_tags|truncate:300:"..."}</p>
{if !$smarty.foreach.post.last}
<hr />
{/if}
{/foreach}

-------------------------------------------------------------------------------




SEO Friendly URLs -------------------------------------------------------------

1. Navigate to Utilities > Addon Modules > Blog > Settings

2. Select "Use SEO Friendly URLs" & Save

3. Add the following to your .htaccess (you may have to rename it from htaccess.txt)

# Blog
RewriteRule ^([^/]*).html$ ./blog.php?pagename=$1 [L,NC]
RewriteRule ^blog/([0-9]+)/[a-z0-9_-]+\.html$ ./blog.php?postid=$1 [L,NC]
RewriteRule ^blog/([0-9]+)/([^/]*)$ ./blog.php?category=$1 [L,NC]
RewriteRule ^blog/page-([0-9]+)$ ./blog.php?page=$1 [L,NC]
RewriteRule ^blog/(.*)/([^/]*)/page-(.*)$ ./blog.php?category=$1&page=$3 [L,NC]
RewriteRule ^blog$ ./blog.php [L,NC]

** Note - You must add entries to your .htaccess for "pages" to work.

-------------------------------------------------------------------------------

That's it! You now have the full functionality of version 1.2
Please direct any questions, comments, suggestions or bugs to http://www.tjphippen.com

Enjoy!

 

###############################################################################
#                                                                             #
#                    WHMCS Blog v1.2      By TJ Phippen                       #
#                                                                             #
###############################################################################




UPGRADE -----------------------------------------------------------------------

1. Unzip all files.

2. Upload all files to their appropriate locations and overwrite any existing:
 - "blog.php" > yoursite.com/whmcs/blog.php
 - "includeblog.php" > yoursite.com/whmcs/includeblog.php
 - "pages.php" > yoursite.com/whmcs/pages.php
 - "modules/admin/blog/blog.php" > yoursite.com/whmcs/modules/admin/blog/blog.php
 - "templates/portal/blog-page.tpl" > yoursite.com/templates/yourtemplate/blog-page.tpl

3. Add the following to the bottom of your "blog.tpl" & "blog-category.tpl":


{if $showrss}<p align="center"><img src="images/rssfeed.gif" class="absmiddle" border="0" alt="" /> <a href="blogrss.php">View RSS Feed</a></p>{/if}


4. Add the following to "blog-post.tpl" after "{$post.content}":


{if $bookmarks}
<hr />
<a href="http://www.addthis.com/bookmark.php?v=250&pub=xa-4a51bb7478842e2e" onmouseover="return addthis_open(this, '', '[url]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/sm-bookmark-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a51bb7478842e2e"></script>
{/if}


5. Add the following to your .htaccess after "# Blog":


RewriteRule ^([^/]*).html$ ./blog.php?pagename=$1 [L,NC]


6. Login to your WHMCs administrative area and navigate to Utilities > Addon Modules > Blog

7. Click "Upgrade Blog"

-------------------------------------------------------------------------------




Sidebar -----------------------------------------------------------------------

Add the following to your footer.tpl or anywhere else on your site you'd like links to your pages to appear:


{php}include("pages.php");{/php}
{foreach from=$allpages item=navpage}
     <li>{if $navpage.icon}<a href="{$navpage.url}" title="{$navpage.title}"><img src="{$navpage.icon}" alt="{$navpage.title}" width="16" height="16" border="0" class="absmiddle" /></a>{/if} <a href="{$navpage.url}" title="{$navpage.title}">{$navpage.title}</a></li>
{/foreach}

-------------------------------------------------------------------------------

That's it! You now have the full functionality of version 1.2
Please direct any questions, comments, suggestions or bugs to http://www.tjphippen.com

Enjoy!

 

Future Planned Features

  • The WordPress import is on the way & will be an external script.
  • Comment count on post listing pages (I forgot to add it to v1.2)
  • & as always, keep the suggestions/feedback coming :)

Link to comment
Share on other sites

One other thing I should mention is that currently the url of the custom pages is generated by the name. Example: "Test Page" would be "Test-Page.html".. This causes issues when you have special characters in or duplicate page names. So in the next release I'll be adding "slugs" which will allow you to manually set the url/file name for each page, category and post. This will also mean that the post # or category # will no longer need to be in the url. Example: "yoursite.com/whmcs/blog/1/uncategorized" would become "yoursite.com/whmcs/blog/uncategorized"

Link to comment
Share on other sites

neat to see you added the teaser function so fast :D Tho it didn't completly fit my needs. Would like it to be like an normal (tinymce) text field so it can contain whatever' (Pictures etc.)

 

possible its and easy fix just adding the tinymce code to that field? might me able to do that myself. anyways great stuff. :)

 

And btw migt be confusing haveing yoursite.com/whmcs/blog.php in the install instructions. as atleast I tryed putting them in that folder doh I would know better :P

easyer woud be: YourWhmcsinstall/blog.php and YourWhmcsinstall/templates/yourtemplate/blog.tpl etc.

 

hope to see the client "colab" future soon ;)

Link to comment
Share on other sites

neat to see you added the teaser function so fast :D Tho it didn't completly fit my needs. Would like it to be like an normal (tinymce) text field so it can contain whatever' (Pictures etc.)

 

possible its and easy fix just adding the tinymce code to that field? might me able to do that myself. anyways great stuff. :)

 

And btw migt be confusing haveing yoursite.com/whmcs/blog.php in the install instructions. as atleast I tryed putting them in that folder doh I would know better :P

easyer woud be: YourWhmcsinstall/blog.php and YourWhmcsinstall/templates/yourtemplate/blog.tpl etc.

 

hope to see the client "colab" future soon ;)

 

Thanks for the comments. There's about 8 more features I'll be adding shortly so I'm still accepting more suggestions. I don't quite understand that what you mean by the tinymce in the teasers, as far as I know it's already there and working, so maybe you can elaborate? I'm also considering adding the ability to use teasers on some posts and not on others rather than have it as a global setting..

 

The next critical feature to add is "page slugs", as ATM without them there are many possible flaws.. Honestly it'll only take me about 5 minutes to add, but I want to make sure the next release has many more features so it's worth it for everyone to upgrade :)

Link to comment
Share on other sites

I have yet an other future request :)

 

It's not allways I can monitor comments, so the possebility to add a report comment button would be nice. That either sends an email to admins, or show up on some important page in whmcs. would show in comments, something like this -->

 

reportbutton.png

Link to comment
Share on other sites

Cant edit after 15 mins for some weird reason so here comes dobbel/trippelpost:

 

ahhh and btw: The includeblog.php don't get the teaser function, so if you are to include it on some page and do like me have pic's on there I currently just removed the "strip_tags" but the picture was too big so it reformated the layer. My site is not lunched yet but its getting close now :) my last resort is quite easy doh' just get what I want from the database with php echo function. But anyways now you know the teaser don't get to the includeblog .php or code' :)

Link to comment
Share on other sites

Cant edit after 15 mins for some weird reason so here comes dobbel/trippelpost:

 

ahhh and btw: The includeblog.php don't get the teaser function, so if you are to include it on some page and do like me have pic's on there I currently just removed the "strip_tags" but the picture was too big so it reformated the layer. My site is not lunched yet but its getting close now :) my last resort is quite easy doh' just get what I want from the database with php echo function. But anyways now you know the teaser don't get to the includeblog .php or code' :)

 

Thanks, I'm working on this now and will see if I can get the next release out at least by Monday, but if all goes well mite get it out today :)

Link to comment
Share on other sites

Hi Sirok, whens 1.3 coming out? I'm thinking of purchasing but if 1.3 is out soon, might be better off waiting.

 

Just looked at the demo, and the different category section looks perfect for what I was looking for my scripts section that I mentioned in another post.

Link to comment
Share on other sites

Hi Sirok, whens 1.3 coming out? I'm thinking of purchasing but if 1.3 is out soon, might be better off waiting.

 

Just looked at the demo, and the different category section looks perfect for what I was looking for my scripts section that I mentioned in another post.

 

I'm working on v1.3 right now :) From v1.2 on every version has a built in upgrade script so no matter what version you initially install you can always upgrade to the new version.

 

But to be realistic, v1.3 it so close to being released(a few hours) that you may not want to waist your time re-uploading the new files. :)

Link to comment
Share on other sites

To those who wonder for {$LANG.comments} to work you must add this to your whmcs lang file: $_LANG["comments"] = "Comments";

 

Whoops, looks like I forgot to add that to the upgrade instructions, though it is in the readme :) Thanks Tulip

 

One other thing I forgot to add was comment count on custom pages, so this will be first thing in v1.4 next week :)

Link to comment
Share on other sites

  • 5 weeks later...

ye. nice. There are those who I allready have requested and a few more easy once:

 

- Possebility to edit who posted. When making a new post have it autofill the creator but if he wants he can edit the creator in a easy textbox. (much like the date field)

 

-

Link to comment
Share on other sites

- The is no way to preview an item, this becomes a real problem when changeing a post to hidden and want to get the link to share to a selected group of people. Making the post name klicky' (link to the newspost) on the first admin page would be nice. or have it show the link on the top or bottom of the edit post page.

Link to comment
Share on other sites

Great suggestions, I'll add the following in the next release:

  • Add ability to edit/change post author
  • Add ability to preview hidden/draft items & direct link to post/pages in admin area.
  • Add ability to view all hidden/draft posts/pages.
  • Add password protected posts. pages, and categories.
  • Add category slugs.
  • Add meta(description/keywords) tags.
  • Add links(like wordpress' blogroll)
  • Add most popular
  • Add archives
  • Add multi language support :)

 

Anything else you have in mind please let me know.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated