Page 1 of 1
Quotes Fix

Posted:
Fri Apr 14, 2006 9:49 am
Author: Eon
Open includes/functions_post.php
FIND
- Code: Select all
$tagallowed = (preg_match('#^</?' . $match_tag . ' .*?(style[ ]*?=|on[w]+[ ]*?=)#i', $hold_string)) ? false ]
REPLACE WITH
[code] $tagallowed = (preg_match('#^</?' . $match_tag . ' .*?(style[t ]*?=|on[w]+[t ]*?=)#i', $hold_string)) ? false ]
FIND
[code] if ($end_html != strlen($message) && $tmp_message != '') [/code]
REPLACE WITH
[code] if (!$end_html || ($end_html != strlen($message) && $tmp_message != ''))
This is the common fix for most people. Simon had to fix it another way, but he is special.. <img>

Posted:
Fri Apr 14, 2006 10:01 am
Author: Jason Sanborn
What exactly does this fix?

Posted:
Fri Apr 14, 2006 10:31 am
Author: Eon
Well if you quote something and it does not put it in the box, it fixes that.
On a fresh IM install it does not do this, but with and upgraded one it will.
It is from the IM.com site. I had to use it.

Posted:
Fri Apr 14, 2006 10:40 am
Author: Jason Sanborn
I guess since I had updated to phpBB 2.0.19, I never saw that problem, which is why it confused me. Quotes seem to be working fine for me. <img>

Posted:
Fri Apr 14, 2006 11:04 am
Author: Eon
I don't know exactly when it got fixed, if .19 fixed it or not, but I know everytime I upgrade to IM140 I have to do it. In the IM140 zip file the file is not right. Which is weird. Cause it works on a new install, but not an upgrade. Any ways, if you have a problem with the quotes not working right this is the fix.

Posted:
Fri Apr 14, 2006 12:15 pm
Author: tekguru
Well as my Quote BB Code brok with the upgrade to the 20.20 core I'vejust looked to apply this fix but it seems not to be valid for the upgraded version.
Does anyone have a revised solution?

Posted:
Mon Apr 17, 2006 2:25 pm
Author: Eon
What's really bad is it is not working for me now.. erghh...
What's another fix? ANd this is still 2.0.19

Posted:
Mon Apr 17, 2006 2:39 pm
Author: IntegraMOD
Have a look here the quote problem is now fixed I think.
http://integramod.com/forum/viewtopic.php?t=163

Posted:
Tue Apr 18, 2006 1:08 pm
Author: Eon
Umm no. I am still using 2.0.19, not 2.0.20..
I guess I should just slug through the manual upgrade now. lol

Posted:
Sun Apr 23, 2006 5:26 pm
Author: Vadar
For what it's worth now, I was having the same problem as Eon (from a fresh install and then the standard upgrade path to 2.0.19 and 1.0.3 security). I applied Eon's correction as written above and it solved the problem.
Thanks Eon! <img>
I had thought I would have to upgrade to 2.0.20, but since this is fixed and I see some of the problems others have had with the update to 2.0.20, I honestly wonder if that update is worth the effort. I have a standard installation with the exception of a single mod (post count mod). My plan, if it is a necessary upgrade, is to use the pre-modded files and then redo the post count mod. That would seem the faster method.
Can anyone comment as to whether 2.0.20 update is worthwhile? If you have an active portal and everything is working fine with 2.0.19, is it worth the effort and risk to update? I haven't seen anything on exactly what this update does.
Thanks!

Posted:
Tue May 09, 2006 12:26 pm
Author: Threat009
[quote=""Vadar";p="2824""]For what it's worth now, I was having the same problem as Eon (from a fresh install and then the standard upgrade path to 2.0.19 and 1.0.3 security). I applied Eon's correction as written above and it solved the problem.
Thanks Eon!

Re: Quotes Fix

