NP_MiniForum v0.6.x

Post your new plugins here!
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

NP_MiniForum v0.6.x

Postby pepiino » Thu Sep 22, 2005 2:45 pm

Update: version 0.6.9

Ok, version 0.6.0 final is out. Download.
I'v updated documentation too.
Last edited by pepiino on Mon Mar 27, 2006 11:56 am, edited 6 times in total.
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>
http://blog.pepiino.info
NP_MiniForum - guestbook or shoutbox for your site!
User avatar
z3rg
Posts: 179
Joined: Thu Mar 07, 2002 10:55 am
Location: Prague, Czech Republic & Pullman, WA, US
Contact:

Postby z3rg » Thu Sep 22, 2005 3:20 pm

Awesome !

btw great documentation :wink:

thx man
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Postby pepiino » Thu Sep 22, 2005 3:28 pm

z3rg wrote:Awesome !

btw great documentation :wink:

thx man


thank you :D
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Thu Sep 22, 2005 4:06 pm

v0.6.0 works for me as well. Thanks!
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Thu Sep 22, 2005 4:55 pm

For those who really want valid XHTML code, they must be very upset by my current implementation of Ajaxized Miniforum because the script in <%Miniforum(script,default)%> include & and other things that is bad for XHTML 1.0. :wink:

Here's instruction how to fix it.

1) remove <script type="text/javascript"> and </script> lines from NP_MiniForum.php
2) create a new skin called mfscript, put <%MiniForum(script,_whateverforum_)%> in the main inex skin part (replace _whateverforum_ to what you have)
3) create mfscript.php (with the following contents) and put it in your blog's root directory where index.php is

Code: Select all

<?php
$CONF = array();
$CONF['Self'] = 'mfscript.php';

include('./config.php');

selectSkin('mfscript');
selector();

?>

4) replace all <%Minifrom(script,whatever)%> in your skin with

Code: Select all

<script type="text/javascript" src="http://yourdomain.com/blog/mfscript.php"></script>

correct the url to where the mfscript.php is

pepiino, maybe you can make this change to the next release and update the doc? The drpback is users need to do more for setup.....
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Postby pepiino » Thu Sep 22, 2005 11:27 pm

admun wrote:For those who really want valid XHTML code, they must be very upset by my current implementation of Ajaxized Miniforum because the script in <%Miniforum(script,default)%> include & and other things that is bad for XHTML 1.0. :wink:


Isn't there a shorter way to walidity?
I'v tried fallowing:

Insert <!-- after line 685 (<script type="text/javascript">) and then insert //--> after line 739 (before </script>). And it works, page is valid XHTML 1.0 strict!
:D.
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Fri Sep 23, 2005 3:11 am

pepiino wrote:
admun wrote:For those who really want valid XHTML code, they must be very upset by my current implementation of Ajaxized Miniforum because the script in <%Miniforum(script,default)%> include & and other things that is bad for XHTML 1.0. :wink:


Isn't there a shorter way to walidity?
I'v tried fallowing:

Insert <!-- after line 685 (<script type="text/javascript">) and then insert //--> after line 739 (before </script>). And it works, page is valid XHTML 1.0 strict!
:D.

Never realize that! good stuff
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Postby pepiino » Fri Sep 23, 2005 11:19 am

pepiino wrote:Insert <!-- after line 685 (<script type="text/javascript">) and then insert //--> after line 739 (before </script>). And it works, page is valid XHTML 1.0 strict!
:D.


Included in 0.6.1 now http://files.pepiino.info/NP_MiniForum/NP_MiniForum-0_6_1.zip (No other changes).
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
JoHnStEn
Posts: 27
Joined: Tue Feb 04, 2003 2:40 pm
Contact:

Postby JoHnStEn » Fri Sep 23, 2005 1:08 pm

I stil have the problem that when I post a message the $desturl is going to the root of my site but I whanna know if it is possible that he goes to /nieuws/nucleus/forum.php again.

And if I change the $desturl in

Code: Select all

$desturl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];


the admin area doesn't work anymore
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Postby pepiino » Fri Sep 23, 2005 1:43 pm

JoHnStEn wrote:I stil have the problem that when I post a message the $desturl is going to the root of my site but I whanna know if it is possible that he goes to /nieuws/nucleus/forum.php again.


Strange, it should work this way.

JoHnStEn wrote:And if I change the $desturl in

Code: Select all

$desturl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];


Ok, '$_SERVER['REQUEST_URI'] contains what? Nothing?
What installation of webserver and php are you running?
If it's public site, please send link to your website.


JoHnStEn wrote:the admin area doesn't work anymore

??
Do you mean admin area of NP_MiniForum or whole nucleus admin area? What does it mean "deosn't work" (error, blank page ...)?
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
JoHnStEn
Posts: 27
Joined: Tue Feb 04, 2003 2:40 pm
Contact:

Postby JoHnStEn » Mon Sep 26, 2005 9:30 am

the url of the forum is

http://www.hoogenarren.nl/nieuws/nucleus/forum.php

the admin to moderate the messages doesn't work anymore I get a blank page when I delete a message
JoHnStEn
Posts: 27
Joined: Tue Feb 04, 2003 2:40 pm
Contact:

Postby JoHnStEn » Tue Sep 27, 2005 7:47 pm

I've already solved the problem

I've changed

Code: Select all

$desturl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];


in

Code: Select all

$desturl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];


in NP_MiniForum.php and now it goes to the right page
staalorm
Posts: 3
Joined: Thu Sep 29, 2005 6:33 am

miniforum install error

Postby staalorm » Thu Sep 29, 2005 6:54 am

Hi. :D

I'm a new user of Nucleus, and my plan is to use it as a full as possible CMS for different sites. A "guestbook" forum like the miniforum seems nice.

All is well with the installation of nucleus using W2K, MySQL 4, PHP4, IIS6 etc. (I love the simplicity and sanity in Nucleus). :)

A small problem with latest miniforum 0.6.1 is;
Trying to install it MySQL gives me this error:

with query CREATE TABLE `nucleus_plug_miniforum_post` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `idforum` INT UNSIGNED NOT NULL , `uname` VARCHAR( 20 ) NOT NULL , `url` VARCHAR( 30 ) , `memberid` INT, `time` INT NOT NULL , `body` TEXT NOT NULL , PRIMARY KEY ( `id` ) , FULLTEXT ( `body` ) ): The used table type doesn't support FULLTEXT indexes

I read the last line as setting up of the "nucleus_plug_miniforum_post" table conflicts with the databasetype?!

Any workaround on this? Or something missing on my MySQL install, since most other folks seem to not have this problem?

Many thanks for any good suggestions from a semi-newbie :wink:

Staalorm
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Re: miniforum install error

Postby pepiino » Thu Sep 29, 2005 8:53 am

staalorm wrote:Hi. :D
Any workaround on this? Or something missing on my MySQL install, since most other folks seem to not have this problem?


Workaround:
Open NP_MiniForum.php and delete lines 115-117 and comma at line 114.

So this part of code:

Code: Select all

   
sql_query("CREATE TABLE `".sql_table("plug_miniforum_post")."` (
             `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
             `idforum` INT UNSIGNED NOT NULL ,
             `uname` VARCHAR( 20 ) NOT NULL ,
             `url` VARCHAR( 30 ) ,
             `memberid` INT,
             `time` INT NOT NULL ,
             `body` TEXT NOT NULL ,
             PRIMARY KEY ( `id` ) ,
             FULLTEXT (
                 `body`
                 )
             )");   
 }

will be:

Code: Select all

   sql_query("CREATE TABLE `".sql_table("plug_miniforum_post")."` (
             `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
             `idforum` INT UNSIGNED NOT NULL ,
             `uname` VARCHAR( 20 ) NOT NULL ,
             `url` VARCHAR( 30 ) ,
             `memberid` INT,
             `time` INT NOT NULL ,
             `body` TEXT NOT NULL ,
             PRIMARY KEY ( `id` )
             )");   
 }


I'm sorry about this. There is no need to use FULLTEXT, my mistake ::D. I'll correct this in next version.

Thank you for feedback!!
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
staalorm
Posts: 3
Joined: Thu Sep 29, 2005 6:33 am

miniforum install error

Postby staalorm » Thu Sep 29, 2005 6:42 pm

Hi there Pepiino! :D

Thank you most wonderfully for your quick reply, I like this forum :)
By changing the file like you said, it installed perfectly.

Now I only got a tiny piece of problem left, that is if I try to add a new forum, and push submit, it only gives me an IE standard error-page (and the new forum is not added);

The page cannot be displayed
The page you are looking for cannot be displayed because the page address is incorrect.
Please try the following:
If you typed the page address in the Address bar, check that it is entered correctly.
Open the home page and then look for links to the information you want.
HTTP 405 - Resource not allowed
Internet Information Services

Hmm, resource not allowed.. The url seem perfect i.e. www.mydomain.com/nucleus/plugins/miniforum/. It's more like the plug-in is not allowed to write to the index.php page? and thus are unable to render it ?

I triple-checked that I had the correct permissions (IIS_USER everything permitted exept "full control"), and "read-only" un-checked on both plugins-folder and all files under it. And ofcourse index.php is registered on the domain as preferred "homepage".

I wonder if this has something to do with a somewhat similar "problem" I have when trying to login from the Nucleus frontpage. Unless the url has the "index.php" in the path I get a identical IE error-page:

path: www.mydomain.com
log-in: administrator/password
result: www.mydomain.com/#nucleus_lf (IE error page)

path: www.mydomain.com/index.php
log-in: administrator/password
result: http://www.mydomain.com/index.php#nucleus_lf (OK logged in)

Any ideas? :?

Much grateful again :)

Staalorm
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Re: miniforum install error

Postby pepiino » Thu Sep 29, 2005 7:37 pm

staalorm wrote:Hi there Pepiino! :D

Hi :)

staalorm wrote:Thank you most wonderfully for your quick reply, I like this forum :)
By changing the file like you said, it installed perfectly.

Great, as I said I'll include this change in future release so other peaple will not meet this problem. Thank you.

staalorm wrote:It's more like the plug-in is not allowed to write to the index.php page? and thus are unable to render it ?

There's no need to write to the index.php.

staalorm wrote:path: www.mydomain.com
log-in: administrator/password
result: www.mydomain.com/#nucleus_lf (IE error page)

path: www.mydomain.com/index.php
log-in: administrator/password
result: http://www.mydomain.com/index.php#nucleus_lf (OK logged in)

Any ideas? :?

I don't know IIS server because I work only with Apache. But try this:
Change line 59:
echo "<form method='post' action='".$pluginpath."/'>
to:
echo "<form method='post' action='".$pluginpath."/index.php'>
in ....plugins/miniforum/index.php

Then try to create new forum. I hope this will help you.
Even if this help, you'll probably have same problem with other operations. Please try other operations (adding template, changing forum ...).
I'll correct whole script then and I'll publish it as new version.
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
staalorm
Posts: 3
Joined: Thu Sep 29, 2005 6:33 am

miniforum install error

Postby staalorm » Fri Sep 30, 2005 4:38 am

Hi again.

>> Great, as I said I'll include this change in future release so other peaple will not meet this problem. Thank you.

Glad to help out :)

I don't know IIS server because I work only with Apache..

Ah, yes we started on IIS some years ago, and now we're soo used to the old junk-in-a-box.. I'm starting a fresh Linux-server box these days, only I can't decide which distribution gives me a low learning-point and still be flexible (much like nucleus) :wink:

>> But try this: Change line 59: echo "<form method='post' action='".$pluginpath."/'>
to: echo "<form method='post' action='".$pluginpath."/index.php'> in ....plugins/miniforum/index.php - Even if this help, you'll probably have same problem with other operations. Please try other operations (adding template, changing forum ...).

I ended up adding the "index.php" 4-5 places in the index.php file and also one instance in template.php. That worked without error. Pepiino - 2 / IIS - 0 :P

Staalorm
User avatar
pepiino
Posts: 100
Joined: Sat Feb 26, 2005 12:36 am
Location: Czech Republic
Contact:

Re: miniforum install error

Postby pepiino » Fri Sep 30, 2005 9:13 am

staalorm wrote:Hi again.
I ended up adding the "index.php" 4-5 places in the index.php file and also one instance in template.php. That worked without error. Pepiino - 2 / IIS - 0 :P


Great :D

v0.6.2 (download) released. (Should work with IIS)

Thank you for cooperation!
Have a nice time.

Pepiino
Josef 'pepiino' Adamcik <jabber:josef.adamcik@jabber.cz>,<GTalk: josef.adamcik@gmail.com>

http://blog.pepiino.info

NP_MiniForum - guestbook or shoutbox for your site!
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Thu Oct 06, 2005 2:44 pm

hum, I'm start seeing spammer NP_Miniforum.... I guess it's time to put in NP_Blacklist support.....

The code is something like:

Code: Select all

        if ($refer != "" and $manager->pluginInstalled('NP_Blacklist') and $blacklist =& $manager->getPlugin('NP_Blacklist')) {
            if (floatval($blacklist->getVersion()) >= 0.96) {
                $spamcheck = array ('type'  => 'Referer', 'data'  => $refer, 'return'  => false);
                $manager->notify('SpamCheck', array ('spamcheck' => & $spamcheck));
            } else {
                if (floatval($blacklist->getVersion()) == 0.95) {
                    $blacklist->blacklist('NP_Referer',$refer);
                }
            }
        }


see http://wakka.xiffy.nl/blacklist

I will see if I can find some time this weekend to do it....
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Thu Oct 06, 2005 6:02 pm

admun wrote:hum, I'm start seeing spammer NP_Miniforum.... I guess it's time to put in NP_Blacklist support.....

The code is something like:

Code: Select all

        if ($refer != "" and $manager->pluginInstalled('NP_Blacklist') and $blacklist =& $manager->getPlugin('NP_Blacklist')) {
            if (floatval($blacklist->getVersion()) >= 0.96) {
                $spamcheck = array ('type'  => 'Referer', 'data'  => $refer, 'return'  => false);
                $manager->notify('SpamCheck', array ('spamcheck' => & $spamcheck));
            } else {
                if (floatval($blacklist->getVersion()) == 0.95) {
                    $blacklist->blacklist('NP_Referer',$refer);
                }
            }
        }


see http://wakka.xiffy.nl/blacklist

I will see if I can find some time this weekend to do it....

Ok, I've done it.... add this code in NP_MiniForum.php after the line "if ($body != "") {"

Code: Select all

             // check for spam attempts, you never know !
             global $manager;
             if ($manager->pluginInstalled('NP_Blacklist') and $blacklist =& $manager->getPlugin('NP_Blacklist')) {
                 if (floatval($blacklist->getVersion()) >= 0.96) {
                     $spamcheck = array ('type'  => 'Referer', 'data'  => $body, 'return'  => false);
                     $manager->notify('SpamCheck', array ('spamcheck' => & $spamcheck));
                 } else {
                     if (floatval($blacklist->getVersion()) == 0.95) {
                         $blacklist->blacklist('NP_MiniForum',$body);
                     }
                 }
             }

Return to “Plugin Development”