[BETA] phpBB3-Knowledgebase

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

Jessica wrote:
bprsk8r4272 wrote:on your demo site i notice on viewtopic mini profile you have the postcount from the articles i think it would be better to change it to Article posts: or kb posts: as it may be a bit confusing
either way good work so far
I agree, it should be "Articles" instead of "Posts" because there's already "Posts" for forum posts.

Also, I think you should change the knowledge base icon to an icon that's smaller than the currently one. In my opinion, it doesn't really look that good.

Look through here (adjust the size using that dragger to 16px), think there might be some icons you can change to. Just my opinion though, so you don't have to change it.
The icon on demo site is just temporary, a work in progress. Most likely will just be used on my site. The original icon (seen below) will be incorporated with the mod.
Image

Opinions are always welcome.
I intend to live forever. So far, so good.
Steven Wright
User avatar
victory1
Registered User
Posts: 935
Joined: Sun Oct 10, 2010 6:47 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by victory1 »

I noticed that the star rating on the demo is not working. Since I also have a similar rating system on the mini-kb that's install on my board, I can tell something is wrong with it. It should not have any stars shaded since no one has rated the topic. I'm sure you've realized it's not working but just in case you have not, I wanted to point it out.
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

victory1 wrote:I noticed that the star rating on the demo is not working. Since I also have a similar rating system on the mini-kb that's install on my board, I can tell something is wrong with it. It should not have any stars shaded since no one has rated the topic. I'm sure you've realized it's not working but just in case you have not, I wanted to point it out.
I have not noticed this, I am still going through the code because the original is not my work. I just took over development because I liked it so much.
I will look into when I get a chance.

I did however get the moderation notification working. Thanks for the changes you provided. They were a great start.

Here is a shot of the notification
Image

Also within the UCP you can see if your submitted article still needs approval
Image
I intend to live forever. So far, so good.
Steven Wright
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

victory1 wrote:I noticed that the star rating on the demo is not working
technically it is working, it is just set at a default rating of 3 to give a neutral rating for new articles. This can be changed by editing two files.

open

Code: Select all

includes/kb.php
find:

Code: Select all

'L_CURRENT_RATING' 		=> sprintf(($article_data['article_votes'] == 1) ? $user->lang['CURRENT_RATING_S'] : $user->lang['CURRENT_RATING_P'], (($article_data['article_votes'] == 0) ? 3 : $article_data['article_rating']), $article_data['article_votes']),
replace with

Code: Select all

'L_CURRENT_RATING' 		=> sprintf(($article_data['article_votes'] == 1) ? $user->lang['CURRENT_RATING_S'] : $user->lang['CURRENT_RATING_P'], (($article_data['article_votes'] == 0) ? 0 : $article_data['article_rating']), $article_data['article_votes']),
Open

Code: Select all

includes/function_kb.php
find:

Code: Select all

$rating = 3;
replace with:

Code: Select all

$rating = 0;
But you do need to be logged in to rate an article, so it will not work for an anonymous user

if needed I can put in a configuration setting in the acp if the interest is there for it.
Hope this helps
I intend to live forever. So far, so good.
Steven Wright
User avatar
victory1
Registered User
Posts: 935
Joined: Sun Oct 10, 2010 6:47 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by victory1 »

Thanks, now that made sense. It should be 0 instead of the default 3. It's the same on my board about not being able to rate if you are not logged in. I had to change a few things in the mini-kb to make it suit my need and also fixed several issues but most of the changes were cosmetic. That's my mini-kb here

I love the comment system on this KB and would have installed it instead of the mini-kb for it alone. But after installing it on my test board, which wen't smoothly; uninstalling it messed up my board. Of course I made a back-up before installing any modifications on my test board. To make a long story short, I had to revert to my back-up to remove the mess uninstalling this mod caused. I see one of the things you are working on, is a simpler installation; please also test uninstalling it also.

By the way, the notification from the screenshot looks great.
darksminky
Registered User
Posts: 132
Joined: Wed Jan 26, 2011 9:13 pm

Re: [DEV] phpBB3-Knowledgebase

Post by darksminky »

Sorry to be a party pooper, but I would suggest using a config variable for the default rating; According to the magic number clause that's frowned upon (magic as in: a default number or definition not defined by a variable of some sort)
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

