Clan x86

Technical (Development, Security, etc.) => General Programming => New Project Announcements => Topic started by: Warrior on December 04, 2005, 05:03:08 am

Title: Digital Text CMS
Post by: Warrior on December 04, 2005, 05:03:08 am
AdvancedContent has moved on and given way to Digital Text CMS.
AdvancedContent was based on the theory of providing the user with basic things (downloads, forum, etc.) as opposed to doing what I wanted it to do...manage content.

Digital Text will have this ability. You will be able to add pages (static HTML for the most part) and moduels (dynamic stuff).

AdvancedContent used it's own template engine which wasn't too shabby but it was a bit restrictive and made things over complicated.
Digital Text uses Smarty (smarty.php.net) an awesome template engine which makes templating easy and FLEXIBLE for the user. (Instead of me organizing the output of say an array of news entries, the user can himself using built in things to loop through arrays passed to the template)-- this results in a GREAT increase in flexibility to the designer and less hassle to the programmer.

The big advantage I think this will have is it's compact size. Since none of the things in AdvancedContent (forums, downloads, news, pm) are implemented into the core the CMS keeps a small size which allows it to be easily adapted to any purpose.

A live demo (live meaning being worked on) is availible at: www.advancedcontent.net/demo (As of now it is not very interactive just some output)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 05:05:27 am
Digital Text uses Smarty (smarty.php.net) an awesome template engine which makes templating easy and FLEXIBLE for the user.

Copier (http://www.sidoh.org/test/scms/index.php/news/full/60).
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 05:07:21 am
Ersan told me about this a while back. Actually smarty is pretty easy to use on all servers, you just plop it in a dir (/lib) and instantiate the class Smarty (include Smarty.class.php)

Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 05:09:00 am
Hmm got a lot of planning to do with how things will interact with each other, going to sleep on it.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 05:10:48 am
Ersan told me about this a while back. Actually smarty is pretty easy to use on all servers, you just plop it in a dir (/lib) and instantiate the class Smarty (include Smarty.class.php)

I'm using it, noob.  :P

That entire CMS (www.sidoh.org/test/scms) uses Smarty.  I've extended the smarty engine slightly to fit the way I want my CMS to work.  It's not very significant, but it saves time and keystrokes.

By the way, it's better to just 'plop' a /smarty directory somewhere within your CMS.  Installing it otherwise would be too much of a hassle.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 05:14:17 am
Ersan told me about this a while back. Actually smarty is pretty easy to use on all servers, you just plop it in a dir (/lib) and instantiate the class Smarty (include Smarty.class.php)

I'm using it, noob.  :P

That entire CMS (www.sidoh.org/test/scms) uses Smarty.  I've extended the smarty engine slightly to fit the way I want my CMS to work.  It's not very significant, but it saves time and keystrokes.

By the way, it's better to just 'plop' a /smarty directory somewhere within your CMS.  Installing it otherwise would be too much of a hassle.

Haha same here, I wrote a class which extends smarty and implemented an abstraction layer of sorts because I am a control freak. Like yours not very vital significant changes (maybe automating a few things here+there, nothing big)

Well yea by "plop" I meant in a dir within your CMS, oops.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 05:17:09 am
Haha same here, I wrote a class which extends smarty and implemented an abstraction layer of sorts because I am a control freak. Like yours not very vital significant changes (maybe automating a few things here+there, nothing big)

Well yea by "plop" I meant in a dir within your CMS, oops.

I wasn't aware that /lib was a common DocumentRoot.  :P
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 12:18:03 pm
I use it anyway.

/demo/lib/smarty
/demo/templates
/demo/templates_c
/demo/cache
/includes

Everything with the CMS no special installation no hassle :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 01:22:38 pm
I use it anyway.

/demo/lib/smarty
/demo/templates
/demo/templates_c
/demo/cache
/includes

Everything with the CMS no special installation no hassle :)

Haha.  I installed it in /<DocumentRoot>/test/scms/classes/smarty.  Also, why wouldn't you set up /demo/configs given your naming pattern?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 01:45:10 pm
I havn't used them, I plan to use them though for multi language support possibly.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 01:57:50 pm
I havn't used them, I plan to use them though for multi language support possibly.

Hehe, that's a great use of them.

Smarty's really nice, but it's hard to know when to use PHP for your core instead of using Smarty for templates.  It's difficult to seperate layout from core like that in some respects.  I think I was talking to iago about this a while ago.  He said he thought the whole idea of templates was so you could keep the graphic designers away from your code, but Smarty actually encourages them to interact with the code.  I suppose that's a positive and negative thing, really.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Quik on December 04, 2005, 03:27:36 pm
I suggest you create a "features" section of your site containing links to code, and build in the "obtain feature list" function that gives the ACP a list of available features, with links to click to install said features. That way people can install the basic core, and customize it later (IE: Adding PM with the click of one link, etc.)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 03:41:14 pm
I don't know I plan to take a simplistic approach at this. I read anything in the /mod folder and mark it as a possible module.
A module to be loaded must communicate with the core and identify itself. I guess I can perhaps mark them as "Loaded" or "Non Loaded" to get the effect of starting and stopping it. Maybe.

