PostNuke

Flexible Content Management System

News


Search Engine friendly URLs with $PATH_INFO and without Apache mod_rewrite

As most of us I run my website at cheap webspace and can not activate the Apache module mod_rewrite, because my provider does not allow so.

I wrote this article to prove, that $path_info can be used to add search engine friendly URLs to PostNuke without the need of advandced Apache modules.

Now the way PostNuke generates its URLs needs to be changed to make it work. I spend some hours on this, but could not manage it to work.
So any help is apperciated. Post your code (or link to your code) as a follow up.

To demonstrate what i mean i made a test link looking like this:
http://www.jan-mantkowski.de/modules.php/op/modload/name/News/file/article/sid/7/mode/thread/order/0/thold/0

Click here to give it a try.

You can also read this article at my website at http://www.jan-mantkowski.de.

This kind of links will be followed by seachengines, and do work within PostNuke environment.
I only did two modifications to modules.php and header.php. The files for version 0.713 can be downloaded here.

Lets have a look at what i changed:
modules.php
Add right after the credits:

if(isset($PATH_INFO)) {
$vardata = explode('/', $PATH_INFO);
$num_param = count($vardata);

if($num_param % 2 == 0) {
$vardata[] = '';
$num_param++;
}

for($i = 1; $i < $num_param; $i=$i+2) {
$$vardata[$i] = $vardata[$i+1];
}
}

The code will extract the variables and the values from the $path_info and make them available for PostNuke.
For in deph informations have a look at this article at www.zend.com.

header.php
At aprox. line 155 you will find:
global $themesarein;

Change the following line:
echo "\n";
to
echo "\n";
and
echo ";@import url(\"".$themesarein."themes/".pnUserGetTheme()."/style/style.css\"); ";
to
echo ";@import url(\""."http://www.yourside.com/"."themes/".pnUserGetTheme()."/style/style.css\"); ";

This is to fix the path for the style sheets. By unknown reason without this changes PostNuke will not find the stylesheets anymore.

You are ready now.

To test it you can create an new article with a link pointing to an other article.
Replace all = and ? with /
You will notice that the link is clickable and works.

So now we need to change the way PostNuke generates its URLs to make sure we will be listed by searchengines.


Pardon my english, i am german.

Jan

pnHTML extension api for WYSIWYG editor

As I try to integrate WYSIWYG editor (by other great developer) into the module I am working on, I thought this may be a better approach; change the FormTextArea() of HTML helper module then I don't have to worry about it else where (but this kinda break the rule of the game: avoid modifying the core of PostNuke). So here is the suggestion, may be someone already suggested this approach. Let's have another set of API for extending "FormTextArea() of HTML helper module or somehow let the FormTextArea() to call hook (not sure if this make sense) from "hook" a module. What do you think?

Turkish language translation for postnuke 7.13

Turkiye PHP Group
<a href=http://www.php.org.tr target=_blank>www.php.org.tr


./byah

PHP 4.2.0 released at www.php.net

"This latest release contains over one hundred changes, bug fixes and improvements over the previous release, PHP 4.1.2. Among the highlights are experimental support for Apache 2, cleanups in variable handling and overhauls of various PHP components, including the domxml, posix, sockets and iconv extensions. For more information, see the PHP 4.2.0 release announcement."


The Dragon's Forge is nuked

We've just started, and we feel PostNuke will allow us to expand our website along with our business.


Come have a look!

Footnote: 1

The friendly URL case


BUT - what I would like to propose is that we give this fantastic piece of code its life on the web. That is, giving the "PostNuke-:mod_rewrite" solution it's own homepage where we can have a list of supported scripts. The implementation by Sascha only supports the basic core modules. And even the Web_Link solution is not completely finalized. (it does not provide friendly URL's when you have a category with more than 10 web links...)

It would be great if users could submit their own working scripts for modules like XForum, PostCalendar, Gallery and more.

I am using all these modules already and I am not strong programmer enough to implement my own scripts for the different modules.

That is why a web page like this could help me and my fellow nukers a lot.

Well, if any of you out there knows how to fix this, then we can just simply change this thread into this webpage, with solutions to all the missing scripts, like: Web_Links, XForum, PostCalendar and Gallery.

- - -

What we are talking about is basically the three following categories. (taken from Sascha's script)

1. The $in var in the array. Example:
"'(?<!/)modules.php\?op=modload&name=Sections&file=index&req=printpage&artid=([1-9][0-9]*)'"
2. The $out variable in the array. See:
"Sections-print-article\\1.html"
3. The mod_rewrite script in the .htaccess file. See:
RewriteRule ^Sections-print-article([1-9][0-9]*).* modules.php?op=modload&name=Sections&file=index&req=printpage&artid=$1

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

How should this code look like for URL's like:

http://domain/modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=2&min=50&orderby=titleA&show=10


http://domain/modules.php?op=modload&name=XForum&file=viewthread&tid=1

http://domain/index.php?module=PostCalendar&func=view&viewtype=details&eid=1

http://www.odinn.net/modules.php?set_albumName=odinn_privat&id=aaa&op=modload&name=NS-Gallery&file=index&include=view_photo.php



All the best to all the Post Nukers out there !

- Zonik, zonik@strik.is

TortoiseCVS RC 50 released: a new experience with cvs


It's freely available under the GPL. With <a href="http://www.TortoiseCVS.org"target="_blank">TortoiseCVS, you can directly check out the latest <a href="http://www.PostNuke.com"target="_blank">PostNuke-Code and stay on top!
Once you got the latest cut, you can update easily, commit and see differences by right clicking on files and folders within Explorer. For a good introduction, see the nice <a href="http://centre.ics.uci.edu/~grape/modules.php?op=modload&name=Wiki&file=index&pagename=TortoiseCVS"target="_blank">Tutorial on docs.postnuke.com!

regards
martin

Past Articles showing restricted titles

This works fine when the articles still reside on the homepage, but when it's moved to the archive, and shown in the "Past Articles" block, the title of the restricted articles is showing.

The anonymos user can't read the article, but I would like the "Past Articles" block to check the persmission table before adding the title.

Is this a known issue? and do you plan to fix it in the near feature?
Or maybe somebody can help me fix it temporarly.

regards
Trond Nilsen

PN .71 through .713 & Andromeda

I was working with Jim McDonald to resolve the issue, and the .713 change log (here) says that it fixed the problem, but that does not seem to be the case. And now Jim has moved on...

One user experiencing the problem (thanks Bert!) had some luck changing:

Header('Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0');
- to -
Header('Cache-Control: cache, must-revalidate, post-check=0, pre-check=0');
- in -
pnSession.php (at roughly line 200)

But that seems to interfere with the behavior of his browser's back button.

I very much hope to resolve the issue, but it does appear to come from a change to pnSession.php, and Andromeda still works fine in 'standalone' mode.

I'd be happy to talk to any PN dev, and I can be reached at scott@turnstyle.com.

-Scott
First Page Previous Page Page 97 / 277 (961 - 970 of 2763 Total) Next Page Last Page