Posted:
Sun May 21, 2006 5:04 pm
Author: Driver 7
Does anyone actually know how to fix the quotes. I have tried all of the fixes found on this site and nothing is working. It looks horrable if someone uses the quotes in a post.
I have found that if you remove the =Name of poster and post #, the quotes work fine. But with that in the BBcode it does not work.
Re: Quotes Fix

Posted:
Tue May 23, 2006 8:45 pm
Author: Teelk
Hmmm... the 2.0.19 update didn't contain the fixes above?
There may have been a mixup when "moving" files over to this site from the old one. I remember ammending the 2.0.19 with those fixes, but an older copy may now be in the downloads here.
For those who this hasn't worked for... can I ask whether or not you've done the premodded or manual updates? If it's manual, I'd go over your includes/bbcode.php file again. That file is rarely changed by any MODs and if you haven't added any bbcode MODs then it most likely hasn't been touched and you can use the premodded file. If you use a file comparison program it's relatively easy to compare yours with the premodded bbcode.php file.
I ask the above question because many people updating at the time made the mistake of editing the wrong lines of code. There are two sections of code about the quotes that are very similar, though not identical. It should be the second section of this code that's edited.
At around the same time that I ammended the update to include the above fixes, I also added the approximate line where the FIND code is. If this isn't in the manual update, then I'm fairly certain it isn't the latest edited version... <img>
Re: Quotes Fix

Posted:
Wed May 24, 2006 6:54 am
Author: Driver 7
Man. I have two of your mods installed Teelk. FAP and Rounded quotes. I just used winmerge to compare my bbcode.php to the one in foundit's premodded update and the deferences are everywhere.
I added my update manually.
I will go over it again now. Perhaps I missed something.
Re: Quotes Fix

Posted:
Thu May 25, 2006 6:41 am
Author: Driver 7
LOL. I fixed mine. I downloaded Found it's bbcode.zip from the other post, Then redid the rounded quotes and the FAP edits to bbcode.php, and sure enough it worked.
Thanks Teelk and Found it! <img>

Posted:
Mon May 29, 2006 8:50 am
Author: ZacFields
Just FYI for future integramod forum searching reference:
I upgraded from 1.3.2d to 1.4.0 and I had this problem where the quotes would not work. I applied the fix provided in the first post of this topic and they work now.
It should be noted that applying the fix does *not* fix the quotes that are already posted, but you will need to test the functionality by trying your quotes in these 3 ways:
1. [ quote ] quote message here [ / quote ]
2. [ quote="ZacFields" ] quote message here [ / quote ]
3. By clicking on the "quote" button on somebody's post.
It's important to try all 3 ways because each of the 3 ways is a different code obviously and it will give you a better indicator of where the problem lies if only one or two of the 3 methods works and one of them doesn't.
Zac
Re: Quotes Fix

Posted:
Mon May 29, 2006 9:50 am
Author: Angelus
Hi.
1. work
2. does not work
3. does not work
after using the fix of the first posting here.
What to do?

Posted:
Mon May 29, 2006 11:14 am
Author: ZacFields
So you're saying that it works when you just use the regular manually-entered [ quote ] tag and the other two do not function?
Have you checked to see that your bbcode.php file matches the premodded file? If not, and if your forum is not been manually modded you should save a backup copy of your bbcode.php file and then try uploading the pre-modded file from a fresh install zip of 1.4.0 and see if that solves your problem.
Zac
Re: Quotes Fix

