-
GSoC Interview: Daniel Byrd
(News)
-
American and English whenever it’s convenient (It’s pretty much only more convenient to be American when trying to enter America).
I enjoy doing a bit of drawing here and there and pretty much any reasonable kind of sport, especially team sports. But as far as interesting hobbies go I don’t raise boa constrictors or compete for the world record for juggling with flaming knives or anything like that. I guess I need to take something up so I can better answer these kinds of questions.
I currently run www.lincolnjcr.com (technically not completely finished yet) where I’ve implemented a specific self-made content management system, which probably had something to do with what drew me to Postnuke.
2. What attracted you to the Google Summer of Code as a programme, and PostNuke as a project?
What tempted me about the GSOC program was the flexibility of the whole system, working where you want, when you want, as well the opportunity to get paid to code, which probably wouldn’t have been possible otherwise and is obviously going to offer some useful experience.
PostNuke seemed like a project I could actually make an impact on, as I already have a decent head start in all the required areas, I didn’t like the idea of taking a plunge into the unknown and having to spend half the time trying to figure out what was actually going on rather than actually contributing. Also a lot of people use websites, and a lot of people benefit from Postnuke, so the idea of contributing to something genuinely useful to many people was a factor for me.
3. Tell us about your project, and how you hope it can benefit PostNuke?
I’ve been on countless websites where the search functionality is just not up to scratch, it’s frustrating to say the least. Although Postnuke already has a fairly well implemented search module, theres room for improvement. My project is essentially to construct a fully functional search engine for PostNuke. Actually, two. One direct port of an existing search system, (along the lines of htdig or phpdig) and one more specific implementation that works more intimately with PostNuke.
The outcome for Postnuke should be the following the features:
Unsharp searches so that users get probably expected results in spite of typing or spelling errors.
Searching of non-html documents (such as open office documents and PDF)
Improvements in performance. Currently, each module is queried individually, multiple results for the same page are displayed more than once and there is no way of displaying searches by relevance.
(If time allows) Semantic searches (ie content added by person x)
5. What do you personally hope to gain from participating in the Summer of Code with PostNuke?
I’m looking forward to getting an insider’s perspective on an open source project as I don’t really know much about open source, and this seems like the best way to learn more. Of course in terms of further work prospects, this is a useful bit of experience to have for sure. It would also be nice to make some friends in the process.
6. Can you see yourself contributing your talents to Open Source projects following the SoC? Will you continue to work with PostNuke in some capacity after the programme has ended?
It’s a definite possibility, I’ll have to see how it goes and see how much I enjoy it. It also depends on how much spare time I have as well I guess. But I’d definitely consider it.
7. Is there anything else you’d like to say now, as the programme begins?
I’d like to thank the people here at PostNuke for applying to GSOC so that I could have this opportunity, and I’d like to say that I’m looking forward to the next few months and that I’ll do my best to make my effort a worthwhile addition to PostNuke.
Lastly, thanks for your time – we in the PostNuke team are excited about the Summer of Code, so thank you for taking part and choo
Generated on April 23, 2008.
-
MediaAttach RC 1 released
(News)
-
Functional features
With the display and delete hooks file uploads become possible in all hook-capable modules.
Many different file types are supported (images, music, videos, archives, documents, ...)
The most formats can be displayed embedded.
Enhanced file information like for example ID3 tags are read and cached with pnRender.
Also emedding external videos (e.g. YouTube, Google or Dailymotion) is possible.
Users can send files to themselves in mails.
Security
Files can be stored outside the web root, which is advisable absolutely.
If this is not possible, a .htaccess file can be created automatically for protecting direct access.
Therefore all access is handled by module functions and permissions.
A quota support cares for bounded storage limits.
Integration
Users can manage their own files in the profile.
With a Scribite plugin for Xinha media can be inserted in the editor easily.
A support for needles in the MultiHook also provides possibilities to include files in other content.
A Guppy plugin for Pagesetter is enclosed as well to be able to define MediaAttach fields.
Also the Content module is being supported by a flexible plugin.
More profound integration possibilities for special modules exist with create and update hooks.
Migration
An import from the file system is possible.
Moreover import options for Downloads 2, Mediashare, PhotoGallery and pnUpper are ready.
Comfort
Direct support for Categories.
Images can be scaled down.
Space-saving multi uploader if JavaScript is available.
Thumbnails can be cut out individually if desired.
The new search functionality is being supported.
The creation of bit torrents for files is possible.
Comprehensive PDF manual.
MediaAttach can be used as easy as every other display hook module (for example EZComments). But if one engages in it, he quickly perceives that the strengths of this module are it's flexibility and it's adaptability. It not only unifies file management and media integration, but can also be used as a gallery for example. Different annexed template sets illustrate several possible applications.
Also interesting is that one can activate MediaAttach also for MediaAttach itself which leads amongst others to the possibility to attach media to other media items.
The module offers concluding dozens possibilities which can all be used, but may not. For this reason it is excellently suited for being employed in project-specific areas and is furthermore in line with our framework idea why it is going to constitute an enrichment certainly.
Links
Download
Bugtracker
Patches
Feature Requests
Have fun with testing and giving feedback :)
Generated on March 7, 2008.
-
Url rewriting on Postnuke 0.8
(News)
-
Main principles of the mod rewrite
For information, the URL rewriting is a module that you can activated in your apache to rewrite the links of a site in order to simplify their reading.
The idea is that the Pn Team also thought that the mod rewrite was not necessarily available / activated on all types of servers (particularly on Windows servers). Indeed, the Postnuke team offers rewritings based on tips already heavily used in management systems like blogs.
Before you begin, here is the format of a link without rewriting.
without rewriting
index.php?module=Users&func=logout Index.php? Users & module = func = logout
URL rewriting without mod rewrite
This rewriting reproduced a "virtual" Folders system on your site, links look like this
URL rewriting without mod rewrite
index.php/Users/logout
In terms of mechanism, it is very simple, when your Web server receives a request for a link, it loads instinctively page "index.html". In this index.php, the parameters of the request are recovered via the header (you can look in "phpInfo" there is a field $ _SERVER [ 'REQUEST_URI'] which corresponds to this information).Then these parameters are interpreted , between the first two "/" is the name of the module, between the two others, the function name. Now Postnuke know the name of the module and function to launch.
You can pass parameters too, for instance, if you want to load a forum with id=2, the links will look like this
URL rewriting without mod rewrite
index.php/Forum/viewforum/forum:2
Note that the url rewriting uses ":" to represent the parameters in a url. So you can't pass variables like this "index.php?variable=filter:3". (be carefull if you are using Pagesetter and his filters system).
URL rewriting with mod rewrite
Optimizing the previous version
In the previous example, all links contained index.php ... but it's ugly, and functionally this file contains no
information useful to load the asked module.This trick is useful when you have no mod rewrite, but if one has an "mod rewrite enabled" server,you can use a "lighter" version of the previous rewriting without an "index.html"
Here is an example
URL rewriting with mod rewrite :Optimizing the previous version
/Users/logout
Be careful, if one of your pictures is written this way
and you load the page /MyModule/main/. "/MyModule/main/test.png" which will be searched. Note that you can make a rewriting that redirect all links of the form "/*/*/*.(jpg | png | gif)" to "$ 3. (Jpg | png | gif)." (but it's ugly).
Mode file
This url rewriting is the classical version already used in previous versions of the cms, The rewrited links are lists of words (module name, the name of function) separated by dashes. Note that this version uses a large number of regular expressions rules to do the rewriting compared to the other one, which may increase the load of your server Web.
One example here ...
URL rewriting with mod rewrite : Mode file
module-Forum-viewtopic-topic-2903-start-0.html
Note that the "module" which one would have thought there's no point in it, is made for the support of the "old style" loading of modules.
URL rewriting customized
So here is the coolest feature, which allows you to customize the URL rewriting depending on the module you want to load. Just create a "encodeurl" function in your API module (pnuserapi) that takes as parameters, the information needed to create for output a fully customized rewrited link.
After, the loading of each page of the CMS, a "decodeurl" function in the API part of the module takes care to reformat the encoded url in a form understandable by the CMS.
You can find an example of the use of this method in the module "Pages" of values addons
Format of a encode and decode url
function pages_userapi_encodeurl($args)
function pages_userapi_decodeurl($args)
This feature is interesting because it allows us to have the hands on your url, not only before loading the page, but after loading this page, allowing you post-processing actions rather interessant.
This method allow you to
- put keywords in the url: (see Pages module)
- have a single version of your rewrited url : Indeed, through the post treatment you can recalculate the url and it does not conform to your requirements, you can redirect to the good link via a redirect 301 "Moved Permanently headers.
Use case of a url rewriting "no duplicate"
Notes: A small problem nevertheless for the use of this rewriting, which is limited to the type url "user". (more details here)
This article is a translation from this "how to" released on Postnuke-France
Generated on February 25, 2008.
-
SEO for postnuke
(News)
-
Customize title
You can customize the general title of your postnuke, by filling in the correspondant fields in the module "settings". The problem is that, you will have only one title for the whole website ... and that's ugly (and bad for SEO).
A solution was offered by Markwest, in order to personnalize this title, on every pages.the title tag plugin
This plugin allow you to format titles like this
Classic titles
HTML for Module Developers - A Discussion :: pnCommunity :: Support at your fingertips
if you want to have shorter titles like this, you can use the other unofficial version in the comments.
Improved titles
HTML for Module Developers
If you're using pnForum, it will give you title like this
PnForum title
Customize meta "descriptions" and "keywords"
You can customize the meta "descriptions" and "Keywords" of you CMS, by filling in the correspondant field in the "settings" module, but with this customisation, you will have only one "description" and "keywords" fields for all the site.
In order to improve this, there are two plugin on the community repository, one for fixing the descriptions and the other one for the keywords tags.
Notes : As the Search engine were spammed by overloaded keywords tags, for most of them , they don't consider this tags anymore.
If you're using pnForum, it will give you this :
PnForum metas
Activate url rewriting
You can activate the url rewriting in Xanthia, go to the Xanthia module, then check the options "use short urls", and copy paste the .htaccess file from the "doc" folder to the root of you CMS.
/!\ Be careful, live search doesn't url with more than two dashes
Notes : an improved version of the current url rewriting is available in postnuke 0.8.
Duplicate content
Don't duplicate links in your portal, two differents links must not point to the same content. Indeed, some search engine don't like to see multiples versions of the same page on a website (that's called "duplicate content")
To avoid this, you can use a robots.txt at the root of the CMS
Robots.txt
User-agent: *
Disallow: admin.php
Disallow: config/*
Disallow: header/*
Disallow: footer/*
Disallow: pntables/*
Disallow: /images/*
Disallow: /includes/*
Disallow: /adlogger/*
Disallow: /themes/*
Disallow: /pnTemp/*
Disallow: /docs/*
Disallow: /javascript/*
Disallow: *.php
Disallow:module-Forum-viewtopic-topic-*-start-0.html
An other tip, "/index.php", "/index.html" and "/" redirect to the same page so you can add this rule in you .htaccess
.htaccess
RewriteRule ^index\.html$ http://postnuke.com [NC,R=301]
RewriteRule ^index\.php$ http://postnuke.com [NC,R=301]
Text formating
In your articles or templates, try to have a structured layout with H1, H2, H3 tags.
Autolink and intern link
The module "autolink" is interesting, because he allows you to create a large amount of intern links with the same source anchor, this will help to increase your rank on the given word
404 error
When you've got an important portal with a large number of pages , it may be possible some of you ranked pages doesn't exist anymore. When search engine bots come to look for this "ghost" pages, you can redirect them to the home of your website, with an "Error 404" header.
.htaccess
ErrorDocument 404 /index.html
Take off unused metas tags
For most of them, search engine bots don't read some meta like "revist-after", so you can take them of your head tags. It will not help you, but you will have a cleaner header.
xxx.html
This article is a translation from this "how to" released on Postnuke-France
Generated on January 31, 2008.
-
A Warm Welcome to Our Newest Member, Mateo Tibaquirá Palacios
(News)
-
Welcome Mateo, tell us a little about yourself. Who are you,
where are you from, and what do you do?
My complete name is Néstor Mateo Tibaquirá Palacios, but I prefer to be called Mateo. I'm from Colombia, a very beautiful country with some horrible problems; balanced, eh? I live in Popayán, where I'm finishing Electronic & Telecommunications Engineer Studies with an emphasis in Telematics (Information and Communications Technology). I chose Telematics because I like to program. Growing up, I did not have a computer, and from the distance I hated the idea of using a command line console. Now, it's different; I love my Ubuntu with the Yakuake console; and Eclipse PDT rocks!
At the University, I discovered that I had sufficient skills to write software. I began programming in C++ and Java some time ag
Generated on January 26, 2008.
-
Jørn Wildt Proposes New Content Module
(News)
-
For the discussion see: http://community.postnuke.com/module-Forum-viewtopic-topic-53152-start-0.htm
Here is what Jørn has in mind:
[quote=Jørn Wildt]Dear PostNuke community
One of the things that always comes up when comparing PostNuke to other Content Management Systems is its lack of real content management. All we have is some old News, Pages and FAQ (and some more) management modules - nothing really fancy. You can add fancy modules like PagEd, Pagesetter, pnWiki and others but somehow they all lack, well, something - something which I find rather difficult to pinpoint. They are either too complex, too simple, impossible to extend and do not integrate well with each other.
I have been doing some thinking about this issue and would like to present some ideas for a new Content system in PostNuke. A framework that newbies can work with right out of the box, an extensible framework, and a framework with well integrated components that are aware of each other. My ideas are by no means rocket science and most, if not all, have been implemented else where - just not in PostNuke.
If you ask me then PostNuke is going to dwindle away unless something serious is done to add a good content framework. Here is my suggestion.
[b]Content Types[/b]
The core component is the "Content Type". For those of you that knows Pagesetter this is exactly the same as Pagesetter's Publication Type. This will be a separate module that takes care of defining content types, editing and displaying content items - but without user navigation! Think of an Article, with it's title, lead-in text, main text and image, as a content item of the type "Article". The type specifies the fields that are available for a single instance of the type - a single content item - a single Article.
Content Types are management by the site administrator (but can also be created by other modules). The admin can choose from an extensible (through plugins) list of field types. Here are some examples (mostly copied from Pagesetter):
- String (one line text), Text (non-HTML), HTML (using Scribite!)
- Number, checkbox, date
- Media files (using Mediashare)
- File uploads
- URL, email
- Computer code (text displayed with line numbers in mono spaced font)
- Category (using PN .8 categories), both single and multiple select.
Now you can create an article as a title (string), lead-in (text), main text (html) - and many other types of content. But there is still no navigation - neither on the admin side nor the user side. All you have is a Content module that allows you to create content types, content items and then display these - assuming you now the URLs. Navigation is delegated to other modules - more on that later on.
The core framework does also handle input form generation: it will auto-generate input forms (using pnForms in PN .8). These can then be copied to another location and re-designed using the standard Smarty templating system.
The core content module handles a few other things: for instance revision history (who changed what and when).
[b]Content Management[/b]
So far there's nothing new compared to Pagesetter. So lets take a look at the admin side of navigation - how to store and locate your content items. I suggest that all content items are stored in a folder structure identically to your standard disk drive. On the harddisk you manage folders and store files in them. In the CMS you also manage folders - but now you store content items in them - indifferently of the content type.
The first challenge is how to handle user contributed content since normal users don't have access to the administrative folder system. Now remember that the core Content system allows anyone (with the right permissions) to add content, but where should it be stored? I suggest a standard "incoming" folder is created for this purpose (much like your mail system). The editors can then keep an eye on this folder and move new content to the right folders.
Actually there should be one "incoming" folder for each content type and it should be possible to specify which it is. In addition to this the system should have a flexible workflow system a'la Pagesetter (now already in the .8 core). So that different editors and authors and admins can be notified when new submissions arrive.
[b]Content Structure[/b]
But there's still not much difference from Pagesetter. So what's the point? Well, enter CoType - this little module, which I'm rather proud of, has some nice layout features that I would like to copy. First of all you have Boxes - elements that can be floated left/right/top/bottom relative to the current content. In CoType you have boxes for media items, program examples, and general text. I would like to extend this so that you can put any content item inside a box. So you can display and Article and put one or more Media type items in boxes as illustrations.
Another thing to copy from CoType is the use of nested content - sections in sections. This concept should be extended, just like the boxes, with the ability nest any content item inside another item. The only problem here is how nested content should be displayed? In CoType you always have sections in sections (in a document) - and there's a well defined standard way to display this. But what happens if you sudden nest a Music album inside a FAQ inside a Media item ... and then box it? Well, that will have to be solved as we go.
I suggest the Content Type configuration lets the admin specify which types of content you can nest inside another.
The system could also enable boxing of other modules contents - assuming some kind of API/interface the external modules have to implement (just like PostNuke's search API).
[b]Content Layout[/b]
The proposed layout scheme is so far rather fixed - something like this:
- Top content item title is displayed inside ... tags.
- Nested content title is displayed in ... (and so on for further nesting).
- All nested content is displayed on one page.
- A small table-of-content is displayed at the top (linking to sub-content anchors).
- Each (nested) content item is displayed with a standard auto-generated template.
- Boxes floated to the left/right are displayed in 50% width (like CoType)
- Top/bottom boxes are displayed in 100% width (like CoType)
This will allow newbies to quick and easy created new content without having to also design their own templates. Assuming of course that the system comes with a suitable default set of content items.
Experienced users can edit and change the auto-generated templates. But these will be recreated everytime the administrator changes the Content Type configuration. So experienced users must copy the templates to another location and then edit them to fit their own needs.
[b]Navigation[/b]
So far I have ignored the concept of navigation between different content items completely. This is because it can be done in so many different ways - and this is mostly where the different types of PostNuke modules distinguish themselves. A media gallery has a completely different navigation paradigme than a News list, a Wiki and a Weblink collection.
So I propose to delegate navigation to other modules. This has already been done with success with a calendar (pgcalendar) and a news archive (pgarchive) for Pagesetter. These two modules takes a specific Content Type and displays it's items a calendar view and a monthly listing view. This combination is extremely strong - you can add all the fields you want on a Calendar item - and still display it using the standard calendar view. Throw in the nested content and the boxing ability and you get an extremely flexible and yet simple Content Management System.
[b]List Navigation[/b]
The basic navigation is simple a pageable list of items ordered by some criteria. You create different lists and then refer these in the URL. For each list you configure which content type(s) to include, the default sorting order, the display template to use for each item - probably more. Including more than one content type gives some problem with respect to sorting.
This implements the typical News list on the frontpage.
[b]Catalog Navigation (collections)[/b]
This is the typical Weblink and File Up/Download navigation through a collection. The hierarchy is mirrored directly from the content folders.
[b]Calendar Navigation[/b]
Displays content items by date in a calendar (see for instance [url=http://www.fgc.dk/index.php?module=pgcalendar&tid=40]http://www.fgc.dk/index.php?module=pgcalendar&tid=40[/url]). You need to specify which date fields to use as start/end date of the entries.
[b]Archive Navigation[/b]
Displays content in lists organized by month (see for instance [url=http://www.fjeldgruppen.dk/arkiv.html]http://www.fjeldgruppen.dk/arkiv.html[/url]).
[b]Menu Navigation[/b]
On thing that frustrates me with PostNuke is the horrible way you edit menus through the Block interface. No - lets allocate a complete module for menu editing and then just select which menu to display in which box (I believe Content Express does this). With the integrated content framework you can now let the editor select content items from dropdown lists or similar - and avoid having to copy/paste raw URLs into the menu editor (this has always been a intellectual bottleneck for the people I have created websites for).
I would also like to see editing of the menu directly in the front-end. The editor should always have an "add current page to menu" icon in the menu. He should also be able to drag and drop menu items without having to jump to the admin interface.
[b]Frontpage Setup[/b]
This is just another idea of what you can do - not necessarily something to actually implement. But the frontpage need not necessarily be a list of latest items as on most portal websites. It might also be a fixed setup based on a grid where you can assign different content items to different locations. For instance Articles to the left, Banners to the right, and a few images at the bottom.
[b]Where to go now?[/b]
Now who's going to implement all this? Good question considering the speed of the core development. I would love to be on the team (and will be) but my time is restricted (especially now that I got my first kid) so I work rather slowly.
Any volunteers?
There's also the question of organizing the code - we cannot have much more than one or maybe two developers on the core Content module. But as soon as that is ready we can take more people in - one for each kind of navigational scheme. Other people can then work on the default content types.
We also need to consider how a system like this fits into the PostNuke distribution. Does it have it's own release cycle? Is it integrated with the core?
Enjoy 8-)
/Jørn[/quote]
Generated on September 4, 2007.
-
PostNuke .8 RC1 Released
(News)
-
PostNuke 0.800 RC1 Core Only Download
Download (ZIP)
MD5: 17d7f2eb16bf4dd886695adefab0e1f5
SHA-1: 624dcb1b29c17150e341878c727ddac83fadeb54
Download (TAR.GZ)
MD5: 9807fe2f3e0ef9f7fa88a3bbb0426815
SHA-1: 354edfc9eff87f77713bc1750cdc77144fcf0bff
PostNuke 0.800 RC1 Full Package Download
Download (ZIP)
MD5: 15718c1d68223bf5fc69b144666741f8
SHA-1: e1901b3d06dce1b82f2dfcde4d2da74e7afb9cf8
Download (TAR.GZ)
MD5: 1d983e5fd18907022fbec598c4ae7111
SHA-1: afb25ef625ce6e1564c40faf1cb29b3c1ea0ee13
PostNuke 0.800 RC1 ValueAddons Download
Download (ZIP)
MD5: 38879b481640289b7b6a605af41638a1
SHA-1: aa10e8f79d038b667aa8638347d3d12a999d8e99
Download (TGZ)
MD5: 4adc34945ae0cf42b3f96408bd21d17c
SHA-1: d4f80e0478bef1721eb29484024a9ed7a1a2e025
Please feel free to use the article below to publicise PostNuke in any web development communities you belong to. It is also published here on community.postnuke.com.
Simon BirtwistleHammerHead
About PostNuke
The PostNuke Application Framework provides a high performance, secure and feature complete framework which both website administrators and web developers can use to great effect in creating unique and attractive websites. PostNuke can be used as a CMS, adapted to blogging, ecommerce or community websites, or for more abstract tasks. It is easily adaptible, extensible and can handle situations in which performance and security are paramount. In this way, PostNuke is a reliable and robust choice for any website administrator.
The most recent version of PostNuke is 0.8 RC1, which represents a feature complete 0.8 version. Once the release candidates have undergone full testing and any remaining bugs are fixed a full release will be made available. This release will be suitable for live websites, however in the meantime RC1 is suitable for testing and development work.
Highlights For Website Administrators
The 0.8 release is more polished and up to date than ever before. With the new libraries for developers, new features should be faster and simpler to develop, reducing deployment costs. PostNuke 0.8 can be adapted to almost any need, from blogs to community websites and new third party modules are being developed all the time, constantly improving what PostNuke has to offer.
Additionally PostNuke 0.8 has a focus on the latest standards: XHTML compliance, Section 508 and Accessibility, and further enahncements have been made to both security, performance and usability.
With all core modules now templated, PostNuke 0.8 is designed to be cached, providing a huge performance boost over dynamically generating every page. Furthermore, with the templating system applied to all core modules designers will find it easier than ever to create a unique look to their websites. Gone are the days of standard 3 column layouts - PostNuke 0.8 includes new themes which are CSS, and not table, based. The new Xanthia theme engine is easier to use and performs better than ever before, while including an upgrade feature making it easy to import Xanthia themes from previous PostNuke versions.
For website administrators, this is the best PostNuke release yet, combining compliance with the latest standards and constantly improving features.
Highlights For Web Developers
The 0.8 release provides an Application Framework to allow rapid development of web solutions using the now stable PostNuke core. This allows third party developers to use the wide range of included API and utility libraries to create their own modules and extend the feature set PostNuke already provides.
Of these libraries, one of the most substantial is DBUtil, providing a cross compatible interface to the database. Selecting, updating and deleting data can all be achieved in one line, and DBUtil, combined with ADOdb will automatically create a cross compatible query for whatever database system is in use. PostNuke .8 has been tested with PostGreSQL, and further databases will be supported in future versions.
Other key features are site wide categories, supported through integration with DBUtil, the PostNuke Forms Framework for HTML forms, and other object based APIs. All of these are new since the 0.7x series and ensure third party development is both quicker and easier, and that compatibility with future versions is maintained.
For web developers, PostNuke will provide an attractive option when searching for a framework upon which complex web solutions can be built quickly, easily and with a minimum of effort. This applies even
Generated on July 17, 2007.
-
Using PostNuke and MySQL in Unicode (UTF-8)
(News)
-
MySql and UTF-8
by: Bernd Plagge
www.choicenet.ne.jp
MySql introduced support for different character sets and collating rules in version 4.1. While this has many advantages databases sometimes need to be migrated and then we have to ensure that the correct character code is set for the new database. We are mainly using UTF-8 and hence you may have to adapt this information to your situation!
What is the problem?
MySql uses as default Latin1, swedish flavour.
How do we check this?
run mysql.
mysql> show variables;
How to check the character set for a particular database?
run mysql.
mysql> show create table
The character code can be set in various places - so where is the best place for this?
We always use UTF-8
------------------------
In this case it makes sense to set the character code for the whole server to UTF-8. MySql actually sets the character code at different levels:
server
client
database connection
database
The character encoding for server, client and the connection work hand in hand to ensure that the data is interpreted correctly. It seems that MySql makes no effort to determine the correct character set but will convert data in accordance with it's configuration. This leads to problems for old databases if the database character code differes from the one configured.
The easiest way to configure MySql for UTF-8 is to put the configuration inot the main configuration file (/etc/mysql/my.cnf).
In my.cnf there are different file sections. So you can't put it just anywhere.
[mysqld]
character-set-server=utf8
[client]
default-character-set=utf8
Setting UTF-8 for one Database
--------------------------------------
You can check the default character code for a database either by dumping the data and then changing the schema file or you can do this online.
You use the 'alter table' statement to change the database using mysql.
run mysql
alter database
default character set utf-8
default collotion_name utf8-general_ci;
note: you may omit the word 'default'.
It is also worth noting that e.g. mysqldump silently adds the default character code when exporting data!
This can causes problems if the character code defined and the database content are different. In such cases MySqldump will try to convert data to it's default character code!
However, you can disable that by adding the character code option when using MySqldump.
e.g. mysqldump --set-charset.
In the same way you may explicitely set the character set.
mysqlimport --default-character-set = utf8
mysqladmin --defautl-character-set = utf8 create
Setting the character code at server start
-----------------------------------------------------
You can start the server with:
character-set-server
collation-server
The current values can be determined with the command
run MySql:
mysql> show variables;
Values may be changed with commands like:
set character_set_server = utf8;
set collation_server = utf8_unicode_ci
Setting the character code within Applications
----------------------------------------------------------
You want ensure that the correct character code is set when connecting to a particular database.
Connect to the database and issue the following SQL command:
mysql>SET NAMES utf8;
SET NAMES is equivalent to the 3 commands:
character_set_client
character_set_connection
character_set_results
How to run PostNuke in UTF-8
-----------------------------------
Several things have to fall into place for this to work correctly.
1) the database encoding needs to be set to UTF-8
2) the application language needs to be encoded in UTF-8
3) PostNuke needs to be told to use UTF-8
ad 1)
see above for details!
ad 2)
The character code for a given language is set in language//global.php (PN 0.76x) or in language//core.php (PN 0.8). Search and adjust the following 3 define strings:
define('_CHARSET','UTF-8');
define('_LOCALE','en_US');
define('_LOCALEWIN','eng');
Of course it is not sufficient just to change the _CHARSET to UTF-8. The text strings themselves need to be encoded in UTF-8. This can be done in a number of ways:
a) use 'recode' or 'iconv' on every language file
b) use the pnlwb (PN Language Workbench) to extract and convert all language files
ad 3)
Following the database initialization you need to issue a "set names to 'UTF-8'" command. As this is done in includes/pnAPI.php we need to patch that file.
PN 0.76x
----------
// load security functions.
include 'includes/pnSecurity.php';
// Load our language files
include 'includes/pnLang.php';
pnLangLoad();
//bplagge 2006-01-31 - charset fix for new MySql version
$dbconn =& pnDBGetConn(true);
$info=$dbconn->ServerInfo();
if ($dbconn->ErrorNo() != 0) {
echo "Error: "; echo $dbconn->ErrorNo();
}
// print_r($info);
$c = _CHARSET;
// Mysql uses non-standard name for UTF-8!
if ($c == 'UTF-8')
$c = 'UTF8';
$query = sprintf('SET NAMES \'%s\'', $c);
$dbconn->Execute($query);
if ($dbconn->ErrorNo()!=0) {
echo "Error: "; echo $dbconn->ErrorMsg();
echo "check pnAPI.php";
}
}
// end bplagge - mysql charset adjustment
PN 0.8
-------
if ($stages & PN_CORE_LANGS) {
// Load our language files
pnLangLoad();
}
# bp 2007-06-01
# need to "set names '' " to ensure correct data handling
$query = sprintf('SET NAMES \'%s\'', 'UTF8');
$result = DBUtil::executeSQL($query, -1, -1, true, true);
Please note that the MySQL character code names are NON STANDARD!
How to check?
----------------
I always found that phpMyAdmin is an excellent tool for MySQL databases. If the data entered in PostNuke is also correctly displayed in phpMyAdmin table browse mode I'm quite confident that everything is fine.
Generated on June 6, 2007.
-
New tools for postnuke community interaction
(News)
-
german speaking bikers. Because of the need of programming some new functions I decided not to re-program one new powerful module.
I decided to program some compact, little modules that can be linked together and be used in any kind of community. So perhaps the modules can alo be interesting for your postnuke community.
As I wrote already - the idea of all modules is to increase the communication and interaction between the community members.
Graphical member search
Whenever community members want to get new contacts they can write personal Messages to other community members. So I first programmed pnMap, a graphical based user search engine. This is not a free module but all other modules are free and open source.
See how active a user ist (last login)
But very often there are many peoples members of a community but not everybody is very active. Perhaps someone has logged in the last time some months ago? If this is the case you do not really need to write an personal mail to these members - you better write mails to the more active members.
So I released pnLastLogin, that loggs the last login of a user. These information can be integrated in a member search as a sort criteria with pnMap or in the profile page of a community member. So you can see who is really actice.
Do you want to know who has visited your profile page?
Did you ever think about the question who visited your profile page? I think this might be an interesting gimmick for all community members. So I released pnClickedMe. This little program loggs who clicks whoose profile page. You can install a little block afterwards on your page that shows a user who has visited his profile page. So many people get interested and want to see who is that person that clicked me? Perhaps this can create new contacts!
Manage friends in a little addressbook
If you have created new contacts, you might be interested to store a list of "friends" with additional information to the contacts. For this you can use pnUserinfo. This is like a little addressbook.
Give your community the possibillity to publish content in weblogs!
If you want to publish some things about yourself, blogging is the keyword. Weblogs can be a really great tool in a web community. pnWebLog for example is a weblog module for postnuke. You also can integrate the newest postings of a weblog owner in his profile etc.
We need faces not nicknames!
Web communities are full of nicknames. But who is the person behind the nic? Mostly user's can upload an avatar but avatars are mostly used for funny pictures etc. But I think in a community that was build up to create real contacts you should be able to see who is the person behind a nicname.
To reach this goal I release pnUserPictures. Using this module you can define picture templates that can be integrated in a user's profile page for example and you can also allow it that users can manage their own gallery. There is not only a category managment possible, usernames can be assigned to the uploaded pictures. So it is not only possible to see the picture, you know who is on the picture. You now can integrate a link in the user's profile that shows with how many other pictures a user is associated. This increases interaction in the community. For all pictures there are thumbnail galleries available. You can install a block that shows the newest pictures and so on.
Give the users the possibillity to delete themselfs - if they want it
Sometimes a user wants to leave a community. Did you ever notice that there is no possibillity in the postnuke core yet for a member so that a member can delete its account with a click? If a user can delete his account himself, the administrator even has less work with such things. To make this possible, I released pnUserDeletion. But before you use this module test the deletion process on an offline backup installation. Some modules might have problems if a user is not found any more in the database.
Invite guests to get registered!
OK - loosing members is not really great but sometimes you can't avoid it. It's better so see the community growing. To invite people to get registered I programmed pnRegisterNow. This module displays a nice javascript popup (no nerving popup...) after a specified number of pageviews. So if a guest surfs in your forum and he opens the 20th page for example, he'll see a popup with an register link and a login form.
The advanced postnuke profile links most of the modules automatically
Now you have seen various modules that can be usefull in a community. But you now say that linking these modules is hard work? No, not really.
Take a look at pnProfile. This is an advanced profile module for postnuke. All modules listed above that are linkable are automatically linked after pnProfile is installed. You can define custom profile fields in pnProfile, integrate user pictures in the profile page, integrate the user's weblog and so on. Take a look at the information page of pnProfile and you will see that using these modules is very easy
Generated on May 21, 2007.
-
Recovery Console for PostNuke .8+ - Now Available
(News)
-
Onboard Tools
Configuration OverviewDisplays many site config settings including module, block and theme detection.
Database Access RecoveryRe-encodes database credentials for the config.php file.
Theme RecoveryResets default site theme and/or resets user-applied themes.
Disabled Site RecoveryYou wondered what turning your site off would do...now you know! This utility restores the site to the "on" state.
Modules Module RecoveryDeletes any Modules modules entries found in the database and freshly installs the Modules module to the System category.
Blocks RecoveryA chart displays important block data and allows for disabling and/or deleting any content blocks. Changing the state of multiple blocks at a time is supported.
PostNuke Site SearchA built-in search bar searches the PostNuke site for content by keywords. Searches for matches in the following modules at this time: pagesetter, users, downloads, weblinks, comments, ezcomments, all news stories/topics, and all forums.
PHP InformationPHP info is displayed by section via a tidy menu.
About The ApplicationA dedicated page that displays licensing, credit and other general information.
Additional Features
Cross-browser-compatible CSS layout.
Highly accessible onscreen display.
Visual, interactive, informative navigation.
Various (but few) core images used for aesthetic lists.
Succinct onscreen instructions for each utility.
All actions require confirmation and provide error/status messages.
All forms re-populate themselves upon error.
Applicable current settings are displayed on every page, before and after recovery.
Security
Utilities that are not needed intelligently disable themselves.
User input cleansing.
Filename can be changed without breaking the application.
Time-sensitive application lockdown.
Gracefully Degrades When
PostNuke version is less than .8x.
PostNuke initialization fails.
Application is under lockdown.
Application is uploaded to incorrect location.
Of Other Interest
Written as a PHP class.
Extremely commented code.
Output source is XHTML 1.0 Strict; tidy and skimmable.
Quietly runs with E_ALL enabled.
A big thanks to all who contributed to the original PSAK, which was the strongest inspiration behind this Recovery Console, and to those who contributed with ideas, feedback and testing of the PNRC, thanks for your time and effort!
Download the PostNuke Recovery Console now!
Generated on May 10, 2007.