Author Topic: Digital Text CMS  (Read 49998 times)

0 Members and 1 Guest are viewing this topic.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Digital Text CMS
« Reply #90 on: January 11, 2006, 07:21:35 pm »
Have a main template which is basically a simple smarty layout which dictates what goes where overall.

Offline igimo1

  • Full Member
  • ***
  • Posts: 420
    • View Profile
Re: Digital Text CMS
« Reply #91 on: January 12, 2006, 12:23:45 am »
WARRIOR SUCKS

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Digital Text CMS
« Reply #92 on: January 13, 2006, 06:55:46 am »
Well I started implementing my module manager, coming along fine
Here is some (untested) code since I'm a showoffy guy

Code: [Select]
<?php

// Some constants
define('VW_MAIN'0);
define('VW_CREATE'1);
define('VW_EDIT'2);
define('VW_DELETE'3);

// Some errors
define ('VW_NOERR'0);
define ('VW_ERRACTN'1);
define ('VW_BADMOD'2);

class 
MMCore
{
var $DB;
var $ModuleName;
var $View;
var $ManagerCanvas;

function HandlePage($view$name NULL)
{
if ($name != NULL)
{
if (!$this->Exists($name))
return VW_BADMOD;

$view VW_EDIT;
$this->ModuleName $name
}

$this->DB = new DatabaseSystem;
$this->View $view;
$usingSys true;
$this->ManagerCanvas = new DisplaySystem($usingSys);

switch ($this->View)
{
case VW_MAIN:
$this->HandleMain();
break;
case VW_CREATE:
$this->HandleCreate();
break;
case VW_EDIT:
break;
case VW_DELETE:
break;
default:
break;
}

return VW_NOERR;
}

function HandleMain()
{
if (!empty($this->ModuleName))
{
$this->ManagerCanvas->assign("SingleModule"true);
// Display information about the module
if (is_array($result))
{
} else {
// Log an error about failing to fetch here
// Display "Unable to Fetch"
$this->ManagerCanvas->assign("ModuleName"$this->ModuleName);
$this->ManagerCanvas->assign("ModuleVersion""Unable to Fetch");
$this->ManagerCanvas->assign("ModuleAuthor""Unable to Fetch");
$this->ManagerCanvas->assign("ModuleDescription""Unable to Fetch");
}
} else {
$this->ManagerCanvas->assign("SingleModule"false);
// Done
}

return VW_NOERR;
}

function HandleCreate()
{
if ($_POST)
{
// Been posted, use sLayer to check it's integrity
} else {
if (!empty($this->ModuleName))
{
// Dont display
} else {
// Display
}
}

return VW_NOERR;
}

}

?>

One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Digital Text CMS
« Reply #93 on: January 14, 2006, 01:26:16 pm »
« Last Edit: January 14, 2006, 04:04:30 pm by rabbit »

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Digital Text CMS
« Reply #94 on: January 14, 2006, 01:57:50 pm »
Add error handling! :P

Quote
Warning:  opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/warrior/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/warrior/public_html/demo/dev/SourceMonkeyv2.php on line 18



Warning:  opendir(/): failed to open dir: Operation not permitted in /home/warrior/public_html/demo/dev/SourceMonkeyv2.php on line 18

There are no files.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Digital Text CMS
« Reply #95 on: January 14, 2006, 02:07:57 pm »
That's Warrior's crappy derivation off of my original SourceMonkey, which is now v1.2.  If you find any errors, please tell me about them.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Digital Text CMS
« Reply #96 on: January 14, 2006, 03:36:57 pm »
Warrior:

I would not recommend saying something like "you are not allowed to do that!" when you try to view config.php.  Instead, implement some sort of symbolic link that opens a blank config.php from elsewhere.  That or don't display it in the list.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Digital Text CMS
« Reply #97 on: January 14, 2006, 04:00:38 pm »
SourceMonkey v1.2 is mine!  I'll work on that one :P

[update]
Changed.

[update]
Now displays images and I fixed a few minor bugs with the path strings.
« Last Edit: January 14, 2006, 04:18:12 pm by rabbit »

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Digital Text CMS
« Reply #98 on: January 14, 2006, 05:19:19 pm »
Crappy? Code owns your okay thanks.

Fixing v2 later today, reformatting and doing misc stuff. Plus I have a feature which will blow 1.2 out of the water. Start calling yourself CodeMonkey Legacy!
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Digital Text CMS
« Reply #99 on: January 14, 2006, 05:29:15 pm »
When you're outputting a file, you should just send a header (obviously before you write anything else to the page) signifying the content type and then output the file.  Personally, I don't like how it leaves the navigation above the page.  That's probably just me though.

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Digital Text CMS
« Reply #100 on: January 14, 2006, 05:44:38 pm »
Question: Why are you calling it "codemonkey" and is this a necessary project to get sidetracked on?
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Digital Text CMS
« Reply #101 on: January 14, 2006, 05:49:55 pm »
Cool name, also this project is done it's just something me and rabbit do for some friendly competition.
Took me 40 mins tops to make a new v2 ver (Although it's buggy and I may just drop it and merge with Rabbit's solution) not going to sidetrack me :P
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Digital Text CMS
« Reply #102 on: January 14, 2006, 06:07:27 pm »
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Digital Text CMS
« Reply #103 on: January 14, 2006, 07:52:05 pm »
Because we'd REALLY copy of off venox right?
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Digital Text CMS
« Reply #104 on: January 14, 2006, 07:54:21 pm »
I still don't know what this new feature will be, but it sucks.  1.2 is bett4hr than v2.  Mine's been updated a little since you were on earlier.