I'm still cleaning up some things in the core and writing my authentication class to do stuff with templates.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 04:01:41 pm
I suggest you create a "features" section of your site containing links to code, and build in the "obtain feature list" function that gives the ACP a list of available features, with links to click to install said features. That way people can install the basic core, and customize it later (IE: Adding PM with the click of one link, etc.)

Taking this sort of approach for this kind of project wouldn't work all that well, assuming he's using the templating method I'm imagining.  It would be hard to implement a plugin-like interface if everything is going to be templated.  You'd have to develop templates for all of your plugins.  :\

I don't know I plan to take a simplistic approach at this. I read anything in the /mod folder and mark it as a possible module.
A module to be loaded must communicate with the core and identify itself. I guess I can perhaps mark them as "Loaded" or "Non Loaded" to get the effect of starting and stopping it. Maybe.

I'm still cleaning up some things in the core and writing my authentication class to do stuff with templates.

Hehe, I'm thinking about doing something like that for the CMS I'm starting to write now too.  We'll see... Like I've already mentioned, making everything templated using this structure's going to be a challenge.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Blaze on December 04, 2005, 04:26:22 pm
Why don't you two just team up?  You're doing very similiar things...
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 05:12:24 pm
Why don't you two just team up?  You're doing very similiar things...

I, for one, am doing this for experience.  I have no intention for this to become some popularly used CMS or anyting.  Warrior, on the other hand, seems to want to release this (multilanguage support! :)).

I normally wouldn't mind teaming up with him (regardless of my past statements), but I'm in a bind with the amount of time I've had lately.  My school schedules in addition to the craze of applying for colleges and scholarships have been driving me up the wall lately.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 04, 2005, 05:18:42 pm
Well I'm trying to find a medium between widely used and not so widely used. Not trying to have this be supper dazzling. Just a simple solution to the everyday problem of building a good website.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 04, 2005, 05:26:01 pm
Well I'm trying to find a medium between widely used and not so widely used. Not trying to have this be supper dazzling. Just a simple solution to the everyday problem of building a good website.

Seeing as how I don't plan on releasing my CMS, I'm tailoring it around my personal wants. :]
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Quik on December 04, 2005, 08:04:51 pm
One of you should custom-tailor one for my personal needs. ;)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Furious on December 04, 2005, 08:33:24 pm
One of you should custom-tailor one for my personal needs. ;)

I was thinking the same thing.  :o
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 05, 2005, 10:45:14 am
The way I'm programming this, it wouldn't be too hard for the user to custom tailor it to his old needs via modifications made to modules and static pages created. This thing is fully themeable and with the use of smarty for the designer you can control how your output will look in the smallest ways.

A few updates: The core now properly handles errors thrown by the page loader.
                      I have implemented an authentication class which sets a variable in the template so that users can see if you are logged in.
                     Now as Sidoh said there are some issues with what should be a template, what should be a module, and whatever.
                     I'm thinking about having the "bare" essentials as part of the core such as Authentication and User registration. But another issue comes to mind like managing user information and how to extend that with the use of modules. Perhaps write a module to dynamically fetch rows and things to update as they are added. Dunno just scribbling some thoughts down.
                    I have also started implementing my modules subsystem into the core. So far it just reads the modules directory and locates all the files needed and if it is not found then it throws and error to the core (most likely will be a fatal one too). 


Todo list:
             Design some user interfaces for when a user logs in, maybe have modules marked as "List only when logged in" or something I'll think more into this
             Fidn a way to isolate all the cores function from the modules since currently I am exposing the entire core. Perhaps create sort of a "Communication pipeline" as in Module grabs Core's anttention Module does the requested data and Module closes stream. This could be overcompliating things but whatever.

 
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 07, 2005, 12:31:53 am
Update:
 Implemented simple modules by simple I mean VERY simple but effective. I might stick with this to maintain my simplistic approach to things.
 
 I have a few bugs to fix on my todo list (No exploits just goofs) but I'm too tired to do it.
 I'll post a source code section tomorrow as soon as I get home from school.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 07, 2005, 12:53:15 am
Update:
 Implemented simple modules by simple I mean VERY simple but effective. I might stick with this to maintain my simplistic approach to things.
 
 I have a few bugs to fix on my todo list (No exploits just goofs) but I'm too tired to do it.
 I'll post a source code section tomorrow as soon as I get home from school.

Dude, reply to the PM I sent you.  Fag.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 07, 2005, 01:07:27 am
I did, the site must not be sending them again omfg. Anyways @ the PM: Sure.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 07, 2005, 01:17:18 am
I did, the site must not be sending them again omfg. Anyways @ the PM: Sure.

Ugh, that's so gay.

Alright, thanks.  :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 08, 2005, 02:01:10 am
After around 20 minutes of coding I fixed the navigational bug(s) and implemented a simple login module (To be extended on later) I'm doing some more thinking on things relating login and how other things in the future will work but that's for another time

Anyhow here's some example code of how I fixed it:

