Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




How To Hack PhpBB?


Well the title might be a bit misleading:
Some time ago I was trying to reverse engineer the authentification
system in phpBB because I was building a community site in which there
was a phpBB Forum integrated as central component. The idea was to give
the users the possibility to log in once and then move on the entire
site without having to bother about login again.
It didn't go very well, I was able to use the login data and some other
stuff, but the autologin stuff didn't work and in some cases my login
attempt was just refused.
Now my question is: is there any good resource on how to integrate
phpBB into community sites (or better, build community sites around
phpBB).

This includes:
- Login system
- Autologin system
- Profile data
- Using polls from phpBB outside phpBB
- Using threads as News (and subsequent answers as comments)




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
VB Hack Login.
I'm using a hack from vb so you can login on a web page other than the forum, it also has options so when loged in it displays this and when loged out displays this. Code:

HACK : Mixin In PHP5
There are still some curious effects, but I'm pretty satisfied by the
results, since PHP is not very flexible.

Let me know what you think, I'm looking into talking about somethin ;)

---------
<?php
/*
* AUTHOR : Created on 5 janv. 2005 by Jonas Pfenniger
* LICENSE : You are free to use this code
* DESC : Mixins are pretty similar to multiple inheritance. The
goal is to
* add capabilites from a class to another class or instance.
* I don't know what it's usefull for, but I'm sure you'll find out ;)
* Because of the limitations of the PHP language, I was not able to do
some
* things, but it was fun to find workarouds where it's possible..
*
* This hack was inspired by the Ruby language, who supports mixins
natively
* See: http://www.ruby-lang.org and http://www.rubyonrails.com
*
*/

