Author Topic: Digital Text CMS  (Read 49909 times)

0 Members and 5 Guests 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 (Continued from AC discussion)
« Reply #75 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.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Digital Text CMS (Continued from AC discussion)
« Reply #76 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).

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 (Continued from AC discussion)
« Reply #77 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.
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 (Continued from AC discussion)
« Reply #78 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.

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 (Continued from AC discussion)
« Reply #79 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.
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 (Continued from AC discussion)
« Reply #80 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.

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 (Continued from AC discussion)
« Reply #81 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]
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 (Continued from AC discussion)
« Reply #82 on: January 07, 2006, 12:15:56 pm »
Not really about globals, but, can one module directly communicate with another, or communicate at all?

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 (Continued from AC discussion)
« Reply #83 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)
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 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 #84 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.

« Last Edit: January 10, 2006, 07:05:20 am by Warrior[x86] »
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 #85 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.

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 #86 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.
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 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 #87 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.
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 #88 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.

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 #89 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.
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