I'm pleased to announce the first public release of El Dorado: a full-stack community web application written in Ruby/Rails.

The app features a forum, community event calendar, shared file storage, and a randomized header image gallery.

It can import content from existing sites running PunBB. The forum is somewhat modeled on PunBB, and is nearly feature complete.

I've been using this app in production since late July '07. The setup/administration process still leave something to be desired, but the end-user functionality is quite well tested.

http://almosteffortless.com/eldorado/

In terms of PunBB features, I don't think the power-user will be fully satisfied. There not much in the way of user administration tools (post throttling, ip-banning) and some major features are still not implemented (subscriptions). However, the basics are pretty solid, and the regular users of my small forum have been satisfied for a while now.

For those PunBB users who are thinking of learning more about Ruby/Rails, I'm hope this will be interesting.

Please have a look and let me know what you think!

Thanks!

Thanks, Smartys. I wasn't quite sure where to put this.

I'm not happy about it either, elbekko! I was wrestling with the topics page for a few hours one day, and then I just gave up and moved on to more important things. I plan on going back and cleaning that page up at some point, though. Honestly, there's definitely a lot of work needed in terms of the html/css. Anyway, I'm more than happy to accept patches!

For the last 3 years or so, I've been running a site that centers around PunBB for a few of my friends. I added some stuff like file uploading and a random headers thing with some crafty integration with WordPress, but that got really frustrating after a while.

Between Jan-May of this year, I started learning Ruby/Rails, and I decided that I should work on a project ? because I think that?s the only real way to learn something. Sure, reading books is great, but I think it?s better if you?re working toward a goal.

So, I started working on an app to replace my PunBB installation, and to bring together all of the bits and pieces I'd been cobbling together around the forum.

Before I say anything else, I want to say a big thank you to Rickard & Co. I would have never been able to get this thing running without PunBB to look to. I also would have never been in the position to try to write an app like this had it not been for the success that was my little PunBB installation. Personally, I think PunBB is one of the best open source apps I've ever come across, if not the absolute best.

Anyway, I had considered trying to work with Beast, the popular Rails forum, but given the 500 line code limit at the time, and the intentionally specific target ? a simple forum app ? I decided to strike out on my own. I don?t intend for this app to be as focused as Beast, or to be a ?rails replacement for punbb,? for that matter. I?m thinking of it more as an app for running a ?community site,? meaning I?d like to add more major features, which you can glean from the future enhancements list below.

So, I got my pet project ? El Dorado ? finished up enough (when is anything ever truly finished?) to launch last weekend. So far, things are looking pretty good. I successfully imported an existing PunBB database from the forum I had running, and I also grabbed all of the user-uploaded files, etc. The resulting database has around 35k rows, and it?s been up and running without any major problems for a week now. The best part is that my ?loyal user base? ? of 15 people or so ? has found little to complain about so far. Rejoice!

You can check the live app out, and you can also checkout (as in ?svn co?) the app if you?re interested in playing around with it. Since I created this app to replace an existing site, you?ll notice right away that there?s some obvious stuff missing ? in particular, there?s no way to create new forums. I suppose I?ll do that when somebody says to me ?hey, Trevor, how do you make a new forum with this stupid thing?? But, until that day?

El Dorado: http://code.google.com/p/eldorado/source ? the code
NewAthens: http://newathens.org ? the live site running on the code
PunBB: http://punbb.org ? the php forum app that the code is replacing

Known Issues: http://trevorturk.backpackit.com/pub/972326
Future Enhancements: http://trevorturk.backpackit.com/pub/972338
Refactoring Ideas: http://trevorturk.backpackit.com/pub/1150742

My weblog and support forum: http://almosteffortless.com

I?d absolutely love to get some feedback about this. It?s very easy to download and get up and running, simply have a look at the README file.

Thanks!
- Trevor

Could you use some fancy javascript to automatically set the img width & height, then? That would be ideal, I guess, because you could restrict the width in the same way that max-width does, but you could preserve the image quality if you also adjusted the height.

Hey Paul, yeah - I'm the same Trevor as on Slicehost, and that's running on a Slice. Sorry if you've been subjected to my whining questions on 2 forums now!