It is always a good idea to create the back up, but what issues did you have with uninstalling. Was it the automod portion of the rest of it? I haven't had began to test that yet. :(
victory1 wrote:But after installing it on my test board, which wen't smoothly; uninstalling it messed up my board. Of course I made a back-up before installing any modifications on my test board.
Thanks
victory1 wrote:By the way, the notification from the screenshot looks great.
I'm sure this is what you are referring to: magic numbers.This is part of the reason I am going through this code completely before I release a beta. I will put this on my list of things to do.
darksminky wrote:I would suggest using a config variable for the default rating; According to the magic number clause that's frowned upon (magic as in: a default number or definition not defined by a variable of some sort)
Keep the comments and critique coming, I would like to see this become a worthy mod.
I intend to live forever. So far, so good.
Steven Wright
User avatar
victory1
Registered User
Posts: 935
Joined: Sun Oct 10, 2010 6:47 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by victory1 »

pertneer wrote:It is always a good idea to create the back up, but what issues did you have with uninstalling. Was it the automod portion of the rest of it? I haven't had began to test that yet. :(


It was an automod install and uninstall. I could not register a test account after uninstalling it. When I clicked register, I would get the below error. I was told by support that uninstalling did not remove a lot of the fields and to go to phpmyadmin, structure and remove them manually. I chose to restore my board instead. The original topic for this mod was not close and the mod was not yet marked abandon when I installed it. A few people ran into the same issue and you can read about in the original topic (the last 2 pages).

Code: Select all

SQL ERROR [ mysqli ]

Field 'user_kb_permissions' doesn't have a default value [1364]

An SQL error occurred while fetching this page.
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

I have to ask where did you get the installer?
If you found my git repository make sure you look at the branch not the master. I have not combined them. I did add the repository to my first post so you can watch progress.

I just tried installing just the automod portion on a test board and then uninstall with no ill effects. Which i suspected because of the sql items are being done in the other installer. Which I have yet to fix these issues. Working on getting the mod to function properly then I will work on the installer. I will see I can find a quick fix today if i get time.
Please bear with me.
I intend to live forever. So far, so good.
Steven Wright
User avatar
victory1
Registered User
Posts: 935
Joined: Sun Oct 10, 2010 6:47 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by victory1 »

You don't need to find a quick fix. I'm not trying to install it anytime soon. I was just making you aware of the errors that I encountered on the last version before it was abandoned. That was way back in February of 2011, when I installed it on my test board.
darksminky
Registered User
Posts: 132
Joined: Wed Jan 26, 2011 9:13 pm

Re: [DEV] phpBB3-Knowledgebase

Post by darksminky »

I would recommend integrating the comments system into the topics system, to reduce mod size and to increase its integration, though the "if it ain't broke don't fix it" principle may apply here
User avatar
ViolaF
Registered User
Posts: 1543
Joined: Tue Aug 14, 2012 11:52 pm

Re: [DEV] phpBB3-Knowledgebase

Post by ViolaF »

victory1 wrote: I could not register a test account after uninstalling it. When I clicked register, I would get the below error.

Code: Select all

SQL ERROR [ mysqli ]

Field 'user_kb_permissions' doesn't have a default value [1364]

An SQL error occurred while fetching this page.
As you say, you dont install it anyway, but for other people who are nagged by this error ;)

open

includes/functions_user.php

find

Code: Select all

        'user_form_salt'            => unique_id(), 
before add

Code: Select all

        'user_kb_permissions'        => '', 
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

Sorry for any confusion but as stated in this post, there is a new installer in the git repository.The most recent installer has this addition in it and does not have errors when installing on a fresh install of phpBB3.

Thanks for trying to help with the fix.
I intend to live forever. So far, so good.
Steven Wright
User avatar
victory1
Registered User
Posts: 935
Joined: Sun Oct 10, 2010 6:47 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by victory1 »

pertneer wrote:Sorry for any confusion but as stated in this post, there is a new installer in the git repository.The most recent installer has this addition in it and does not have errors when installing on a fresh install of phpBB3.
OK, I understand now what you are saying. I'm glad you updated the installer because like I said when I was testing it last year on my test board, it installed perfectly but uninstalling left me with a mess.
Some tables were not removed, some permission modules were not removed, some additions to the config table were not removed; that cause the board to give errors in certain functions. Like I did not know anything was wrong after removing the mod until 2 days later when I tried to create a test account and clicked on the register button. That's when it threw the error, as I stated earlier.
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [DEV] phpBB3-Knowledgebase

Post by pertneer »

I added a config value to the acp to set default rating as well as a dev version download link on demo forum. Once I get dev version to work well enough to put into beta, I will add link here and update title to beta.
I intend to live forever. So far, so good.
Steven Wright
Locked

Return to “[3.0.x] MODs in Development”