PostNuke

Flexible Content Management System

News



Rogue Preview on the Streets

Anyway, enough of the warnings, on with the fun stuff and explaining the changes and giving credit where credit is due. I'll try to briefly touch on the changes in the system, but as always I will manage to forget about 50 changes and 50 people that need to be recognized. My apologies in advance for that.

-- Permission System -- Jim McDonald. The new system gives you unlimited depth to "user groups". Gone are the days from having the separate admin and users system. The new system unifies these and allows you to give or deny special access to any user. You can deny certain areas of your site to an unregistered user, or the entire site altogether. You can also set your groups so that even when a user registers, they have to have their group access upped by a site admin. There are really quite a few possibilities now with the user system, that will only get better by the end of the Rogue Cycle.

Note, most third party plugins will need to be upgraded to the new system, hence the need for the preview. Any third party plugin that uses the admin will definitely need to be upgraded with the new permissions.

-- DB Abstraction -- Ryan and Pablo -- Ryan did the hard part with the original abstraction in PEAR, and then we changed directions and went with ADODB. The abstraction is done in a very professional manner and does not add much weight to the script. As Ryan went through the original time he also cleaned many of the queries that we were using, which has improved performance greatly! Pablo is now the ADODB expert, and has also written a great guideline for developing with ADODB and is posted in the sections on this site. We are hard at work to make the install file ADODB compliant as well, with Rogue.sql's coming for supported DB's very soon.

-- Multi-Sites -- Sebastien -- The long talked about MultiSites mod is here. What this does is allow you to run a single codebase with several different domains. We run it on this site, and it works quite well! All of the support sites and postnuke.com all run off the same single instance of postnuke codebase. This allows for very quick updates, and global changes through sites. It's also an excellent tool for ISP's or small companies that would like to offer hosting. Read the docs in the multisites module. Great work on this one!

-- Language tool -- Pascal -- For those of you that work hard on the translations for your PostNuke site, there is a new tool for you. The language module goes through and finds the missing defines in your language files and generates a report and a temp directory for you. It's a great tool, and I have just begun to play with it.

-- Wiki and bbcode -- Sebastien -- Still working on this a bit, but you can now use wiki code formatting with your article submissions.

-- Install writes to config.php -- Scott. A long asked for feature. The install file now writes to the config file during installation. This only works for fresh installs currently, but we will get it working for upgrades as well. With the install writing to the config file, we have also encrypted the SQL password and username, to harden security a bit.

-- MD5 Passwords -- Alley -- Now all passwords in the users table are encrypted with MD5. This is a much tighter security for you windows folks out there, and better than the old crypt method as well. Now with the admin table gone, your admin users have their passwords encrypted.

-- index.php redirection -- Tim (I hope I didn't forget who did this!) -- As you notice, the index page now doesn't redirect to the modules start page, it simply loads it. You still have the option of selecting your start page.

-- New admin schema -- Pascal -- Still a work in progress, but we are moving away from the multiple links / case / module files for admin modules. An example can be found in the language module.

-- Better theme arrays -- Jim -- I posted the doc on this yesterday, but take a look at the PostNuke theme for them in action. Very elegant code!

-- user.php modularized -- David. The new system is very much like the current admin system. David did a great job in modularizing the user.php file so now you can have custom user modules.

-- MPN Upgrades -- Michael -- Upgrades from MyPHPNuke now available, along with upgrades from PHPNuke 5.2 and 5.3.

Damn, I know that I am forgetting a ton of new features (Probably big ones!) but my fingers are killing me now. Documentation on the permissions can be found in the online help screen in the admin. Be careful setting up your permissions! Documentation for developers for Rogue themes, modules, etc can be found on the sections in this site and Steve has also been adding documentation to the official documentation site. Enjoy the preview!

The ChangeLog can be viewed here

Endorsed software... YAPNS (NOT!)

References:
FoxServ Home - http://foxserv.linuxmax.net/
Mambo @ SF - http://sourceforge.net/projects/mambo/
Miro in OZ - http://www.miro.com.au/

=-Rogue-= Theme Function

Obtaining Article Information, Links, and HTML Fragments

1. Getting raw article information

$results = getArticles(where, order, limit)

This function takes three parameters, and returns an array of arrays, each holding information on a particular article. The where, order, and limit variables do not need to specify their initial keywords.

Example:

$results = getArticles("topic=4", "counter DESC", "5");

this will get the five most-read articles in topic 4

Note that the information passed back is pretty much directly from the database. The only real exception to this is that some values are duplicated for backwards-compatibility. These are:

topicid = tid
topic = tid
catid = cid

2. Getting processed article information

$info = genArticleInfo($row)

This function takes a row as returned from getArticles() and does some simple parsing of it to make it more acceptable to PostNuke. The specific textfields created are listed in the user documentation for genArticleInfo(). The operations carried out on the array are as follows:

. add a number of date/time strings
. validate the informant string
. provide a 'Category: title' type article header
. sanitize (and transform) the article title and bodies

3. Getting article links

$links = genArticleLinks($info)

This function takes information as returned from genArticleInfo() and creates a number of links from it suitable both for themes and internal use. The specific links created are listed in the user documentation for genArticleLinks(). The links are 'pure', in that they are straight URLs and have no HTML tags around them.

4. Getting preformatted HTML

$preformat = genArticlePreformat($info, $links)

This function takes information as returned from genArticleInfo() and links as returned from genArticleLinks() and creates a number of preformatted HTML fragments suitable both for themes and internal use. The specific fragments created are listed int he user documentation for genArticlePreformat(). The fragments normally include formatting information and are complete and self-sufficient HTML.


5. Putting it all together

Here is a really simple example that gets a bunch of articles, generates, the relevant information, and uses it to print out a list of headlines.

// Get the latest 10 articles by author ID 5 in descending time order $articles = getArticles("aid=5", "time DESC", 10); foreach ($articles as $row) {

// Generate information for row
$info = genArticleInfo($row);
$links = genArticleLinks($info);
$preformat = genArticlePreformat($info, $links);

// Print a clickable title (with category, if any) and date of the
// story
echo "$preformat[catandtitle] ($info[briefdate])";
}




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