That site is running an import of a PunBB install that I'm running for my friends, which is on 1.2.15. I was thinking of trying to upgrade that PunBB install to 1.3 and then importing from that, mainly for the UTF stuff. I haven't looked at what else is different in the database just yet, but there's the first_post_id at least.

I didn't directly port the PunBB css over, I just eyeballed it and wrote new stuff. I'm a fan of really short css files, so I tried to be as sparse as possible in that sense.

Yeah, and Inconsiderate Bastard Posting Big Images, or IBPBI, has been plaguing me for years smile

I'm hoping to use that attachment_fu plugin to automatically re-size images for posting in the forum, but I also see that you guys at PunBB have figured out how to restrict image sizes with some CSS trickery, which might work just fine as well. Otherwise, I don't know what max width I would set. I've got basic css-only theme support, so people could widen out the page and then complain about having their images restricted to whatever I chose.

I agree that the look-and-feel of Beast is quite nice. Personally, I prefer the way PunBB looks, though, which is why I've ported that look over to my Rails app. Actually it's a mix of K2 and PunBB styles, but I think it works quite nicely.

I have a testing version live here: http://newathens.org:8000/forum - I haven't tested with IE at all, though, and the way I'm doing the threads is table-based, which really really really needs some fixing.

If anybody who happens to read this happens to know their way around the PunBB-way of doing thread displays and also happens to want to help me out, I'd sure appreciate it! smile

Thanks very much for your reply, Rickard. I think I'm going to try importing into my app from a PunBB 1.3 database, even thought I know things aren't 100% finalized yet. I'll give the update script a try (http://blog.punbb.org/2007/03/13/the-new-update-script/) and post some feedback in the forums specifically about that.

Thanks, elbekko.

I'm not trying to ask this question as a "when is PunBB 1.3 coming out" sort of thing, because I know the answer to that smile

However, I was wondering if there are any more likely candidates for PunBB 1.3 database changes. I completely understand if there's no good answer for this, but I figure it's worth asking if you developers are considering anything else at this point in time.

The reason I'm asking is because I'm working on an open-source Rails forum, and I'll be importing from an existing PunBB database. I was thinking of running the 1.3 database converter on my 1.2.15 database to bring it up to 1.3 (roughly, at this point, I know) before importing into my app, and I'm trying to figure out if that's a silly idea. If the database conversion stuff is _mostly_ done, though, perhaps it would make sense. That way, I could be making an import feature that won't be out of date when 1.3 comes out. Plus, I would love to take advantage of the UTF8 stuff that you guys have been working on, just to pick one interesting item.

If anyone who happens to be reading this is interested in Rails and PunBB, then please have a look at my little project: http://eldorado.googlecode.com/svn/trunk/ - This project was born out of my desire to learn Ruby/Rails, and I hope it doesn't seem like I'm trying to poo-poo PunBB. I think it's a fantastic app, and I couldn't have possibly gotten so far with my project without PunBB and the PunBB-inspired Beast forum in Rails (http://svn.techno-weenie.net/projects/beast/).

Is there an "easy" way to know what database changes have been made for PunBB 1.3? Perhaps there's a wiki page somewhere, or maybe one of the developers knows offhand...? I can look through the databases myself, no problem, but I thought I'd try and save myself the hassle smile Thanks!

That's along the lines that I was thinking. I just figured it was worth asking. Thanks!

I was just wondering if somebody could talk a bit about Changeset 969:

http://dev.punbb.org/changeset/969

Added a new column to the topics table, first_post_id. As the name suggests, topics now store the ID of their first post. News scripts and such should benefit greatly from this change.

What are "news scripts" and why would they benefit from this?

I'm not opposed to the change or anything - just curious smile

Thanks!