Code: [Select]
if ($DB->GetRowCount($query) == 0)
{
$Disp->assign("Nav_Count", 0);
} else {
$nav_array = array();
$i = 0;

while ($result = $DB->FetchArray($query))
{
$nav_array[$i]['name'] = $result['Name'];
$nav_array[$i]['link'] = "index.php?page=" . $result['Name'];
$i++;
}

$query = $DB->PerformQuery("SELECT ModName FROM site_mods");

while ($result = $DB->FetchArray($query))
{
$nav_array[$i]['name'] = $result['ModName'];
$nav_array[$i]['link'] = "index.php?mod=" . $result['ModName'];
$i++;
}

$Disp->assign("Nav_Count", count($nav_array)); // FIXED invalid number count
$Disp->assign("Nav_Item", $nav_array);
}

$Module->SetModule($mod);

$Disp->Show();

And here is the templating code:

Code: [Select]
{if $Nav_Count}
{foreach from=$Nav_Item item=nav}
<a href="{$nav.link}">{$nav.name|capitalize}</a><br />
{/foreach}
{/if}
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 08, 2005, 02:06:31 am
As a suggestion, you may want to consider the possiblity of someone supplying an image as a link ($nav.name) as opposed to a plaintext one.  I don't suppose this would matter much since capital "<" is just "<", but I don't know if you'd want to do any additional parsing for something like this.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 08, 2005, 02:11:40 am
$nav.name is the name of the module eg. "test" -> "Test" (I think this is what you mean)

Anyhow I've learned the helpfulness of globals (Passing objects from core to module :D)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 08, 2005, 02:13:38 am
$nav.name is the name of the module eg. "test" -> "Test" (I think this is what you mean)

Anyhow I've learned the helpfulness of globals (Passing objects from core to module :D)

Haha, yeah.

Globals are nice, but I wish that PHP would have an implements method for its OO capability, that'd make things so much cleaner...
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 08, 2005, 02:25:53 am
I thought PHP5 had this *shrug* that's not widely used anyhow.

I was in an especially tight bind because some of my classes take params in thier constructors which are essential to how it's run (example: $DB = new dtDatabase($settings['dbtype']) and settings is $settings = GetSettings();) and I had no idea how to pass that from config.php to the core to the module so globals worked perfectly here.

I was also faced with a setback because I was previously using array_push() but I don't think it can push associative arrays. Oh well I use a (imho) cleaner method now.

I think most of the major coding of the CMS is done though :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 08, 2005, 02:34:46 am
I thought PHP5 had this *shrug* that's not widely used anyhow.

I was in an especially tight bind because some of my classes take params in thier constructors which are essential to how it's run (example: $DB = new dtDatabase($settings['dbtype']) and settings is $settings = GetSettings();) and I had no idea how to pass that from config.php to the core to the module so globals worked perfectly here.

I was also faced with a setback because I was previously using array_push() but I don't think it can push associative arrays. Oh well I use a (imho) cleaner method now.

I think most of the major coding of the CMS is done though :)

RTFM (http://www.php.net/manual/en/language.oop5.php).  Just kidding.  implements is a widely used OO structure in other OOP languages, just look at some of the Java code from JavaOp or something.

Yeah, other than passing them as params (which is really stupid to begin with), globals are the only way I'm aware of to share variables/objects between classes (unless you use a long line of extends classes, which is dumb anyway).

In my opinion, array_push is a pretty useless function.  As I'm sure you're aware, it has the same affect as:

Code: [Select]
$v = array();

v[] = '0';
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 08, 2005, 02:47:56 am
Yea. Why would I want to read something on PHP5!? :P.

array_push() was getting annoying so while looking through some old advancedcontent code I saw I did it like this in some places (Saved by my old code!).

I like my current CMS' state it's pretty powerful yet small. I can't see any bugs in it (except some warnings PHP would generate if I do something withought checking another which I'll fix) all that I really lack is the time to sit down and write some modules.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 08, 2005, 01:46:43 pm
Yea. Why would I want to read something on PHP5!? :P.

array_push() was getting annoying so while looking through some old advancedcontent code I saw I did it like this in some places (Saved by my old code!).

I like my current CMS' state it's pretty powerful yet small. I can't see any bugs in it (except some warnings PHP would generate if I do something withought checking another which I'll fix) all that I really lack is the time to sit down and write some modules.

Haha.  Its funny that they'd even have a function that can be replaced with an operator.  It's like having an add() function.  Oh well, haha.

That's what we call "efficient!" :P
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 08, 2005, 03:40:08 pm
Okay I decided to keep my modules in this simplistic format maybe improve on it with some identification abilities (Make them able to inherit a class from thier own probably thier own class spawned on thier creation so they can identify themselves if they'd like but that would allow them to do evil things (Like include themselves endlessly but then again, who'd use a malicious module!?). Yea I'll probably do a little more thinking but for now I think I'll leave it this way.

I'm going to start working on some basic modules to show off the functionality of the core and get around to seeing if theres any optimizations I can make before releasing a stable "beta1"
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 08, 2005, 05:43:34 pm
Okay I decided to keep my modules in this simplistic format maybe improve on it with some identification abilities (Make them able to inherit a class from thier own probably thier own class spawned on thier creation so they can identify themselves if they'd like but that would allow them to do evil things (Like include themselves endlessly but then again, who'd use a malicious module!?). Yea I'll probably do a little more thinking but for now I think I'll leave it this way.

I'm going to start working on some basic modules to show off the functionality of the core and get around to seeing if theres any optimizations I can make before releasing a stable "beta1"

