Forum Home
Welcome to pyForum.org.
A message board system written in pure python using the web2py framework.
Download pyForum (v1.0.3): pyForum_1-0-3.tgz.
Anonymous Users - Change Forum Language To: Deutsch | English | Español
Replying in Official section
By: richard
Rank: Starfleet Ensign
Postings: 17
From: Australia
Posted: Fri, 24 April, 2009 - 03:57 AM

hi,

I can't reply to http://www.pyforum.org/pyforum/default/view_topic/59. I guess that's because I posted in the official section rather than community so I will continue the discussion here.


Correct, I've been keeping these "features" a little bit in the "hidden" side since I still have not found a way to deal properly with them, for example, once ": cool :" has been converted to cool it turns into an "invalid" html that should be parsed out, what I need to do is find a way to "reverse" and reconvert them for preview in the reply function.

...

However, when converted to HTML the system does not know anymore that they were pyforum-generated (this is mostly JS, or client side), I am still looking for an "elegant" and not-hacky way of dealing with this..

How about an AJAX call to get the original markup? With Jquery that would be something like:

function getMarkup(topic_id) {
var reply_box = $('#z_content');
reply_box.attr('disabled', 'disabled'); // disable reply box until have markup
$.get(URL_for_markup, {topic_id : topic_id}, function(markup) {
reply_box.text(markup);
reply_box.attr('disabled', '');
}
}

Incidentally I noticed you're using raw Javascript instead of Jquery - is that to make pyforum more light weight?


There is also suport for [ b ]Bold[ /b ], [ i ]Italic[ /i ] and [ u ]underline[ /u ] (Which I should remove but what the heck)..

You've already implemented most of the BBCode markup, which many people are already used to. So I reckon you should keep them.


Thanks for the comments richard, you're the first member that has taken a look at the actual code (and talked about it), all comments are appreciated..

Thanks very much for giving away this great app!
By: Speedbird
Rank: Starfleet Lieutenant
Postings: 61
From: Camas, Washington
Posted: Fri, 24 April, 2009 - 07:59 PM

Incidentally I noticed you're using raw Javascript instead of Jquery - is that to make pyforum more light weight?

That's correct, I wanted to use a minimal approach to start then the addition of the goodies

As far as the BBCode I need to add them say, next to the emoticons, a "helper" or "wizard" to add them automatically in the reply box, but that's a minor thing..

Thanks very much for giving away this great app!

My pleasure, I am a firm believer in Open Source, and python in particular, in fact every place that I've worked for, my open source "projects" have been a major decision maker for my employers to end up hiring me biggrin

Cheers,

-- sb
By: richard
Rank: Starfleet Ensign
Postings: 17
From: Australia
Posted: Sat, 25 April, 2009 - 07:27 PM

From: Speedbird
My pleasure, I am a firm believer in Open Source, and python in particular, in fact every place that I've worked for, my open source "projects" have been a major decision maker for my employers to end up hiring me biggrin


That's fantastic.

I came across one of your previous projects http://www.zforum.org/, which offers similar functionality to pyforum but is based on Zope. How did development of the forum in web2py compare to zope?

Richard
By: Speedbird
Rank: Starfleet Lieutenant
Postings: 61
From: Camas, Washington
Posted: Sat, 25 April, 2009 - 10:33 PM

Interesting question, it is said that Zope programming (Zope2, that is), is the least "pythonic" of all the python development framework, there is a lot of "black magic" happening in zope, for example, you need to be aware that your "application" (called Products in Zope2) will use the entire Zope machinery such as Authentication, Acquisition, authorization and so forth, as a developer, you "have to" rely on them much the way as developing in the microsoft .Net platform for example, you have to drink the kool aid no questions asked.

Though the functionality of zForum is very similar to pyForum, they are two very different beasts, I'd say that about 15% of the code in pyForum was borrowed from zForum, take a look for example to the authentication/authorization mechanism in pyForum, I ended up rolling my own, which is surprisingly similar to web2py's own, and I can honestly say that nothing was "borrowed" from web2py, I poked inside web2py innards just to see in what way authentication and authorization was being handled, and made a very small, but effective module that makes pyForum its own "unit" (I have the source code posted in my blog at http://www.julioflores.com/zblog/blog/view/15). In Zope, I had to rely on external add-ons for authentication (which made the product depend on MySQL as the only RDBMS supported), and another external add-on to handle form authentication, and so on, yes you can "code" all the stuff yourself, but that means spending extra 3 months coding these parts.

Now don't get me wrong, I respect Zope a lot, in fact, I think ZPT (http://en.wikipedia.org/wiki/ZPT#Zope_Page_Templates) is in many ways superior to all the mark-ups around, but I am really sad that Zope has taken a very different approach with a brand new, extremely hard to adopt paradigm that literally made me start looking around for something new (and guess what I found cool).. I coded in Zope (along with python for other projects) hands on for 10 years, web2py was a welcoming breath of fresh air.

Coding in web2py was (still is) fun, I enjoyed developing it, because almost everything is pure python, I guess that it all comes down to that, during the development cycle of pyForum (that took about 3-4 weeks) I had one Browser opened up on zForum (the UI, not the code itself), and in another "workspace" I had all the pyForum stuff, I basically developed it that way, checking out the functionality of the former and applying it to the latter while at the same time optimizing it or changing old paradigms, etc.

Sorry for the long post, hope you're still awake lol I just thought it was a good post to describe the "similarities" between both products, thank for bringing it up Richard.

Regards,

Julio
Welcome
Username:
Password:
 
Quick Search:
System Announcements
Latest Posts