/**
* Mixin : allow to inheritate methods and properties of multiple
objects
* - Limitations :
* - Cannot inherit __get and __set
* - Reflection does not show the new methods
* - Some behaviors are still weird
*/
class Object
{
/**
* Contains class_name => instances
*/
private $mixin_objects = array();

/**
* Contains method_name => calling code
*/
private $mixin_methods = array();

/**
* For the tests
*/
public $hoi = 0;

/**
* Method and variable mixing
* @var string A class name
*/
public function mixin($class_name)
{
if (!class_exists($class_name))
trigger_error("Class name $class_name is not loaded", E_USER_ERROR);
if (array_key_exists($class_name, $this->mixin_objects))
{
trigger_error("Mixin $class_name allready registered");
return;
}

// Variable argsnum on constructor
$args = func_get_args();
$c = 'return new '.$class_name.'('
for($i=1; $i<count($args); $i++)
{
$c .= '$args['.$i.']'
if ($i < count($args) - 1) $c .= ','
}
$c .= ');'

// Create instance
$x = eval($c);
if ($x instanceof MixinChild)
{
$x->setMixinParent($this);
}
$this->mixin_objects[$class_name] = $x;

// Link methods
$refl_class = new ReflectionClass($class_name);
$refl_methods = $refl_class->getMethods();
foreach($refl_methods as $refl_method)
{
// TODO : Inherited methods should not be added

// Do not private and protected methods
if ($refl_method->isPublic())
$this->mixin_methods[$refl_method->getName()] =
'$this->mixin_objects['.
$class_name .
']->'. $refl_method->getName();
}

// Link parameters
foreach ($x as $k => &$v)
{
if (!isset($this->$k))
$this->$k = &$v;
}
}

/**
* Method overloading
* @var string Method name
* @var array Method arguments
*/
public function __call($method_name, $args)
{
if (!array_key_exists($method_name, $this->mixin_methods))
{
trigger_error("Method $method_name does not exist");
return;
}

$c = 'return '. $this->mixin_methods[$method_name] .'($args[0]'
for($i=1; $i<count($args); $i++) $c .= ',$args['.$i.']'
$c .= ');'

return eval($c);
}

How Do You Hack Mail() To Get Around Outlook's Removal Of Line Breaks
Outlook has a default setting that removes certain line breaks (
) from text messages. This setting can be found under tools > options > email options > 'Remove Extra Line Breaks In Plain Text Documents' (for Outlook 2003).

This is problematic because I need WYSIWYG input areas for clients to set how their email will look. Microsoft really should have never violated the WYSIWYG rule for text email.

If you want to try this for yourself, use php mail() to mail yourself the following sample text :

$msg = "This is a sample sentence
---Sample sentence number 2
---Sample sentence number 3 Sept 2005 each
---Sample sentence number 4";

When I receive this email in outlook, the line break after ‘each’ is clipped making the email look like a mess (unless I uncheck line break setting in outlook).

Microsoft even talks about this bug here : url

Does anybody know of a way to send php text messages without encountering this issue. That or does anybody know the exact algorithm Microsoft uses to determine when and when not to clip new lines?

Phpbb
for those of you who are familiar with it: what do I do with the phpBB file once I have downloaded it??

Help On Editing PHPBB
I do manage a website and it includes a PHPBB forum, obviously placed at /forum (¿why to use a weirder path? :P). The thing is that my site is more than a forum, it has more content. I have menus almost everywhere, it's very navigable; but if you go into the forum, you can only get back to the other sections of the site using the back buton or removing everything starting from /forum in the address bar. Of course, this doesn't fit my site's philisophy, which is almost to put menus even inside the menus in every page, so you can go from everywhere to everywhere... I hope you cacth it. I've noticed that it shows the domain and title I put in the admin panel. Well, what I'd like to do is to make this text link to my homepage, placed at /index.php or simply /. The problem is that I'm completely lost when trying to do something in PHPBB's source files. I don't know which file should I edit, nor where should I add the code. These files are a code labirynth for me, and I need to edit them to fit my site's needs.

PhpBB Nesting?
Is it possible to configure phpBB to display threads "newsgroup style"?
What I mean by this is to show replies to the top level post indented
in a tree structure. One thing I cannot stand about phpBB is that all
replies to a top-level topic are in a long train. You never know if
somebody is replying to the person before him or the original poster,
etc. If not, does anybody know another open source forum tool that
does this, besides mwforum?

Phpbb And Php Pages
I have a phpbb message board that I am using. I also have some pages I created that use HTML and PHP. I am curious if there is someway for me to use the login inside the phpbb to use as a login to my other pages. Is there an easy way to have these 2 integrated so that they can only access either one if they are logged in? Or will I have to set up a separate loging for my other PHP pages?

Phpbb Login
We run a medium sized website that hosts a phpbb forum. We want to create a custom login/logout script, and I have tried really hard to decrypt the phpbb code but find it really difficult.

Does anyone have a basic login/logout script that works with the phpbb database? So writing the sessions/cookies etc.

I want to be able to create a single login/logout page where i process everything - ie: set sessions/cookies for login (but finding it hard to work out what values/names to set).

PhpBB Login
i'm currently using the following code to place a phpBB3 login box anywhere on my website. As you can see, it uses the phpBB3 "ucp.php?mode=login" code to process everything.

Is there a way that I can send the form data to "ucp.php?mode=login" and then KEEP all the post data and redirect it to a new page to use the post data again?

Here is the code:

Adding Users In PhpBB 2.0.x
I've been looking through the phpbb2.0 forum looking for tips on how
to add a user without using the registration form. While phpbb 3 seems
to have a simple way, the 2.0 search turned up empty.
I've tried adding users via php, into the phpbb_users table, but these
users cannot login - they get the error message 'You have specified an...

PhpBB Pagination Error -
I've got pagination errors in a phpBB board. Some forums are showing "page 1
of 0". Previous enquiries both here and at the phpBB forum have given me
half-answers, the latest of which contained this advice:

For each forum in phpbb_forums:

-) Get the number of posts that belong to a forum from phpbb_posts
select count(*) as count from phpbb_posts where forum_id=$forum_id
update phpbb_forums set forum_posts=$count where forum_id=$forum_id
-) Get the number of topics that belong to a forum from phpbb_topics
select count(*) as count from phpbb_topics where forum_id=$forum_id
update phpbb_forums set forum_posts=$count where forum_id=$forum_id

I understand that I have to enter some of this code into phpMyAdmin to
correct the error in the MySQL database - but I don't understand how! I've
tried copying and pasting the uncommented lines into the "queries" box in
phpMyAdmin, but I get syntax error messages back which I can't fathom. (I'm
not even sure whether I'm entering them into the right place.)

I'm running:

phpBB 2.0.6
phpMyAdmin 2.5.4

My ISP is running:
MySQL 4.0.15a
php 4.3.2

