EzDevInfo.com

phpbb

phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2. phpBB • Free and Open Source Forum Software phpbb is free and open source forum software that is easy to use, powerful, and highly customisable. our community offers extensive support to end users.

Membership Provider based on PhPbb database

I am just wondering how to go about implementing a forms Membership provider based off of a PhPbb forum database. I have looked at simply hashing the password using a function port of 'phpbb_hash' and comparing it to the database values, however I can't seem to grasp the login system as the hashes I was getting were not the same as those in the database.

Can someone tell me how to authenticate a users credentials against a PhPbb database?


Source: (StackOverflow)

Configure Amazon SES on PHPbb3

I'm actually looking for how to use Amazon SES on phpbb3. I tried to use the SMTP of ses but this didn't work. Is there another way to do this ?

Thanks!


Source: (StackOverflow)

Advertisements

php - website security using global variable

i was recently browsing some php source code, particularly ones of forum software like phpbb and esotalk

I noticed one thing, most of them used a global variable at the start of their page as some sort of security like so:

if (!defined("IN_ESOTALK")) exit; //For esotalk
if (!defined("IN_PHPBB")) exit; //FOR phpbb

What sort of security is this? I don't understand. Could you explain to me what this prevents and how?

thanks, Vidhu


Source: (StackOverflow)

Handling unread posts in PHP / MySQL

For a personal project, I need to build a forum using PHP and MySQL. It is not possible for me to use an already-built forum package (such as phpBB).

I'm currently working through the logic needed to build such an application, but it's been a long day and I'm struggling with the concept of handling unread posts for users. One solution I had was to have a separate table which essentially holds all post IDs and user IDs, to determine if they've been read:

tbl_userReadPosts: user_id, post_id, read_timestamp

Obviously, if a user's ID appears in this table, we know they've read the post. This is great, except if we have thousdands of posts per day (which is more than possible in the system which is being proposed), and thousdands of users. This table would become huge within a matter of days, if not hours.

Another option would be to track the user's last activity as a timestamp, and then retrieve all posts made after their last activity was updated. This works in theory, but let's say a user is writing an extremely long post, and in the meantime several members also start new threads or reply to posts in other threads. When the user submits his new post, his last activity would be updated, and thus not match those made in the meantime.

Does anyone have experience with this, and how did you tackle it?

I've checked in phpBB and it seems that the system assigns a custom session to each user, and works on that basis, but the documentation is pretty sparse as to how this deals with unread posts.

Thoughts and opinions gratefully received, as always.


Source: (StackOverflow)

How can I integrate users' logins from my site into phpBB?

I need some help with what is probably a newbie question in terms of modifying phpBB.

I have a whole system developed in PHP, and I would like to integrate phpBB so that people can navigate into the forums and post seamlessly, without logging in again.

Now, using the phpBB users table as the users table for my system (and having people register in phpBB instead of in my website) is not possible unfortunately (it'd take more work to redo our system than to build our own basic forum).
I'm assuming I can hack my way into making phpBB believe that a certain user ID has logged in, however, that user won't exist in phpBB's users table (which I'm assuming will cause it to error out pretty much everywhere).

All the tutorials and forum posts I could find implied having phpBB as the primary. I couldn't find anything to do it the other way around.

I'm guessing the only possible way to solve this is by having both tables relatively synchronized.

Now, provided that I can have both users table synchronized, what is the best way to integrate both sites, keeping my site's login and users table as the "primary" ones?
Also, is there anything in particular I should keep in mind when creating records in phpBB's users table? Or is it relatively straightforward to figure out? What tables should I be writing to, if there is more than one?


Source: (StackOverflow)

Converting phpBB BBCode posts to Markdown

I have a phpBB2 forum with posts stored in BBCode. The forum posts are stored like this in the database:

[quote:e5adceb8e8][quote:e5adceb8e8="Person 2"][quote:e5adceb8e8="Person 3"]Nested quote[/quote:e5adceb8e8]Another nested quote[/quote:e5adceb8e8]Some text[/quote:e5adceb8e8]