Posted:
Mon May 29, 2006 11:22 am
Author: Angelus
Yes the normal quote via the BBcode box works but the quote function in postings of another user does not work.
And yes I have some mods installed changing the bbcode for example the album pack 1.21 and something else. Will try to use the normal bbcode file. But when this works this won't help me because I need the modded file for the integrated mods.
Edit:
This are the changes from Album Pack 1.21
- Code: Select all
##-----[ FIND ]------------------------------------------------# $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\3', $bbcode_tpl['url4']);##-----[ AFTER, ADD ]------------------------------------------#// Mighty Gorgon - Full Album Pack - BEGIN // Get Album PIC based on ID $bbcode_tpl['fullalbumimg'] = str_replace('{IMG_NUM}', '\1', $bbcode_tpl['fullalbumimg']); $bbcode_tpl['albumimg'] = str_replace('{IMG_NUM}', '\1', $bbcode_tpl['albumimg']); $bbcode_tpl['albumimgl'] = str_replace('{IMG_NUM}', '\1', $bbcode_tpl['albumimgl']); $bbcode_tpl['albumimgr'] = str_replace('{IMG_NUM}', '\1', $bbcode_tpl['albumimgr']); $bbcode_tpl['albumimgc'] = str_replace('{IMG_NUM}', '\1', $bbcode_tpl['albumimgc']);// Mighty Gorgon - Full Album Pack - END##-----[ FIND ]------------------------------------------------# $replacements[] = $bbcode_tpl['url4'];##-----[ AFTER, ADD ]------------------------------------------# // Mighty Gorgon - Full Album Pack - BEGIN // [albumimg]image number here[/albumimg] $album_img_patterns[1] = "#[albumimg]([0-9]+)[/albumimg:$uid]#si"; $album_img_replacements[1] = $bbcode_tpl['albumimg']; // [albumimgl]image number here[/albumimgl] $album_img_patterns[2] = "#[albumimgl:$uid]([0-9]+)[/albumimgl:$uid]#si"; $album_img_replacements[2] = $bbcode_tpl['albumimgl']; // [albumimgr]image number here[/albumimgr] $album_img_patterns[3] = "#[albumimgr:$uid]([0-9]+)[/albumimgr:$uid]#si"; $album_img_replacements[3] = $bbcode_tpl['albumimgr']; // [albumimgc]image number here[/albumimgc] $album_img_patterns[4] = "#[albumimgc:$uid]([0-9]+)[/albumimgc:$uid]#si"; $album_img_replacements[4] = $bbcode_tpl['albumimgc']; // site image-end // [fullalbumimg]image number here[/fullalbumimg] $album_img_patterns[5] = "#[fullalbumimg:$uid]([0-9]+)[/fullalbumimg:$uid]#si"; $album_img_replacements[5] = $bbcode_tpl['fullalbumimg']; $text = preg_replace($album_img_patterns, $album_img_replacements, $text); // Mighty Gorgon - Full Album Pack - END##-----[ FIND ]------------------------------------------------# $text = preg_replace("#[img]((http|ftp|https|ftps)://)([^ ?&=#"nrt<]*?(.(jpg|jpeg|gif|png)))[/img]#sie", "'[img]\1' . str_replace(' ', '%20', '\3') . '[/img]'", $text);##-----[ AFTER, ADD ]------------------------------------------# // Mighty Gorgon - Full Album Pack - BEGIN // [albumimg]album image id here[/albumimg] $text = preg_replace("#[fullalbumimg]([0-9]+)[/fullalbumimg]#sie", "'[fullalbumimg:$uid]\1[/fullalbumimg:$uid]'", $text); $text = preg_replace("#[albumimg]([0-9]+)[/albumimg]#sie", "'[albumimg:$uid]\1[/albumimg:$uid]'", $text); $text = preg_replace("#[albumimgl]([0-9]+)[/albumimgl]#sie", "'[albumimgl:$uid]\1[/albumimgl:$uid]'", $text); $text = preg_replace("#[albumimgr]([0-9]+)[/albumimgr]#sie", "'[albumimgr:$uid]\1[/albumimgr:$uid]'", $text); $text = preg_replace("#[albumimgc]([0-9]+)[/albumimgc]#sie", "'[albumimgc:$uid]\1[/albumimgc:$uid]'", $text); // Mighty Gorgon - Full Album Pack - END
This are the changes from the image resizer I found on the old site:
- Code: Select all
# #-----[ FIND ]------------------------------------------ # $bbcode_tpl = null; # #-----[ AFTER, ADD ]------------------------------------------ # // mod img size add function makeimgsize ( $width, $height ) { global $board_config; $size = ''; // check for smallness if ( $width < $board_config['postimg_width'] && $height <board_config> $height ) { if ( $board_config['postimg_width'] < $width ) { $size = 'width="' . $board_config['postimg_width'] . '"'; } }else { if ( $board_config['postimg_height'] <height> $img ) { $stuff = $matches[1][$i]; $stuff = explode( ':', $stuff ); if ( count( $stuff ) != 4 ) { // old image or something $post = preg_replace( "#[img]([^?].*?)[/img]#i", $bbcode_tpl['img'], $post ); } switch($stuff[0]) { case '=right': $align = $lang['RIGHT']; break; case '=center': $align = 'center'; break; case '=left': default: $align = $lang['LEFT']; break; } $width = $stuff[1]; $height = $stuff[2]; $size = makeimgsize( $width, $height ); if ( $size != 'SMALL' ) { $replace = $bbcode_tpl['thmbimg']; $seek = array( '{IMAGE}', '{WIDTH}', '{HEIGHT}', '{SIZE}', '{NOTICE}', '{ALIGN}' ); $with = ( !empty( $size ) ) ? array( $matches[2][$i] , $width, $height, $size, $lang['postimg_clickme'], $align ) : array( $matches[2][$i] , $width, $height, $size, '', $align ); $replace = str_replace( $seek, $with, $replace ); } else { $replace = str_replace( '1', $matches[2][$i], $bbcode_tpl['img'] ); } $post = str_replace( $img, $replace, $post ); } return $post; } // mod img size end # #-----[ FIND ]------------------------------------------ # $patterns[] = "#[img]([^?].*?)[/img]#i"; # #-----[ BEFORE, ADD ]------------------------------------------ # // mod img size replace with call to image parsing function $text = image_parse ( $text, $uid ); # #-----[ FIND ]------------------------------------------ # $text = preg_replace("#[img] # #-----[ BEFORE, ADD ]------------------------------------------ # // mod max img size changed the first pass thingo preg_match_all( "#[(img.*?)]((http|ftp|https|ftps)://)([^ ?&=#"nrt<]*?(.(jpg|jpeg|gif|png)))[/img]#sie", $text, $matches ); // now we go through these matches and do what's needed foreach ( $matches[0] as $i => $m ) { // easier use $tag = $matches[1][$i]; $url1 = $matches[2][$i]; $url2 = $matches[4][$i]; // if we already tagged this one then we leave it be ;) preg_match( '#img.*?:(d+):(d+)#i', $tag, $match ); if ( empty( $match ) ) { // get the size so we can store it if ( !$size = @getimagesize( $url1 . $url2 ) ) { // image will not get resized $width = ''; $height = ''; } else { $width = $size[0]; $height = $size[1]; } } else { // we already have the size $width = $match[1]; $height = $match[2]; } $tag = explode( ':', $tag ); // remove any possible left over : stuff $tag = $tag[0]; // lastly we replace it within the text $text = str_replace( $m, '[' . $tag . ':' . $width . ':' . $height . ':' . $uid . ']' . $url1 . $url2 . '[/img]', $text ); } # #-----[ IN-LINE FIND ]------------------------------------------ # $text # #-----[ IN-LINE BEFORE, ADD ]------------------------------------------ # // # #-----[ AFTER, ADD ]------------------------------------------ # // end mod img size changes
I'm no coder so I will probably not find the problem.
Greetings
Thorsten
Re: Quotes Fix