PostNuke Theme Information

themeindex() and themearticle()

themeindex() and themearticle() take a number of legacy parameters, but also three arrays which hold pretty much all of the information that a user should need to create full-featured themes, and supercede the old parameters. The three separate arrays, and their current contents, are outlined below.

info

info holds raw information. Most of this comes direct from the database query on a story, however some extras are also added. info is guaranteed to have at least the following items:

. bodytext - the main text of the story
. briefdatetime - short version of the date and time the story was published
. briefdate - short version of the date the story was published
. catandtitle - the category and title of the story, in the format
'Category: Title', if the story is in a particular category
. cid - the ID of the category the story is in
. catid - the ID of the category the story is in (deprecated)
. cattitle - the name of the category the story is in
. comments - the number of comments the story has
. fulltext - home text, then body text, then notes
. hometext - the header text of the story
. informant - the person who submitted the story
. longdatetime - long version of the date and time the story was published
. longdate - long version of the date the story was published
. maintext - home text, then body text
. notes - any editorial notes on the story
. sid - the story ID
. tid - the topic ID
. topic - the topic ID (deprecated)
. topicd - the topic ID (deprecated)
. title - the story title
. topicname - the name of the topic
. topicimage - pathname to the topic image
. topictext - description of the topic
. unixtime - the Unix timestamp of the story
. version - the version of the array. This can be used to see if sepcific variabels exist in the array or not.
. withcomm - if the story allows comments to be posted with it

links

links holds a set of 'pure' URLs for a spcific story. These are used to provide ad-hoc links where required by the themer. links is guaranteed to have at least the following items:

. category - list of items in the same category as the story
. comment - comments on the story
. fullarticle - the story itself
. print - print the story
. send - send the story to a friend
. version - the version of the array. This can be used to see if sepcific variabels exist in the array or not.

preformat

preformat holds a set of pre-formatted HTML fragments that fit a standard format. These are generally considered 'intelligent', so for instance a preformat that contains a comments link will contain the correct text relating to how many comments have been previously posted. Pretty much all preformatted text contains URLs. preformat is guaranteed to have at least the following items:

. bodytext - main body of text, including autolinks if any
. bytesmore - 'bytes more' link (for back-compatibility)
. category - list of items in the same category as the story
. cattitle - the title of the story, preceded by it's category (if any)
. comment - info on current number of comments
. fulltext - home text, then body text, then notes
. hometext - initial text, including autolinks if any
. maintext - home text, then body text
. more - single generic status link (for back-compatibility)
. notes - any editorial notes on the story
. print - print the story
. readmore - 'read more' link
. send - send the story to a friend
. title - the title of the story
. version - the version of the array. This can be used to see if
sepcific variabels exist in the array or not.

Example

The PostNuke theme uses these arrays to generate a lot of content, please look at this as an example of how the arrays can be used.





Topics and Sub Topics

In a reverse way can be interesting to assign a logo image to the Main Link topics and to the Main Download topics..

And...
and can be also interesting to go in this way, creating something like an "Arguments" page where to find Topics associated to Links and Downloads... so you can have a Main Topic associated to a Main Link topic and to a Main Download topic and soon, i.e.:

Topic "Argument 1" with his Links "Argument 1", his Downloads "Argument 1", his Forums "Argument 1" and all the other modules if you need (and relative subtopics "Argument 1.1, 1.2, 1.3 and soon)..
First Page Previous Page Page 155 / 277 (1541 - 1550 of 2763 Total) Next Page Last Page