Page 1 of 3

Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 11, 2006 8:00 am
Author: found it
Here is the upgrade for 2.0.20.....

Please back up all other files you edit or copy over to avoid later problems....

As this involves a database addon i advise you back up your database too...


As Simon N was kind enough to post his file edits ( a thank you to him for his time and effort) I have compared them to mine and we were not far out from each other....I have also included premodded files for those members who have integramod version phpbb2.0.19 and phpbb security 1.0.3 DO NOT USE THESE FILES IF YOU HAVE NOT FULLY UPGRADED

The premodded files are now updated to be fully working after a few errors were reported.....

if you have used the bbcode and function_post file from the previous download package please overwrite with the new ones here....

[b][size=99px]http]

[b][size=99px]http]

Any problems post away :twisted:

PostPosted: Tue Apr 11, 2006 7:31 pm
Author: Flex
Should this be posted as news or announcement and available in the download area.

I'm only saying because I just happend to bump into it by mistake <img>

PostPosted: Tue Apr 11, 2006 7:38 pm
Author: bariq
"Flex";p="1053" wrote:Should this be posted as news or announcement and available in the download area.

I'm only saying because I just happend to bump into it by mistake <img>


agreed make this as announcement.

BIG Thanks for the integramod team for their efforts as always.

PostPosted: Tue Apr 11, 2006 7:46 pm
Author: Flex
I have version phpbb2.0.19 and phpbb security 1.0.2 not .3, Can I still use the premoded files?

PostPosted: Tue Apr 11, 2006 8:51 pm
Author: Bush
"Flex";p="1059" wrote:I have version phpbb2.0.19 and phpbb security 1.0.2 not .3, Can I still use the premoded files?


All depends on what mods you have added into IM.

PostPosted: Wed Apr 12, 2006 3:12 am
Author: Simon N
"Flex";p="1059" wrote:I have version phpbb2.0.19 and phpbb security 1.0.2 not .3, Can I still use the premoded files?


No offense but did you read the first post? Particularly: DO NOT USE THESE FILES IF YOU HAVE NOT FULLY UPGRADED

Upgrades are there to fix the security holes as well as bugs....so its always best to try and be up to date. Its not a fashion thing its actually needed <img>

Sorry for sounding harsh.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 12, 2006 7:43 am
Author: Helter
what Fubie is saying is that if you have not upgraded to phpbb security 1.0.3, and you use the premodded files, you will now be partially upgraded to phpbb security 1.0.3. If the security upgrade is not complete, you will have errors, if you can even access your site

PostPosted: Wed Apr 12, 2006 4:00 pm
Author: Flex
Mmm, if the security patch was not part of the last upgrade ie: integramod 140 with no mods, then why are we not providing an upgrade to the unmoded 140?

And yes, I did read the first post, but I was unsure as to why they were providing an upgrade from 2.0.19 to 2.0.20 without any modifications ie: updated security patch, hence why I've asked again.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 12, 2006 4:14 pm
Author: found it
Hi

When i say without any mods I mean your own added mods.....

when upgrades are released for Integramod ...it normally is the best course of action to upgrade your site.....

The security upgrade was released 2 months ago as phpbb2.0.18 broke the back up function......which is part of integramod 1.4.0

Are you asking that we should provide details of how to upgrade your forum if you havnt added the security mod upgrade....?

I am sure I miss understand that part....

Can I ask as to why you never upgrade to security 1.0.3?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 12, 2006 4:22 pm
Author: Neva
I think that any update to IM should work with the freash install of IM that can be downloaded from the site. That way it is as simple as install IM + patch. At this time there are lots of updates and fixes floating around in posts that lots of people may not know about. We all seem to have IM in various states of update.
I have a few friends that would love to use IM but there never seems to be an easy why to get an up to date forum without a lot of work.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 12, 2006 4:35 pm
Author: found it
I do agree with that point......I to have just set up Integramod for someone and yes as we know the first install is straightforward ...you do then have to do 4 upgrades to get it upto date....

But please hang in there a little longer as we are getting on top of this and will have new things shortly....

:mrgreen:

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 12, 2006 5:56 pm
Author: Flex
"found it";p="1241" wrote:Hi

When i say without any mods I mean your own added mods.....

when upgrades are released for Integramod ...it normally is the best course of action to upgrade your site.....

The security upgrade was released 2 months ago as phpbb2.0.18 broke the back up function......which is part of integramod 1.4.0

Are you asking that we should provide details of how to upgrade your forum if you havnt added the security mod upgrade....?

I am sure I miss understand that part....

Can I ask as to why you never upgrade to security 1.0.3?


I never upgraded to 1.0.3 because I was hoping the fix would also be released with the next IM upgrade and since the main fix was the daily backup component of it I decided I didnt have to since I get daily backups through my host anyway.

So... now in my situation I would have to update the security patch from 1.0.2 to .3 then upgrade from 2.0.19 to 2.0.20 using the premoded files, Is that correct?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Thu Apr 13, 2006 2:27 am
Author: found it
Hi

yes at the moment that is the only way.....though I do not see the problem as the security mod comes with premodded files as well....though please read the read me file.....

PostPosted: Thu Apr 13, 2006 6:36 am
Author: Eon
Maybe in this thread you should list the update path.

IM 1.32D to IM1.40
then phpbb 2.0.17 to 2.0.19
then phpbb Security 1.02 to 1.03
then phpbb 2.0.19 to 2.0.20

But with all the appropriate links and all that. I would do it but I am lazy and at work...

That would clarify update issues, if an Update topic with the pathways was done.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Thu Apr 13, 2006 10:10 am
Author: found it
Very true but I to am very lazy.....as it took long enough just to put together the upgrade path for 2.0.20

:mrgreen:

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 11:09 am
Author: ayasha
i am attempting this update today and have come across something i do not understand.

#-----[ OPEN ]---------------------------------------------
#
admin/admin_forums.php

#
#-----[ FIND ]---------------------------------------------
# Line 37
"auth_post" => AUTH_ALL,
"auth_reply" => AUTH_ALL,

#
#-----[ REPLACE WITH ]---------------------------------------------
#
"auth_post" => AUTH_REG,
"auth_reply" => AUTH_REG,


i do not seem to have that in my file. so i am at a loss of what to do.

PostPosted: Fri Apr 14, 2006 11:59 am
Author: tekguru
Had aanyone had problems with the Quote BBCode since doing the upgrade?

For me since upgrading it does not seem to function at all.

Any ideas? I've tried manually upgrading my original bbcode.php file which failed as well as taking the premodded vesion and adding my mods, it still fails despite it working perfectly prior to the upgrade.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 12:00 pm
Author: tekguru
Thinks, BB Codes are not configured in any other file are they?

PostPosted: Fri Apr 14, 2006 12:20 pm
Author: Eon
Well I am trying the upgrade on a test site, and I am having all kinds of problems.

First off all the premodded files are not in the d/l.

Such as profile.php, memberlist.php, db/mssql.php. The later 2 are not mentioned in the edits to change anything, but are listed as being changed.

So then I thought well I will just manually change them.. Nope. My profile.php doesn't have the mentioned find in it at all.

Glad I tried this on a test site first, cause I can't even log into now. All I did was drop the premodds in their approp places, and ran the update.php.

And this is with a STOCK IM140 upgraded to 2.0.19 and phpbb security 1.03.

PostPosted: Fri Apr 14, 2006 12:24 pm
Author: tekguru
Same story here I'm afraid to say :(

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 12:29 pm
Author: found it
"cleo";p="1573" wrote:i am attempting this update today and have come across something i do not understand.

#-----[ OPEN ]---------------------------------------------
#
admin/admin_forums.php

#
#-----[ FIND ]---------------------------------------------
# Line 37
"auth_post" => AUTH_ALL,
"auth_reply" => AUTH_ALL,

#
#-----[ REPLACE WITH ]---------------------------------------------
#
"auth_post" => AUTH_REG,
"auth_reply" => AUTH_REG,


i do not seem to have that in my file. so i am at a loss of what to do.


you do not need to do this change....

PostPosted: Fri Apr 14, 2006 12:30 pm
Author: tekguru
Okay so ow do we get Quote BB Codes working then as they surely are not here <img>

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 12:52 pm
Author: tekguru
For reference the BBCode.php I'm using is:

<<Rmoved>>

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 12:56 pm
Author: tekguru
Hmm looks like the PHP BBCode is broken too, and as I can't attach files..

Try them here: [url=http]link to my files[/url].

Hope someone can help!

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 12:56 pm
Author: found it
phphbb reported this problem just after they released the update...i have just been there and found this fix for it....(though i have so much better things to do with my time...)