Posted:
Mon Jun 05, 2006 2:21 am
Author: Angelus
Nobody able to help? My problem is still not solved.
Greetings
Thorsten

Posted:
Mon Jun 05, 2006 6:48 am
Author: Eon
Try using Found it's bbcode.zip file in this topic, then go back and make your edits for your mods. Make sure you pay close attention to the edits to avoid any mistakes.
http://integramod.com/forum/viewtopic.p ... &&start=45
Re: Quotes Fix

Posted:
Mon Jun 05, 2006 7:57 am
Author: Angelus
Thankks for the tip. Will try it this week and than let you know if it worked.
Greetings
Thorsten

Posted:
Mon Jun 05, 2006 8:18 am
Author: Eon
NP man. Just let us know.
Re: Quotes Fix

Posted:
Tue Jun 06, 2006 8:27 am
Author: Angelus
Hi I tried it and now get the following error message when klicking on quote in someones post:
Fatal error: Call to undefined function: dss_rand() in C:XAMPPxampphtdocsforumincludesbbcode.php on line 534
The code in line 534 is:
- Code: Select all
$uid = dss_rand();
and dss_rand() is only one time appearing in bbcode.php.
SO what to do now?
Greetings
Thorsten

Posted:
Tue Jun 06, 2006 8:53 am
Author: Eon
Hmm. I am not sure what that is. Is that after you click submit on the post, or right when you click the quote button?
Re: Quotes Fix

