view service message in knowledgebase

Forum dedicated to Mods for HESK created by Mike Koch

Moderator: mkoch227

Post Reply
jessar94
Posts: 76
Joined: Sun Mar 16, 2014 7:54 pm

view service message in knowledgebase

Post by jessar94 »

Hey.

I wonder if it is possible to view the service message even when you're inside the knowledgebase?

I tryed to add this code

Code: Select all

<?php
    // Service messages
    $res = hesk_dbQuery('SELECT `title`, `message`, `style` FROM `'.hesk_dbEscape($hesk_settings['db_pfix'])."service_messages` WHERE `type`='0' ORDER BY `order` ASC");
    if (hesk_dbNumRows($res) > 0)
    {
    ?>
    <div class="row">
        <div class="col-md-12">
            <?php
            while ($sm=hesk_dbFetchAssoc($res))
            {
                hesk_service_message($sm);
            }
            ?>
        </div>
    </div>
    <?php } ?>
but i get error Parse error: syntax error, unexpected '<' in C:\WEB\root\knowledgebase.php on line 46

[Edit]
i have read the uservoice now :)
It´s a feature request (Y)
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: view service message in knowledgebase

Post by Klemen »

You're already within PHP code block, so the first

Code: Select all

<?php
is not expected and causing the error.

You only need

Code: Select all

<?php
and

Code: Select all

?>
if you're outside of PHP code block (for example within HTML code).
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
Post Reply