Jump to content

Ipb 1.2 / 1.3 On Php5


Recommended Posts

If you are still running these depreciated versions of Invision Power Board, you will need to make the following changes to run them on PHP5.

 

 

Symptoms of this problem

 

* Blank 'My Controls' page

* Blank 'Profile' page

* MySQL errors when reporting post

* MySQL errors on 'The Moderating Team' page

 

Files affected

 

* sources/Profile.php

* sources/Usercp.php

* sources/misc/contact_member.php

* sources/misc/stats.php

 

Step 1

BACKUP YOUR FILES!

 

Step 2

Open sources/Profile.php

Find:

>var $parser;

 

Change To:

>//var $parser;

 

Save and upload sources/Profile.php

 

Step 3

Open sources/Usercp.php

Find:

>var $parser;

 

Change To:

>//var $parser;

 

Save and upload sources/Usercp.php

 

Step 4

Open sources/misc/contact_member.php

Find:

>var $email	 = "";
  var $forum	 = "";
  var $email	 = "";

 

Change To:

>//var $email	 = "";
  var $forum	 = "";
  var $email	 = "";

 

Find:

>$DB->query("SELECT m.name, m.email, mod.member_id FROM ibf_moderators mod, ibf_members m WHERE mod.forum_id='$fid' and mod.member_id=m.id");

 

Change To:

>$DB->query("SELECT m.name, m.email, moder.member_id FROM ibf_moderators moder, ibf_members m WHERE moder.forum_id='$fid' and moder.member_id=m.id");

Save and upload sources/misc/contact_member.php

 

Step 5

Open sources/misc/stats.php

Find:

>//--------------------------------------------
// Do we have any moderators? NORMAL MODS 1st
//--------------------------------------------
  
$DB->query("SELECT m2.id, m2.name, m2.email, m2.hide_email, m2.location, m2.aim_name, m2.icq_number,
				   f.id as forum_id, f.read_perms, f.name as forum_name, c.state
			FROM ibf_moderators mod
			  LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
			  LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
			  LEFT JOIN ibf_members m2 ON (mod.member_id=m2.id)
			");

Change To:

>//--------------------------------------------
// Do we have any moderators? NORMAL MODS 1st
//--------------------------------------------
  
$DB->query("SELECT m2.id, m2.name, m2.email, m2.hide_email, m2.location, m2.aim_name, m2.icq_number,
				   f.id as forum_id, f.read_perms, f.name as forum_name, c.state
			FROM ibf_moderators moder
			  LEFT JOIN ibf_forums f ON(f.id=moder.forum_id)
			  LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
			  LEFT JOIN ibf_members m2 ON (moder.member_id=m2.id)
			");

Find: (this edit doesn't show up in 1.2, so if that's your version then you should be able to skip this step)

>//--------------------------------------------
// Do we have any moderators? GROUP MODS 1st
//--------------------------------------------
  
$DB->query("SELECT m.id, m.name, m.email, m.hide_email, m.location, m.aim_name, m.icq_number,
				   f.id as forum_id, f.read_perms, f.name as forum_name, c.state
			FROM ibf_moderators mod
			  LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
			  LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
			  LEFT JOIN ibf_members m ON ((mod.is_group=1 and mod.group_id=m.mgroup))
			");

 

Change To:

> //--------------------------------------------
// Do we have any moderators? GROUP MODS 1st
//--------------------------------------------
  
$DB->query("SELECT m.id, m.name, m.email, m.hide_email, m.location, m.aim_name, m.icq_number,
				   f.id as forum_id, f.read_perms, f.name as forum_name, c.state
			FROM ibf_moderators moder
			  LEFT JOIN ibf_forums f ON(f.id=moder.forum_id)
			  LEFT JOIN ibf_categories c ON(c.id=f.category AND c.state != 0)
			  LEFT JOIN ibf_members m ON ((moder.is_group=1 and moder.group_id=m.mgroup))
			");

 

Save and upload sources/misc/stats.php

 

 

Source: http://forums.invisionize.com/index.php?showtopic=73882

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...