Posted:
Tue Jun 06, 2006 9:09 am
Author: Angelus
It was after I pressed "preview" because I wanted to check if it works.
Re: Quotes Fix

Posted:
Tue Jun 06, 2006 10:28 am
Author: Angelus
I located the problem. It's in the update file
phpbb_2.0.18_to_2.0.19_integramod_1.4.0.txt the following statement:
#
#-----[ FIND ]---------------------------------------------
# There are two instances of similar code, only edit the second one(is under the bbencode_first_pass function).
# Line 437
//
and
for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '
', '
', '', false, '');
$text = bbencode_first_pass_pda($text, $uid, '/[quote=(".*?")]/is', '[/quote]', '', false, '', "
");
//
and
for posting replies with quote, or just for quoting stuff with an pre-defined post entry
$text = bbencode_first_pass_pda($text, $uid, '/[quote=p=("[0-9]+")]/is', '
', '', false, '', "
");
$text = bbencode_first_pass_pda($text, $uid, '/[quote=("[^"]*?");p=("[0-9]+")]/is', '
', '', false, '', "
");
#
#-----[ REPLACE WITH ]---------------------------------------------
#
//
and
for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '
', '
', '', false, '');
//
and
for posting replies with quote, or just for quoting stuff with an pre-defined post entry
$text = bbencode_first_pass_pda($text, $uid, '/[quote=p=\\"([0-9]+)\\"]/is', '
', '', false, '', "
");
$text = bbencode_first_pass_pda($text, $uid, '/[quote=\\"(.*?)\\";p=\\"([0-9]+)\\"]/is', '
', '', false, '', "
");
$text = bbencode_first_pass_pda($text, $uid, '/[quote=\\"(.*?)\\"]/is', '
', '', false, '', "[quote]");
If I do not this change the quotes work correctly. So would be great if someone can check the problem. Sorry can't use bbcode in this posting because of the quote tags in the text.
Greetings
Thorsten
Re: Quotes Fix

Posted:
Sun Jun 11, 2006 9:07 pm
Author: Sadasius2
I have a quote problem as well. It has to do with expanding and contracting. On my website sometimes I have huge quotes that will not contract. It is left expanded and taking too much room. All my other quote functions work perfectly.

Posted:
Fri Jun 16, 2006 9:53 am
Author: Azrael
using: standard IntegraMod 1.40
updated to 2.20 from premodded files
updates to security 1.03 from premodded files
I can't find the code that's mentioned in the first post in functions_post.php at all.
1. [ quote ] quote message here [ / quote ]
2. [ quote="ZacFields" ] quote message here [ / quote ]
3. By clicking on the "quote" button on somebody's post.
And another info: Version 1 and 2 work, only clicking on the quote button doesn't. which would be: [quote=""User1";p="17""] for example. No idea how to fix it.
I have the mentioned bbcode.php file installed as it came with one of the updates. I have not edited that file and only made the mysql5 fixes to functions_post.php.
Any ideas? Any help would be appreciated