[Tool] phpBB 2.0.14 to 2.0.15 Code Changes

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
97
63%
Very Good
15
10%
Good
14
9%
Fair
7
5%
Poor
20
13%
 
Total votes: 153

Feldon
Registered User
Posts: 20
Joined: Wed Sep 08, 2004 1:39 pm
Location: Belgium
Contact:

Post by Feldon » Sun May 08, 2005 11:54 am

Hi

I'm using on my forum BBCODE_BOX just to be able to easy add post,
Flash, VideoAudio and other stuff.
After the update from 2.0.14 to 2.0.15, video and audio doesn't work.

I know that the problem is in 'includes/bbcode.php' cause when I've uploaded
my backuped 'bbcode.php' file, everything works again.

Where is the problem in the changed code ?

Code: Select all

includes/bbcode.php

FIND - Line 127 
2.0.14 Code: 

{
   global $lang, $bbcode_tpl;

AFTER, ADD 
2.0.15 Code: 

   $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);

FIND - Line 197 
2.0.14 Code: 

   // [img]image_url_here[/img] code..
   // This one gets first-passed..
   $patterns[] = "#\[img:$uid\](.*?)\[/img:$uid\]#si";

REPLACE WITH 
2.0.15 Code: 

   // [img]image_url_here[/img] code..
   // This one gets first-passed..
   $patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i";

FIND - Line 210 
2.0.14 Code: 

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";

REPLACE WITH 
2.0.15 Code: 

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";

FIND - Line 619 
2.0.14 Code: 

*/
function make_clickable($text)
{

AFTER, ADD 
2.0.15 Code: 

   $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
Any help is welcome.
Thanks

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Sun May 08, 2005 11:55 am

3Di wrote:
NightriderXP wrote:
deny wrote:Heavily moded board should never be done with easymod but always with hand.

Why? Your statement is illogical, to say the least...

:!:


I suggest you to read this topic very well ;)

http://www.phpbb.com/phpBB/viewtopic.ph ... highlight=

so, you'll understand the reason why.


3Di, you are just incredibly, incredibly wrong. I rarely make extreme statements like that, but as an author of a fair number of very long and complicated mods it really upsets me to see this kind of misinformation handed around. It's attitudes like that that cause mod authors like me to have to spend a ton of time helping people fix errors that are not errors in the mods themselves but rather errors in the way peole install them (errors that easyymopd would never make).

Easymod is invaluable, for virgin boards and for heavily modded boards. I do not beleive your board is any more modded than mine (mine is quite heavily modded). Doing things by hand will not tune you in to where one mod conflicts with another exxcept in the obvious cases where you can't find a line the mod is looking for because it's been changed -- which is exaclty where easymod will likewise tell you about the conflict so that you can fix it before proceeding with the easymod install.

I've been strongly temteped in giving support for my mods to make a rule tthat I will not help anyone until they have tried installing with easymod first. That would cut down on 90% of the support questions I get. I haven't done that (other than this post I really am pretty mild mannered), but it is very tempting.

Please don't spread around this kind of misinformation....it is wrong and is the cause for a lot of wasted time not only among the people installing mods but also fo rhte peopolke like me that support the mods.

User avatar
3Di
Former Team Member
Posts: 13902
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Sun May 08, 2005 12:15 pm

asinshesq wrote:
3Di wrote:
NightriderXP wrote:
deny wrote:Heavily moded board should never be done with easymod but always with hand.

Why? Your statement is illogical, to say the least...

:!:


I suggest you to read this topic very well ;)

http://www.phpbb.com/phpBB/viewtopic.ph ... highlight=

so, you'll understand the reason why.


3Di, you are just incredibly, incredibly wrong. I rarely make extreme statements like that, but as an author of a fair number of very long and complicated mods it really upsets me to see this kind of misinformation handed around. It's attitudes like that that cause mod authors like me to have to spend a ton of time helping people fix errors that are not errors in the mods themselves but rather errors in the way peole install them (errors that easyymopd would never make).

Easymod is invaluable, for virgin boards and for heavily modded boards. I do not beleive your board is any more modded than mine (mine is quite heavily modded). Doing things by hand will not tune you in to where one mod conflicts with another exxcept in the obvious cases where you can't find a line the mod is looking for because it's been changed -- which is exaclty where easymod will likewise tell you about the conflict so that you can fix it before proceeding with the easymod install.

I've been strongly temteped in giving support for my mods to make a rule tthat I will not help anyone until they have tried installing with easymod first. That would cut down on 90% of the support questions I get. I haven't done that (other than this post I really am pretty mild mannered), but it is very tempting.