If they'd like to?  You're making it sound like they have minds of their own!  Scary.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 08, 2005, 05:51:30 pm
Haha after rereading it is sorta scary. Anyhow I havn't implemented anything new yet but I was testing my modules and wrote a simple news one, here it is:

Code: [Select]
<?php
global 
$Disp;
global $DB;

$Display = new dtDisplay("news.tpl");

$action $_GET['action'];

switch ($action)
{
case "":
$query $DB->PerformQuery("SELECT * FROM site_news LIMIT 1");

if ($DB->GetRowCount($query) == 0)
{
$Disp->assign("News_Count"0);
} else {
$news_array = array();
$i 0;

while ($result $DB->FetchArray($query))
{
$news_array[$i]['Subject'] = $result['Subject'];
$news_array[$i]['Author'] = $result['Author'];
$news_array[$i]['Message'] = nl2br($result['Message']);
$i++;
}

$Display->assign("News_Count"$i);
$Display->assign("News_Item"$news_array);

}

$Disp->assign("Content"$Display->fetch("news.tpl"));
break;
}
?>

Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 08, 2005, 06:37:54 pm
That is nice and clean. :)

Are you sure you don't want to have the modules outside of classes, though?  I'd probably recommend against that, but its your CMS, not mine. :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 12:08:54 am
They arn't really in classes. They just have access to essential classes if they want (I think the only "required" but not really required one is the Display class (to of course, display text in the content area).

Example: The module could just do some sort of internal action instead of displaying anything thus not using any classes. As I write more classes I can expose more. I was actually surprised $smarty->fetch() worked so well.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 12:14:26 am
Actually I realize I may have misled you so, the core creates a class for the module (which creates the entry in the mySQL if it doesn't exist then actually includes the module) but the module itself isn't a class.

Actually here's what it does (yes this needs a bit of work)

Code: [Select]
<?php
/* LiquidDev
Professional Scripting
   
   @author: Nelson Carrillo
 */

class dtModules
{

function SetModule($mod)
{

if (!$this->Exists($mod))
$this->Create($mod);

$this->Perform($mod);
}


function Exists($mod)
{
$settings GetSettings();
$DB = new dtDatabase($settings['dbtype']);

$query "SELECT * FROM site_mods WHERE ModName='" $mod "'";

if ($DB->GetRowCount($DB->PerformQuery($query)) == 0)
return false;
else
return true;
}

function Create($mod)
{
$settings GetSettings();
$DB = new dtDatabase($settings['dbtype']);

$query $DB->PerformQuery("INSERT INTO site_mods SET ModName='" $mod "'");

// TODO: Check the query.

return;
}

function Perform($mod)
{
include_once("modules/" $mod "/index.php"); // TODO: Check to make sure this file exists!
}
}

?>

Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 09, 2005, 01:08:46 am
No, I mean that you're not wrapping the module itself in a class of its own?  Something like:

Code: [Select]
<?php

class module extends dtModules {
  function 
do_this()
    ...
}

?>

Maybe I'm missing something?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 01:25:56 am
No I'm not doing something like that. I did something like that before and didn't like it. It created a problem with instancing classes and whatever. I may try it in the future but for now, no.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 09, 2005, 01:33:44 am
No I'm not doing something like that. I did something like that before and didn't like it. It created a problem with instancing classes and whatever. I may try it in the future but for now, no.

Just do something like this:

Code: [Select]

class core {

 ...

 function load_module($mod) {
   include_once('modoules/'. $mod .'/index.php');

   $mod->load();
 }

}

// $mod/index.php:

class module extends core {

  function load() {
    ...
  }

}

$mod = new module();

Maybe that'll help?  Of course your way works nicely already, so changing it isn't necessarily a good idea. :)

}
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 01:39:54 am
I believe I had something like (I think I've shared it here before)

Code: [Select]
class MyModuleName extends MyCoreName
{
     function MyModuleName()
     {
           $settings['Author'] = "Nelson";
           $settings['Description'] = "This is a description";
           //...etc
          $this->RegisterModule($settings);

          return;
     }

// ...
}
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 09, 2005, 02:03:34 am
I believe I had something like (I think I've shared it here before)

Code: [Select]
class MyModuleName extends MyCoreName
{
     function MyModuleName()
     {
           $settings['Author'] = "Nelson";
           $settings['Description'] = "This is a description";
           //...etc
          $this->RegisterModule($settings);

          return;
     }

// ...
}

This is the important part:

Code: [Select]
// $mod/index.php:

class module extends core {

  function load() {
    ...
  }

}

[b]$mod = new module();[/b]

That should eliminate your class instancing.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 02:15:45 am
I might try it again later and see if I get any problems, it certainly is cleaner.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 09, 2005, 03:05:09 am
I might try it again later and see if I get any problems, it certainly is cleaner.

Alright, let me know.  :)

I'm planning on starting on something like this soon, so your experience will be useful! :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 05:59:43 am
Small updates:
        Fixed a goof in the news module (Why the hell did I put LIMIT 1 !?)
        Added the ability for templates to know if you are logged in or not ({if $User_Login == true}... {/if})
        Fixed a small error in the Authentication class which wouldn't save cookies right
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: rabbit on December 09, 2005, 09:23:24 am
Is there a beta yet?  I feel like trying some things...
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 02:16:43 pm
No not yet, I just coded all this. Unless you'd like to write a few modules and test it for bugs but I'm still in the "Developing" stage as opposed to the "Bug Fixing" stage.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Furious on December 09, 2005, 04:09:15 pm
When you get a beta version completed, PM me and I will give it a try :P
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 04:58:11 pm
Okay man. I've been taking a look @ some Admin features and how I will implement them. There is also the question of which I should integrate user permissions into the core or make that a module but that would also raise the issue of having module dependant on other modules. Maybe have a global system define each time a module is loaded that way you can do

define("MYMODULE", "");
Then in each module do an ifdef or something and if it's defined use the functions that the module provides, dunno need more thinking time.

I just implemented placeholders for news administration and ported the login HTML to smarty which reduced it by about 20 lines.

I am cleaning up index.php (Where most of the core is) and considering making it more OO with an entire class dedicated to stuff inside the core. I don't know I'll read some articles on good OO design and then make this decision.

I have decided the core will have built in Page and Module administration (Starting, Stopping, Deleting, Creating, etc)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 08:31:37 pm
I have open sourced it (Not licensed yet)
http://www.advancedcontent.net/demo/src/
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on December 09, 2005, 08:59:00 pm
Do you really have to define $Auth and $Disp as globals?  My intuitive guess would be no.

Anyway, very nice on making it clean.  Looks good. :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: zorm on December 09, 2005, 10:07:02 pm
See http://www.advancedcontent.net/demo/ for rather clear flaw in the way your code works.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 10:08:51 pm
Yea I know, I need to add checking to that. I think I said that before but yea I'll do that now.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 10:12:32 pm
Ok patched.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: zorm on December 09, 2005, 10:18:43 pm
Also unless im missing something it looks like just about all of your SQL queries are open to injection?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 10:42:09 pm
Yea they are, trying to code it first, bugfixing and security are later. No sense in securing something that doesn't work.

btw Sidoh I implemented modules with classes just now. Working perfectly, reuploading sources. I need to update some of the modules but yea they work great :)
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 10:46:47 pm
Okay reuploaded sources and ported the remaining modules over.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 09, 2005, 11:21:46 pm
New Module!
Module Listing
- Lists all modules and information about them.
http://www.advancedcontent.net/demo/index.php?mod=list_mod
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: zorm on December 10, 2005, 01:30:40 am
Security should be done at the time of initial coding and not something added later. You'll likely have enough problems with obscure bugs that will just be added too if you forget to add security to something.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 10, 2005, 02:25:57 am
Geh I'll add it in tomorrow then.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 10, 2005, 06:27:21 pm
I think I patched all the mySQL injection holes. If there isn't anything else I'm going to move on to more complicated modules to give my CMS a run for it's money.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: rabbit on December 10, 2005, 07:10:12 pm
Fatal error: Class login: Cannot inherit from undefined class modulecore in /home/warrior/public_html/demo/src/modules/login/index.php on line 3

