PostNuke

Flexible Content Management System

News

Custom User Fields Storing Problem

#1
pnAPI only enables to change active user data with pnUserSetVar function but not other users'. For some registration purposes I suggest changing pnUserSetVar function code:
function pnUserSetVar($name, $value, $uid = 0)
{
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();

if (empty($name)) return false;
if (empty($uid)) {
$uid = pnSessionGetVar('uid');
if (empty($uid)) return false;
}

...
#2
Making use of the previous change to the API code, the problem could be solved with altering newuser_user_finishnewuser function (modules/NS-NewUser/user.php).Right after the lines that update user table, insert the following:
...
$result = $dbconn->Execute("sql statement to insert new user...");

$uid = $dbconn->PO_Insert_ID($pntable['users'], $column['uid']);
if (!empty($dynadata) && is_array($dynadata)) { while (list($key, $val) = each($dynadata)) { pnUserSetVar($key, $val, $uid); } }
...
I found that this change completely solved the problem with custom user data fields storing. Miklos Kovacs
Footnote: 1


phpMyadmin Version 2.6.2 Release Candidate 2: many enhancements and Bugfixes

Features of v2.5.6 RC 2: (here the Changelog):


-General code optimization by removing old PHP3-compatibility
-Make default functions configurable
-Visual scratchboard: show column names
-Show overhead in table list, allow to check all overheaded tables at once
-Export: can suppress dates information
-MySQL error messages improved formatting
-Printview: display linked values and other relational features
-Export: allow delayed INSERTs, and support for UPDATE and REPLACE statements
-Show result of last SHOW query when using multiple queries

a Online-Demo
Footnote: 1

AutoTheme Tutorials!

The tutorials are viewable online and downloadable as PDF. They are accompanied by a free graphic template and theme from Webvida that are used in the tutorial.

Comment posting and support for the tutorials is also available in the special forums.

Tutorials (other tutorial links in left blocks)
Forum

Also, don't forget AutoTheme!

Module inactivation problem

index.php?op=modload&name=...
or
modules.php?op=modload&name=...
(the way main menu block does if you just insert [modulename] into the URL field of a menu item in Administration/Blocks/Main Menu). I suggest altering the code and including a pnModAvailable API function call to do this task. Original code:
if (file_exists('modules/'...
New code should look like this:
if ((pnModAvailable($name)) && (file_exists('modules/'...
I found that this solves the problem. Have fun with PostNuke! Miklos Kovacs, Hungary
Footnote: 1

Interview: Franky Chestnut, pnConcept.com

Hacks
dWl Mod Suite - This was for pn0.713, it was inspired from modifications that were done on the Downloads and Web Links modules at phpNuke. There is an All Page and that would be the only real important thing about this one. It was one of my first hacking I made. And to think of it, I still use the all page on my site [demo] but I think that is all that is left of the modifications. Also in this hack, I made it so there is a listbox with the title instead of just a field when you wanted to modify a link or a download. Little things like that. People should not use it today... all files comes from pn0.713.

pnMailUserHTMLHack - Another modification of the pn0.714 Mail User mod. All it did was to give the choice to send an email to a user in text or in html.

pncUserHack - None the least, this is my most popular work. It began with only the possibility to choose the password you want when registering and today, you can add dynamic fields, list, checkbox, define required fields, moderate registration and so on. Lots of options with the mail because for a time, the goal was to give admin the possibility to use PostNuke on hosting without mail function. But as users were asking more and more... it became what it is today.

pncUserHack was made with pn0.723 so I do not recommend it for newer version today. The future is unknown for this one, it depends on many things.

Blocks
Block Your_Avatar - My first block. It shows the avatar from your profile and a list box to change it directly on the block. Today, this one makes me laugh.

pncPaypalContribute - A pnAPI block that shows a Paypal button for donations. The email and currency can be choose in the administration for this block.

Mods
FeedBack- This was my first module and it still work although I think it was made for the pn0.6x or pn0.71x series. I took the Recommend_Us module and made it so it sends an email to the admin and it was my first experience. I saw later 2 or 3 modules that had the same name and we're doing the exact same thing. I thought it was funny but it was for everyone an easy way to start I guess.

pnUser_Points 0.22X - This one will disapear and I'll be glad because it never quite fully worked well. Not that it is a bad module but it doesn't work very well when your database becomes medium or large. The way it was written, it was using so much ressources that most of the time, the module couldn't update itself like it was supposed to do. What I did to put the 'x' after the 0.22 is that there was no administration in the original one. So you had to change the configuration directly in the files. And for me, I thought that it wasn't very..... actual. So I made the administration for the configuration and I added the possibility to clean the table where data was inserted. I also made the initialisation so people didn't had to insert the table by hands anymore.
I remember that I didn't want this one to go out with my name on it but since I didn't had any answer from the original authors when I finished it, I release it as it was. And people kept the association and came to me for the support and the future version.

Next version will make this one completly obsolete. 100% pnAPI, much less ressources, Groups points and Archives.

pncPopMessages - That one is a copy of the original Admin_Message but with a block include that would pop a message. I made a copy because I want to separate the original Admin messages from the messages that would pop.

pncGroups - I made this one because I didn't want to add manually users that would help us on PostNuke-France.org on various things. Documentation, support or even administrate a part of the site. So the module is giving the hability to the users to register for a group with all the permission fuss. You also can make a group open or close, define how many users can register for a particular group and so on. 2 blocks were included, one to show groups information and the other, the list of users in a particular group.

pncSimpleStats and pncSimpleStats Xantia - These are my last ones. While working on the pncUserPoints and discovering that ressources may not be a problem like the old User_Points was, I made this little Stats module with some some functions that were for the pncUP. For each category (news, comments, reviews and xforum), it shows a page with the list of users and the amount they proposed or wrote. No database, always getting the most recent count.
The Xantia version was my way of practicing with the new pnRender Engine and to give the result to the users. It is templated.

Upcoming
pncPaypalMod - Just my personal Paypal mod that won't do a zillion thing. The pncPaypalContribute will be moved to this mod. The goal is to make a simple mod that will show the list of contributors but won't have many functionality. I know there is probably 10 out there but I'm a programmer and I like to create my own. I just want something basic. I have a working version under a desk somewhere but never had the time to finish it. And.......... it will be free ;-) (No pun intended ha ha ha !)

All other upcoming mods are reactualisation, pnAPIsation and for some, templated of the existing ones : pncUserPoints, pncGroups, pncPopMessages, etc...

I also made the decision to concentrate on simple modules whatever they will be. I want them easy and fast to create and give them to the community so they can learn with various examples. And since we are near a new era (brrr) with the Xantia and pnRender engine coming, all will be templated for the occasion like the pncSimpleStats.

Voilà ! That is about what I've done and probably worth mentioning...


Where do you live?

I live in Paris - France, but was born in Canada.

What is your real-life job?

I work as a technicien and programmer on a professional software for music publishers. Mostly done in MS Access.

Tell me about your postnuke "career".

I'm not quite sure when I started but I'm a survivor of phpNuke. At first, I didn't like PostNuke (0.60 I think) and went back to phpNuke. But later, I felt that it wasn't serious. If I remember correctly, the only reason was the huge modules pool that was available for phpNuke then. But after a time, when you see that you will only use 1% of what is available, you take a peek behind other doors. And I came back to PostNuke (0.62) to make more tests. And got hooked.

As I wasn't very up-to-date about 'collaborative' programming, I was curious to discover how it was done. I made lots of tests with other CMS but was constantly driven back to PostNuke for various reasons or even to take a break. Then I got tired of testing and it was a natural decision to stick with PostNuke. The code under the hood had more common points with what I was exploring than the others.

With time, I was getting better at answering technical question and had a big presence in the french community. So David from Boomtchak ask me to co-administrate. When Boom went down for a time, another french support site went up and I was there again (Kaintech). I even been asked on Envolution-france but I didn't stayed long. Then the administrator of PostNuke-France ask me to take the lead because he couldn't stay, I took the opportunity and I'm there since then.

So I guess that for the french community, I'm known for the administrator hat, and for the rest of the world, for the lines I wrote.

When did you start working on your own module?

It was soon after deciding that PostNuke was the CMS I would stay with. Since I'm an self made programmer as that I didn't know much about php, I started by modifying already existing modules. That is how the UserHack was born. All it was doing at the time was giving the hability to users to choose their own password when registering. After that, I did various hack on the Downloads, the Web Links and when I gained confidence, I added an admin interface to the User Points mod and my first module was a FeedBack module. (Although many people made the same one, I didn't know at that time).

What is your development like?

I'm the "cliché" I guess, I work alone and like to be alone in the dark with a bottle of wine, my cigarette, and far away, the tv on. Yes, late at night when the bottle is empty, there are consequences on the coding. I won't say that it is the reason of course, but I try to make every line of code readable. Much needed at the end of the night. In fact, I think I put more time on how the code looks than how it looks when it is rendered. He he !

I like to consider myself the one that sometimes touches the soft spot of people. This is without being pretentious of course. I don't do very big things, I'm not the great programmer and my background may be slightly light, but the small things I do, people have been waiting for them. Like the first UserHack. When people were eager to have the possibility to choose their password at registration, I did it. When others or myself wanted an admin for the User Points, I did it also. And so on... I think that is mostly how I made my name.

I also rarely do something that I won't use myself. So many things I did were things that I wanted for myself in the first place. By chance, others were thinking the same.

The only tool that I consider worth mentioning is my code editor (if I can name it) : Crimson Editor (http://www.crimsoneditor.com), great syntax highlight, no crappy tabulations since the editor changes them in spaces and makes files readable the same way for everyone. I can't bare it anymore to read some code from others and taking half an hour only to make it clearer to read so I can understand it and fix or make modifications if needed. That is why I take my time to make my code so everyone on any computer sees the same thing.
You can also change code in files directly on your host with the ftp functionality. Perfect for newbies. Pros will probably move on to something that suits them more.

What is the biggest difficulty in your development?

I saw someone write "Time"... and that would be the same for me. It is not a PostNuke related problem since I am probably part of the rare ones to be happy that PostNuke is slow in development. I work hard in my professional job and I rarely sleep more than 3 or 4 hours a night so I'm very slow on creating any new things for PostNuke. People will say I never quite meet deadlines I propose and it's true (PostNuke related of course).

What features should the Postnuke .8 core have to simplify your work?

Good documentation and clear examples for newbies, intermediates and advanced users and developpers. I learned everytheverything from what others did and I'm still and will always be in a learning mode. The Example mod is a great start but when I have wanted to do something just a step more complicated, It has taken me awhile to find out how to do it. I have searched the smarty doc, and the Xantia code for a long time just to do something a little more complicated than what the Example mod was doing.

Which route will Postnuke/your module in your opinion go in the future?

I will follow its evolution and I have already started doing so. As I stated, I have already made a pnRender enabled module with the pncSimpleStats for practice and also to give another example for others and... I'm not sure but I think it may be the first non-official module done that way. And I intend to make more mods that are simple so people can have a look at them and say : "oooh, that I understand !".

What should users of your module regard?

I guess that one of my strong point is evolving with what the users want or doing the little thing that users were waiting for. When I look at my pncUserHack, between the first and the last ones, there are so much differences, it is freaky... but it is all what the users wanted at that time.

My weakest point would be the time I take to make something but that it is not something I have control over...

Anything else you always wanted to say about Postnuke/your module?

I know that there are developers like me hiding or keeping a low profile. I, myself, am often trying to keep a low profile because whenever I do something, it is always a great battle for me to support what I do because of time constraints. That is why I don't do much publicity. But I do my best to gain confidence about what I do and I hope to be able in the future to give more time to PostNuke, helping or coding. I hope that open minded developers that do have the time will get out of the dark and share their knowledge, skills and talent and contribute more to the development, documentation, support, etc.

Actual pnDevs are really, really great... but to give them a chance so they don't loose their mind, giving them a hand would be great.

Thank you very much for you time.

My pleasure ! And hoping my english wasn't too bad ! ;-)

Franky’s Homepage: <a href="http://dev.pnconcept.com” target=”_blank”> http://dev.pnconcept.com

Cyberdasher.com is PostNuked!

The site's not yet 100% complete, but should be soon. Without a strong CMS like PostNuke, a multi-topic site like this could not exist!

Thanks,
Vince
Footnote: 1


New version of Backend.php for Postnuke supports Atom Feeds

By using this new backen.php which I have called xBackend.php instead to describe the mulitfunctionality, and to also use the same namingconvemtion as other stuff from this site, you will gain a wider syndication solution for your users.

First of all you get all the benefits from the backend2.php which is already out and used by a lot of people. See more information here

Second you will gain support for multiple feedtypes, just by adding something to the url.

By default you will recieve a RSS 2.0 feed. But if you specify an other of the supportet feedtypes you will be able to get validating RSS 0.91 feeds and validating Atom feeds.

However the Atom specification is only at version 0.3 so that may change in the future, but I will try to keep up with the development as it goes.

At the same time I would like to request some help from the community. I am looking for a coder who woul dlike to help me make a new version of the xRss module for Postnuke.
It seems there are a growing interrest for this, and I would like to add more functionality. My trouble is that I am not familiar with how to recieve information from other modules. Like getting lists of topics, languages, categories etc. to choose from while selcting your sources for the feed url or script.

Demonstration:

Atom
Atom validator

RSS 2
RSS 2 validator

RSS 0.91
RSS 0.91 validator

Functionality demo:

RSS 2 topic 1 and 18 only in danish and english languages

To support multilingual sites the language of the story is included in the link.

I will also be interested in headring from anyone who have special requirements for the feeds, like if you woul dlike to expand the use of elements in a feed.

Example: Under each Item a number of extra elements can be added like a link and description to the Category or topic. Postnuke has already som functionality to add some related links based uppon the topic settings, I guess that PN 0.8 with its more functional Categories system can do this as well with categories.

PHP-CSL (Code Snippet Library): Released

To visit the projects sourceforge page, visit: www.sf.net/projects/php-csl
Footnote: 1
First Page Previous Page Page 34 / 277 (331 - 340 of 2763 Total) Next Page Last Page