Author Topic: Digital Text CMS  (Read 49894 times)

0 Members and 2 Guests are viewing this topic.

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 #120 on: June 04, 2006, 07:46:22 pm »
k
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 #121 on: June 05, 2006, 12:30:34 am »
I might be needing a final (or latest) version for a personal project, we can work that out when the time comes.
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 #122 on: June 05, 2006, 06:40:21 am »
Well I need to redo some thinking which I've since done on modules. I can get it done it's just that it's time consuming how I designed it. I need to make a lot of things easier. I also forgot a lot of what I was thinking while writing code so I'll need to reread some code.
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 #123 on: June 05, 2006, 07:12:23 pm »
Well I need to redo some thinking which I've since done on modules. I can get it done it's just that it's time consuming how I designed it. I need to make a lot of things easier. I also forgot a lot of what I was thinking while writing code so I'll need to reread some code.

Ok. There's not a HUGE rush, but I would like to get it done and up inside a month or two, if possible. Thanks.
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 #124 on: June 27, 2006, 08:22:09 pm »
As part of my revision of DigitalText CMS I've decided to recreate my module system.

Code: [Select]
function HandlePluginPage()
{
if (!isset($_GET['plugin']))
return -1;
else
$plugin = $_GET['plugin'];


$query = $this->DB->PerformQuery("SELECT ID FROM Plugins WHERE Name='" . $plugin . "' LIMIT 1");

if ($this->DB->CountResults($query) == 0)
{
if (!is_file(SCRIPT_ROOT . '/plugins/' . $plugin . '.plugin.php'))
return -1;

$query = $this->DB->PerformQuery("INSERT INTO Plugins SET Name='" . $plugin . "'");

if (!$query)
return -1;
}

include_once SCRIPT_ROOT. '/plugins/' . $plugin . '.plugin.php';

if (!function_exists($plugin . '_main'))
return -1;

if (function_num_args($plugin . '_main')) != 2)
return -1;

$function = $plugin . '_main';

$arg = $_GET;

$ret = $function($arg, &$this);

if ($ret != 0)
echo "Unexpected behavior.";
else
echo "Plugin terminated successfully.";
}

It's untested and pretty preliminary and unoptimized but I think it should work.
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 #125 on: June 27, 2006, 09:56:12 pm »
The way you do your queries bugs me, still.

Also, you really need to make an error handler or something so that you don't have to check every result for an error.  I do like the passing of the parent object, though, I never thought of that.  And lastly, passing $arg = $_GET is redundant.  Personally, I'd assign the plugin's $arg values inside the _main function instead of passing a clone.

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 #126 on: June 28, 2006, 08:30:49 am »
Well I was thinking of passing only paramaters I wanted it to handle by the $arg param but I threw that in there to get it working quickly.

I'd really rather check each variable because I don't think writing an error handler would apply there? I do however have a general purpose handler written which reports errors to the DB but don't raise a message unless it's either fatal or verbose is on in the settings.

I'm not going to pass the entire core in the end, I'll write a layer ontop of the core which allows / disallows access to certain functions.

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 zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: Digital Text CMS
« Reply #127 on: July 10, 2006, 06:30:53 pm »
Interesting stuff but I still really don't get the point of the database calls...?
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

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 #128 on: July 10, 2006, 07:27:24 pm »
Stores information regarding the module and was meant to be extended further into something I've since forgotten.
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