Topic: Comments welcome on 'MyWebMaker'

Here's a little project I've been working on, a simple content management system called (for now at least) MyWebMaker: http://www.labradorstraits.net/mwm/

There's a demo you can play with. Any comment, suggestions are welcome (note that it's in a very early stage of development.)

Thanks!

2

Re: Comments welcome on 'MyWebMaker'

I like it smile The layout and design make a change from most CMS's...

3 (edited by Paul 2004-06-04 13:46)

Re: Comments welcome on 'MyWebMaker'

I like it too. Clean, simple and elegant. Any plans for PunBB integration?

Re: Comments welcome on 'MyWebMaker'

Very nice! I just had a quick run-through and it appears to be working like a charm :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Comments welcome on 'MyWebMaker'

Paul wrote:

I like it too. Clean, simple and elegant. Any plans for PunBB integration?

Thanks.

I haven't progressed as far as a "plan", but the idea is there smile It's part of the reason why for now the user/authentication system is barebones -- to allow for integration with other systems.

What I'd like is to make punBB an add-on component, with an automated install. So a site administrator could click an "Add PunBB Forum" link and a script would:

- Fetch the latest version from Rickard's site;
- Untar it;
- Generate a config file;
- Add the tables to the database;
- Insert the forum administrator user;
- Create a default forum;
- Set the punbb cookie and load the forum index page.

I think all that is do-able, but I haven't begun to work on it yet -- and it could be a while smile

And then there are many things to do with layout & design... it would be nice if the forum 'inherited' some basic settings from the site.

Re: Comments welcome on 'MyWebMaker'

sleddog wrote:

- Fetch the latest version from Rickard's site;

For that you can use this file :D

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Comments welcome on 'MyWebMaker'

Rickard wrote:
sleddog wrote:

- Fetch the latest version from Rickard's site;

For that you can use this file big_smile


Hey cool. One problem solved. Inspires me to maybe make a totally unplanned first attempt at it this weekend smile

8

Re: Comments welcome on 'MyWebMaker'

Let us know how you get on and how you did it (if you do it). I can't work out how to inject the values that install.php asks for on the install form.

Re: Comments welcome on 'MyWebMaker'

I'd be happy to share any progress I make, though it could be a while...

Re: Comments welcome on 'MyWebMaker'

OK, is the joker one of you guys? smile

http://www.labradorstraits.net/mwmdemo/index.php?id=11

So subtle.

11

Re: Comments welcome on 'MyWebMaker'

Not me. Though I wish it had been.

Re: Comments welcome on 'MyWebMaker'

Yes cool and Good Buddy!!

God wisely designed the human body so that we can neither pat our own backs nor kick ourselves too easily

Re: Comments welcome on 'MyWebMaker'

Sorry I haven't work on the Punbb integration much. It's a big undertaking smile and I want to iron out some of the basics first. I have new scripts up now with many fixes, and including an embryonic new feature -- http://www.labradorstraits.net/mwmdemo/blog.php -- where I'd appreciate input on from anyone/everyone here.

Rickard I hope you don't mind me posting this. If so I'll stop, just say smile

14

Re: Comments welcome on 'MyWebMaker'

Nice. I like the idea you posted in that blog; would be easy to use and effective.

Re: Comments welcome on 'MyWebMaker'

it looked messed up when i went to the demo page you should hide the admin thing i think someone fucked it up

16 (edited by sleddog 2004-06-12 10:15)

Re: Comments welcome on 'MyWebMaker'

Yes someone messed it up by setting silly things like page width = 8000. Thanks! smile It reminded me that I need to verify some of those submitted values. I'm sure the person set that page width intentionally, but a real user could easily make a typo and put '8000' instead of '800'.

Re: Comments welcome on 'MyWebMaker'

Maybe a message with a warning would be a good idea. Like "Are you really sure you wish to set the width to 8000? This will generally be too wide" or something similar, and then a confirm-button after that.

No electrons were harmed in the creation of this post.
However, many were excited and some may have enjoyed the experience.