If anyone can provide an "idiot's guide" to correcting this problem I'd be
most grateful. I've been trying since the middle of December to fix it!

PhpBB Installation, Permissions
Just a quick item of note:
Installation Guide says: chmod -rw-rw-rw- config.php

Most often this would be done using an FTP client.
I have been unable to do this, and assume its because the dir does not
have 'w' set for group, other. I know when creating dir's on a Unix
host, the dir takes on the permissions of its parent. I'm also
guessing that its rare for "htdocs" directories to have 'w' set and to
do a chmod for config.php requires changing every dir on the tree.

I also noticed some hosts have installers or fantastico to install
phpBB.
Is there any difference, compared to doing it manually ?
Any comments ? ( I know this isn't specifically a PHP question;
didn't know a better group )

PhpBB Database Requirements
I'm looking into setting up a forum for a client's website. phpBB and Invision Power Board seem to be the two most popular. For the moment I am starting with phpBB because I don't like the "free trial" language on Invision's site.

I'll be setting up phpBB with MySQL. Does it require its own database, or can I use an existing MySQL database that already has tables in it?

PhpBB And Wordpress Template
I have created a template for my site and now I want to use the same template
for phpBB and wordpress, please help me that is there some specific way to
slice the template for phpBB and wodpress or there is some other method...

Converter For PhpBB To VBullettin
I want to convert an existing site in phpBB to Vbullettin.Is there any
converters available for the same.Please let me know more about this as
this is an urgent requirement

PhpBB And Displaying Images
I need to add upload functionality of images to phpBB 1.4.4. I have decided to have the images upload directly into mysql as binary data. I have been succesful in adding upload code into phpBB to allow it to upload images. What I am having a problem with is displaying those uploaded images on the viewtopic.php page.

I have taken a look at the tutorial on phpbuilder that talks about uploading and viewing binary data in mysql and I have followed the examples.

here's the link if interested:
http://www.phpbuilder.com/columns/florian19991014.php3

So basically this tutorial has the user create another file that will be called to grab and format (with proper header info -- image/gif) the image and send it back to the relevant page. So within my viewtopic page - where I want the image to appear I provide the following code. post_id is a parameter that tells getdata.php where the image field is located for that record. PHP Code:

PhpBB Sites Hacked.
The phpBB sites are hacked. If you search for "HACKED BY CYBER-ATTACK"
on msn.com you will get a list of all the sites hacked.

Anyone knows what is the way to clean this up ?

Php,PhPBB,Apache,MySQL,Linux
The problem is that i must run a BulletinBoard like Helpdesk program. Somebody else made this program. but in the vacation the shutted down the linux server. Now the Database doesn't work anymore.

The error he gives is:

phpBB : Critical Error

Could not connect to the database

I installed al programs again (Apache,Php,MySQL). And then i put back the backup from the database/phpBB program. I already asked some people and they say it is maybe the link between the database and the MySQL.

Phpbb Directory Permissions On Windows?
What should the directory permissions look like on the various folders in a typical phpbb install? I was looking at a server today that had phpbb installed on a box with IIS installed on it and many of the folders had read,write and modify flags set for the IUSR_MACHINENAME account. Im thinking this should be changed to read-only.

PhpBB Automated Module Installation
I hope this is the right forum for this post. Does anybody know if a program already exists to automate the process of installing phpBB modules? I couldn't find one, so I was going to write one; but I don't want to if one exists. It kind of seems like there might be one already, looking at the way the installation files are formatted. It's really annoying to me that they don't pass out diff patches along with the module instructions.

Parse Error In Phpbb Registration
I keep getting this error:

Parse error: parse error, unexpected $ in /........./phpBB2/includes/usercp_register.php on line 1401

Here is around the lines (1401) in question, I'm pretty new to all this so I'm not sure what to look at or do, any help would be appreciated, considering I can't register any new users until I get this figured out. Here is the lines in question:

[MySQL] PhpBB Not Displaying Topics
Yes, I know there exists a suport forum for discussion about problems
with phpBB, but noone there seems to know the solution to my problem...
so I ask here.

I've been messing around with phpbb_ tables in my database... I'm trying
to convert a incomplete Ikonboard forum to phpBB, and had to do lots of
stuff manually (which is fine as I'm familliar with MySQL). And, now I'm
stuck and can't figure out the problem...

The forum in question is:
http://fly.srk.fer.hr/~nick/remorkeri/phpBB2/

The situation is this:
a) from the outside:
On index.php I can see numer of topics, number of posts and info about
last post. On viewforum.php I get "There are no posts in this forum.".
b) from the inside:
select post_id, topic_id, forum_id from phpbb_posts;
returns a whole bunch of everything, so this table seems OK.