Yeah, that must be the one I was thinking of (http://punbb.org/stuff/extdemo/). I'll hold off - thanks for the help!

Just wondering if there is any progress on this front. I'm excited to try and write an extension smile

I swear I saw an example extension floating around here a while ago, but I can't seem to find it now.

15

(62 replies, posted in News)

Great news. I'm very excited smile

I solved my issue with including the punbb functions. Here's the code, in case anybody else runs into this problem:

define('PUN_ROOT', './forum/');
global $db, $pun_user, $pun_config;
require PUN_ROOT.'include/common.php';

The problem was not having the $db, $pun_user, and $pun_config variables globalized.

Thanks Smartys. You're right, I'll put in a ticket on Wordpress to change that function, too. I was just thinking it'd be easier to get something changed in PunBB than the other way around. Not that I don't love Wordpress, but I don't think I've ever gotten a ticket through there.

I'll leave that stuff in I s'pose. I'm just trying to be careful and do things the best way possible - e.g. avoiding duplicate code and overly complicated stuff. Thanks for the reply. I post back here when I make more progress.

Ha! http://punbb.org/forums/viewtopic.php?pid=77662

Thanks, Rickard!

Umm... So, I've managed to make a page to log into PunBB from within a Wordpress theme. This is not so terribly hard, but it wasn't exactly "easy", either. The next step, of course, would be to make it also log you into Wordpress. Before I get that far, I thought I'd share the code.

If someone is interested in this and knows what's what, please have a look and let me know if I'm doing something in a silly or otherwise non-smart way:

http://www.newathens.org/files/punbb_wp_login.txt

Clearly, this doesn't take into account password resets, etc, and bad passwords are dumped in a funny way. What I'm trying to get done is logging into PunBB cleanly, and then I'll add in the rest.

Perhaps, for example, I don't need to leave in the stuff updating the status of the user, etc. I figure it's not a bad idea to leave it in there, though. I could, I suppose, try and sneak another feature by Rickard and see if he'd turn all of the actions taken at login into a function - that way, I wouldn't need the code in here. I dunno, I'm just rambling now. I'm working on logging into Wordpress AND PunBB now, so I'll post my progress on that when it's functional.

P.S. - If you'd like to use this code, just make a "login.php" file in your current Wordpress theme directory, and then make a Page which uses that "template". I made a Page called "Login" and left it blank, telling it to use Login as the template.

Hip! Hip! Hooray! Thanks so much, Rickard!

I'd like to request that the unregister_globals() function be renamed to something like punbb_unregister_globals() or what have you due to a clash with Wordpress functions. I'm trying to integrate the two, and I've got to edit the Wordpress wp-settings.php file to avoid the clash, and it would be nice to not have to do that. I don't think this is any more a PunBB thing than a Wordpress thing, but I feel like I've got a better shot of getting this change made in PunBB, so I thought I'd ask. Thanks!

... Suddenly, the include is working... ! I'm not sure why, though, which is a bummer. Anywhoot...!

If somebody reads this anyway - is there a way to put in a "formal" request to get unregister_globals() renamed to something like punbb_unregister_globals() or what have you? I'm editing the Wordpress wp-settings.php file to avoid the clash, but it would be nice to not have to do that.

Anybody...? Bueller...? smile

I'm also wondering if there's a chance of getting the unregister_globals() function renamed so as not to conflict with Wordpress. I know that's an odd request, but it's going to make it impossible to link the 2 programs without changing the core files of 1. Is there a place to leave tickets? I don't see how to log into Trac.

I'm still not able to get this working. It seems that I'm loading the punbb functions properly, but it's just not working as expected. Please let me know if you've done this successfully and might be able to help. Thanks much.

24

(18 replies, posted in PunBB 1.2 troubleshooting)

i'm having a similar issue:

http://punbb.org/forums/viewtopic.php?pid=77454#p77454

i'm trying to run punbb functions from within a wordpress theme and i'm getting this error:
Fatal error: Call to a member function on a non-object in /home/.turgo/newathens/newathens.org/forum/include/functions.php on line 110

due to this code:
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';

if i use this code:
define('PUN_ROOT', './forum/');
global $db;
require PUN_ROOT.'include/common.php';

i get this error:
There is no valid language pack '' installed. Please reinstall a language of that name.

it's very odd - and i'm not sure what to do. i'm running the latest version of punbb and wordpress - and i do have the language pack English installed. and i checked my punbb config and it says i'm using english. if anyone has any ideas, i'd really appreciate it