PostNuke

Flexible Content Management System

News

Permission Administration - A discussion

A lot of PNs are hardly taking advantage of the permission system because it is very hard to administer even for pros sometimes. Recently on a seminar I saw the permission-system of a CMS (100 000$+ per License) and I want to share some of the solutions they had. Since I am not a programmer, the only thing I can contribute to PN is Ideas...

The CMS was using a Role-Model system. So there were differnet Roles (Access-Rights) that were assigned to groups or users. For PN there would be the following RM:
- Reader: Can read and post comments

- Editor: Can Post items
- Publisher: Can Post items and publish them or publish items posted by other, but e.g. not delete items once published
- Administrator: Godlike

This would reduce the amount of Roles to four. If someone wanted different models, it can be done in the Database itself (for someone that can deal with own permissions can shurely handle phpmyadmin...).

The function of users and groups was similar. You have users, you have groups, that´s about it. This could be done a little more comfortable in PN, but works fine right now.

Next step was, that every object was defined the permissions (objects = Modules?). So we had a setting like:

Object - Group/User - Role
News - Reg. users - editor
News - unreg users - reader
News - Marketingteam - Publisher
News - Admins - Administrator
News - User XY - Publisher

This should be set in the News administration and should be handled mostly via dropdown menues. These could also include subobjects like:



Everything not assigned was inherited. Also the position within the setting (above / below) was not relevant. I guess when having conflicting rights, we would use the more restrictive.

This could be a big step forward with PN, what do you think? Is this a lot of work, or could we see it in let´s say 0,73???

To state this clear: PN is absolutely awsome already, so please read this as suggestion, not as complaint.

Thank You

Graffiti
http://www.graffiti-marketing.de

Searchengine-friendly URL's - another solution

Surely, Karateka's approach is the holistic one - he uses the PN core. But for those looking for speed and/or a more subtle way to submit their pages to search engines the above example may help.

With the above example it is possible to let the PN-installation untouched and build bridge-pages for the search engines only (e.g. submitting the sitemap.htm from the above example to the searchengine instead of the index.php). And of course you can build different pages for different search engines :-)


.planzelle.


Report from the Open Source CMS Conference


  • Cofax
  • Midgard
  • bitflux
  • OpenCMS
  • Wyona
  • Zope
  • AxKit
  • Cocoon
  • PostNuke


The two day conference started off with a keynote from
Charles Nesson, director of the Berkman Center for Internet
Society at Harvard Law School. Charles talked about the
importance of open source solutions for the future of
education. It was very encouraging to hear thus from one
of the premier experts on cyberspace law.

The conference proceeded with a quick succession of talks
about the various CMS that were present. Each had something
unique to contribute, and it was very interesting to hear
about other CMS straight from the programmers.

The CMS could be roughly grouped into categories:


  • traditional CMS (database-oriented, JAVA)
    Cofax, OpenCMS
  • XML-based CMS
    Wyona, bitflux, AxKit
  • Frameworks
    Midgard, Zope, Cocoon
  • Community CMS
    PostNuke

Some systems, especially of the XML-based variety, showed
a high level of sophistication. Wyona went as far as to
do everything in XML, even the access control.

Generally most CMS placed a lot of emphasis on publishing
workflows, revision control etc. It became evident very
quickly that there is a lot more to the term CMS than
most news publishing scripts from Hotscripts or Sourceforge
can provide. Also, CMS means different things to different
people.

The presentation that really blew the audience away was no
CMS though, it was a WYSIWYG editor. Yeah right. Another one.
Actually, after having seen the <a target=_top href="http://www.q42.nl/xopus/">demo of that particular
editor, a lot of mind bombs exploded in the audience.
Many could not believe their eyes, and you could witness
their thought processes as they pondered on the impact of this
demo.

The demo, which is for Internet Explorer 5.5 and up only
at the moment (Mozilla version to follow soon) relied on
XSLT, XML Schema and JavaScript. No ActiveX, no Java applets.
It was arguably the first killer app that really showed what
the value of XSLT on the client is. As Lon Boonen, the author,
said: "This is not another templating engine. Its the last one."
Sooner or later all CMS, PostNuke included, will have to
lay out their XML story. PostNuke has a foot in the door with
its XML-RPC system, but a lot of works remains to be done.

Another aspect of the conference was devoted to various frameworks
that allow to create custom CMS. The CMS market is so fragmented
that most sites run custom-built CMS. Some frameworks were very
elegant (Zope and Cocoon), while others focussed more on ease
of use, and leveraging PHP knowledge (Midgard).