:mrgreen:

Open functions_post.php, Find
Code: Select all
$message = addslashes($message);


After Add

Code: Select all
$message = str_replace('&quot;', '&quot;', $message);


this fix is due to the fact that html is on. The quotes work fine if html is off....though I do stress that this fix needs to be done....

PostPosted: Fri Apr 14, 2006 1:01 pm
Author: Eon
OK, what about my problem?

I can't even log into my test site now, it just goes to the portal without me registered in.

Also, I can't register a new account, it tells me the control picture is not the same, but I know it is.

PostPosted: Fri Apr 14, 2006 1:05 pm
Author: tekguru
Well my thanks for posting the fix but it still fails for me as I have HTML turned on as it is need for the BBCode table codes we use.

Could you point me at the thread on PhpBBS and I'll follow through myslef directly.

Cheers.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 1:06 pm
Author: found it
Did I not highlight in big read writing to back up your files before overwriting with the new ones....!!!

also the reason profile.php, memberlist.php are not there is well i guess as they are not needed as we use PCP..... :D

As it is a test site you are using you can easily start again with files that you already downloaded to get your version to 1.4.0 2.0.19 and security 1.0.3 I cant help any more than that without a link.....

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 1:07 pm
Author: ayasha
"found it";p="1584" wrote:
"cleo";p="1573" wrote:i am attempting this update today and have come across something i do not understand.

#-----[ OPEN ]---------------------------------------------
#
admin/admin_forums.php

#
#-----[ FIND ]---------------------------------------------
# Line 37
"auth_post" => AUTH_ALL,
"auth_reply" => AUTH_ALL,

#
#-----[ REPLACE WITH ]---------------------------------------------
#
"auth_post" => AUTH_REG,
"auth_reply" => AUTH_REG,


i do not seem to have that in my file. so i am at a loss of what to do.


you do not need to do this change....


thank you found it <img>

PostPosted: Fri Apr 14, 2006 1:07 pm
Author: found it
"tekguru";p="1594" wrote:Well my thanks for posting the fix but it still fails for me as I have HTML turned on as it is need for the BBCode table codes we use.

Could you point me at the thread on PhpBBS and I'll follow through myslef directly.

Cheers.


I just tested this with html on and off before the fix and after and it fixes it as it should....let me find the link....

:mrgreen:

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 1:10 pm
Author: tekguru
I still think there is a problem with the :

Code: Select all
$html_match = '#<[^w<40>#';
myself.

PostPosted: Fri Apr 14, 2006 1:12 pm
Author: Eon
Well then. lol So touchy.. I didn't say I didn't have back ups. Well profile.php is mention in the manual upgrade, so that should be removed, it actually says to find and replace..

http://www.eon.roxr.com

There is you a link.

I would make you admin but I can not get there yet. what is odd though, it shows me already logged in as well. LOL

How can it go wrong if it is stock and you just upload the premod files and run the db update? That should simple enough. But it did not work.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 1:14 pm
Author: found it
To tekguru

try this open bbcode.php and find

Code: Select all
// [quote] and [/quote] for posting replies with quote, or just for quoting stuff.     $text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');.


about line 464

after add
Code: Select all
$text = bbencode_first_pass_pda($text, $uid, '/[quote=\\&quot;(.*?)\\&quot;]/is', '[/quote]', '', false, '', "[quote]");


you seem to be missing that line (back up first)

Lemme know

:mrgreen:

PostPosted: Fri Apr 14, 2006 1:19 pm
Author: found it
"Eon";p="1600" wrote:Well then. lol So touchy.. I didn't say I didn't have back ups. Well profile.php is mention in the manual upgrade, so that should be removed, it actually says to find and replace..

http://www.eon.roxr.com

There is you a link.

I would make you admin but I can not get there yet. what is odd though, it shows me already logged in as well. LOL

How can it go wrong if it is stock and you just upload the premod files and run the db update? That should simple enough. But it did not work.


Lol you should see me on a bad day.... :D

I just registered at your site and logged in did you fix or change the files back....

with regards to the manual upgrade that is the phpbb upgrade with some of the changes taken out after 3 hours of looking for code I didnt do it all....

:mrgreen:

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 1:20 pm
Author: tekguru
That gets us closer at least we get the boxes now - but if you check out:

http://www.4winmobile.com/viewtopic.php?p=24211#24211

You will see that the post quoted lists the prior post as:

waveydavey";p="24216 wrote: à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Select à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ºÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Expand à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º

Instead of referencing it properly.

Near but still something amiss <img>

Re: Release of upgrade for phpbb2.0.20

PostPosted: Fri Apr 14, 2006 1:22 pm
Author: found it
"tekguru";p="1604" wrote:That gets us closer at least we get the boxes now - but if you check out:

http://www.4winmobile.com/viewtopic.php?p=24211#24211

You will see that the post quoted lists the prior post as:

waveydavey";p="24216 wrote: à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Select à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ºÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Expand à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º

Instead of referencing it properly.

Near but still something amiss <img>


yeah I have the same problem on my site......I shall have a look....

PostPosted: Fri Apr 14, 2006 1:25 pm
Author: tekguru
Grin at least we have the same problem now. Let me know please if you find a solution - that will make us both happy I think <img>

Cheers for the assist so far!

PostPosted: Fri Apr 14, 2006 1:47 pm
Author: Eon
meh...

I logged in but it is not letting me view as logged in. I don't know how you got to register though..

I am going back to .0.19 for now and will try this again.

PostPosted: Fri Apr 14, 2006 8:50 pm
Author: Bush
I did the following:

Code: Select all
# #-----[ OPEN ]--------------------------------------------- # includes/functions_post.php  ##-----[ FIND ]---------------------------------------------# Line 165         $allowed_html_tags = split(',', $board_config['allow_html_tags']);           $end_html = 0;         $start_html = 1;         $tmp_message = '';         $message = ' ' . $message . ' ';           while ($start_html = strpos($message, '<', $start_html))         {             $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1)));               if ($end_html = strpos($message, '>', $start_html))             {                 $length = $end_html - $start_html + 1;                 $hold_string = substr($message, $start_html, $length);                   if (($unclosed_open = strrpos(' ' . $hold_string, '<')) != 1)                 {                     $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1));                     $hold_string = substr($hold_string, $unclosed_open - 1);                 }                   $tagallowed = false;                 for ($i = 0; $i < sizeof($allowed_html_tags); $i++)                 {                     $match_tag = trim($allowed_html_tags[$i]);                     if (preg_match('#^</?' . $match_tag . '[> ]#i', $hold_string))                     {                         $tagallowed = (preg_match('#^</?' . $match_tag . ' .*?(style[ ]*?=|on[w]+[ ]*?=)#i', $hold_string)) ? false ]---------------------------------------------#         // If HTML is on, we try to make it safe         // This approach is quite agressive and anything that does not look like a valid tag         // is going to get converted to HTML entities         $message = stripslashes($message);         $html_match = '#<[^w<40>#';         $matches = array();           $message_split = preg_split($html_match, $message);         preg_match_all($html_match, $message, $matches);           $message = '';           foreach ($message_split as $part)         {             $tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));             $message .= htmlspecialchars($part) . clean_html($tag);         }           $message = addslashes($message);


I get this error: Call to undefined function: clean_html() in /home/mofclan/public_html/portal/includes/functions_post.php on line 180

Line 180 = $message .= htmlspecialchars($part) . clean_html($tag);

PostPosted: Fri Apr 14, 2006 10:07 pm
Author: tekguru
Ref the Quote problkem, I asked on PhpBBS and all tehy had to ofer in the way of advise is that we screwed up the edit of the bbcode.php file. Not a lot of help.

PostPosted: Fri Apr 14, 2006 11:10 pm
Author: Bush
"tekguru";p="1693" wrote:Ref the Quote problkem, I asked on PhpBBS and all tehy had to ofer in the way of advise is that we screwed up the edit of the bbcode.php file. Not a lot of help.


there is no quoted person here named problkem in this thread.. ?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sat Apr 15, 2006 4:42 am
Author: Flex
"found it";p="1605" wrote:
"tekguru";p="1604" wrote:That gets us closer at least we get the boxes now - but if you check out:

http://www.4winmobile.com/viewtopic.php?p=24211#24211

You will see that the post quoted lists the prior post as:

waveydavey";p="24216 wrote: à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Select à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ºÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Expand à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º

Instead of referencing it properly.

Near but still something amiss <img>


yeah I have the same problem on my site......I shall have a look....