http://www.advancedcontent.net/demo/src/modules/login/
Error, yes?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 10, 2005, 07:27:38 pm
No, I just forgot to make it a .phps file I'll do it when I don't feel lazy.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 15, 2005, 04:35:46 pm
Removed uploaded source for now since it was getting annoying to keep updating it.

Module updates:
 Updated all the modules to use the new module core (version 0.0.1b)
 Updated all the modules to use the new "Admin panel" option
 Added news module administration (preview: here (http://www.advancedcontent.net/demo/screenshots/DTNewsAdmin.PNG))
 
Core updates:
 Updated the core to fix a few authentication bugs
 Fixed a bug in the auth class (Found by me and noticed by Quik :p)
 Updated the module core to version 0.0.1b (Mostly checks to make sure modules dont go haywire)

Todo list:
 Update core to allow modules to switch off "Administration" so that they dont display the link
 Make templates into thier respective dirs (Yea 5 minutes of coding just havn't gotten around to it ..:))
 Create a "page management" module
 Create a "user management" module
 Do some thinking (That's always good)

Anyway that's all for that.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: rabbit on December 15, 2005, 05:17:16 pm
Pack the source or something?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 15, 2005, 06:19:19 pm
I will next release. or I'll write a tool to list all the sources from the current files.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 29, 2005, 05:13:38 am
http://www.advancedcontent.net/demo/index.php?page=TODO%20List

That's my todo list.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: rabbit on December 29, 2005, 06:44:20 pm
Who the hell is 'Glenn Lovell'?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on December 29, 2005, 08:11:10 pm
Uh *shrug* Anyway yea that code has a bunch of bugs which I fixed but I'm still working out a few :/
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 01, 2006, 03:06:39 am
Performing a major rewrite of some things including some of the module core. Once this is done it will fit snugly with the new Navigation core. I think after this big update I may be able to draft an in depth documentation and release a beta1
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Quik on January 01, 2006, 03:35:41 am
Who the hell is 'Glenn Lovell'?

Testing skinning abilities for a personal project of mine.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 01, 2006, 04:06:48 am
Okay well I just added some changes in the way modules will be handled and heres the info:

Before modules used to create (and recreate) thier tables EACH time they were called. Which was fine for my server but on slow servers it could begin to eat bandwith and speed.

So I made it so the core has a built in module handler with a Loader, Installer, Starter, and Stopper. It is about 70% implemented right now but I'm  tired so eh.

Cleaned up the MPI (Module Programming Interface) and made some changes and exposed an entire new 'Security' layer to it accessible via $this->MPI_SecurityBlahBlah();

I fixed a bug me and quik discovered (no longer will happen thanks to the new module handling code)
The template code for smarty was tuned up a bit to get some additional speed increases out of it.

Thats all for tonight tomorrow I'll possibly finish the new module stuff and work on the rest of the core.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 05, 2006, 06:54:02 am
Okay I had a new idea:

Global modules. Example you have a module which lists which users are online only you want that module to appear for EVERY page..
How do you do that?

My only thoughts were to assign smarty the content (most likely the already parsed template maybe add a method to the modules to supply this) but really I don't know.

Any thoughts on how to acomplish this from the more experienced (Still less than me) web people?

Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: rabbit on January 05, 2006, 10:44:43 pm
Use a field like "{%global_mods%}" in the template, and then add a "position" and "global" properties to the module class.  If global=>position, else position=null, or whatever.  List the global modules in position,alphabetical into the template as blocks.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on January 06, 2006, 01:47:27 am
Okay I had a new idea:

Global modules. Example you have a module which lists which users are online only you want that module to appear for EVERY page..
How do you do that?

My only thoughts were to assign smarty the content (most likely the already parsed template maybe add a method to the modules to supply this) but really I don't know.

Any thoughts on how to acomplish this from the more experienced (Still less than me) web people?

You fucking loser.  I totally own you.  I challenge you to a rap duel.  I demand satisfaction.

Use Smarty configs.  You can define if the module is supposed to be global or not there.  Then pass each module which "state" it's in (if it is being called to draw or to draw itself if its global).
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 06, 2006, 04:29:48 am
Good idea but how would my module manager interface with that? I don't want the users to edit files when he doesn't have to.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on January 06, 2006, 03:45:58 pm
Good idea but how would my module manager interface with that? I don't want the users to edit files when he doesn't have to.

Give the modules the ability to edit their own configuration files.  Have the core pass things to modules that cause them to change their settings (if they're global or not, etc).

You should do something like this:

1 -- Page requested

2 -- Core loaded, modules loaded

3 -- GET/POST variables parsed to identify the location of the user

4 -- Core passes these values to each of the modules; if the modules find that they're global, they draw their stuff no matter what.  If not, they don't unless it's the correct page.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 06, 2006, 03:55:25 pm
Okay I decided on a rather simplistic solution (Doesn't need any major changes)

Each module has an option to be global/nonglobal

Now when loading the page it checks which are global and assigns them a variable, say {$GlobalNews} which fetches the content using a method inside the core  (and in term uses Smarty->Fetch) and returns it.

Now, this WILL put some stress on the modules, however I think if you WANT a module to be global it should be specially designed for it, let me elaborate:

When doing the main feed for the modules to the site canvas, they should check if the request was from the core to RETURN data or if it was nothing at all in which case they should just render whatever they have.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Sidoh on January 06, 2006, 05:49:33 pm
I'm not quite sure I understand.  Are you doing

Core -> Module -> Core -> Canvas?

I'm recommending you do:

Core -> Module -> Canvas

Though there are obviously some potential flaws in that system, I think it would work better.  Dunno.
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 07, 2006, 12:22:29 am
The core exposes it's canvas to the modules. So what global modules would do is:

Either draw to the core when they are called or return whatever they  were supposed to draw if the core requests it (Which will only be done if they are global)

The core has it's own canvas but each module can have a bunch of canvases to seperate the drawing stage, eg:

Code: [Select]
<?php

function ModuleInit()
{
global $SiteCanvas;
$Canvas1 = new DisplaySystem;

// Now for the SiteCanvas you MUST assign {PageContent} with something to draw to it so we do this

$Canvas1->assign("MyVar""MyVal");
$Canvas1->assign("MyVar2""MyVal2");
$SiteCanvas->assign("PageContent"$Canvas1->Fetch("whatever.tpl");

return;
}

?>

[/php]
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: rabbit on January 07, 2006, 12:15:56 pm
Not really about globals, but, can one module directly communicate with another, or communicate at all?
Title: Re: Digital Text CMS (Continued from AC discussion)
Post by: Warrior on January 07, 2006, 12:43:07 pm
They will be able to, I am rewriting it. It will feature a message passing system (more like Signals that the module needs to be programmed to recognize)
Title: Re: Digital Text CMS
Post by: Warrior on January 10, 2006, 07:00:19 am
Looking for module makers for my CMS:

My CMS has evolved into something which is VERY powerful as of late and I just finished putting the finishing touches on my Navigation core. My current todo list is:

   - Implement an Error subsystem (As discussed with Sidoh)
   - "Global" Modules
   - Implement an Administration system
   - Forward errors from output to a logging function
        - Implement a generic Flag/Rank system as opposed to Admin/Member, more flexible.

Those (minus Global Modules) are pretty easy things which I can implement over a few days.
After that I am in need of people to make initial modules.

Needed modules:

A forum module (I may take this up)
A member list module
Site Settings module (Manages settings such as current theme, admin email, maintenence mode, etc..)
Member Management Module (Manages member ranks, settings, ipbans, etc...)

Module makers would be taught the workings of MPI (Module Programming Interface) and the overall module structure by me.

Also other availible positions:
Template designers/implementers
Core programmer

The core programmer would work along side me in designing future versions of my CMS. I know a few of you are pretty talented in PHP and you would be a nice addition. As of now I dont have any plans for a "beta2" release

Template implementation is VERY easy and I could brief you in how to use Smarty and how the core feeds output to be custom fitted to each template.

I also am in need of someone to design the default look+feel which would stay the same for the Install and the Administration section.

Note: this project is and will remain open source, I am just trying to get a developer community started for when I launch the official website.

Title: Re: Digital Text CMS
Post by: rabbit on January 10, 2006, 09:39:48 am
I'll do core!  I spose I'll do other things as a get around to them/feel like it.  I can probably have members list and a forum core done by the end of next week.
Title: Re: Digital Text CMS
Post by: Warrior on January 10, 2006, 10:10:35 am
Okay well I wrote the example module I showed you (www.advancedcontent.net/demo/src) and I just wrote a module lister which shows the use of it a little better.

When I write other modules the uses of other fields will become more appearant. I'm at school but I'll IM you when I get home to update the MPI and give you whatever info you need.

As for the core programming, there isn't much left unless something arises.
Title: Re: Digital Text CMS
Post by: Warrior on January 11, 2006, 05:44:36 am
I've come across a pitfall Sidoh mentioned earlier in this topic. Would the user have to rewrite the module template for each new skin?

My solution is be as generic as possible when writing module .tpl files else just state they need to port them. Unless there is a better solution that's what it will be like.
Title: Re: Digital Text CMS
Post by: Sidoh on January 11, 2006, 03:48:50 pm
I've come across a pitfall Sidoh mentioned earlier in this topic. Would the user have to rewrite the module template for each new skin?

My solution is be as generic as possible when writing module .tpl files else just state they need to port them. Unless there is a better solution that's what it will be like.

Anything with modules needs to have a higher level template engine (like you're describing).  You might not even want to suggest that modules use Smarty; instead, you should use a system that allows them to open tables, close them, etc.  In something like this, they might have access to the alignment, size and "style" of table, but nothing beyond that.  It might make creating very customizable modules difficult, but you could also allow them access to smarty.

It would also help if you provided guidelines for creating templates, such that using Smarty with more complex modules would be a less grueling task.
Title: Re: Digital Text CMS
Post by: Warrior on January 11, 2006, 04:55:41 pm
That seems like a mess and I'm trying to keep it as simple as possible, I don't see a problem with making complex modules with smarty but I do see the problem of coding all the skins over.

You need to remember, this is a CMS which aims at flexibility, so I'll assume the user wants to do a little site tweaking to make it his.
Title: Re: Digital Text CMS
Post by: rabbit 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.
Title: Re: Digital Text CMS
Post by: igimo1 on January 12, 2006, 12:23:45 am
WARRIOR SUCKS
Title: Re: Digital Text CMS
Post by: Warrior 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;
}

}

?>

Title: Re: Digital Text CMS
Post by: rabbit on January 14, 2006, 01:26:16 pm
The source browser is up, you can use it here: http://www.advancedcontent.net/demo/sourcemonkey.php

[update]
Warrior's crappy derivations:
http://www.advancedcontent.net/demo/SourceMonkeyv2.php
http://www.advancedcontent.net/demo/ViewSource.php
Title: Re: Digital Text CMS
Post by: Sidoh 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.
Title: Re: Digital Text CMS
Post by: rabbit 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.
Title: Re: Digital Text CMS
Post by: Sidoh 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.
Title: Re: Digital Text CMS
Post by: rabbit 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.
Title: Re: Digital Text CMS
Post by: Warrior 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!
Title: Re: Digital Text CMS
Post by: Sidoh 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.
Title: Re: Digital Text CMS
Post by: Quik 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?
Title: Re: Digital Text CMS
Post by: Warrior 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
Title: Re: Digital Text CMS
Post by: Quik on January 14, 2006, 06:07:27 pm
I wonder where I heard that name before. (http://www.x86labs.org:81/forum/index.php?action=profile;u=159)
Title: Re: Digital Text CMS
Post by: Warrior on January 14, 2006, 07:52:05 pm
Because we'd REALLY copy of off venox right?
Title: Re: Digital Text CMS
Post by: rabbit 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.
Title: Re: Digital Text CMS
Post by: Quik on January 14, 2006, 08:03:28 pm
Because we'd REALLY copy of off venox right?

Just telling you where I've heard the name before :p

Although I have a feeling that this type of project, or at least this functionality, has been done already, I still like the idea and generally how it's handled. Very cool.
Title: Re: Digital Text CMS
Post by: Warrior on January 27, 2006, 09:13:22 am
Okay a bunch of updates. MPI has been updated to v0.0.2 and all modules have been updated accordingly (all modules created by me, "SFS" by Spencer still needs the info on how to update from me)

The module manager has had it's "Create Module" function created which has a bunch of security checks and the Display Core has been updated accordingly to allow System paths ("/templates/sys")

Navigation subsystem was revamped to it's last state making it version v0.0.4 . This version is IMHO the most flexible version ever.

Usage:
The navigation takes ANY HTML and modules can create entries when they are called with install parameters.

MPI functions have been implemented to allow modules to do this:

Code: [Select]
function MPI_AddNavigationEnt($text, $link)
function MPI_AddNavigationEntEx($html)

MPI_AddNavigationEnt preappends the link with "index.php?type=module&name="
and the second parameter provides the module name.The $text parameter is just what the link says.

Example usage:
Code: [Select]
$this->MPI_AddNavigationEnt("Test Module", "test");

Additional Notes: The second parameter MUST be the System name. Use MPI_GetSysName() if you are unsure what it is.

MPI_AddNavigationEntEx adds raw HTML to the navigation core.

Example usage:
Code: [Select]
$this->MPI_AddNavigationEntEx("<strong>I am raw HTML</strong><br />");

Additional Notes: Be careful when using this as it can be dangerous is all I have to say.

--------------------------------------------

A beta release is expected VERY soon. The core has matured quite nicely and with these updates and bug fixes yesterday I think I am almost ready. All I really lack now is modules to help users and some tidying up and optimizing.
Title: Re: Digital Text CMS
Post by: rabbit on January 27, 2006, 11:08:55 pm
SFS has been updated to work with the new MPI changes.

Further work will be done this weekend to allow posting.
Title: Re: Digital Text CMS
Post by: rabbit on January 29, 2006, 07:20:33 pm
SFS and Login have been updated for the new MPI updates.

SFS is fully functional.  Talk to me or Nelson for an account on the site, as a registration module has not yet been made.
Title: Re: Digital Text CMS
Post by: zorm on January 30, 2006, 10:23:13 pm
Soo wheres the source code for the sourcemonkey?!
Title: Re: Digital Text CMS
Post by: rabbit on January 30, 2006, 10:58:56 pm
http://www.advancedcontent.net/demo/sourcemonkey.phps
Title: Re: Digital Text CMS
Post by: zorm on January 31, 2006, 01:06:10 am
Alright, now I can show off my craptastic code!
http://www.advancedcontent.net/zorm/sourcemonkey.php
Title: Re: Digital Text CMS
Post by: rabbit on January 31, 2006, 01:38:07 pm
You forgot the images.
Title: Re: Digital Text CMS
Post by: zorm on January 31, 2006, 02:55:40 pm
Actually yours is missing the folder and file images too.
Title: Re: Digital Text CMS
Post by: rabbit on January 31, 2006, 04:50:55 pm
Shh.
http://www.advancedcontent.net/demo/folder.png
http://www.advancedcontent.net/demo/blank.png
http://www.advancedcontent.net/demo/monkey.png
Title: Re: Digital Text CMS
Post by: zorm on January 31, 2006, 06:21:16 pm
Shh.
http://www.advancedcontent.net/demo/folder.png
http://www.advancedcontent.net/demo/blank.png
http://www.advancedcontent.net/demo/monkey.png

Well those are 404 because you suck at life but I figured it out. I've got images now.
Title: Re: Digital Text CMS
Post by: rabbit on January 31, 2006, 08:50:04 pm
Pshh..close enough.
Title: Re: Digital Text CMS
Post by: Warrior on March 16, 2006, 11:45:10 pm
It's been a long while since the last update but today I cracked open the source.

I removed half written code which was totally wrong (what was I thinking) and MPI_UpdateEntry(Ex) have been removed due to a lack of thinking on my part when writing them. Maybe a redesign of some things is in order to get it right.

The Module Manager system has been cleaned up slightly and I started working a little more on the permission class.
The administration panel recieved a little implementation mostly taking and stripping down module manager panel and starting to mold out this new thing.

The news recieved a slight visual improvement and I'll implement a commenting system and reimplement pagination when I'm not so tied up.
Title: Re: Digital Text CMS
Post by: Warrior on June 04, 2006, 03:12:00 pm
I've stopped all major work on this CMS. It's a side project for now. Perhaps in the future I'll bring it back but it fell victim to some bad design (Despite how much I planned :() and lack of motivation.
I know Rabbit still uses it so if there are any groundbreaking bugs I can get around to fixing them
Title: Re: Digital Text CMS
Post by: rabbit on June 04, 2006, 05:50:14 pm
Right...I don't really use it.  I did base a bit of my module loader system off of your class, though.
Title: Re: Digital Text CMS
Post by: Warrior on June 04, 2006, 07:46:22 pm
k
Title: Re: Digital Text CMS
Post by: Quik 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.
Title: Re: Digital Text CMS
Post by: Warrior 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.
Title: Re: Digital Text CMS
Post by: Quik 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.
Title: Re: Digital Text CMS
Post by: Warrior 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.
Title: Re: Digital Text CMS
Post by: rabbit 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.
Title: Re: Digital Text CMS
Post by: Warrior 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.

Title: Re: Digital Text CMS
Post by: zorm on July 10, 2006, 06:30:53 pm
Interesting stuff but I still really don't get the point of the database calls...?
Title: Re: Digital Text CMS
Post by: Warrior 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.