Please don't spread around this kind of misinformation....it is wrong and is the cause for a lot of wasted time not only among the people installing mods but also fo rhte peopolke like me that support the mods.


The topic i mentioned wasn't wrote by me, as you can see.
pls avoid those such of statements and read it wll ;)

A question: why EM has not been released yet, since two or more years? It's still beta, you know.

Also i've used it 1 time and i 've found a lot of troubles, i do my mods manually, sometimes i do some error but i fix it, quickly and easyly.


If the conversation have to continue under your behaviour, then Ill ignore you since now, here I'm too to learn and help, I'm not a boy, I started from a Commodore vic-20, a lot of years ago.. keep cool and keep also your statements for you.

tha in advance.

(in this topic i was not the only one who said the same as me, bye)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

winter_mute
Registered User
Posts: 2
Joined: Sun Mar 14, 2004 9:10 pm

Post by winter_mute » Sun May 08, 2005 12:27 pm

Hi everyone,
Got two things to write about.

1) phpBB 2.0.14->2.0.15 and Jr. Admin Mod
I wrote verry simple and very fast fix for Jr. Admin Mod. I'm not verry good in this things so please don't be mad if it doesnt work :roll:

In already moded admin/pagestart.php find:

Code: Select all

if (!$userdata['session_admin'])
{
	redirect(append_sid("login.$phpEx?redirect=admin/&admin=1", true));
}
replace with:

Code: Select all

if ((!$userdata['session_admin']) && (!empty($jr_admin_userdata['user_jr_admin'])))
{
	redirect(append_sid("login.$phpEx?redirect=admin/&admin=1", true));
} 
As I said before - this is verry simple fix :D It only let your Jr. Admins access ACP instead redirect them to phpBB index page, plus Main Admin 2nd authorisation still works. I've got to add 2nd authorisation 4 Jr. Admins but don`t have time to do that ATM.
BTW; I'm using Junior Admin 2.0.5 - fix works fine with it. Don't know how things would go on other version ... so please leave the feedback if U try this fix.

2) EasyMod vs. Manual
In most of cases EM works fine but there are some modyfications e.g. Sub-Categories/Sub-forum Mod which are moving big parts of code from default phpBB files to their own files. What's the worst in those default phpBB files they are not deleting text but disable it with long comments

Code: Select all

 /* ------------------
disabled code...
---------*/
So... while U are using EM changes could be made inside the commented/disabled code, and... simply they don't affect phpBB at all.

That's all.
Regards,
winter_mute

BTW; sorry 4 my English :D

Desummoner
Registered User
Posts: 8
Joined: Wed Sep 03, 2003 1:36 am

Post by Desummoner » Sun May 08, 2005 12:41 pm

One little update.
If more than one language installed (other than English) and you're going to use EasyMOD to update phpBB (EasyMOD will try to update all laguages as well) you should make this changes to MOD script:

In phpbb_2.0.14_to_2.0.15.txt code (lines 370-374)

Code: Select all

#
#-----[ FIND ]---------------------------------------------
# Line 1021
$lang['An_error_occured'] = 'An Error Occurred';
$lang['A_critical_error'] = 'A Critical Error Occurred';
Should be changed to

Code: Select all

#
#-----[ FIND ]---------------------------------------------
# Line 1021
$lang['An_error_occured']
$lang['A_critical_error']
After this change EasyMOD sucsessfully update all languages (but text it inserts is in English of couse).

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Sun May 08, 2005 1:02 pm

3Di wrote: ...The topic i mentioned wasn't wrote by me, as you can see...

Right, and I agree with everything that wGEric (mod leader) and others said in there except for a single post by swizzec who is simply wrong on this subject. The gist of the topic (started by wGEric) was that people should not say things are 'EM Compliant' because that means that they will install with EM or by hand with no conflicts with anything else that is EM compliant. Nothing to do with the limitations of EM at all.
3Di wrote: ...pls avoid those such of statements ...
Yup, you're right I should not have been so brittle. Sorry. I just get very frustrated with the fact that people avoid EM and then make life so much more difficult for themselves and for me (as a supporter of mods).
3Di wrote: ...A question: why EM has not been released yet, since two or more years? It's still beta, you know....