I have exactly the same issue as you guys. Found it have you found a fix for this yet?

Thanks

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sat Apr 15, 2006 6:54 am
Author: tekguru
Not as of yet, I _think_ it's a missing < when the first part of the Quote BBCode is created, but no ideas how to get it back in there! Or even whether that is actually the problem.

PostPosted: Sat Apr 15, 2006 1:17 pm
Author: found it
"tekguru";p="1693" wrote:Ref the Quote problkem, I asked on PhpBBS and all tehy had to ofer in the way of advise is that we screwed up the edit of the bbcode.php file. Not a lot of help.


ok my bad i did make an error on the bbcode.php file I used an old update 2.0.18 to 2.0.19 and did not apply the bbcode error we had before.....

first post is updated with the new bbcode file and a new complete premodded package....

though the fix in function post must be done as well....

Sorry for the inconveniance......

:mrgreen:

PostPosted: Sat Apr 15, 2006 11:58 pm
Author: tekguru
Oh blast, now to download and remod the BBCode to support my advances table handling.

Oh well, only takes 10 minutes or so, at least the problem is now identified!

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 2:45 am
Author: Mighty07
Hi all!

I've updated. Appart from that Quotes problem, everything is ok.
But it's better to have that code appearing onthe quotes, than not having quotes at all! <img>

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 3:35 am
Author: Flex
"tekguru";p="1716" wrote:Not as of yet, I _think_ it's a missing < when the first part of the Quote BBCode is created, but no ideas how to get it back in there! Or even whether that is actually the problem.


I'm a bit confused... we still have an issue with this right?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 4:04 am
Author: found it
"Flex";p="1841" wrote:
"tekguru";p="1716" wrote:Not as of yet, I _think_ it's a missing < when the first part of the Quote BBCode is created, but no ideas how to get it back in there! Or even whether that is actually the problem.


I'm a bit confused... we still have an issue with this right?


No read my post after that one....just upload the new bbcode.php file and do the file edits fior functions post....

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 5:49 am
Author: Flex
I'm still having issues and this is what I've done so far:

1. updated to phpbb_security_102_to_103_im140
2. used premoded files for Integramod_2.0.19-2.0.20 upgrade
3. replaced bbcode.php with the copy provided here
5. edited functions_post.php as per first page

Everything updated correctly except when I use quote I get this :

lunchbox";p="1210 wrote: à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Select à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ºÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Expand à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º

AND NOT THIS:

Flex wrote (View Post): à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Select à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ºÃƒÆ’ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¹ Expand à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ º

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 6:28 am
Author: found it
try this one i think the first post got corrupted.....

PostPosted: Sun Apr 16, 2006 7:02 am
Author: Nata
on question is the integramod in download section up to date ?

PostPosted: Sun Apr 16, 2006 7:16 am
Author: IntegraMOD
"ilia";p="1856" wrote:on question is the integramod in download section up to date ?

As far as I can tell its 2.0.17 security 1.02 so if you download this package you will have to go through the updates 2.0.17 to 2.0.19 and security to 1.02 to 1.03 then 2.0.19 to 2.0.20 to fully update

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 8:28 am
Author: Flex
"found it";p="1853" wrote:try this one i think the first post got corrupted.....


Well, this time it worked a charm, might want to update the original.

Thanks so much.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 9:52 am
Author: found it
We got there in the end....thank you for reporting the errors I have to say it isnt the easiest of things trying to upgrade integramod with phpbb upgrades..


:mrgreen:

PostPosted: Sun Apr 16, 2006 1:30 pm
Author: tekguru
Indeed working now, the only small issue for me is that the part of the text that shows the link back to the original post is slightly larger than the other links but that could be a theme issue <img>

I'm jut very very happy to have it working - pats on the back all round guys!

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 5:50 pm
Author: Mighty07
"found it";p="1853" wrote:try this one i think the first post got corrupted.....


Perfect!
It's working here too...
Thanks!

Re: Release of upgrade for phpbb2.0.20

PostPosted: Sun Apr 16, 2006 6:33 pm
Author: tmotley
Backed up database, downloaded/saved files to be changed, uploaded premodded files, uploaded install folder, ran update_to_latest.php from install folder, deleted install folder

Works like a charm! Everything appears to be functional.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 9:37 am
Author: Exzachly
Everything seems to have gone perfect with the upgrade; except all my album thumbnails are not being shown/generate in the site album/personal albums.

This is really odd...

When I directly link to a personal album image; i.e. go straight to the album_thumbnail.php?pic_id=X link it dumps the image to the browser like it's a text file, but it does cause it to generate the thumbnail. If I then refresh it shows the picture (with the direct link). But the image is still not available from the album view.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 9:53 am
Author: Exzachly
additionally i'm guessing this has something to do with common.php as it's the only file the album_thumbnail.php includes that was modified in this update.

Starting my dig through code; any ideas would be helpful.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 10:29 am
Author: Exzachly
OK, I figured it out. This is actually not related to the upgrade; but I did stumble across it during the post-upgrade.

After the upgrade, you are told to goto the GeneralAdmin->Configuration page to populate any additional fields made by the upgrade. Well nothing really looked different to me, but I did change my domain name from:
http://www.gc2builder.com -> http://www.GC2Builder.com

I then went to inspect the site to make sure everything was working ok, that's when I noticed all of the album thumbnails were broken and none of the album pictures would display either.

So after the last post I started digging around. Inside album_thumbnail.php where it checks for the hotlink prevention the code was using strstr to compare the strings:
Code: Select all
    for ($i = 0; $i < count($good_referers); $i++)    {       $good_referers[$i] = trim($good_referers[$i]);         if( (strstr($check_referer, $good_referers[$i])) and ($good_referers[$i] != '') )       {          $errored = FALSE;       }    }


Thus http://www.gc2builder.com was not matching http://www.GC2Builder.com; and well use most servers/sites rewrite the url to lowercase not all do; and on top of that if you use a specific case in the good referers list then they may not match either.

The Simple Fix: change the strstr, to stristr (Case-insensitive string compare). And thus the problem was solved.

I'm guessing a mod may want to move this out of here since it actually turned out to be something else.

Peace,
-Z

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 10:59 am
Author: ayasha
"found it";p="1853" wrote:try this one i think the first post got corrupted.....


is this the code changes we are suppose to use?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 12:19 pm
Author: Vixje
did the upgrade, now the board is broke.

this is the error:

Fatal error: Call to undefined function: phpbbsecurity_guests() in D:WebserverApacheApache2wwwwww.domain.extcommon.php on line 396

PostPosted: Mon Apr 17, 2006 1:25 pm
Author: Eon
Glad that was not a live one there. <img>

PostPosted: Mon Apr 17, 2006 1:41 pm
Author: Vixje
lol true

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 2:12 pm
Author: ayasha
can i ask what to do if i do not have this line in my file? and it does not say to replace it with anything, or to add anything before or after

admin/pagestart.php

#
#-----[ FIND ]---------------------------------------------
# Line 47
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{

PostPosted: Mon Apr 17, 2006 2:18 pm
Author: Eon
Depends. read the instructions at the top and it explains that. It may ask you to find the first instance of that, then find something after that to replace it. If tehre are multiplie instances of it in the file.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 2:35 pm
Author: ayasha
ok, here are the entire intructions for that particular file, and as i said, i do not have that instance at all that is says to find, but does not say what to do, i understand that the second bit of code, you just delete

#
#-----[ OPEN ]---------------------------------------------
#
admin/pagestart.php

#
#-----[ FIND ]---------------------------------------------
# Line 47
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{

#
#-----[ FIND ]---------------------------------------------
# Line 57
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);
$url = str_replace('//', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];


#
#-----[ REPLACE WITH ]---------------------------------------------
# Just remove/delete the lines (replacing with an empty line)


Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 3:01 pm
Author: found it
"cleo";p="2047" wrote:ok, here are the entire intructions for that particular file, and as i said, i do not have that instance at all that is says to find, but does not say what to do, i understand that the second bit of code, you just delete

#
#-----[ OPEN ]---------------------------------------------
#
admin/pagestart.php

#
#-----[ FIND ]---------------------------------------------
# Line 47
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{

#
#-----[ FIND ]---------------------------------------------
# Line 57
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);
$url = str_replace('//', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];


#
#-----[ REPLACE WITH ]---------------------------------------------
# Just remove/delete the lines (replacing with an empty line)



On the bit that starts line 57...just remove the code that it tells you to...

Code: Select all
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);     $url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);     $url = str_replace('//', '/', $url);     $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);     $url = preg_replace('/?$/', '', $url);     $url .= ((strpos($url, '?')) ? '&' ]


