Lets fix PulseCMS


#1

1.- Don’t hide errors:

error_reporting(0);

If i remove your error reporting i get A LOT OF ERRORS, wich is wrong, fix them, don’t hide them.

2.- Handle XML properly if you serve XML.

on rss.php replace:

<?php 

include("config.php");
error_reporting(0);

With:

<?php 
include("config.php");
header("Content-type: text/xml");

Another fix, layout.php at the end:

<!-- Stats Tracking Code -->

Change it to:

<!-- Stats Tracking Code -->
<?php
if (empty($_SERVER['HTTP_REFERER'])){
	 $_SERVER['HTTP_REFERER'] = 'none';
}
?>

I will list more mistakes during my usage and move to PulseCMS. (Yes i’m still willing to move to PulseCMS).


#2

Other fixes on inc/tags/blog.php

Line & fix:

Line: 5, 6:
if (isset($_GET['d']) && is_numeric($_GET['d'])){ $get_id = $_GET['d']; }
if (isset($_GET['page']) && is_numeric($_GET['page'])){ $cur_page = $_GET['page']; }

Line: 84:
$cur_page        = isset($cur_page) ? $cur_page : 1;

#3

Adding a few things to rss.php

echo "<copyright>$blog_title - $blog_description All rights reserved.</copyright>\n";
echo "<generator>PulseCMS</generator>\n";

This goes right after:

echo "<language>$rss_lang</language>\n\n";

More Redactor items?
#4

Adding “MORE” to Redactor toolbar.

Create a file with the name of “more.js” under admin/js/redactor with this content:

// Author: Alberto Ferrer
// Email: albertof@barrahome.org
// For PulseCMS only.
(function($)
{
    $.Redactor.prototype.more = function()
    {
        return {
            init: function ()
            {
                var button = this.button.add('more', 'More');
                jQuery('a.re-more').css({
            			backgroundImage : ' url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQ0lEQVQYV2MMDQ39zwAEq1evZgTR6AAmzwhjYFOMLAc2BZtidDG4dcgSyNbDnITiLnTFyO4mXSFRVhPlGaKDh9gABwAJuDgDsQ44aQAAAABJRU5ErkJggg==)',
            		});
                this.button.addCallback(button, this.more.test);
            },
            test: function(buttonName)
            {
                this.selection.restore();
                this.insert.html('##more##');  
            }

        };
    };
})(jQuery);

Now modify admin/index.php and right under this:

<script src="<?php echo $path.'/'.$admin; ?>/js/redactor/table.js"></script>	

Add the next line:

<script src="<?php echo $path.'/'.$admin; ?>/js/redactor/more.js"></script>	

Feel free to submit a better icon, i’m kinda lazy on the UI dept.

Usage is quite simple: you will see a cross (X) next to Full Screen icon. Place the mouse pointer on where you want to add the more button, click and done.


#5

Thanks for all these @bet0x! Will get on to these asap and start to merge into the code base.

Please keep your amends and comments coming through at any time :slight_smile:
thanks


#6

There is other issues to be solved, example:

<?php

require_once("login.php");

Must be:

<?php
require_once("login.php");

To prevent header errors.

also on create and i’m sure on many more:

<?php

require_once("login.php");

session_start();
  1. login.php already has a session_start() on line 12, why you duplicate it?

  2. After every

<?php

You must place the code and don’t leave spaces.
3. Don’t use <? is deprecated. Use <?php (found this bug on diag.php under admin folder.


#7

functions.php

<?php

require_once("login.php");

session_start();
include('functions.php');

1.- Wront space
2.- Again session_start when is already initiated on login.php
3.- functions.php already have a require_once to login.php
4.- since functions.php is only for functions there is no point on requiere or include login.php

On home.php

<?php

require_once("login.php");

session_start();
include('functions.php');

Wrong again.

magic.php

<?php
require_once("login.php");

no need for that, you can move it to functions.php as a function.

open.php, html & js before checking the login.

also in the same file.

<?php

require_once("login.php");

session_start();

You may want send me an email, setup a git private repo and i will help you to fix almost everything :slight_smile:


#8

Why haven’t these reported errors not been fixed by now? It’s 6 months later!


#9

What makes you think they haven’t (or were even accurate?)


#10

Because I checked some.


#11

Pulse is being fixed all the time and improved as mentioned in more detail here:

Closing as double-posting…


closed #12