Re: Comments welcome on 'MyWebMaker'

Yes, though it's a little more complicated than that. Percentage values are allowed as well as pixels. So if a percentage value is entered, we need to check that it does not exceed 100% (and also some sane low-end value, like 50%, for when someone types 10% but really meant 100%). If it isn't a percentage value then we need to check that the value isn't rediculously high or low.

Re: Comments welcome on 'MyWebMaker'

i went did you fix it? cause its like it again... whats the problem?

20 (edited by sleddog 2004-06-12 20:30)

Re: Comments welcome on 'MyWebMaker'

Boys will be boys as my dear old mom used to say :)

Someone just changed the value for page width, etc. to rediculously large absolute values (e.g. 7200 pixels).

In normal use a site administrator wouldn't hack his/her own site like that, at least not intentionally. Regardless, some sanity checking is required for page width, sidebar width and photo sizes.

I've worked up this to implement tonight or tomorrow:

// Check a value submitted from the Site Settings form:
function checkValue($string,$max_abs,$min_abs,$max_rel,$min_rel,$value) {
    // If the last char of submitted string is '%' we note it then remove it:
    if (substr($string, -1) == "%") {
        $rel=TRUE;
        $string = substr($string, 0, -1);
    }
    // Remove any non-numerial chars from the string:
    $length = strlen($string);
    $charnum = 0;
    $badchars = array();
    while ($charnum < $length) {
        $char = substr($string, $charnum, 1);
        if (!preg_match("/[0-9]/", $char)) {
            array_push($badchars, $char);
        }
        $charnum++;
    }
    foreach ($badchars as $bad) {
        $string = str_replace($bad,"",$string);
    }
    if (!$string) {
        $string = "0";
    }
    // Check that the value falls within the set range for relative (%) values.
    // If not, reset it and produce a warning message:
    if ($rel) {
        if ($string > $max_rel) {
            $new_string = $max_rel;
            $msg = "You specified $string% for $value. 
            The maximum allowed value is $max_rel%.";
        }
        elseif ($string < $min_rel) {
            $new_string = $min_rel;
            $msg = "You specified $string% for $value. 
            The minimum allowed value is $min_rel%.";
        }
        else {
            $new_string = $string;
        }
        $new_string = $new_string . "%";
    }
    // Or check that it falls within the set range for absolute (pixel) values.
    // If not, reset it and produce a warning message:
    else {
        if ($string > $max_abs) {
            $new_string = $max_abs;
            $msg = "You specified $string pixels for $value. 
            The maximum allowed value is $max_abs pixels.";
        }
        elseif ($string < $min_abs) {
            $new_string = $min_abs;
            $msg = "You specified $string pixels for $value. 
            The minimum allowed value is $min_abs pixels.";
        }
        else {
            $new_string = string;
        }
    }
    return array($string,$new_string,$msg);
}

If a $msg is generated, the user will be sent back to the site setting form after submitting. The msg (in red) will be inserted below the input field for the particular value, and the value in the input field willl be reset to the $new_string (sanitized) value.

If anyone has comments, suggestions they're always welcome.

Re: Comments welcome on 'MyWebMaker'

Hey, nobody noticed the typo? smile

Anyway, it's in place now.

Re: Comments welcome on 'MyWebMaker'

Added Blog navigation and introduced the Guestbook feature over the past few days.

23

Re: Comments welcome on 'MyWebMaker'

very nice smile

Re: Comments welcome on 'MyWebMaker'

The subject of protecting email addresses from spam harvesting has been discussed here, so I thought someone might want to comment on the method I've implemented:

http://www.labradorstraits.net/mwm/blog.php?id=16

Re: Comments welcome on 'MyWebMaker'

sleddog wrote:

The subject of protecting email addresses from spam harvesting has been discussed here, so I thought someone might want to comment on the method I've implemented:

http://www.labradorstraits.net/mwm/blog.php?id=16

Well, I could still write a script that searches through all this pages and fetch the email from there (Or, by "search expression", do you mean harvest the addresses using google or something?)