remove this

PostPosted: Mon Apr 17, 2006 3:04 pm
Author: ayasha
thanks found it, just wanted to make sure i did not need that first find.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Mon Apr 17, 2006 3:07 pm
Author: found it
No problem

sorry the install file is a lot clearer i just used phpbbs file and remove some bits...though you need to double check with the premodded files as some of the file edits are not needed and i cannot remember if i removed them all.....

:mrgreen:

PostPosted: Mon Apr 17, 2006 3:15 pm
Author: ayasha
i think you did a great job with it, with everything you do, i know you stay so busy, and i am most appreciative for you taking the time to do this install upgrade. <img>

PostPosted: Tue Apr 18, 2006 7:42 am
Author: ayasha
ok, i finally got finished with the upgrade this morning, and i get this error


Parse error: syntax error, unexpected $end in D:xampphtdocspspincludessessions.php on line 588

here is my line 588

?>

any suggestions?

PostPosted: Tue Apr 18, 2006 8:00 am
Author: Nata
verify if there is no space after ?> and before

PostPosted: Tue Apr 18, 2006 11:51 am
Author: ayasha
there is no space before or after

Re: Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 18, 2006 12:08 pm
Author: dpmcalister
How do you find out what version of phpBB Security you're running?

PostPosted: Tue Apr 18, 2006 1:07 pm
Author: Eon
In the ACP it will say 1.03 at the top if you are running it. If it doesn't, then you are using 1.02.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 18, 2006 1:10 pm
Author: dpmcalister
Thanks

PostPosted: Tue Apr 18, 2006 1:31 pm
Author: found it
"cleo";p="2144" wrote:ok, i finally got finished with the upgrade this morning, and i get this error


Parse error: syntax error, unexpected $end in D:xampphtdocspspincludessessions.php on line 588

here is my line 588

?>

any suggestions?


Hi can you show me your sessions file

PostPosted: Tue Apr 18, 2006 2:45 pm
Author: Jason Sanborn
I upgraded a test site to 2.0.20 and noticed that the ranks page in the ACP is no longer functioning (white page). Has anyone else experienced this issue?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 18, 2006 3:00 pm
Author: found it
Hi

Nice find just tested this....

DSid you use the premodded files....?

I missed a
Code: Select all
)


on line 281

it should be

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )


but it is

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm


just need to add the ) at the end

PostPosted: Tue Apr 18, 2006 3:06 pm
Author: Jason Sanborn
I was using premodded files. :)

PostPosted: Tue Apr 18, 2006 3:08 pm
Author: found it
"Jason Sanborn";p="2210" wrote:I was using premodded files. :)



thanks again for highlighting my error.... :D

PostPosted: Tue Apr 18, 2006 3:34 pm
Author: Thug Lyfe
"Eon";p="2184" wrote:In the ACP it will say 1.03 at the top if you are running it. If it doesn't, then you are using 1.02.


well i guess i'm not on 1.03 then....how can i update?

Re: Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 18, 2006 3:50 pm
Author: found it
there is a post on the old integramod site with the files ....I think they are in the download section...

Re: Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 18, 2006 4:57 pm
Author: Thug Lyfe
found it thanks <img>

Re: Release of upgrade for phpbb2.0.20

PostPosted: Tue Apr 18, 2006 5:59 pm
Author: Bush
"found it";p="2208" wrote:Hi

Nice find just tested this....

DSid you use the premodded files....?

I missed a
Code: Select all
)


on line 281

it should be

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )


but it is

Code: Select all
    $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm


just need to add the ) at the end


Found IT

I just wanted to let you know, I updated to PS 1.0.3 and phpBB 2.0.20 by hand (did not use pre-modded files) and I did not have to fix this.

Just a heads up to those who did not use pre-modded files.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 19, 2006 12:00 pm
Author: Threat009
Hi Guys!

Grateful for the quick update and all efforts put into it, but I'm in need of a little clarification here.

admin/admin_ranks.php There are 2 parts confusing me, where we are directed to find certain lines, but before we are instructed what to do w/these lines, we are directed to find a new line?? <!-- s]##-----[ FIND ]---------------------------------------------# Line 17  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/    ##-----[ FIND ]---------------------------------------------# Line 21define('IN_PHPBB', 1);    ##-----[ REPLACE WITH ]---------------------------------------------# Just remove/delete the lines (replacing with an empty line)  [/php]
Code: Select all
##-----[ FIND ]---------------------------------------------# Line 273         }         else         {             $rank_id = 0;         }  ##-----[ FIND ]---------------------------------------------# Line 279                 if( $rank_id )  ##-----[ REPLACE WITH ]---------------------------------------------#           $confirm = isset($HTTP_POST_VARS['confirm']);                 if( $rank_id && $confirm )  

Also, Originally I had downloaded 2 files from here for this update. Integramod_2.0.19-2.0.20 and bbcode.php. At first glance I couldn't find bbcode.php, so I had intended on asking about that anyway. I noticed the bbcode.php file is no longer up for download. Is this something I need or should be concerned with?

Thanks for any further help here................

PostPosted: Wed Apr 19, 2006 1:06 pm
Author: Eon
It is just tellingg you that you need to find that instance after the first find.

I think they updated those files in the download. That is probably why it is no longer an indvidual download.

PostPosted: Wed Apr 19, 2006 1:27 pm
Author: Threat009
"Eon";p="2317" wrote:It is just tellingg you that you need to find that instance after the first find.

I think they updated those files in the download. That is probably why it is no longer an indvidual download.

Just found the multiple "FIND" info under the mod description, feeling dopey now :grin:

[color=red]edit] N/M found it! All good for now..... <img>

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 19, 2006 1:32 pm
Author: found it
I updated the download, the bbcode.php file was only if you are using the premodded files.....

all the files are updated and correct at this time...

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 19, 2006 4:19 pm
Author: gcomfx.com
Hey guys... updated security, no problem. Updated to .20 again no problems. All with Pre-modded files. I did find the bbcode.zip file added extra to the download. :? At least it does this on my site. The only edit I have is I // the two lines about the [you] bbcode.

Re: Release of upgrade for phpbb2.0.20

PostPosted: Wed Apr 19, 2006 10:20 pm
Author: Threat009
Okay I did it, and once again thankyou for the update. Judging by the amount of time it took me to manually update this thing, I can tell alot of work was put into this update, so thanks again, I'm grateful.

At first glance everything looks fine, however I did run across one major problem. No one can post! I think it's an easy fix, but I can't figure it out.

Error]
Parse error: parse error, unexpected $ in /home/Threat/public_html/Portal/posting.php on line 1339

[color=green]posting.php

