Brain cms cant make any news

SupahCookie

Member
Feb 18, 2015
79
0
Hey!
I installed brain cms, and plus emulator (PRODUCTION-201701242205-837386173)
When iam trying to make news for on the cms, he isnt sending it to the database, (everything is working.. execpt that..) is that a bug in brain cms? Or is it my fault...

Greets
 

SupahCookie

Member
Feb 18, 2015
79
0
news.php ? can you post the braincms screenshot. I never used it.
Sure, now iam gona paste that code their. Where should there be the error visable?
 
Ok,
try to search 'news' on your braincms folder. Or post screenshot of braincms (folder) wwwroot or htdocs
 
Surely there is some of column is not completed.
Ok, i tried to create some news. Still no error?
 

Attachments

  • Screenshot_20170222-171930.png
    Screenshot_20170222-171930.png
    331.4 KB · Views: 7
  • Screenshot_20170222-172024.png
    Screenshot_20170222-172024.png
    449.3 KB · Views: 6
  • Screenshot_20170222-172328.png
    Screenshot_20170222-172328.png
    151.4 KB · Views: 8

MasterJiq

Member
Jul 8, 2016
385
23
adminpan -> news.php
try to put code I given to you
 
Found the problem, if not correct tell me. Run this sql
Code:
ALTER TABLE cms_news ADD COLUMN date INT(11) NOT NULL;
 

Zaka

Programmer
Feb 9, 2012
471
121
Try the adminpan I sent you.

I was talking to Zaka as he said make sure all the tables are right in the cms_neas table and I just said wouldn't there be an error when you click create or something
not necessarily because it's in the query, so the query might just fail and if he doesn't catch that, then you wont know I guess.
 

SupahCookie

Member
Feb 18, 2015
79
0
The one that posts the news.
Code:
<?php
    include_once "includes/head.php";
    include_once "includes/header.php";
    include_once "includes/navi.php";
    admin::CheckRank(6);
?>
<aside class="right-side">
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Maak een niews bericht<br>
                        <form name="mygallery" action="" method="POST">
                        </header>
                        <div class="panel-body">
                            <?php admin::PostNews(); ?>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">Titel</label>
                                <div class="col-sm-10">
                                    <input type="text" value="<?php echo $_SESSION['title']; ?>" name="title"class="form-control">
                                </div>
                            </div><br><br>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">Klein Verhaal</label>
                                <div class="col-sm-10">
                                    <input type="text" value="<?php echo $_SESSION['slogan']; ?>" name="slogan"class="form-control">
                                </div>
                            </div><br><br>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">Image</label>
                                <div class="col-sm-10">
                                    <?php
                                        echo '<select onChange="showimage()" class="form-control" name="topstory" style="    width: 100%;font-size: 14px;"';
                                        if ($handle = opendir(''.$_SERVER['DOCUMENT_ROOT'].'/adminpan/img/newsimages'))
                                        {   
                                            while (false !== ($file = readdir($handle)))
                                            {
                                                echo'';
                                                if ($file == '.' || $file == '..')
                                                {
                                                    continue;
                                                }   
                                                echo '<option name="topstory" data-image="'.$config['hotelUrl'].'/adminpan/img/newsimages/' . $file . '" value="'.$config['hotelUrl'].'/adminpan/img/newsimages/' . $file . '"';
                                                if (isset($_POST['topstory']) && $_POST['topstory'] == $file)
                                                {
                                                    echo ' selected';
                                                }
                                                echo '>' . $file . '</option>';
                                            }
                                        }
                                        echo '</select>';
                                    ?>
                                    <br>
                                    <style>
                                        .imagebox {
                                        width: auto;
                                        background-repeat: repeat-y;
                                        border-radius: 6px;
                                        float: left;
                                        margin-right: 0.72pc;
                                        margin-bottom: 10px;
                                        webkit-box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important;
                                        -moz-box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important;
                                        box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important;
                                        }
                                    </style>
                                    <div class="imagebox">
                                        <img style="border-radius: 6px;"src="<?= $config['hotelUrl'];?>/adminpan/img/newsimages/choose.gif" name="topstory" border=0>
                                    </div>
                                    <br><br>
                                </div>
                            </div>
                            <br><br>
                            <script src="<?= $config['hotelUrl'];?>/adminpan/js/ckeditor/ckeditor.js"></script>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">Nieuws bericht</label>
                                <div class="col-sm-10">
                                    <textarea id="editor1" name="news"  rows="15" cols="80"><?php echo $_SESSION['news']; ?></textarea>
                                </div>
                            </div><br><br>
                            <button style="width: 130px;
                            float: right;
                            margin-right: 14px;" name="postnews" type="submit" class="btn btn-success">Bericht Plaatsen</button>
                        </div>
                    </section>
                </div>
            </form>
        </header>
        <?php
            if (User::userData('rank') > '6')
            {
            ?>
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Alle nieuws berichten<br>
                        <div class="panel-body">
                            <?php admin::DeleteNews(); ?>
                            <table class="table table-striped table-bordered table-condensed">
                                <tbody>
                                    <?php
                                    
                                    
                                    
                                    $getArticles = $dbh->prepare("SELECT * FROM cms_news ORDER BY id DESC");
                                    $getArticles->execute();
                                        
                                        while($news = $getArticles->fetch())
                                        {
                                            echo'<tr>
                                            <td>'.$news["id"].'</td>
                                            <td>'.$news["title"].'</td>
                                            <td>'.$news["shortstory"].'</td>
                                            <td>'.$news["author"].'</td>
                                            <td>'. date('d-m-Y', $news['date']).'</td>
                                            <td><center><a href="'.$config['hotelUrl'].'/adminpan/news/edit/'.$news["id"].'"><i  style="padding-top: 5px; color:green;" class="fa fa-edit"></i></a></td>
                                            <td><a href='.$config['hotelUrl'].'/adminpan/news/delete/'.$news["id"].'><i style="padding-top: 4px; color:red;" class="fa fa-trash"></i></center></a></td>
                                            </tr>';
                                        }
                                    ?>
                                    
                                    
                                    
                                    
                                </tbody>
                            </table>
                        </div>
                        <?php
                        }
                        else{
                        ?>
                        <?php
                        }
                    ?>
                </div>
            </div>
            <script>
                // Replace the <textarea id="editor1"> with a CKEditor
                // instance, using default configuration.
                CKEDITOR.replace( 'editor1' );
            </script>
            <?php
                include_once "includes/footer.php";
                include_once "includes/script.php";
            ?>
 
I also have one, for viewing news ( iguess.. same name..) but this one is in the adminpanel
 
SQL] ALTER TABLE cms_news ADD COLUMN date INT(11) NOT NULL;
[Err] 1146 - Table 'plus.cms_news' doesn't exist

Error if i use that code
 

Users who are viewing this thread

Top