With this plugin you can easily add simple forum (guestbook) to your weblog. It can also to use as a shoutbox.
| General Plugin info | |
|---|---|
| Current Version: | 0.6.11 |
| Download: | see here or 0.6.12(unofficial) |
| Demo: | http://edmondhui.homeip.net/blog/shoutbox.php |
| Forum thread: | http://forum.nucleuscms.org/viewtopic.php?t=8810 |
| Requiremets: | Nucleus CMS version 3.0 or newer, php version 4.1.1 or newer (probably it can work on older version, but not tested) |
| Author: | Josef ‘Pepiino’ Adamcik (http://zapisnik.pepiino.cz - in czech, josef.adamcik@gmail.com ), admun (Edmond Hui) |
lang.php.xx files, where xx are language shortcuts (e.g.: en, cs …). Choose your preffered language and rename the file to lang.php. If you do this after the installation, the plugin options will not be translated.lang.php.xx files, where xx are language shortcuts (e.g.: en, cs …). Choose your preffered language and rename the file to lang.php. If you do this after the upgrade, the plugin options will not be translated. nucleus/plugins/miniforum/upgrade.phpIn an admininstration area of the plugin you can manage forums, posts and templates. Installation creates one default forum (named ‘default’). If you want to show the forum on your page, use skinvars as described in a next section.
| Enable quickmenu? | Set it to no, if you don’t want to show the miniforum link in your admin menu. |
|---|---|
| Number of posts to show: | how many posts will be shown on one page |
Convert linebreaks to <br/> tags | linebreaks will be replaced with <br/> tag |
| Max length of word. | Longer words will be splited with ‘-’. It prevents users from breaking your page’s layout. |
| Convert urls to links? | Set it to yes, if you want the plugin to find urls in post and make them clickable. |
| Path to images of emoticons. | specify here the path to your emoticon images - see How to use smileys below. |
| Enable captcha test. (Needs NP_Captcha installed.) | Activate captcha support. See detailed instructions. |
You can use fallowing skinvar (where myforum is the short name of your forum ):
<%MiniForum(action,forum,template,number of posts per page)%>.
Allowed actions are (case insensitive):
shownew - insert a past 24 hours new shout notificationshowposts - inserts postsshowform - inserts formscript - inserts javascript for updating postlist
Number of posts per page has meaning only for showposts and script actions. You schould specify the same number in both showposts and script skinvars.
Examples:
<%MiniForum(script,myforum,mytemplate)%> - inserts javascript for auto-refresh <%MiniForum(ShowPosts,myforum,mytemplate)%> - inserts list of posts from the forum myforum using template mytemplate<%MiniForum(ShowForm,myforum,mytemplate)%> - shows a form for adding posts to the forum myforum using template mytemplate<%MiniForum(ShowPosts,myforum)%> - inserts list of posts from the forum myforum using default template<%MiniForum(ShowForm,myforum)%> - shows a form for adding posts to the forum myforum using default template<%MiniForum(ShowPosts)%> - inserts list of posts from the default forum using default template<%MiniForum(ShowForm)%> - shows a form for adding posts to the default forum using default template| Template for postlist header | Part before posts. Allowed templatevars: <%title%>,<%description%> (taken from settings of the current forum) and <%navigation%>, which places content of the navigation template (see template for navigation below). |
|---|---|
| Template for post body | One item in postlist. Allowed templatewars: <%name%> - It will be replaced with corresponding tempelate for the tag name. (See template for tag <%name%> ....), <%date%>,<%time%> - format of date and time can be customized in templates too <%body%> which represents content of the post. You can use templatevar <%gravatar%> for gravatar support since v0.6.0 (See gravatar support section in this manual.). To use avatar from NP_Profile (as of 0.6.12), use <%profileavatar%> to obtain the URL to the avatar image. To display the image use it like <img src=”<%profileavatar%>” alt=”avatar” style=”width:50px” /> |
| Template for postlist footer | Simillar to header template |
| Form body for logged users | Form for adding new message. This version will be shown to logged in users. Don’t change names of inputs and textarea! |
| Form body for not logged users | This version will be shown to non-registered visitors. Don’t change names of inputs and textarea! You can use <%captcha%> to insert the captcha image here. See details about captcha support. |
Template for navigation (tag <%navigation%>) | Template for templatevar <%navigation%>, which can be used in header amd footer templates. Allowed templatevars:<%first-page%> - link to the first page, <%prev-page%> - link to previous page,<%cur-page%> - number of current page,<%page-count%> - number of pages,<%next-page%> - link to next page,<%last-page%> - link to the last page |
Template to display tag <%name%>, when there isn’t any link entered. | Allowed templatevars : <%user-name%>,<%user-link%> |
Template do display tag <%name%>, when there is a mail or an url entered. | Allowed templatevars : <%user-name%>,<%user-link%> |
Template to display tag <%name%> for registered users. | Allowed templatevars : <%user-name%>,<%user-link%> |
| Template to display date | Date format (for <%date%>). See http://php.net/date |
| Template to display time | Time format (for <%time%>). See http://cz.php.net/date |
| Text for next page link | Will be used in <%next-page%> (see template for navigation) |
| Text for previous page link | Will be used in <%previous-page%> (see template for navigation) |
| Text for first page link | Will be used in <%first-page%>(see template for navigation) |
| Text for last page link | Will be used in <%last-page%> (see template for navigation) |
| Convert urls to links? | Set it to yes, if you want the plugin to find urls in post and make them clickable. |
| Convert emoticons to images? | Set it to yes, if you want to see images instead of text smileys. See smileys section of documentation |
| Default gravatar image | Path to image which will be used for users without gravatar. For deteails about gravatar support see gravatar support section in this manual. |
| Size of gravatar image | uh, size of gravatar image ... |
The plugin doesn’t contain any pictures of emoticons. There are three ways how to get smileys working:
nucleus/plugins/emoticons nucleus/plugins/fancytext/smiles (Note: If you are using BOLG:CMS you don’t have to change path). emoticons.php (in plugins/miniforum directory). This file contains filenames of images, which will be used to replace text-smileys. If you don’t know what the gravatar is, look here. If you want to use gravatar add
<img src="<%gravatar%>" title="gravatar image" />
into post body template and edit gravatar size and default gravatar image fields in template setup.
Thanks Admun for this great feature. It’s using AJAX to refresh posts (So page isn’t reloaded when refreshing). Don’t worry, users with disabled javascript still have acces to all posts.
If you want to use this feature insert:
<%MiniForum(script,[forumname],[forumtemplate])%>
after <body> in your skin. ie: <%MiniForum(script,default)%>.
Captcha is well-known antispam system. Nuclues CMS has it’s own captcha solution provided by great plugin NP_Captcha. You need this plugin installed in order to use captcha support in NP_MiniForum.
Remeber please that the captcha is not well-accessible and it’s wery annoying for most of the users. Try to use another antispam solution if it’s possible. NP_MiniForum provides support for NP_Blacklist which is very good but it’s now dead (for details visit this forum thread).
Using NP_Captcha with NP_MiniForum
<input type="text" name="captcha" />
(You can copy and paste it from here). The name of this field must be captcha exactly.
Make a copy of your default skin and call it guestbook (or whatever). You’ll just need a Main Index part, so you can delete the rest safely (Archive, Archive list etc.). Edit the Main Index skinpart and replace
<%blog(defaultskin/index,10)%>
with
<%MiniForum(ShowPosts,default)%>
<%MiniForum(ShowForm,default)%>
Then create file (in nucleus root - the directory where your index.php and config.php files are placed) guestbook.php and insert:
<?php session_start(); $CONF['Self'] = 'guestbook.php'; include('./config.php'); selectSkin('guestbook'); selector(); ?>
Do you have any ideas how to improve this plugin? You can write them into forum thread of NP_MiniForum!
Are you going to make any improvement of NP_MiniForum? It’s great but first try to contact me (josef.adamcik@pepiino.info) beacause I can send you the actual version of code and we can discuss the development.
Please, report any bugs to the forum thread of this plugin or send me an e-mail.
As you can see, my english isn’t the best. Feel free to correct my mistakes and any unclear formulations. This is WIKI.
:: Back to plugins ::