Crise

blog Releasing some auxiliary code and project

4 posts in this topic

While back I went through my "development directory" and found some pieces of work that could potentially be useful for other people, if shared, but were either used only by us internally or just to collect dust.

So I put in some effort and packaged a few different files for public consumption, if you find them useful then great... if not then it is no-ones loss. I would ask you to comment below if you find something interesting in the stuff listed below, but seeing as our previous blogs haven't been big on comments (which is why there haven't been any more), who am I kidding.

Check the full post, after the break for more details.

1. Inno Setup Scripts (partial code dump)

This file contains a collection of auxiliary scripts used by our installer, please see the enclosed readme, and the script files themself, for further details.

2. PHP Utilities (Tiger and TTH hashing, Base32 encoding)

This file contains two simple classes, again the enclosed readme will shed more light on each (also explains why they are even here, since the original unmodified version of most of the code can be found on google).

"This code is namely shared because the current PHP based DC software that make use of the ADC protocol

generally uses hard coded hashes, or off loads the task of hashing to a binary dependency, for login.

While TTH is not used for that task directly the tiger and tigerfix methods, and the documentation

surrounding them, will hopefully be of use to some and lessen the number solutions reliant on static hashes."

3. phpBB based CMS system (aka. SnCMS, as in tin dioxide)

This was originally built for something we were planning for here at ApexDC then it was used for something completely different in the end, and after that it was used on the now late ADCPortal. Older version of this is still kind of in use, internally, but it only exists as a spare (though it has been particularly useful in testing the recent server moves).

I originally made it based on a concept I had long time ago, that I used on an old AirDC++ web site (yes, way back when it was still running phpBB2, I was somewhat involved in the web side of things there), now with phpBB3 as the backend.

I have bundled two styles with it, the original ADCPortal template files and a template'd version of the old layout for the system I made for the old AirDC++ site with some modernizations. I didn't release this before because I couldn't be bothered to create a style that didn't have a branding on it... but seeing as ADCPortal is dead, superseded by www.dcbase.org somewhat, and AirDC++ uses a different style now there is no longer a reason not to release it with the styles unedited.

Notably this project in its entierty is licensed under GNU GPL v2, as any phpBB modification should be (even though it doesn't modify phpBB per se). This old topic is also related (as you can see the plans to release it have existed for a while). No real installation instructions, read the comments in config.php, and figure it out from there (if someone actually seriously wants to use this, reply below and I'll give better instructions).

Downloads

AolemanEl likes this

Share this post


Link to post
Share on other sites

Hi,

Could I have a little more instruction on how to install SnCMS? I've installed it I think but have this on index.php: "SnCMS: Invalid configuration, recheck config.php"

Thank you for any help you may provide. Also, I guess when I have it installed correctly I will know how to configure it?

Peter

Share this post


Link to post
Share on other sites

Hi,

Could I have a little more instruction on how to install SnCMS? I've installed it I think but have this on index.php: "SnCMS: Invalid configuration, recheck config.php"

Thank you for any help you may provide. Also, I guess when I have it installed correctly I will know how to configure it?

Peter

Each forum in a phpBB installation has a numeric unique id, same for topics.

Start by creating f.ex. a "Site Pages" forum and create topics titled simply Menu and Home in it then set the id's of those topics as instructed in config.php, same goes for forums you want the front page news to fetched from if any.

In a deployment environment this forum is naturally only editable by select few, and usually hidden, since every page in it represents one page on the site. Pages would be accessed by either: www.example.com/?id=pagetitle or www.example.com/?id=<topic id> (this is why I prefer to keep topic titles there as one word)

Edit: I may have some better instructions written up somewhere, I'll see if I can find them.

Share this post


Link to post
Share on other sites

Below is some basic usage instructions for the SnCMS, written back in 2007

The basic idea of the system is to make site maintenance a task that does not involve editing of any physical files on server. To put it short you create, update and remove site content by doing the respective actions to topics under the Site Pages forum (from here on, the forum).

Basic rules:

  1. The title of the topic created is not the actual page title (it's used as an identifier)
  2. The title of the topic is to be one word and one word only
  3. You will avoid replying to topics in the forum
  4. Don't use too many code or quote tags in one page
  5. Preview your pages, but also see the final result through main site afterwards

Special Topics

In the forum we have two special or required topics, without these the site will refuse to function entirely and return you with message:

"ClickCMS: Invalid configuration!"

Menu Topic

This one of the required topics is definitely more tricky as it has a specific syntax it must follow, always!

page id, bbcode link
page id, bbcode link
etc.
Note: page id for main site index is always Home "Home" Topic Site index doesn't have an id it could rely on, so in the forum Home is equivalent of site index. Site index also has a static alias assigned to it on the main site which is 'idx' (see below). Accessing Standard Pages For main site we generally have two ways to access pages, and they are the following:
http://www.example.com/?id=1
http://www.example.com/?id=blah
http://www.example.com/?id=idx <- alias for main site index and thus a reserved name, so it can't be used as a page name.

The first access method (where parameter is numeric) is based on topic id. The second access method (where parameter is alphabetic) is based on topic title instead. These are the two link formats that should be used when linking stuff inside the forum.

Hiding Page Temporarily

Simply lock the topic and it's no longer viewable through main site, yet still have it recorded on the forum. (to completely delete page simply delete it)

Share this post


Link to post
Share on other sites