Firefox PHP

Phorum member system for complete site

Posted by Terradon 
Phorum member system for complete site
June 12, 2011 01:24PM
It seems an easy question and i think it should be an easy answer too, but i just don't see how to use the phorum member system as a membersystem for an whole site?
All questions are about integrating an existing membersystem into phorum, but i just want to try to replace my existing login system by the phorum login system. Our (boardgame)site uses sessions to keep track of user items/game-state and so on.

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Phorum member system for complete site
June 12, 2011 05:11PM
There are various options for that.

One is to include the Phorum framework code, by including common.php. By doing that, you can make use of the Phorum authentication in the same way as the Phorum scripts. Note that in 5.2 you need to chdir() to the Phorum install directory to make this work. In 5.3, it will be possible to include common.php from any script, making this method somewhat easier to use.

The other method, is to use the quick authentication script that Brian wrote. If you search for "quick authentication" on these boards, then you'll find information about that. This script does a lightweight implementation of the Phorum authentication. It takes thePhorum session cookie and uses that to lookup the user data from the Phorum database. This data is stored in a global variable, so you can reference it from your own code.

If you only need to check for the authenticated user, then the quick authentication method is probably best. If you also want to be able to use the Phorum framework, e.g. to store new data for the user in the Phorum database, then it's more useful to include the framework code. Of course, a hybrid path could be useful to, depending on the kind of integration needs that you have.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Phorum member system for complete site
July 17, 2011 10:53PM
Thank you, i will include common.php in my header file, so it will be available through our whole site.
If i understand it well, i can easily use my own forms for logging in, register and sending forgotten passwords?

One more question, phorum uses all myisam tables, while i rather wanna use InnoDB, especially for committing multiple updates, inserts ,delete actions and storing images inside a table.
InnoDB actually does store images not in the table itself, but stores it in its own filesystem and in the table it stores a reference to it. The advantage is, when reading rows in a very large table, it only reads the reference instead all the bits of the image. So storing images in a table won't slow down reading large tables and you still can rely on the database for keeping the integrity of your data (images) on the database .

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Phorum member system for complete site
July 18, 2011 07:01AM
and what is the question about innodb? you can easily convert the tables.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Phorum member system for complete site
July 18, 2011 07:14AM
Like Thomas says, you can convert the tables at will. Only not the search table, which needs to be a MyISAM table because of the full text indexing that is in use for it.

Creating your own login form is possible. Just remember to set the temporary cookie that is normally set by the login.php script in order to prove to the server that the browser supports cookies.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Phorum member system for complete site
July 18, 2011 07:45PM
i was just wondering if their is phorum code which is especially optimized for myisam tables, which could be potentially less for innodb tables. For example: count(*) has a different behaviour in myisam and innoDB (in terms of speed, not result, because they both handle count(*) on a different way. The other example has been mentioned above, about the way these tables store images).

For now, i will convert all tables, except the search table, to innoDB.

Thanks for both answers.

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Phorum member system for complete site
July 18, 2011 08:05PM
I am not aware of any MyISAM-specific code, except for the search table index. The reason for using MyISAM by default is one born from the need for system compatibility, not because we prefer it over innodb.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Phorum member system for complete site
July 19, 2011 07:36PM
it were just a few questions, because i am trying to onderstand the book "High Performance MySQL" from O'Reilly.
Thanks for your answers, for now i know enough:)

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Sorry, only registered users may post in this forum.

Click here to login