PostNuke was the only representative from the Weblog / Community
CMS world. Unlike the more traditional CMS it places the emphasis
more on the community aspects of a site, and allows for easy
integration of functionality that goes beyond content management,
like shopping carts, chat, forums, galleries etc.
The <a target=_top href="http://www.postnuke.com/talks/oss_cms_postnuke.pdf">slides (1450K) from the PostNuke presentation should be available soon.

The best part of the conference were definitely the one on one
discussions with developers from various CMS systems. Over a
couple beers a lot of ideas were exchanged, and optimism about
future areas of collaboration led to the formation of
<a target=_top href="http://www.oscom.org">oscom.org, an organisation devoted to exchange of ideas
between Open Source CMS.

The conference was a success with more than a hundred attendees,
quite a few of them coming from big name CMS vendors. Some
preliminary contacts were established to work on a Java
standard for CMS, called the <a target=_top href="http://www.jcp.org/jsr/detail/170.jsp">Content Repository for Java API
Similar ideas where discussed among a group of Open Source CMS.

A very promising start for what looks to become a regular event.
See you in San Francisco for the next installment.


PostNuke 0.712 released

Changelog for PostNuke 0.712


  • Members list now displays logged-on users in saner fashion
  • Discrepancy between Who's online block and Members List module fixed
  • Posting comments with special characters now works more of the time
  • Web links now show HTML in descriptions
  • Login message now shows correctly on smaller displays
  • Censoring now obeys the censor setting
  • Listing all stories in a topic no longer gives an error
  • Autolinks with '/' in them no longer break autolinking
  • New blocks pay attention to language settings
  • Modules module keeps better track of the versions of modules available to it
  • Modules are now allowed to have more than one active hook
  • Systems that do not supply their server information through HTTP_SERVER_VARS are now catered for correctly
  • Editing of autonews stories now works correctly
  • News stories no longer allow URLs in their title
  • Quotation marks in HTML are no longer corrupted in early versions of PHP
  • Emails with URLs in them now display properly
  • Pager now handles an unset startnum

Search engine friendly URLs revisited.

Why common methods to enable search engine friendly dynamic websites do not apply for PostNuke
Search engine friendly URLs for dynamic websites are always a hot subject.
There are several nice solutions: PHPBuilder dealed with this subject and the force type solution several times [1 2]. However, PostNuke can't benefit from Tim's solution, because all paths in PostNuke are relative. So, if you have an URL such as http://www.postnuke.com/article/1/, postnuke will try to find the topic image in http://www.postnuke.com/article/images/topics/some_fancy_topic.gif, but the picture is located in http://www.postnuke.com/images/topics/some_fancy_topic.gif
So, without a core rewrite that would change all relative to absolute paths, this method does not apply for us.

Prerequisites for my proposed method
E. Soysal has covered this subject twice for Nuke-Sites [1 2].
A lot has changed in PostNuke and the way URLs are being built since then, so it might be a good idea to revisit this subject.
To successfully use this method, you need apache as a webserver and mod_rewrite enabled. Now, if you don't know if you have this on your host, please ask your system administrator. If not, it might be an idea to collect hosts that have mod_rewrite enabled in the comments to this article. Don't forget: you can always ask and talk to your server admins and maybe even convince them. :)

What we want to achieve
Did you ever try to tell your friends about a Web_Links directory on a postnuke site? Chances are high that you gave up on it, because the URL was too long.
Did you look up your site on Google? How much of your site was really indexed by Google? It's very likely that if you are using 0.7+, only the mainpage was indexed by Google.
So, our goal is to make your site more user friendly and search engine friendly at the same time, without touching the PostNuke core or slowing down your system's performance too much.
So, we want to have an URL like http://www.postnuke.com/Web_Links.html rather than http://www.postnuke.com/modules.php?op=modload&name=Web_Links&file=index.

Time to dive into the code
You may wonder how to achieve our goal without touching the core. Well, themes are not considered as core files, so themes/yourtheme/theme.php is our candidate for a hack. :)
There are 4 steps that you need to take:

1) We will first start to buffer your output. We do this by adding the following line in your function themeheader:
ob_start();

2) Now, go to the end of your themefooter function and add those lines:

$contents = ob_get_contents(); // store buffer in $contents
ob_end_clean(); // delete output buffer and stop buffering
echo replace_for_mod_rewrite($contents); //display modified buffer to screen

3) replace_for_mod_rewrite() needs to be explained as well:
Add the following function above your first function in your theme:

function replace_for_mod_rewrite(&$s)
{
$in = array("'(?<!/)modules.php\?op=modload&name=News&file=article&sid=([0-9]*)&mode=([a-zA-Z]*)&order=([0-9]*)&thold=([0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=News&file=index&catid=&topic=([1-9][0-9]*)&allstories=1'",
"'(?<!/)modules.php\?op=modload&name=News&file=index&catid=&topic=([1-9][0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=Sections&file=index&req=listarticles&secid=([1-9][0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=Sections&file=index&req=viewarticle&artid=([1-9][0-9]*)&page=([1-9][0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=Sections&file=index&req=printpage&artid=([1-9][0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=NS-Polls&file=index&req=results&pollID=([0-9]*)&mode=thread&order=0&thold=0'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=index&([a-zA-Z0-9_.;+&]*)=([a-zA-Z0-9_.;+&]*)&([a-zA-Z0-9_.;+&]*)=([a-zA-Z0-9_.;+&]*)&([a-zA-Z0-9_.;+&]*)=([a-zA-Z0-9_.;+&\[\] ]*)&([a-zA-Z0-9_.;+&\[\] ]*)=([a-zA-Z0-9_.;+&\[\] ]*)'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=index&([a-zA-Z0-9_.&]*)=([a-zA-Z0-9_.&]*)&([a-zA-Z0-9_.&]*)=([a-zA-Z0-9_.&]*)&([a-zA-Z0-9_.&]*)=([a-zA-Z0-9_.&\[\] ]*)&([a-zA-Z0-9_.&\[\] ]*)=([a-zA-Z0-9_.&\[\] ]*)'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=index&([a-zA-Z0-9]*)=([a-zA-Z0-9]*)&([a-zA-Z0-9_.;+&]*)=([a-zA-Z0-9_.;+&]*)&([a-zA-Z0-9_.;+&]*)=([a-zA-Z0-9_.;&+]*)'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=index&([a-zA-Z0-9]*)=([a-zA-Z0-9]*)&([a-zA-Z0-9]*)=([a-zA-Z0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=index&([a-zA-Z0-9&]*)=([a-zA-Z0-9&]*)'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=index'",
"'(?<!/)modules.php\?op=modload&name=([^&]*)&file=([a-zA-Z0-9]*)'",
"'(?<!/)print.php\?sid=([0-9]*)'"
);
$out = array("article\\1.html",
"Topic\\1-all.html",
"Topic\\1.html",
"Sections\\1.html",
"Sections-article\\1-page\\2.html",
"Sections-print-article\\1.html",
"NS-Polls-results-\\1.html",
"\\1-\\2-\\3-\\4-\\5-\\6-\\7-\\8-\\9-\10-\11.html",
"\\1-\\2-\\3-\\4-\\5-\\6-\\7-\\8-\\9.html",
"\\1-\\2-\\3-\\4-\\5-\\6-\\7.html",
"\\1-\\2-\\3-\\4-\\5.html",
"\\1-\\2-\\3.html",
"\\1.html",
"\\1-\\2.html",
"print\\1.html"
);
$s = preg_replace($in, $out, $s);
return $s;
}

That's a lot of code, but it covers almost all typical PostNuke links and it modifies the important article and Section links.
In $in, we have an array of patterns that we want to replace. In $out, we have the array of new patterns.

So, I'll try to explain what some of these patterns do, so that you can start from there to do your own changes or extensions to this.

"'(?<!/)modules.php\?op=modload&name=News&file=article&sid=([0-9]*)&mode=([a-zA-Z]*)&order=([0-9]*)&thold=([0-9]*)'"

- (?<!/) is an assertion that I happily give Jim McDonald credit for. It means that this pattern will only be valid, if it does not start with a preceding slash and helps us to convert only links inside your PostNuke site (so links to external sites will not be converted).
- Notice that the question mark needs to be escaped so that it looks like this: modules.php\?op
- Another important thing to remember is that ampersands in links have to be
&
(and not just &). The new API strictly follows and supports this already, but if you still find links in your site that aren't converted properly, it is most likely because old modules have used just &.
- sid=([0-9]*) indicates that you may have any digit from 0 to 9 after sid=, the occurrence may be 0 to unlimited times.
- mode=([a-zA-Z]*) indicates that you may have any alphabetical character after mode=, from 0 to unlimited times.

So, we have managed to convert the links on the fly, what is missing now is the appropriate apache directives.