Perfectly fair question. EM is totally stable and does not screw up in installing code. Period. But I think Nutzzy is still working on adding to the features. Example: a few months back he got the SQL part working so that now EM will do most table changes that mods may ask you to do (so that you can avoid the separate step of using you mysql GUI to update your tables in the way your mods ask you to). But there are still sql statements that EM will spit back and tell you to do manually. That's not dangerous...EM tells you which changes it has NOT made to the tables so you can make them with phpmyadmin or whatever db GUI you are using...but that's probably one of the reasons he hasn't released it for final validation yet. Another may be that he still may be working on adding a feature that will automatically uninstall mods based on their mod script.

But keep in mind that the author of EM -- Nutzzy -- was one of the primary coders for phpbb to begin with and people are comfortable using EM without validation (much like they use ptrirchik's mods without validation).
3Di wrote: ...Also i've used it 1 time and i 've found a lot of troubles, i do my mods manually, sometimes i do some error but i fix it, quickly and easyly...

If you find your errors without asking for support from the mod author then that's totally up to you, of course. But I very much doubt the errors you ran into were EM errors and you may want to consider doing yourself a favor by giving it another try.

st.luke
Registered User
Posts: 110
Joined: Tue Jan 25, 2005 3:07 am
Contact:

Post by st.luke » Sun May 08, 2005 1:12 pm

i have found where the problem is.. ... .com]phpBB code..
$patterns[] = "#\+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];

// [url=http://www.phpbb.com]phpBB
code.. (no xxxx:// prefix).
$patterns[] = "#\*?)\](.*?)\[/url\]#is";
[/quote]

REPLACE WITH
2.0.15 Code:


// [url=xxxx://www.phpbb.com]phpBB
code..
$patterns[] = "#\+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
$replacements[] = $bbcode_tpl['url3'];

// [url=http://www.phpbb.com]phpBB
code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";


when i do this, links dont work in signatures, it just shows the url (for eg: [url=XXX.XXXX.XXX]my picture here [ /url] )

can anyone help me with this please?

[edit] i should just add that images still work in sigs, but the links dont.

User avatar
3Di
Former Team Member
Posts: 13902
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Sun May 08, 2005 1:22 pm

asinshesq wrote:
3Di wrote:...The topic i mentioned wasn't wrote by me, as you can see...

Right, and I agree with everything that wGEric (mod leader) and others said in there except for a single post by swizzec who is simply wrong on this subject. The gist of the topic (started by wGEric) was that people should not say things are 'EM Compliant' because that means that they will install with EM or by hand with no conflicts with anything else that is EM compliant. Nothing to do with the limitations of EM at all.

I know, before start to talk, i'm used to read and understand, democracy means something like: you have your tought and i have mine, respect.
3Di wrote: ...pls avoid those such of statements ...
Yup, you're right I should not have been so brittle. Sorry. I just get very frustrated with the fact that people avoid EM and then make life so much more difficult for themselves and for me (as a supporter of mods).

Nevermind, i haven't took offence of it, simply read all the other posts that speack about my concern and maybe you'll have to answer to anyone of us.. ;)
3Di wrote: ...A question: why EM has not been released yet, since two or more years? It's still beta, you know....

Perfectly fair question. EM is totally stable and does not screw up in installing code. Period. But I think Nutzzy is still working on adding to the features. Example: a few months back he got the SQL part working so that now EM will do most table changes that mods may ask you to do (so that you can avoid the separate step of using you mysql GUI to update your tables in the way your mods ask you to). But there are still sql statements that EM will spit back and tell you to do manually. That's not dangerous...EM tells you which changes it has NOT made to the tables so you can make them with phpmyadmin or whatever db GUI you are using...but that's probably one of the reasons he hasn't released it for final validation yet. Another may be that he still may be working on adding a feature that will automatically uninstall mods based on their mod script.

But keep in mind that the author of EM -- Nutzzy -- was one of the primary coders for phpbb to begin with and people are comfortable using EM without validation (much like they use ptrirchik's mods without validation).

I started with phpbbs and php only from two months, but reading tons of topics and books i'm quite improving my skill, i'm 41 old, and i'm a java, c++, html, basic, assembler programmer... php it's a new one for me and doing things myself, such MODding, help me a lot in order to learn more, day by day.
3Di wrote: ...Also i've used it 1 time and i 've found a lot of troubles, i do my mods manually, sometimes i do some error but i fix it, quickly and easyly...

If you find your errors without asking for support from the mod author then that's totally up to you, of course. But I very much doubt the errors you ran into were EM errors and you may want to consider doing yourself a favor by giving it another try.


Maybe one day, when i'll see the DEvelopment of EM has really finished (i know a lot of BETAs that are stable, this doesn't means that is the final version), i'll do, I don't think so.

