Page 1 of 1

fix for tabs in code tags

Posted: Tue Jun 02, 2009 1:37 pm
by janiii
discussion from here: viewtopic.php?f=4&t=11561

i found a mod for phpbb that should fix the problem with tabs in code tags:
http://www.phpbb.com/mods/db/index.php? ... ib_id=9005

Re: fix for tabs in code tags

Posted: Wed Jun 03, 2009 3:49 am
by ThePhoenixBird
Got it, but reading the code of this mod i think that it could break the current Geshi highligh mod, i will try to test it first :D

Re: fix for tabs in code tags

Posted: Sun Jun 21, 2009 10:28 am
by janiii

Re: fix for tabs in code tags

Posted: Sun Jun 21, 2009 2:06 pm
by janiii
i installed phpbb3 and added the geshi mod.
that one didnt work for me.
janiii wrote:wouldnt some of this help? http://qbnz.com/highlighter/geshi-doc.h ... -container



BUT i found a solution. there are some files to be edited. so if i could contact you tpb.. :)

Re: fix for tabs in code tags

Posted: Sun Jul 05, 2009 7:07 am
by janiii
tpb, i couldn't contact you..

in includes/bbcode.php comment out these lines:

Code: Select all

$code = str_replace("\t", '   ', $code);$code = str_replace('  ', '  ', $code);$code = str_replace('  ', '  ', $code);
this will help that the tabs will not be replaced by spaces.

but in firefox there is still problem with selecting the code. if you select the code by hand, it copies the tabs. but if you click on the select all link, somehow it is wrong copied with spaces. but in IE it works fine. dont know how in opera and safari or google.

Re: fix for tabs in code tags

Posted: Mon Jul 06, 2009 1:10 am
by ThePhoenixBird
testing tabs on code tags fix by janiii

Code: Select all

 Index: trunk/L2_GameServer/java/net/sf/l2j/Config.java===================================================================--- trunk/L2_GameServer/java/net/sf/l2j/Config.java (revision 3238)+++ trunk/L2_GameServer/java/net/sf/l2j/Config.java (revision 3240)@@ -2379,20 +2372,21 @@ 	private static void loadFloodProtectorConfigs(final Properties properties) 	{ 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM, "UseItem", "4"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE, "RollDice", "42"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_FIREWORK, "Firework", "42"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ITEM_PET_SUMMON, "ItemPetSummon", "16"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_HERO_VOICE, "HeroVoice", "100"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SUBCLASS, "Subclass", "20"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_DROP_ITEM, "DropItem", "10"); 		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SERVER_BYPASS, "ServerBypass", "5");+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MULTISELL, "MultiSell", "1"); 	}  	/** 	 * Loads single flood protector configuration. 	 *  	 * @param properties 	 *            properties file reader 	 * @param config 	 *            flood protector configuration instance 	 * @param configString  

Re: fix for tabs in code tags

Posted: Mon Jul 06, 2009 2:15 am
by MELERIX
not working for me.

Re: fix for tabs in code tags

Posted: Mon Jul 06, 2009 2:20 am
by ThePhoenixBird
MELERIX wrote:not working for me.
your bug report doesnt have your forum rev number or copy-paste of the forum error --closed

PS: clean your cache Ctrl+F5
PS2: this fix doesnt allow you to use TABS while writing on the "Post a Reply" text box, you need to use another text editor (wordpad, notepad++, etc) that let you use TABS and then when pasting them inside CODE tags the tabs will be preserved.

Code: Select all

					example
try to highlight with your mouse the white space in front of the example word and you will see the tabs, previously they were replaced by spaces

Re: fix for tabs in code tags

Posted: Mon Jul 06, 2009 3:28 am
by MELERIX
Lo que sucede Fenix es que al presionar donde dice "Seleccionar todo" luego lo pegas por ejemplo en notepad y la verdad queda ilegible, aparece todo el texto hacia el lado :S

Por cierto estoy usando IE8.

Re: fix for tabs in code tags

Posted: Mon Jul 06, 2009 5:16 am
by janiii
MELERIX wrote:Por cierto estoy usando IE8.
^^ lolcats comming!

Re: fix for tabs in code tags

Posted: Tue Jul 07, 2009 8:13 pm
by ThePhoenixBird
MELERIX wrote:Por cierto estoy usando IE8.
There is your problem, we tested on FF 3.0/3.5, Opera 9.5/10, Chrome 2.0, Safari 4 and they work perfectly. I dont care about IE6/7/8

Image

Re: fix for tabs in code tags

Posted: Tue Jul 07, 2009 8:23 pm
by janiii
there is some problem with the patches now. some lines get lost and there are some new lines between each line.. :/

Re: fix for tabs in code tags

Posted: Wed Jul 08, 2009 6:17 am
by MELERIX
janiii wrote:there is some problem with the patches now. some lines get lost and there are some new lines between each line.. :/
janiii I have the same issue with IE8 :cry:

now is impossible to copy codes using IE8... (Phoenix I know that you don't like IE8) but for me IE8 is fine.

please try mantain compatibility between diferent plataforms, in this case different software browsers: IE / Firefox / Chrome / Safari / Opera.

Re: fix for tabs in code tags

Posted: Sat Jul 11, 2009 11:04 pm
by ThePhoenixBird
MELERIX wrote:
janiii wrote:there is some problem with the patches now. some lines get lost and there are some new lines between each line.. :/
janiii I have the same issue with IE8 :cry:

now is impossible to copy codes using IE8... (Phoenix I know that you don't like IE8) but for me IE8 is fine.

please try mantain compatibility between diferent plataforms, in this case different software browsers: IE / Firefox / Chrome / Safari / Opera.
Try this fix:

Image

and then

Image

Save the Cheerleader
Save the World
Save the Internet
Use Firefox!!

Re: fix for tabs in code tags

Posted: Tue Jul 14, 2009 1:34 am
by MELERIX
please try mantain compatibility between diferent plataforms, in this case different software browsers: IE / Firefox / Chrome / Safari / Opera.
:roll: