NP_MiniForum v0.6.x

Post your new plugins here!
User avatar
z3rg
Posts: 179
Joined: Thu Mar 07, 2002 10:55 am
Location: Prague, Czech Republic & Pullman, WA, US
Contact:

Postby z3rg » Tue Jun 22, 2010 10:09 pm

Hmm, upgraded Nucleus to the 3.51 version (from 3.32) and just found out that NP_Miniforum stopped working. Definitely something wrong with plugin since I cannot post any new forum comments.

All the posts show fine but when I try to add a new comment a blank page is shown.

Further investigation revealed that when uninstalling plugin a blank screen is shows as well when I click on Update subscription.

Can anyone try the latest miniforum 0.6.12 with the latest Nucleus?
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Tue Jun 22, 2010 10:12 pm

Can you look in the web server error logs for any PHP errors associated with that plugin?
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins
User avatar
z3rg
Posts: 179
Joined: Thu Mar 07, 2002 10:55 am
Location: Prague, Czech Republic & Pullman, WA, US
Contact:

Postby z3rg » Tue Jun 22, 2010 10:18 pm

Unfortunately I cannot since the link to errorlog is missing on website of my hosting company ...

Found another weird issue - cannot create new template (from within miniforum), it will just do nothing. Hmm
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Tue Jun 22, 2010 10:26 pm

a regular nucleus template? Or a plugin specific template. I'm not really familiar with this plugin and I don't have the time tonight to investigate. Can you try the 0.6.11 version and see if you have the same problem? Also, see if your host can provide you with the web server error logs for your domain. That would give us a specific error on a specific line of a specific file and helps tremendously over wild guessing. I'll take another look in the morning.
Is your question not solved yet?

Search our FAQ,

read the Documentation, or

browse the list of available plugins.



Check out my plugins
User avatar
z3rg
Posts: 179
Joined: Thu Mar 07, 2002 10:55 am
Location: Prague, Czech Republic & Pullman, WA, US
Contact:

Postby z3rg » Tue Jun 22, 2010 10:34 pm

Ok, I asked them to provide a link to error log.

A plugin specific template.

Yep, just tried the .11 version and it behaves very strange as well. Right after the installation I get blank screen and it doesn't return to Plugins page. So I think there might be something broken with the plugin and the latest Nucleus since it worked fine with the older version. Or there might something else ... will see tomorrow it's getting midnight here anyway ...

Thanks!
User avatar
z3rg
Posts: 179
Joined: Thu Mar 07, 2002 10:55 am
Location: Prague, Czech Republic & Pullman, WA, US
Contact:

Postby z3rg » Wed Jun 23, 2010 7:05 am

After bit of testing I've found out that similar issues are caused by other plugins.

Example would be NP_Gravatar. After installing the plugin I also get blank screen. So the question is if there's some incompatibility with some older plugins and the latest Nucleus or my installation is somehow damaged?

Almost all plugins install absolutely fine except these two (which were working on Nucleus 3.32).

Edit: I've edited NP_Gravatar and removed some blank space after the code

Code: Select all

?>
and it installs fine. However no luck with miniforum ...
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Fri Oct 15, 2010 11:09 pm

No luck here either. Got white screen on install. Can't save the template, or a new forum, or edits to the default forum. Doing any of these breaks the admin page.

When trying to save the default template:

Code: Select all

[Fri Oct 15 15:03:58 2010] [error] [client xx.xx.xx.xxx] PHP Fatal error:  Call to undefined function  sql_escape() in /misc/22/149/079/938/2/user/web/curtis.rantthisspace.com/nucleus/plugins/miniforum/template.php on line 126, referer: http://www.curtis.rantthisspace.com/nucleus/plugins/miniforum/?ticket=bd5fe9c0a432a8f0317e2ae3b91b5c61&action=defaulttempl


template.php

Code: Select all

  * this function escapes all template atributes before sending to db
  */
  function prepareForDb() {
    $this->description = sql_escape($this->description);             //  line 126 //
    $this->postsHeader = sql_escape($this->postsHeader);
    $this->postBody =    sql_escape($this->postBody);
    $this->postsFooter = sql_escape($this->postsFooter);
    $this->formLogged =  sql_escape($this->formLogged);
    $this->form =        sql_escape($this->form);
    $this->navigation =  sql_escape($this->navigation);
    $this->name =        sql_escape($this->name);
    $this->nameLin =     sql_escape($this->nameLin);
    $this->memberName =  sql_escape($this->memberName);
    $this->date =        sql_escape($this->date);
    $this->time =        sql_escape($this->time);
    $this->nextPage =    sql_escape($this->nextPage);
    $this->previousPage =sql_escape($this->previousPage);
    $this->firstPage =   sql_escape($this->firstPage);
    $this->lastPage =    sql_escape($this->lastPage);
    $this->gravDefault = sql_escape($this->gravDefault);
  }


When attempting to change name of default forum:

Code: Select all

[Fri Oct 15 15:12:33 2010] [error] [client xx.xx.xx.xxx] PHP Fatal error:  Call to undefined function  sql_escape() in /misc/22/149/079/938/2/user/web/curtis.rantthisspace.com/nucleus/plugins/miniforum/index.php on line 162, referer: http://www.curtis.rantthisspace.com/nucleus/plugins/miniforum/?ticket=5e43d75f4778b662fab7b27ec30b59fb&action=edit&forumid=1