4) Basically all converted URL-calls need to be reverted by apache with mod_rewrite. You will only need a .htaccess file for this. For your convenience, just copy and paste the code below into a .htaccess and upload it to the webroot of your PostNuke installation.



RewriteEngine On

#Articles
RewriteRule ^article([1-9][0-9]*).* modules.php?op=modload&name=News&file=article&sid=$1

#Topics
RewriteRule ^Topic([1-9][0-9]*)-all.* modules.php?op=modload&name=News&file=index&catid=&topic=$1&allstories=1
RewriteRule ^Topic([1-9][0-9]*).* modules.php?op=modload&name=News&file=index&catid=&topic=$1

#FAQ
RewriteRule ^FAQ([1-9][0-9]*)-([0-9]*).* modules.php?op=modload&name=FAQ&file=index&myfaq=yes&id_cat=$1

#Sections
RewriteRule ^Sections([1-9][0-9]*).* modules.php?op=modload&name=Sections&file=index&req=listarticles&secid=$1
RewriteRule ^Sections-article([1-9][0-9]*)-page([1-9][0-9]*).* modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=$1&page=$2
RewriteRule ^Sections-print-article([1-9][0-9]*).* modules.php?op=modload&name=Sections&file=index&req=printpage&artid=$1

#NS-type modules
RewriteRule ^NS-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).* modules.php?op=modload&name=NS-$1&file=index&$2=$3&$4=$5
RewriteRule ^NS-Polls-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html modules.php?op=modload&name=NS-Polls&file=index&req=$1&pollID=$2
RewriteRule ^NS-Polls-([a-zA-Z0-9_]*).html modules.php?op=modload&name=NS-Polls&file=index&pollID=$1
RewriteRule ^NS-([a-zA-Z0-9_]*).html modules.php?op=modload&name=NS-$1&file=index

#General Stuff
RewriteRule ^([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).* modules.php?op=modload&name=$1&file=index&$2=$3&$4=$5&$6=$7&$8=$9
RewriteRule ^([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).* modules.php?op=modload&name=$1&file=index&$2=$3&$4=$5&$6=$7
RewriteRule ^([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).* modules.php?op=modload&name=$1&file=index&$2=$3&$4=$5
RewriteRule ^([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).* modules.php?op=modload&name=$1&file=index&$2=$3
RewriteRule ^([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html modules.php?op=modload&name=$1&file=$2
RewriteRule ^([a-zA-Z0-9_]*).html modules.php?op=modload&name=$1&file=index


Finally, you can see my proposed solution in action on the following (test) sites so far:
http://www.mountainwatersspa.com/
http://www.lobosoft.com/

I'm not claiming that my code is the best solution, maybe even not for this method, but it works.
So, there you have an example and some basic instructions, now go and conquer Google et al and don't forget to mention other hosting companies that support mod_rewrite or make suggestions on how to make this better. :)

Spanish translation for Rogue .711

Ya está disponible en postnuke-espanol.org la versión de los ficheros en español para Postnuke Rogue .711.

Como siempre, hemos intentado crear una versión lo más neutra posible, de forma que pueda servir para todos los usuarios de España y LatinoAmérica, evitando todo tipo de localismos .

Esta versión es en español informal (de "tu")

Próximamente tendremos la versión formal (de "Usted")

Cleaned-up Stats (English) language file

Here is the output of the Stats module on my site before my changes:

We've received 13085 pages views since June 2001, 40 today, and 28 yesterday.

The best day at all was Sunday, November 04, 2001 (872 pageviews), while Sunday, December 16, 2001 (1 pageviews) was a realy poor day.

Most people visit us on Sunday with a total of 2342 pageviews, while Thursday is not really our best day with a total of 1351 pageviews. In average, our best hour (with) 1224 pageviews ) is at 17 o'clock , while only our hardcore-fans seem to show up at 5 o'clock (with only 53 pageviews).

And after my changes:

We have received 13085 pages views since June 2001, 40 today, and 28 yesterday.

Our best day overall was Sunday, November 04, 2001 (872 page views), while Sunday, December 16, 2001 (1 page views) was our worst day.

Most people visit us on Sunday with a total of 2342 page views, while Thursday is not really our best day with a total of 1351 page views. On average, our best hour (with 1224 page views ) is at 17 :00 hours , while only our hardcore fans show up at 5 :00 hours (with only 53 page views).

There were no changes needed to the rest of the page.

You can download it here.

Search Module

Footnote: 1
First Page Previous Page Page 103 / 277 (1021 - 1030 of 2763 Total) Next Page Last Page