[php]<php> 'post','news_category' => 'news_category', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');while( list($var, $param) = @each($params) ){     if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )     {         $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? htmlspecialchars($HTTP_POST_VARS[$param]) : htmlspecialchars($HTTP_GET_VARS[$param]);     }     else     {         $$var = '';     }}  $confirm = isset($HTTP_POST_VARS['confirm']) ? true : false;  $params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL, 'lock_subject' => 'lock_subject');while( list($var, $param) = @each($params) ){     if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )     {         $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? intval($HTTP_POST_VARS[$param]) : intval($HTTP_GET_VARS[$param]);     }     else     {         $$var = '';     }}  $refresh = $preview || $poll_add || $poll_edit || $poll_delete;$orig_word = $replacement_word = array();//-- mod : post icon -------------------------------------------------------------------------------//-- add$post_icon = isset($HTTP_POST_VARS['post_icon']) ? intval($HTTP_POST_VARS['post_icon']) : 0;//-- fin mod : post icon ---------------------------------------------------------------------------    //// Set topic type//$topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL;$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE )) ) ? $topic_type : POST_NORMAL;//-- mod : calendar --------------------------------------------------------------------------------//-- add/*$year  = ( !empty($HTTP_POST_VARS['topic_calendar_year']) ) ? intval($HTTP_POST_VARS['topic_calendar_year']) : '';$month   = ( !empty($HTTP_POST_VARS['topic_calendar_month']) ) ? intval($HTTP_POST_VARS['topic_calendar_month']) : '';$day     = ( !empty($HTTP_POST_VARS['topic_calendar_day']) ) ? intval($HTTP_POST_VARS['topic_calendar_day']) : '';$hour    = ( !empty($HTTP_POST_VARS['topic_calendar_hour']) ) ? intval($HTTP_POST_VARS['topic_calendar_hour']) : '';$min     = ( !empty($HTTP_POST_VARS['topic_calendar_min']) ) ? intval($HTTP_POST_VARS['topic_calendar_min']) : '';*/$calendar_event = ( !empty($HTTP_POST_VARS['calendar_event']) ) ? trim($HTTP_POST_VARS['calendar_event']) : '';$calendar_duration = ( !empty($HTTP_POST_VARS['calendar_duration']) ) ? trim($HTTP_POST_VARS['calendar_duration']) : '';/*$d_day     = ( !empty($HTTP_POST_VARS['topic_calendar_duration_day']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_day']) : '';$d_hour  = ( !empty($HTTP_POST_VARS['topic_calendar_duration_hour']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_hour']) : '';$d_min   = ( !empty($HTTP_POST_VARS['topic_calendar_duration_min']) ) ? intval($HTTP_POST_VARS['topic_calendar_duration_min']) : '';if ( empty($year) || empty($month) || empty($day) ){     $year = '';     $month = '';     $day = '';     $hour = '';     $min = '';     $d_day = '';     $d_hour = '';     $d_min = '';}if (empty($hour) && empty($min)){     $hour = '';     $min = '';     $d_hour = '';     $d_min = '';}*/  // start event$topic_calendar_time = 0;if (!empty($calendar_event)){     $topic_calendar_time = strtotime($calendar_event);}  // duration$topic_calendar_duration = 0;if ( !empty($topic_calendar_time) && !empty($calendar_duration) ){     $topic_calendar_duration = strtotime($calendar_duration) - $topic_calendar_time;     if ($topic_calendar_duration <0>sql_query($sql) ) {        $info = $db->sql_fetchrow($result);        $auth_forum = $info['forum_id'];        $db->sql_freeresult($result);    } else {        message_die(GENERAL_ERROR, 'Could not query table', '', __LINE__, __FILE__, $sql);    } } else {    message_die(GENERAL_ERROR, 'Could not fetch forum id for setting up security', '', __LINE__, __FILE__, $sql); } $is_auth = $tree['auth'][POST_FORUM_URL . $auth_forum]; //-- mod : calendar --------------------------------------------------------------------------------//-- add$is_auth_type = '';$is_auth_type_cal = '';//-- fin mod : calendar ----------------------------------------------------------------------------switch( $mode ){     case 'newtopic':         if ( $topic_type == POST_ANNOUNCE )         {             $is_auth_type = 'auth_announce';         }//-- mod : announces -------------------------------------------------------------------------------//-- add         else if ( $topic_type == POST_GLOBAL_ANNOUNCE )         {             $is_auth_type = 'auth_global_announce';         }//-- fin mod : announces ---------------------------------------------------------------------------         else if ( $topic_type == POST_STICKY )         {             $is_auth_type = 'auth_sticky';         }         else         {             $is_auth_type = 'auth_post';         }//-- mod : calendar --------------------------------------------------------------------------------//-- add         if (!empty($topic_calendar_time))         {             $is_auth_type_cal = 'auth_cal';         }//-- fin mod : calendar ----------------------------------------------------------------------------         break;     case 'reply':     case 'quote':         $is_auth_type = 'auth_reply';         break;     case 'editpost':         $is_auth_type = 'auth_edit';         break;     case 'delete':     case 'poll_delete':         $is_auth_type = 'auth_delete';         break;     case 'vote':         $is_auth_type = 'auth_vote';         break;     case 'topicreview':         $is_auth_type = 'auth_read';         break;     default:         message_die(GENERAL_MESSAGE, $lang['No_post_mode']);         break;}  //// Here we do various lookups to find topic_id, forum_id, post_id etc.// Doing it here prevents spoofing (eg. faking forum_id, topic_id or post_id//$error_msg = '';$post_data = array();switch ( $mode ){     case 'newtopic':         if ( empty($forum_id) )         {             message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);         }           $sql = "SELECT *             FROM " . FORUMS_TABLE . "             WHERE forum_id = $forum_id";         break;       case 'reply':     case 'vote':         if ( empty( $topic_id) )         {             message_die(GENERAL_MESSAGE, $lang['No_topic_id']);         }           $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type             FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t             WHERE t.topic_id = $topic_id                 AND f.forum_id = t.forum_id";         break;       case 'quote':     case 'editpost':     case 'delete':     case 'poll_delete':         if ( empty($post_id) )         {             message_die(GENERAL_MESSAGE, $lang['No_post_id']);         }  //-- mod : announces -------------------------------------------------------------------------------// here we added//   , t.topic_announce_duration//-- modify//-- mod : calendar --------------------------------------------------------------------------------// here we added//   , t.topic_calendar_time, t.topic_calendar_duration//-- modify//-- mod : post icon -------------------------------------------------------------------------------// here we added//   , t.topic_icon//   , p.post_icon//-- modify         $select_sql = (!$submit) ? ', t.topic_title, t.topic_desc, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, t.topic_calendar_repeat, t.topic_announce_duration, t.news_id, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';         $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';         $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';//-- fin mod : post icon ---------------------------------------------------------------------------//-- fin mod : calendar ----------------------------------------------------------------------------//-- fin mod : announces ---------------------------------------------------------------------------           $sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, t.topic_time, p.post_id, p.poster_id" . $select_sql . "             FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "             WHERE p.post_id = $post_id                 AND t.topic_id = p.topic_id                 AND f.forum_id = p.forum_id                 $where_sql";         break;       default:         message_die(GENERAL_MESSAGE, $lang['No_valid_mode']);}  if ( $result = $db->sql_query($sql) ){     $post_info = $db->sql_fetchrow($result);     $db->sql_freeresult($result);       $forum_id = $post_info['forum_id'];//-- mod : categories hierarchy --------------------------------------------------------------------//-- delete//   $forum_name = $post_info['forum_name'];//-- add     $forum_name = get_object_lang(POST_FORUM_URL . $post_info['forum_id'], 'name');//-- fin mod : categories hierarchy ----------------------------------------------------------------//-- mod : calendar --------------------------------------------------------------------------------//-- add     if (!empty($post_info['topic_calendar_duration']))     {         $post_info['topic_calendar_duration']++;     }//-- fin mod : calendar ----------------------------------------------------------------------------       //     // Topic Lock/Unlock     //     $lock = ( isset($HTTP_POST_VARS['lock']) ) ? TRUE : FALSE;     $unlock = ( isset($HTTP_POST_VARS['unlock']) ) ? TRUE : FALSE;         if ( ($submit || $confirm) && ($lock || $unlock) && ($is_auth['auth_mod']) && ($mode != 'newtopic') && (!$refresh) )     {         $t_id = ( !isset($post_info['topic_id']) ) ? $topic_id : $post_info['topic_id'];           if ( $unlock )         {             $sql = "UPDATE " . TOPICS_TABLE . "             SET topic_status = " . TOPIC_UNLOCKED . "             WHERE topic_id = " . $t_id . "             AND topic_moved_id = 0";         }         else if ($lock)         {             $sql = "UPDATE " . TOPICS_TABLE . "             SET topic_status = " . TOPIC_LOCKED . "             WHERE topic_id = " . $t_id . "             AND topic_moved_id = 0";         }           if ($lock || $unlock)         {             if ( !($result = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);             }         }     }       if ( $post_info['forum_status'] == FORUM_LOCKED && !$is_auth['auth_mod'])     {        message_die(GENERAL_MESSAGE, $lang['Forum_locked']);     }     else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])     {        message_die(GENERAL_MESSAGE, $lang['Topic_locked']);     }       if ( $mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete' )     {         $topic_id = $post_info['topic_id'];           $post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;         $post_data['first_post'] = ( $post_info['topic_first_post_id'] == $post_id ) ? true : false;         $post_data['last_post'] = ( $post_info['topic_last_post_id'] == $post_id ) ? true : false;         $post_data['last_topic'] = ( $post_info['forum_last_post_id'] == $post_id ) ? true : false;         $post_data['has_poll'] = ( $post_info['topic_vote'] ) ? true : false;         $post_data['topic_type'] = $post_info['topic_type'];         $post_data['topic_time'] = $post_info['topic_time'];//-- mod : post icon -------------------------------------------------------------------------------//-- add         $post_data['post_icon'] = $post_info['post_icon'];//-- fin mod : post icon ---------------------------------------------------------------------------//-- mod : calendar --------------------------------------------------------------------------------//-- add         $post_data['topic_calendar_time'] = $post_info['topic_calendar_time'];         $post_data['topic_calendar_duration'] = $post_info['topic_calendar_duration'];// repeat         $post_data['topic_calendar_repeat'] = $post_info['topic_calendar_repeat'];         $repeat_mode = $post_info['topic_calendar_repeat'];         if($repeat_mode)         {             $repeat_type = substr($repeat_mode,0,2);             $repeat_type_value = substr($repeat_mode,2,2);         }//-- fin mod : calendar ----------------------------------------------------------------------------//-- mod : announces -------------------------------------------------------------------------------//-- add         $post_data['topic_announce_duration'] = $post_info['topic_announce_duration'];//-- fin mod : announces ---------------------------------------------------------------------------         $post_data['poster_id'] = $post_info['poster_id'];           if ( $post_data['first_post'] && $post_data['has_poll'] )         {             $sql = "SELECT *                 FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr                 WHERE vd.topic_id = $topic_id                     AND vr.vote_id = vd.vote_id                 ORDER BY vr.vote_option_id";             if ( !($result = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);             }               $poll_options = array();             $poll_results_sum = 0;             if ( $row = $db->sql_fetchrow($result) )             {                 $poll_title = $row['vote_text'];                 $poll_id = $row['vote_id'];                 $poll_length = intval($row['vote_length'] / 86400);                 $poll_length_h = intval( ( $row['vote_length'] - ( $poll_length *86400) ) /3600 ) ;                 $max_vote = $row['vote_max'];                 $hide_vote = $row['vote_hide'];                 $tothide_vote = $row['vote_tothide'];                   do                 {                     $poll_options[$row['vote_option_id']] = $row['vote_option_text'];                     $poll_results_sum += $row['vote_result'];                 }                 while ( $row = $db->sql_fetchrow($result) );             }             $db->sql_freeresult($result);               $post_data['edit_poll'] = ( ( !$poll_results_sum || $is_auth['auth_mod'] ) && $post_data['first_post'] ) ? true : 0;         }         else         {             $post_data['edit_poll'] = ($post_data['first_post'] && $is_auth['auth_pollcreate']) ? true : false;         }                 //         // Can this user edit/delete the post/poll?         //         if ( $post_info['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'] )         {             $message = ( $delete || $mode == 'delete' ) ? $lang['Delete_own_posts'] : $lang['Edit_own_posts'];             $message .= '<br><br>' . sprintf($lang['Click_return_topic'], '<a>', '</a>');               message_die(GENERAL_MESSAGE, $message);         }         else if ( !$post_data['last_post'] && !$is_auth['auth_mod'] && ( $mode == 'delete' || $delete ) )         {             message_die(GENERAL_MESSAGE, $lang['Cannot_delete_replied']);         }         else if ( !$post_data['edit_poll'] && !$is_auth['auth_mod'] && ( $mode == 'poll_delete' || $poll_delete ) )         {             message_die(GENERAL_MESSAGE, $lang['Cannot_delete_poll']);         }     }     else     {         if ( $mode == 'quote' )         {             $topic_id = $post_info['topic_id'];         }         if ( $mode == 'newtopic' )         {             $post_data['topic_type'] = POST_NORMAL;         }           $post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;         $post_data['last_post'] = false;         $post_data['has_poll'] = false;         $post_data['edit_poll'] = false;     }     if ( $mode == 'poll_delete' && !isset($poll_id) )     {         message_die(GENERAL_MESSAGE, $lang['No_such_post']);     }       // BEGIN cmx_slash_news_mod     if( $board_config['allow_news'] && $post_data['first_post'] &&  $is_auth['auth_post'] &&         ($is_auth['auth_news'] || ( $is_auth['auth_mod'] && $mode == 'editpost') ) )     {         if( $mode == 'editpost' )         {             $post_data['news_id'] = $post_info['news_id'];         }         else         {             $post_data['news_id'] = 0;         }         $post_data['disp_news'] = true;     }     else     {         $post_data['disp_news'] = false;     }// END cmx_slash_news_mod}else{     message_die(GENERAL_MESSAGE, $lang['No_such_post']);}  //// The user is not authed, if they're not logged in then redirect// them, else show them an error message////-- mod : calendar --------------------------------------------------------------------------------// here we added//    || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])//-- modifyif ( !$is_auth[$is_auth_type] || (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal]) )//-- fin mod : calendar ----------------------------------------------------------------------------{     if ( $userdata['session_logged_in'] )     {//-- mod : calendar --------------------------------------------------------------------------------//-- add         if (!empty($is_auth_type_cal) && !$is_auth[$is_auth_type_cal])         {             message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type_cal], $is_auth[$is_auth_type_cal . "_type"]));         }//-- fin mod : calendar ----------------------------------------------------------------------------         message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));     }       switch( $mode )     {         case 'newtopic':             $redirect = "mode=newtopic&" . POST_FORUM_URL . "=" . $forum_id;             break;         case 'reply':         case 'topicreview':             $redirect = "mode=reply&" . POST_TOPIC_URL . "=" . $topic_id;             break;         case 'quote':         case 'editpost':             $redirect = "mode=quote&" . POST_POST_URL ."=" . $post_id;             break;     }     $redirect .= ($post_reportid) ? '&post_reportid=$post_reportid' : '';     redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));}  //// Set toggles for various options//if ( !$board_config['allow_html'] ){     $html_on = 0;}else{     $html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );}  if ( !$board_config['allow_bbcode'] ){     $bbcode_on = 0;}else{     $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] );}  if ( !$board_config['allow_smilies'] ){     $smilies_on = 0;}else{     $smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] );}  if ( ($submit || $refresh) && $is_auth['auth_read']){     $notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0;}else{     if ( $mode != 'newtopic' && $userdata['session_logged_in'] && $is_auth['auth_read'] )     {         $sql = "SELECT topic_id             FROM " . TOPICS_WATCH_TABLE . "             WHERE topic_id = $topic_id                 AND user_id = " . $userdata['user_id'];         if ( !($result = $db->sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);         }           $notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata['user_notify'];         $db->sql_freeresult($result);     }     else     {         $notify_user = ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) ? $userdata['user_notify'] : 0;     }}  $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] );$setbm = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['setbm']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_setbm'] );  execute_posting_attachment_handling();  //// Begin Approve_mod Block : 2//if ( $mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost' || $mode == 'quote' ){     $approve_mod = array();     $approve_mod['notify'] = false;     $approve_sql = "SELECT *         FROM " . APPROVE_FORUMS_TABLE . "         WHERE forum_id = " . intval($forum_id);     if ( !($approve_result = $db->sql_query($approve_sql)) )     {         message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);     }     if ( $approve_row = $db->sql_fetchrow($approve_result) )     {         if ( intval($approve_row['enabled']) == 1 )         {             $approve_mod = $approve_row;             $approve_mod['enabled'] = true;         }     }     $approve_mod['moderators'] = array();     $approve_mod['moderators'] = explode('|', $approve_mod['approve_moderators']);     if ( in_array($userdata['user_id'], $approve_mod['moderators']) || $is_auth['auth_mod'] )     {         //moderator, don't screen their post         $approve_mod['enabled'] = false;     }         if ( $approve_mod['enabled'] )     {         if ( $approve_mod['forum_hide_unapproved_posts'] )         {             $lang['Stored'] = $lang['approve_admin_Stored_replacement'];         }         //         // Check if quoted post is approved         //         if ( $mode == 'quote' )         {             // patch purpose proposed by Markus Rietzler <markus>             // check if the quoted post has been approved, if so, empty the quote text             $approve_sql = "SELECT *                     FROM " . APPROVE_POSTS_TABLE . "                     WHERE post_id = " . intval($post_id) . "                         AND is_post = 1";             if ( !($approve_result = $db->sql_query($approve_sql)) )             {                 message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);             }             if ( $approve_row = $db->sql_fetchrow($approve_result) )             {                 //quoted post is not approved                 $approve_mod['quoted_post_not_approved'] = true;             }         }           //         // Check user and topic moderation         //         if ( $approve_mod['approve_users'] )         {             //all users & topics, let's check them to see if we should disable moderation             if ( $approve_mod['approve_posts'] && $mode != 'newtopic' )             {                 $approve_sql = "SELECT approve_moderate                     FROM " . APPROVE_TOPICS_TABLE . "                     WHERE topic_id = " . intval($topic_id) . "                         AND approve_moderate = -1                     LIMIT 0,1";                 if ( !($approve_result = $db->sql_query($approve_sql)) )                 {                     message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);                 }                 if ( $approve_row = $db->sql_fetchrow($approve_result) )                 {                     if ( intval($approve_row['approve_moderate']) == -1 )                     {                         //topic auto-approved                         $approve_mod['enabled'] = false;                     }                 }             }             if ( $approve_mod['enabled'] )             {                 $approve_sql = "SELECT approve_moderate                     FROM " . APPROVE_USERS_TABLE . "                     WHERE user_id = " . intval($userdata['user_id']) . "                         AND approve_moderate = -1                     LIMIT 0,1";                 if ( !($approve_result = $db->sql_query($approve_sql)) )                 {                     message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);                 }                 if ( $approve_row = $db->sql_fetchrow($approve_result) )                 {                     if ( intval($approve_row['approve_moderate']) == -1 )                     {                         //user auto-approved                         $approve_mod['enabled'] = false;                     }                 }             }         }         else         {             //only selected topics, let's check them to see if we should turn on moderation             $approve_mod['enabled'] = false;             $approve_sql = "SELECT *                 FROM " . APPROVE_TOPICS_TABLE . "                 WHERE topic_id = " . intval($topic_id) . "                 LIMIT 0,1";             if ( !($approve_result = $db->sql_query($approve_sql)) )             {                 message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);             }             if ( $approve_row = $db->sql_fetchrow($approve_result) )             {                 if ( intval($approve_row['approve_moderate']) == 1 )                 {                     //topic is moderated                     $approve_mod['enabled'] = true;                 }             }         }         //check the user to see if we should still moderate them, regardless of topic settings         if ( !$approve_mod['enabled'] )         {             $approve_sql = "SELECT *                 FROM " . APPROVE_USERS_TABLE . "                 WHERE user_id = " . intval($userdata['user_id']) . "                 LIMIT 0,1";             if ( !($approve_result = $db->sql_query($approve_sql)) )             {                 message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);             }             if ( $approve_row = $db->sql_fetchrow($approve_result) )             {                 if ( intval($approve_row['approve_moderate']) == 1 )                 {                     //user is moderated                     $approve_mod['enabled'] = true;                 }             }         }         if ( $approve_mod['enabled'] )         {             //check admin settings for what to allow & what to moderate             switch ($mode)             {                 case 'newtopic':                     if ( intval($approve_mod['approve_topics']) != 1 )                     {                         //new topics are not moderated                         $approve_mod['enabled'] = false;                     }                 break;                                 case 'reply':                 case 'quote':                     if ( intval($approve_mod['approve_posts']) != 1 )                     {                         //new replies are not moderated                         $approve_mod['enabled'] = false;                     }                 break;                                 case 'editpost':                     if ( intval($approve_mod['approve_poste']) != 1 )                     {                         //post edits are not moderated                         $approve_mod['enabled'] = false;                     }                     $approve_mod_post_id = ($HTTP_GET_VARS[POST_POST_URL]) ? $HTTP_GET_VARS[POST_POST_URL] : $HTTP_POST_VARS[POST_POST_URL];                     if ( !$approve_mod['enabled'] && ( intval($approve_mod['approve_topice']) == 1 ) && !empty($approve_mod_post_id) )                     {                         //let's see if it's a topic and if so, turn moderation back on                         $approve_sql = "SELECT t.topic_first_post_id                             FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p                             WHERE p.post_id = " . intval($approve_mod_post_id) . "                                 AND t.topic_id = p.topic_id                             LIMIT 0,1";                         if ( !($approve_result = $db->sql_query($approve_sql)) )                         {                             message_die(GENERAL_ERROR, $lang['approve_posts_error_obtain'], '', __LINE__, __FILE__, $approve_sql);                         }                         if ( $approve_row = $db->sql_fetchrow($approve_result) )                         {                             if ( intval($approve_row['topic_first_post_id']) == intval($approve_mod_post_id) )                             {                                 //topic edits are moderated                                 $approve_mod['enabled'] = true;                             }                         }                     }                 break;             }         }     }}//// End Approve_mod Block : 2//  // BEGIN cmx_slash_news_mod//// Get News Categories.//if( $userdata['session_logged_in'] && $post_data['disp_news'] ){     if ( $mode == 'edit' && empty($post_id) )     {         message_die(GENERAL_MESSAGE, $lang['No_post_id']);     }      $sql = 'SELECT n.* FROM ' . NEWS_TABLE . ' n WHERE 1 ORDER BY n.news_category';       if ( !($result = $db->sql_query($sql)) )     {         message_die(GENERAL_ERROR, 'Could not obtain news data', '', __LINE__, __FILE__, $sql);     }       $news_sel = array();     $news_cat = array();     while ( $row = $db->sql_fetchrow($result) )     {         if( ($news_category > 0 && $news_category == $row['news_id']) ||             ($post_data['news_id'] > 0 && $post_data['news_id'] == $row['news_id']) )         {                 $news_sel = $row;         }                 if( $post_data['news_id'] != 0 && $post_data['news_id'] == $row['news_id'] )         {             $news_sel = $row;         }         $news_cat[] = $row;     }         if( $post_data['news_id'] == 0 && $news_category == 0)     {         $boxstring = '<option>' . $lang['Regular_Post'] . '</option>';     }     else     {         $boxstring = '<option>' . $news_sel['news_category'] . ' (' . $lang['Current_Selection'] . ')</option>';         $boxstring .= '<option>' . $lang['Regular_Post'] . '</option>';     }       if( count( $news_cat ) > 0 )     {         for( $i = 0; $i </option>assign_block_vars('switch_news_cat', array(             'L_NEWS_CATEGORY' => $lang['Select_News_Category'],             'S_NAME' => 'news_category',             'S_CATEGORY_BOX' => $boxstring         ));     }}// END cmx_slash_news_mod  // --------------------//  What shall we do?//if ( ( $delete || $poll_delete || $mode == 'delete' ) && !$confirm ){     //     // Confirm deletion     //     $s_hidden_fields = '<input>';     $s_hidden_fields .= ( $delete || $mode == "delete" ) ? '<input>' : '<input>';       $l_confirm = ( $delete || $mode == 'delete' ) ? $lang['Confirm_delete'] : $lang['Confirm_delete_poll'];       //     // Output confirmation page     //     include($phpbb_root_path . 'includes/page_header.'.$phpEx);       $template->set_filenames(array(         'confirm_body' => 'confirm_body.tpl')     );       $template->assign_vars(array(         'MESSAGE_TITLE' => $lang['Information'],         'MESSAGE_TEXT' => $l_confirm,           'L_YES' => $lang['Yes'],         'L_NO' => $lang['No'],           'S_CONFIRM_ACTION' => append_sid("posting.$phpEx"),         'S_HIDDEN_FIELDS' => $s_hidden_fields)     );       $template->pparse('confirm_body');       include($phpbb_root_path . 'includes/page_tail.'.$phpEx);}else if ( $mode == 'vote' ){     //     // Vote in a poll     //         if ( (!empty($HTTP_POST_VARS['vote_id'])) and (is_array($HTTP_POST_VARS['vote_id'])) and (isset($HTTP_POST_VARS['vote_id'])) )     {         $vote_option_id = intval($HTTP_POST_VARS['vote_id']);         $vote_id = $HTTP_POST_VARS['vote_id'];         $sql = "SELECT vd.vote_id, vd.vote_max                 FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr             WHERE vd.topic_id = $topic_id                 AND vr.vote_id = vd.vote_id                 AND vr.vote_option_id = $vote_option_id             GROUP BY vd.vote_id";         if ( !($result = $db->sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);         }           if ( $vote_info = $db->sql_fetchrow($result) )         {             $max_vote = $vote_info['vote_max'];         }         $max_voting=count($vote_id);         if ($max_voting>$max_vote)         {             $max_voting=$max_vote;         }         for($i = 0; $i <max_voting>sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);         }           if ( $vote_info = $db->sql_fetchrow($result) )         {             $vote_id = $vote_info['vote_id'];               $sql = "SELECT *                 FROM " . VOTE_USERS_TABLE . "                   WHERE vote_id = $vote_id                     AND vote_user_id = " . $userdata['user_id'];             if ( !($result2 = $db->sql_query($sql)) )             {                 message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);             }               if ( !($row = $db->sql_fetchrow($result2)) )             {               for($i = 0; $i <max_voting>sql_query($sql, BEGIN_TRANSACTION) )                 {                     message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);                 }               }                 $sql = "UPDATE " . VOTE_DESC_TABLE . "                     SET vote_voted = vote_voted + 1                     WHERE vote_id = $vote_id                         AND topic_id = $topic_id";                 if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )                 {                     message_die(GENERAL_ERROR, 'Could not update poll voted', '', __LINE__, __FILE__, $sql);                 }                   $sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip)                     VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";                 if ( !$db->sql_query($sql, END_TRANSACTION) )                 {                     message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);                 }                   $message = $lang['Vote_cast'];             }             else             {                 $message = $lang['Already_voted'];             }             $db->sql_freeresult($result2);         }         else         {             $message = $lang['No_vote_option'];         }         $db->sql_freeresult($result);           $template->assign_vars(array(             'META' => '<meta>')         );         $message .=  '<br><br>' . sprintf($lang['Click_view_message'], '<a>', '</a>');         message_die(GENERAL_MESSAGE, $message);     }     else     {         redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));     }}else if ( $submit || $confirm ){     //     // Submit post/vote (newtopic, edit, reply, etc.)     //     $return_message = '';     $return_meta = '';       switch ( $mode )     {         case 'editpost':         case 'newtopic':         case 'reply':             $username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';             $subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';             $topic_desc = ( !empty($HTTP_POST_VARS['topic_desc']) ) ? trim($HTTP_POST_VARS['topic_desc']) : '';             $message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';//-- mod : calendar --------------------------------------------------------------------------------//-- add             $topic_calendar_time = ( $topic_calendar_time != $post_data['topic_calendar_time'] && !$is_auth['auth_cal']) ? $post_data['topic_calendar_time'] : $topic_calendar_time;             if (empty($topic_calendar_time)) $topic_calendar_time = 0;// repeat             $repeat_mode = $post_info['topic_calendar_repeat'];             if($repeat_mode)             {                 $repeat_type = substr($repeat_mode,0,2);                 $repeat_type_value = substr($repeat_mode,2,2);             }             $topic_calendar_repeats = ( !empty($HTTP_POST_VARS['topic_calendar_repeats']) ) ? trim($HTTP_POST_VARS['topic_calendar_repeats']) : '';             $topic_calendar_repeats_value = ( !empty($HTTP_POST_VARS['topic_calendar_repeats_value']) ) ? trim($HTTP_POST_VARS['topic_calendar_repeats_value']) : '';             if(intval($topic_calendar_repeats_value)==0 || !($topic_calendar_repeats=='DD' || $topic_calendar_repeats=='MT' || $topic_calendar_repeats=='MY' || $topic_calendar_repeats=='WW' || $topic_calendar_repeats=='YY') )             {                 $topic_calendar_repeat = '';             }else             {                 $topic_calendar_repeat = $topic_calendar_repeats . $topic_calendar_repeats_value;             }             $topic_calendar_duration = ( $topic_calendar_duration != $post_data['topic_calendar_duration'] && !$is_auth['auth_cal']) ? $post_data['topic_calendar_duration'] : $topic_calendar_duration;             if ( !empty($topic_calendar_duration) )             {                 $topic_calendar_duration--;             }             if (empty($topic_calendar_time) || empty($topic_calendar_duration)) $topic_calendar_duration = 0;//-- fin mod : calendar ----------------------------------------------------------------------------             $poll_title = ( isset($HTTP_POST_VARS['poll_title']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_title'] : '';             $poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';             $poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? intval($HTTP_POST_VARS['poll_length']) : '0';             $poll_length_h = ( isset($HTTP_POST_VARS['poll_length_h']) && $is_auth['auth_pollcreate'] ) ? intval($HTTP_POST_VARS['poll_length_h']) : '0';             $poll_length = $poll_length*24;             $poll_length = $poll_length_h+$poll_length;             $poll_length = ($poll_length) ? max(0, ($poll_length/24)) : 0;             $max_vote = ( isset($HTTP_POST_VARS['max_vote']) && $is_auth['auth_pollcreate'] ) ? ( ( $HTTP_POST_VARS['max_vote'] == 0 ) ? 1 : $HTTP_POST_VARS['max_vote'] ) : '';             $hide_vote = ( isset($HTTP_POST_VARS['hide_vote']) && $is_auth['auth_pollcreate'] && ($poll_length>0) ) ? 1 : '';             $tothide_vote = ( isset($HTTP_POST_VARS['tothide_vote']) && isset($HTTP_POST_VARS['hide_vote']) && $is_auth['auth_pollcreate'] && ($poll_length>0) ) ? 1 : '';             $bbcode_uid = '';               //-----------------------------------------------------------------------------             // MOD: Delayed Topics               // If we're trying to delay (force time), check for rights...             $forcetime = '';             if (isset($HTTP_POST_VARS['forcetime']) && trim($HTTP_POST_VARS['forcetime']) != '')             {                 if (!$is_auth['auth_delayedpost'])                 {                     message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_' . $is_auth_type], $is_auth[$is_auth_type . "_type"]));                 }                 else                 {                     $forcetime = strtotime($HTTP_POST_VARS['forcetime']);                     user2boardtime($forcetime);                     if (($forcetime == -1) || ($forcetime < time()))                     {                         $forcetime = '';                     }                 }             }               // MOD: Delayed Topics {end}             //-----------------------------------------------------------------------------  //-- mod : calendar --------------------------------------------------------------------------------// here we have added//   , $topic_calendar_time, $topic_calendar_duration//-- modify prepare_post only             prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length, $max_vote, $hide_vote, $tothide_vote, $topic_desc, $topic_calendar_time, $topic_calendar_duration, $topic_calendar_repeat );//-- fin mod : calendar ----------------------------------------------------------------------------               if ( $error_msg == '' )             {                 $topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;//-- mod : announces -------------------------------------------------------------------------------//-- add                 if ($topic_announce_duration </a>sql_query($approve_sql)) )                         {                             message_die(GENERAL_ERROR, $lang['approve_posts_error_insert'], '', __LINE__, __FILE__, $approve_sql);                         }                         if ( $approve_mod['approve_notify_topics'] )                         {                             $approve_mod['notify'] = true;                         }                     }                     elseif ( $mode == 'reply' && $approve_mod['approve_posts'] )                     {                         $approve_sql = "INSERT INTO " . APPROVE_POSTS_TABLE . " (post_id, topic_id, is_post, poster_id)                             VALUES (" . intval($post_id) . ", " . intval($topic_id) . ", 1, " . intval($userdata['user_id']) . ")";                         if ( !($approve_result = $db->sql_query($approve_sql)) )                         {                             message_die(GENERAL_ERROR, $lang['approve_posts_error_insert'], '', __LINE__, __FILE__, $approve_sql);                         }                         if ( $approve_mod['approve_notify_posts'] )                         {                             $approve_mod['notify'] = true;                         }                     }                     elseif ( $mode == 'editpost' )                     {                         $approve_mod['topic_or_post'] = 'is_post';                    

Re: Release of upgrade for phpbb2.0.20

PostPosted: Thu Apr 20, 2006 1:05 am
Author: found it
hi

can you place a zip file or a txt file so ican compare you posting.php as the site has screwed up your copy....

:mrgreen:

PostPosted: Thu Apr 20, 2006 6:51 am
Author: Eon
Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

<img>

PostPosted: Thu Apr 20, 2006 6:56 am
Author: gcomfx.com
"Eon";p="2400" wrote:Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

<img>


Is that the fix for my problem? If so, do you have a link?

PostPosted: Thu Apr 20, 2006 9:41 am
Author: found it
[quote=""Eon";p="2400""]Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

:mrgreen: <img>

PostPosted: Thu Apr 20, 2006 9:43 am
Author: found it
"gcomfx.com";p="2401" wrote:
"Eon";p="2400" wrote:Not to be nit picky or anything, b ut wouldn't it be beneficial to add the functions_post.php edit for the quotes into the install.txt file and into the pre-modded files?

That is the only fix I had to do when I installed it on my main site.

That way people just download the pack and install and be done.

<img>


Is that the fix for my problem? If so, do you have a link?


http://integramod.com/forum/viewtopic.php?p=1592#1592

Re: Release of upgrade for phpbb2.0.20

PostPosted: Thu Apr 20, 2006 11:11 am
Author: Threat009
"found it";p="2365" wrote:hi

can you place a zip file or a txt file so ican compare you posting.php as the site has screwed up your copy....

:mrgreen:

Thanks for taking the time to compare. I'm not sure why no one else has had this problem yet, but I'm guessing it may have something to do w/a mod I've installed in the past.

[url=http]posting.php.zip[/url]

PostPosted: Thu Apr 20, 2006 11:14 am
Author: gcomfx.com
I have HTML off, but I'll try that fix and see if it helps.

Edit: That line is already in the functions_post.php

Or are you pointing me to something else? <img>

PostPosted: Thu Apr 20, 2006 2:27 pm
Author: gcomfx.com
Also have you guys quoted anyone with images yet?

http://100mphclub.com/community/viewtop ... 2914#32914

The quote is not expanded, but takes the space as if it were. <img>