I looked in the files and every single one of them had a line-feed at the end, after ?>. So I removed them all, updated the subscriptions, still no luck. Uninstalled the plugin, reinstalled, got white screen on install.
Last edited by WillyP on Mon Jan 31, 2011 12:38 pm, edited 2 times in total.
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Fri Oct 15, 2010 11:18 pm

maybe try sql_real_escape_string() function instead?
Is your question not solved yet?

Search our FAQ,

read the Documentation, or

browse the list of available plugins.



Check out my plugins
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Fri Oct 15, 2010 11:34 pm

Ok, I'll try that.

Line 162 of index.php:

Code: Select all

/**
* Changes atributes if the forum.
*/
function changeForum($forumid) {
    $shortName = trim(requestVar('short_name'));
    $title =      sql_escape(requestVar('title'));                        /// line 162///
    $desc =      sql_escape(requestVar('desc'));
   
    if ($shortName == "") errMsg(MF_MISSING_SHORT_NAME);
    if (!ereg('^[0-9a-zA-Z_\-]+$',$shortName)) errMsg(MF_WRONG_SHORT_NAME);
   
    // check, if the short name is uniqe
    $query= "SELECT id FROM `".sql_table('plug_miniforum_forum').
            "` WHERE `short_name`='$shortName' AND id!='$forumid'";
    if (sql_num_rows(sql_query($query)) != 0) errMsg(MF_SHORT_NAME_USED);
   
    $query= "UPDATE `".sql_table('plug_miniforum_forum').
            "` SET `title`='$title',`description`='$desc',`short_name`='$shortName'".
            " WHERE id='$forumid'";
    sql_query($query);
}


Looks like the same, I'll just do a search and replace for all files.
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Fri Oct 15, 2010 11:57 pm

Yay! It worked! Well, I got to save a change to the name of the forum anyway, putting it in the skin and some more testing is in order before the champagne comes out! ;)
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Sat Oct 16, 2010 12:29 am

Seems to work now... Thanks Frank! I'll zip up the updated files and upload to the wiki later.

Here's a link to see it on my son's site: http://www.curtis.rantthisspace.com/
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Sat Oct 16, 2010 12:51 am

Cool. He's using my Terminal skin.
Is your question not solved yet?

Search our FAQ,

read the Documentation, or

browse the list of available plugins.



Check out my plugins
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Sat Oct 16, 2010 2:40 am

Yeah, he loves that!
User avatar
WillyP
Nucleus Guru
Nucleus Guru
Posts: 872
Joined: Sun Aug 30, 2009 3:29 am
Location: Pembroke, NH
Contact:

Postby WillyP » Sun Oct 17, 2010 3:54 am

Tested, added to wiki. Though, I must say this is a better shoutbox than a forum. A user of your site cannot create a topic. An admin can create more forums, but each forum is a single topic. I think if I wanted a simple forum on my own site, I would create another blog and make a skin for it that looked like a forum. That way you could have categories, and each post would be the first post in the topic. Then use comments for replies. Any registered member who should be able to post in the forum would be added to the forum team. The only difference from a real forum is that comments don't bump a post to the top.
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Sun Oct 17, 2010 4:39 am

You could make a plugin to replace the blog skinvar that lists the items on the index by most recent comment. That would be easy to do.
Is your question not solved yet?

Search our FAQ,

read the Documentation, or

browse the list of available plugins.



Check out my plugins
User avatar
CeKaDo
Posts: 24
Joined: Fri Feb 27, 2009 8:03 pm
Location: Schwelm, Germany
Contact:

Postby CeKaDo » Tue Oct 19, 2010 10:06 am

Great pluginh, it´s running now, captcha included :)

But now I have two things on my wishlist:

1. I like to protect my guests by hiding an email-adress like NP_FriendlyComment does. Is it possible in any way?

2. Is it possible to make some fields (like "Name" and maybe the new "Email" to required fields? By the way: How can I put a new field like "Email" in the form?)

Maybe the plugin become more saved and much less spam ;-)
Nur Dumme trauen sich alles - Only fools are doing everything

German multiplikator for Nucleus CMS

Sorry about my bad english, writing it was 35 years ago ;-)
User avatar
CeKaDo
Posts: 24
Joined: Fri Feb 27, 2009 8:03 pm
Location: Schwelm, Germany
Contact:

Postby CeKaDo » Mon Apr 25, 2011 6:01 am

Ok, no answer, but the problem is fixed now.

Another question: Is it possible to give the site admin a message, if a new entry has posted? Just like new comments in the blogs?
Nur Dumme trauen sich alles - Only fools are doing everything



German multiplikator for Nucleus CMS



Sorry about my bad english, writing it was 35 years ago ;-)
Hiro
Posts: 419
Joined: Tue Aug 03, 2004 2:36 pm
Location: Italy
Contact:

Postby Hiro » Thu Dec 26, 2013 11:20 am

demo page doesn't exist.

Return to “Plugin Development”