select post_id, post_text from phpbb_posts_text;
same thing.

select topic_id, forum_id, topic_title from phpbb_topics;
same thing.

So, form the inside everything seems nice. So, why viewforum.php doesn't
see the articles? I tried to figure out the PHP code, but couldn't,
haven't got all the time in the world...

PHPNuke To PhpBB Integration Question
I have a standalone phpBB forums and just recently installed
PHPNuke on my website. I know phpnuke comes with it's own version of phpBB.

How can I make it possible for members who register through phpnuke to
automatically be register with my standalone phpBB?

If this is not possible, how can I transport my standalone phpbb to the one
that is included with PHPNuke?

Webpage PhpBB Login Integration.
On my website i have a login username/password box i have it when you enter your login details it'll log you into the forums. When no ones loged in theres no problems but when someone logs in i get the error on my index page

QuoteWarning: Cannot modify header information - headers already sent by (output started at /home/adaminc/public_html/index-test.php:5) in /home/adaminc/public_html/forums/includes/sessions.php on line 254 Code:

Phpbb Auto Increment Question?
Is anyone familiar with the way phpbb works in terms of adding a new user to the database. If i am right it doesnt seem to auto increment?

When a new user registers fir my site, I also have an sql insert into the phpbb_user table too so they can then logon to the forum.

But the id seems to go in as just 0 and wont increment! Is there any reason for this?

Variable Being Passed From Site Into PhpBB
I am creating an autologin feature where my site members are logged into the bulletin board automaticly

the only variable I find that is global is $sAuth

it stores the members id #... I can user this to pull the name and password out of the database and set name and password in the forum to eaqual these... is this a security issue?

or can $sAuth only be set by script on my site??? I am rather new and want to make sure this variable can not be asigned in another way.

Linking A Page With Phpbb Forum
iv been trying to do this for a while, link my website users with phpBB forum users so they only need to register once. Now someone was kind enough to give me this code to get the users information: Code:

Upload Phpbb, Instead Of 1 File At A Time?
It says i have to upload the whole folder to my server, and im using cpanel so i have to do it like a few files a time, how do i upload the whole folder at once? is their a way of uploading a zip and extracting it to my site, or is their a way on ftp i can do this?..

PhpBB Classified Ad Extention Installation
Trying to install the phpBB classified ad extension for phpBB.

Getting the following error/s


Warning: include(./language/lang_english/lang_main_ads.php) [function.include]: failed to open stream: No such file or directory in /home/namibiac/public_html/ads_mod/ads_common.php on line 37 ...

Deleting User Account With PhpMyAdmin And PhpBB
I've got phpBB v2.0.4 (message board) running and I'd like to delete an account. The problem is...I've never used phpMyAdmin before and I'm a bit stuck.

Show Postings From A PHPBB Forum On Another Page
I want to show the 3 latest threads in a phpbb forum on another php
page, but as I completely SUCK at PHP,

Form To Post Into A Hidden PHPBB Forum
I'm trying to make a PHP/HTML Form that after it was finished being filled out, and was submitted, it would post it in a hidden forum that only administrator on the forum could view. I'm not 100% sure if this is even possible, but if it is, how hard would be to accomplish?

Adding An Affiliate Tracking Code To Phpbb Forum.
I am currently running phpBB 2.0.22 with current updates. I am trying to integrate an affiliate tracking code to track new registrations. The current code is:

<!--START SoAndSo.Com CODE-->

<script language="JavaScript" type="text/javascript"  
 src="https://www.soandso.com/affiliate/trackingcode_sale.php?mid=12&sec_id=M_129eJ5kN3vD8uF&sale=<?=$USERNAME?>&orderId=<?=$EMAIL?>">
</script>

<!-- END SoAndSo.Com CODE -->

I do not know if i am using the correct varaibles "EMAIL" & "USERNAME" and i do not know what page to place the code in so that it can grab these variables.


Copyright © 2005-08 www.BigResource.com, All rights reserved