change default setting for new articles to "draft" instead of "public"

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
anika
Posts: 8
Joined: Mon Nov 07, 2016 10:09 am

change default setting for new articles to "draft" instead of "public"

Post by anika »

Script URL: http://helpdesk.caratec.de
Version of script: ?
Hosting company: 1&1
URL of phpinfo.php: http://helpdesk.caratec.de/docs/phpinfo.php
URL of session_test.php: http://helpdesk.caratec.de/docs/session_test.php
What terms did you try when SEARCHING for a solution: Request Entity Too Large, exceeds size,

Write your message below:

Hi there,

is there any possibility to change the default setting for the type of new articles to "draft" instead of "public"?

Thank you for your support.

Kind regards

Anika
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: change default setting for new articles to "draft" instead of "public"

Post by Klemen »

In admin/manage_knowldgebase.php find this code (around line 295):

Code: Select all

	if (isset($_SESSION['new_article']))
    {
		$_SESSION['new_article'] = hesk_stripArray($_SESSION['new_article']);
    }
    elseif ( isset($_GET['type']) )
    {
		$_SESSION['new_article']['type'] = intval( hesk_GET('type') );
        if ($_SESSION['new_article']['type'] != 1 && $_SESSION['new_article']['type'] != 2)
        {
        	$_SESSION['new_article']['type'] = 0;
        }
    }
Just BELOW that add

Code: Select all

    if ( ! isset($_SESSION['new_article']['type']))
    {
        $_SESSION['new_article']['type'] = 2;
    }
That should do the trick.

Make sure:
#1 you backup any files before editing
#2 use a good text editor like the free Notepad++ to make sure files are saved correctly (Windows notepad will NOT save files in correct encoding!)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
anika
Posts: 8
Joined: Mon Nov 07, 2016 10:09 am

Re: change default setting for new articles to "draft" instead of "public"

Post by anika »

Thank you very much. This was the solution for my problem!
Have a nice day!
Post Reply