Greets, 3D.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

DMET-XIX
Registered User
Posts: 3
Joined: Sun Apr 17, 2005 2:16 pm
Location: Netherlands
Contact:

Post by DMET-XIX » Sun May 08, 2005 1:27 pm

I have a very strange problem, when asked to find:

Code: Select all

   if( $mode == "addforum" )
   {
      list($cat_id) = each($HTTP_POST_VARS['addforum']);
(in admin/admin_forums.php)
Which is the very first thing I need to do, it cannot find it because I have:

Code: Select all

	if( $mode == "addforum" )
	{
		list($cat_id) = each($_POST['addforum']);
Note the subtle difference between $HTTP_POST_VARS and $_POST.

This seems to be consistent in all my files (no HTTP prefix, and no _VARS suffix) even though I did a previous upgrade to 2.14 successfully.
Any idea what's wrong with my files and how to correct this?

Edit: Can I just 'ignore' this and make the changes anyway? (but without said pre/suffixes).
Edit2: Made the changes as winter_mute (few replies below) suggested, works like a charm.
Last edited by DMET-XIX on Sun May 08, 2005 4:33 pm, edited 3 times in total.

blaknite
Registered User
Posts: 27
Joined: Fri Mar 18, 2005 7:09 pm

Post by blaknite » Sun May 08, 2005 1:42 pm

Code: Select all

         $query = preg_replace('#(.*WHERE.*)(username|user_email|ban_email) = \'(.*)\'#ise', "\"\\1LOWER(\\2) = '\" . strtolower('\\3') . \"'\"", $query);
this section of code that it said I had to replace for the 2.0.15 update is not found in my db/postgres7.php file .....

something I should be worried about? lol

think maybe I missed a step from 2.0.14 update?

JJX2
Registered User
Posts: 80
Joined: Mon Feb 14, 2005 1:08 pm

Post by JJX2 » Sun May 08, 2005 1:42 pm

A problem i just noticed...

I loging as admin
I click "Go to Administration Panel"
The phpbb board ask me again to login.
This is how it should be done?

T1Cybernetic
Registered User
Posts: 98
Joined: Wed Sep 01, 2004 4:31 am
Location: Wakefield, West Yorkshire, Uk, Nr Earth
Name: Christopher Maxwell
Contact:

Post by T1Cybernetic » Sun May 08, 2005 2:15 pm

JJX2 wrote: A problem i just noticed...

I loging as admin
I click "Go to Administration Panel"
The phpbb board ask me again to login.
This is how it should be done?


I have same problem as you but i am working on fixing it now!
Empty your mind. Be formless, shapeless, like water.
Now you put water into a cup, it becomes the cup.
You put water into a bottle, it becomes the bottle.
You put it into a teapot, it becomes the teapot.
Now, water can flow, or it can crash! Be water, my friend. (Bruce Lee)

computersOC
Registered User
Posts: 2528
Joined: Thu Dec 04, 2003 6:21 am
Location: New York
Contact:

Post by computersOC » Sun May 08, 2005 2:17 pm

JJX2 wrote: A problem i just noticed...

I loging as admin
I click "Go to Administration Panel"
The phpbb board ask me again to login.
This is how it should be done?


That is normal.
http://www.computersOC.com - overclocking, P2P, broadband tweaks, ISP forums, more... Computer Building Help -- Overclocking Guide

Want us to install you a phpBB board or update your current one? Want mods/anti-spam mods installed? Moving to a new host? Check us out here.

User avatar
3Di
Former Team Member
Posts: 13902
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Sun May 08, 2005 2:26 pm

T1Cybernetic wrote:
JJX2 wrote:A problem i just noticed...

I loging as admin
I click "Go to Administration Panel"
The phpbb board ask me again to login.
This is how it should be done?


I have same problem as you but i am working on fixing it now!


check this topic:

http://www.phpbb.com/phpBB/viewtopic.php?t=288428

:arrow:
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

winter_mute
Registered User
Posts: 2
Joined: Sun Mar 14, 2004 9:10 pm

Post by winter_mute » Sun May 08, 2005 2:32 pm

DMET-XIX wrote: [...] Edit: Can I just 'ignore' this and make the changes anyway? (but without said pre/suffixes).
Yes, since AFAIR $HTTP_POST_VARS == $_POST
blaknite wrote: [...]
something I should be worried about? lol
No, if you are using other than PostgreeSQL db (eg. MySQL) you can skip this part, I think :P :roll:

Post Reply

Return to “[2.0.x] MOD Database Releases”