[b:e5adceb8e8]Some bold text[/b:e5adceb8e8]
[i:e5adceb8e8]italic text[/i:e5adceb8e8]
[u:e5adceb8e8]underlined text[/u:e5adceb8e8]

[code:1:e5adceb8e8]print ("hello world!");[/code:1:e5adceb8e8]

[img:e5adceb8e8]http://www.google.co.nz/intl/en_com/images/logo_plain.png[/img:e5adceb8e8]

[url]http://google.com[/url]

[url=http://google.com]Google[/url]

[color=darkred:e5adceb8e8]
Coloured text[/color:e5adceb8e8]

[size=18:e5adceb8e8]
Big text[/size:e5adceb8e8]

[list:e5adceb8e8]
List Item 1
List Item 2
[/list:u:e5adceb8e8]

[list:e5adceb8e8]
[*:e5adceb8e8]List Item 1
[*:e5adceb8e8]List Item 2
[/list:u:e5adceb8e8]

[list=1:e5adceb8e8]
[*:e5adceb8e8]List Item 1
[*:e5adceb8e8]List Item 2
[/list:o:e5adceb8e8]

[list=a:e5adceb8e8]
[*:e5adceb8e8]List Item 1
[*:e5adceb8e8]List Item 2
[/list:o:e5adceb8e8]

I'm after any tools that could help me convert this syntax to Markdown. Ideally I'd only want to convert the [b], [i], [quote], [url], [code], and [list] tags. It would be preferable to convert the [img] tags to links in Markdown to avoid page resizing problems. Any purely presentational elements such as the [color] and [size] tags would converted to plain text.


Source: (StackOverflow)

Eclipse HTML editor for HTML template files

I'm trying to edit phpbb HTML template file with Eclipse Ganymedes version 3.4.1 containing Web Developer Tools.

These template files contain HTML markup with template variable marks in form {*variable_name*}. Now, when trying to open such file, Eclipse trys to validate also these template variable marks.

For example template contains

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />

After opening Eclipse shows on editor body:

Unsupported Character Body
Character encoding "{S_CONTENT_ENCODING}" is not supported by this platform.
<button>Set encoding...</button>

How to solve this using WTP or is there any better editor for template editing purpose ?


Source: (StackOverflow)

Authenticate user against PhPbb database

Recently I have started implementing a solution which will use a PhPbb database for forms authorization, I have used the class from this below thread:

PhPbb C# Authentication Port

So i wrote a membership provider using this class in the 'ValidateUser' function:

public override bool ValidateUser(string username, string password)
    {
        ForumsDataContext db = Root.ForumsDataContext;
        PhPbbCryptoServiceProvider phpbbCrypt = new PhPbbCryptoServiceProvider();
        string remoteHash = db.Users.Where(u => u.UserName == username).FirstOrDefault().UserPassword;
        if (String.IsNullOrEmpty(remoteHash))
            return false;
        return phpbbCrypt.phpbbCheckHash(password, remoteHash);
    }

However this always returns false as the 'phpbbCrypt.phpbbCheckHash' returns false and I do not know enough about PhPbb to determine why the hashes are not matching up.

Any sugestions?


Source: (StackOverflow)

phpBB3 auto-login

I've integrated a phpbb3 forum to my already existing website.

I've been able to make my registration process add the user to the phpbb db as well.

Now i'm facing a problem where I am trying to get the user to auto-login to the forum when he logs in to my website.

Have anyone here done that? I can't find anything relevant on Google as all posts seem to talk about 'phpbb external webpages' and how you can use phpbb sessions on other webpages. however what i'm trying to do is to initiate a login only when the member logs in to my website, and following the tutorials i found on google will let my users log in to my site when they log in to my forum (which is the other way around).

Thanks


Source: (StackOverflow)

Replicate PHPBB password hashing in ASP.net c#

I'm using phpbb 3.0.8 at the moment. It has 3,000 users and around 60,000 posts. I'm changing the forum to a different one, written in classic ASP (I know people are going to disapprove of this but I have good reasons).

My site is written in ASP.net. The classic ASP forum has an API to connect to it. I've set all this up, and it works fine. I have written my own login form.

I want to copy all the user accounts over. The current forum has the table:

Username | Password |  Hash  |  Salt

I've overidden the classic ASP hashing technique to now use the ASP.net Security.SHA1 hash. The password is stored as SHA1(rawpassword + salt).

My plan is to store new fields along side the current ones:

UserID | Password |  Hash  |  Salt  |  PHPBBHash

When the user logs in, if the PHPBB hashh field is set, it hashes the password with the PHPBB hash. Then, if login is sucessful, it deletes the PHPBBHash field, and creates the current systems hash values. This way, it's a smooth transition over from PHPBB to the new forum, and no one loses their accounts.

My problem is, given a PHPBB hash, a username, and password, in ASP.net c# how can I verify the PHPBB hash? How does it calculate it?

My concern is also that the classic ASP hash function claimed to be SHA1, but it produced different results to Securiy.SHA1.

Edit

I've put a bounty on this if anyone can give me a definitive solution, I appreciate the answer linking to the resources but I'm still struggling to understand it.

Test Case

Raw password:

blingblangblaow222

In PHPBB3 database:

username: Tom
username_clean: tom
user_password: $H$9ojo08A3LuhnkXR27p.WK7dJmOdazh0
user_passchg: 1301433947
user_form_salt: 637f480dfdab84ef

Using the example code from Vishalgiris answer, we do this:

phpBB.phpBBCryptoServiceProvider cPhpBB = new phpBB.phpBBCryptoServiceProvider();
string remoteHash = "$H$9ojo08A3LuhnkXR27p.WK7dJmOdazh0";
bool result = cPhpBB.phpbbCheckHash("blingblangblaow222", remoteHash);
Response.Write("<BR><BR><BR>" + result);

This actually returns true. Super! But does anyone know why this works? I'm baffled, it doesn't seem to take salt into account at all.


Source: (StackOverflow)

Simple Forum Software? [closed]

I'm looking for extremely simple forum software.

Something that simply allows a user to create an account, make a post, and for users to comment on that post.

No HTML, no user profiles, no private message, no bloat. Just software for simple postings. Almost borderline blog software that allows user created accounts.

I've looked at the following software and they have way more features, functionality and bloat than I want:

  • bbPress (close, but even more simple ... and from the lastest dev post, apparrently bbPress is being dropped for a WordPress plugin)
  • Vanilla
  • SMF
  • PunBB / FluxBB
  • phpBB

Does anyone know of any good simple forum software?


UPDATE

I just found an example forum that is great in being simple. It's Street Easy's forum. I'd love to know what underlining software they are using. This is nearly exactly what I want. The only thing I'd remove is that it has "Categories/Tags". I don't need that. If the Category/Tag could be removed, functionality - this is exactly what I want.

UPDATE 2

Still no answers :(


Source: (StackOverflow)

Authenticate phpBB using custom MS-SQL database

How can I let my users to log into a phpBB forum by entering their user credentials while these credentials are stored in a separate MS SQL database?


Source: (StackOverflow)

phpbb3's slow indexing of new messages

I try to found solution to improve phpbb3 new message indexing. I have about 10000 messages on my forum, and each new message adds VERY long time (20-30 sec). I've checked mysql_slow.log and found long queries there which is actually adding message into phpbb3's index.

Do someone have or find any ready solutions?


Source: (StackOverflow)

Best way to get a file from remote server and copy to local server using php [closed]

Let's say there is a file on a remote server that can be downloaded without any restrictions, ie. you can put the direct link to the file in your browser and it downloads the file, for example http://www.remotesite.com/video.avi will prompt your browser to download that file. Using php, what is the best way to grab that file and upload it to my local server without the file being downloaded to my PC at all, which is what happens with phpBB if you put a url in the file upload form? An example of the code needed would also be appreciated. Thanks


Source: (StackOverflow)

How to programmatically log in into phpBB forum?

I have a forum using phpBB. Now i would like to do something like this from source code:

login("user", "password")

How to do this in phpBB?


Source: (StackOverflow)