Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Anguz on October 22, 2004, 06:28:53 PM

Title: Faster Parsecode
Post by: Anguz on October 22, 2004, 06:28:53 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=39)

This mod will make the bulletin board code parsing faster.
Title: Re: Faster Parsecode
Post by: Burpee on October 22, 2004, 06:40:05 PM
Hmm... any downsides?
If there aren't it wouldn't make sense to turn this into a mod - it should just be used for the default SMF install...
Title: Re: Faster Parsecode
Post by: Anguz on October 22, 2004, 07:43:59 PM
For now it's a mod, I'm a mod maker. :)

I don't know any downside yet. If you think about it, this function is called lots of times in topics: for message bodies (if there's code blocks, it's called more than once) and signatures, news. Any optimization on it would be very good, so I worked on it for some weeks. In my tests, this one is 20-1000% faster, depending on what it's given to parse.
Title: Re: Faster Parsecode
Post by: [Unknown] on October 22, 2004, 08:12:35 PM
Just because it's faster doesn't mean there are no downsides.  I'm not completely certain it will parse the same, and there's no one it's going into 1.0....

Because, see, the one in there works, mostly.  There are a few bugs, but generally speaking it works and for most people.  Even if this one is faster, and even does some things better... if there's anything it does worse, it really won't be a good move.

-[Unknown]
Title: Re: Faster Parsecode
Post by: Kindred on October 28, 2004, 10:13:39 AM
Well, I tried to install it, (mostly because I want to install the csv-table mod) but I keep getting failures on the install....
Title: Re: Faster Parsecode
Post by: Anguz on October 28, 2004, 01:04:20 PM
Do you have the publick RC2? If you installed the fixes package, that may be why you get the failure. I'll write a quick update for the mod to install on the fixes one quick.

/me switches to his text editor...
Title: Re: Faster Parsecode
Post by: Anguz on October 28, 2004, 01:30:17 PM
Updated to 1.01

Now it installs fine on RC2 after the fixes patch was applied.
Title: Re: Faster Parsecode
Post by: Lazy on October 29, 2004, 10:08:08 AM
installs fine on rc2 btw. works fine, allways do installs by hand & seems parsing faster.
Title: Re: Faster Parsecode
Post by: allfripou on November 14, 2004, 05:14:49 PM
thx for this mod :)

However the codes in uppercase like [*U] are not parsed anymore in my case [*u] still works.

Maybe a mistake on my side or a small fix ?

:)
Title: Re: Faster Parsecode
Post by: Anguz on November 14, 2004, 05:42:20 PM
What tag gives you that problem? Did it work fine before the mod? It should be case insensitive.
Title: Re: Faster Parsecode
Post by: allfripou on November 14, 2004, 06:29:21 PM
[*U]here  [/U] does not work anymore and was working just before the mod introduction. I'll test the others ;) and edit here.

PS [*u] was working  and is working anyway.

Edit get the same for COLOR , B. I think this is general. I have tested the BB codes in the board news.
Title: Re: Faster Parsecode
Post by: Anguz on November 14, 2004, 10:00:12 PM
Yeah, I think I know what the problem is. I'll fix it and release the update soon. Sorry for not noticing before.
Title: Re: Faster Parsecode
Post by: Anguz on November 15, 2004, 02:06:17 AM
Updated to 1.02


I made this release an update instead of a full installer, so you will need 1.01 installed first. The reason for doing it like this was that many other mods are based on this one, uninstalling would have been a lot messier if you had those too.
Title: Re: Faster Parsecode
Post by: allfripou on November 15, 2004, 02:53:27 PM
works very well now thx.

:)
Title: Re: Faster Parsecode
Post by: Anguz on November 15, 2004, 06:29:33 PM
Glad to hear that. :)
Title: Re: Faster Parsecode
Post by: Anguz on November 17, 2004, 05:19:48 AM
Someone asked me why it is faster. The main reason is that it first checks which tags are used in the message passed to it and then only does those.
Title: Re: Faster Parsecode
Post by: Webby on November 19, 2004, 03:34:54 AM
Works very well and is indeed faster.  Thanx !
Title: Re: Faster Parsecode
Post by: Tony Reid on November 19, 2004, 07:24:22 PM
Im getting this error when I click [Apply Mod] in the package manager...

Quote
Installing this package will perform the following actions:
Type                                                    Action                                              Description
1. Execute Modification                     ./Sources/Subs.php                           Failure

All I have installed is the public RC2 and the fusebox mod.

Any ideas?

Title: Re: Faster Parsecode
Post by: Anguz on November 19, 2004, 08:47:38 PM
If you've not installed the fixes for RC2, then use 1.00. If you have, use 1.01. After either one, apply 1.02 update. Let me know if that helps. :)
Title: Re: Faster Parsecode
Post by: Tercel on November 20, 2004, 02:43:40 PM
Hi,

thanks for your great MODs!
With FasterParsecode i got a Problem when installing.
After installing 1.01, PaketManager will not let me install the 1.02 Update, cause it says its an old Version (Red Light behind the Mod Name).

Does anyone know what´s the reason for that?

Thanks from Germany!

Tercel
Title: Re: Faster Parsecode
Post by: Anguz on November 20, 2004, 03:28:35 PM
1.02 tells you it's an older version when you have 1.01 installed? weird. Does it give you the link to apply the mod anyway?
Title: Re: Faster Parsecode
Post by: Tercel on November 20, 2004, 10:15:43 PM
No, just - Show Files & Delete. Not funny :-)
But it shows all 3 (incl. Install) when 1.01 is not installed.

Tercel
Title: Re: Faster Parsecode
Post by: Tercel on November 20, 2004, 11:10:43 PM
Man, don´t make yourself trouble, might be a failure due to some Mods, i´ve allready installed:

   Mod Name Mod Version   
1. Faster Parsecode 1.01  [ Modifikation anwenden ] [ Dateien auflisten ] [ Löschen ] 
2. OnLine Users Today 1.1   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
3. Buddy List 1.11   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
4. Fuse Box 1.22   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
5. The Bar Of Experience 1.1   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
6. Faster Parsecode 1.02  [ Modifikation anwenden ] [ Dateien auflisten ] [ Löschen ] 
7. Ultimate Shoutbox 1.2   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
8. Message Icon Manager (Quick Reply) 1.2   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
9. Coloured Jumpbox 1.11   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
10. Manage Holidays MOD 1.01   [ Deinstallieren ] [ Dateien auflisten ] [ Löschen ] 
11. SMF 1.0 RC2 Fix Package 1.0   [ Dateien auflisten ] [ Löschen ] 

When I install 101, embendet Pictures are not shown and Tables are desroyed, even after adding 102 manualy, there´s no clue. It won´t work. But I´m shure this is no problem of your MOD.

Keep on Your good Work - You just can´t have everything in life :-)

Tercel
Title: Re: Faster Parsecode
Post by: Anguz on November 21, 2004, 01:53:47 AM
Hmm... could you post a copy of a message with an image and table the way you had problems with? I'd like to test this.
Title: Re: Faster Parsecode
Post by: Eris Siva on November 21, 2004, 03:29:46 AM
Won't let me install this mod at all....

Perhaps because I'm using 1.0 pre?
Title: Re: Faster Parsecode
Post by: Anguz on November 21, 2004, 04:49:45 AM
Quote from: Eris Siva on November 21, 2004, 03:29:46 AM
Won't let me install this mod at all....

Perhaps because I'm using 1.0 pre?

Yes. I'll release the next version when SMF 1.0 gets released publicly. Soon. :)
Title: Re: Faster Parsecode
Post by: Tercel on November 21, 2004, 08:54:37 AM
Of course

[table]
    [tr]
      [td]
      [url=http://...maddogs.info][img width=38 height=38]http://independence-somewhere/Bilder/erv_schweinfurt.jpg[/img][/url][hr][/td]
      [td]Schweinfurt Mad Dogs[hr][/td]
      [td][url=http://...maddogs.info]...maddogs.info[/url][br][url=http://independence-hockey.com][b]INDEPENDENCE[/b][/url][/td]
[/tr]
    [tr]
      [td]
      [url=http://...bayreuth-tigers...][img width=38 height=38]http://independence-somewhere/Bilder/bayreuth_the_tigers.jpg[/img][/url][hr][/td]
      [td]Bayreuth Tigers[hr][/td]
      [td][url=http://...bayreuth-tigers...]...bayreuth-tigers...[/url][/td]
    [/tr]
    [tr]
      [td]
      [url=http://...bschc-preussen...][img width=38 height=38]http://independence-somewhere/Bilder/bschc_preussen_60.gif[/img][/url][hr][/td]
      [td]Berliner SCHC Preussen[hr][/td]
      [td][url=http://...bschc-preussen...]bschc-preussen...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...revier-loewen...][img width=38 height=38]http://independence-somewhere/Bilder/revier_loewen.jpg[/img][/url][hr][/td]
      [td]Revier Löwen Oberhausen[hr][/td]
      [td][url=http://...revier-loewen...]...revier-loewen...[/url][br][url=http://...revierloewenfans.../]...revier-loewenfans...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...ehc-le...][img width=38 height=38]http://independence-somewhere/Bilder/blue_lions_leipzig.jpg[/img][/url][hr][/td]
      [td]Blue Lions Leipzig[hr][/td]
      [td][url=http://...ehc-le...]...ehc-le...[/url][br][url=http://82.97.68.153/startseite.php]Hauptseite[/url][/td]
      [/tr]
   [tr]
      [td]
      [url=http://...eisbaerenjuniors...][img width=38 height=38]http://independence-somewhere/Bilder/eisbaeren_juniors.jpg[/img][/url][hr][/td]
      [td]Eisbären Juniors e.V. Berlin[hr][/td]
      [td][url=http://...eisbaerenjuniors...]...eisbaerenjuniors...[/url][/td]
      [/tr]
       [tr]
      [td]
      [url=http://...eisloewen.com][img width=38 height=38]http://independence-somewhere/Bilder/esc_dresden.jpg[/img][/url][hr][/td]
      [td]Dresdner Eislöwen[hr][/td]
      [td][url=http://...eisloewen.com]...eisloewen.com[/url][br][url=http://...eisloewen...]...eisloewen...[/url][/td]
    [/tr]
    [tr]
      [td]
      [url=http://...hannover-eishockey...][img width=38 height=38]http://independence-somewhere/Bilder/hannover_indians.jpg[/img][/url][hr][/td]
      [td]Hannover Indians[hr][/td]
      [td][url=http://...hannover-eishockey...]...hannover-eishockey...[/url][br][url=http://...kev-hannover-indians...]...kev-hannover-indians...[/url][/td]
    [/tr]
    [tr]
      [td]
      [url=http://...hassfurt-sharks...][img width=38 height=38]http://independence-somewhere/Bilder/erc_hassfurt.jpg[/img][/url][hr][/td]
      [td]Hassfurt Sharks[hr][/td]
      [td][url=http://...hassfurt-sharks...]...hassfurt-sharks...[/url][br][url=http://...sharks-fans.info/forum/index.php]...sharks-fans.info/forum/index.php[/url][/td]
    [/tr]
    [tr]
      [td]
      [url=http://...hoechstadt-alligators...][img width=38 height=38]http://independence-somewhere/Bilder/hoechstadt_alligators.jpg[/img][/url][hr][/td]
      [td]Aischtal Alligators Höchstadt[hr][/td]
      [td][url=http://...hoechstadt-alligators...]...hoechstadt-alligators...[/url][/td]
      [td] [/td]
    [/tr]
    [tr]
      [td]
      [url=http://...sc-mittelrhein...][img width=38 height=38]http://independence-somewhere/Bilder/scmittelrhein.jpg[/img][/url][/td]
      [td]Mittelrhein Bären[hr][/td]
      [td][url=http://...sc-mittelrhein...]...sc-mittelrhein...[/url][/td]
      [td] [/td]
    [/tr][/table]

[b]Oberliga Süd[/b][hr]
[table]
    [tr]
      [td]
      [url=http://...starbulls...][img width=38 height=38]http://independence-somewhere/Bilder/star_bulls_rosenheim.jpg[/img][/url][hr][/td]
      [td]Starbulls Rosenheim[hr][/td]
      [td][url=http://...starbulls...]...starbulls...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...ehc-muenchen.com][img width=38 height=38]http://independence-somewhere/Bilder/ehc_muenchen.jpg[/img][/url][hr][/td]
      [td]EHC München[hr][/td]
      [td][url=http://...ehc-muenchen.com]...ehc-muenchen.com[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...ec-peiting...][img width=38 height=38]http://independence-somewhere/Bilder/ec_peiting.jpg[/img][/url][hr][/td]
      [td]EC Peiting[hr][/td]
      [td][url=http://...ec-peiting...]...ec-peiting...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...evr-online...][img width=38 height=38]http://independence-somewhere/Bilder/ev_ravensburg.jpg[/img][/url][hr][/td]
      [td]EV Ravensburg[hr][/td]
      [td][url=http://...evr-online...]...evr-online...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...stuttgart-wizards...][img width=38 height=38]http://independence-somewhere/Bilder/stuttgart_wizards.jpg[/img][/url][hr][/td]
      [td]Stuttgart Wizards[hr][/td]
      [td][url=http://...stuttgart-wizards...]...stuttgart-wizards...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...ev-fuessen...][img width=38 height=38]http://independence-somewhere/Bilder/fuessen.jpg[/img][/url][hr][/td]
      [td]Leopards Füssen[hr][/td]
      [td][url=http://...ev-fuessen...]...ev-fuessen...[/url][/td]
      [/tr]
[tr]
      [td]
      [url=http://...ehc-klostersee...][img width=38 height=38]http://independence-somewhere/Bilder/ehc_klostersee.jpg[/img][/url][hr][/td]
      [td]EHC Klostersee[hr][/td]
      [td][url=http://...ehc-klostersee...]...ehc-klostersee...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...tev-miesbach...][img width=38 height=38]http://independence-somewhere/Bilder/tev_miesbach.jpg[/img][/url][hr][/td]
      [td]TEV Miesbach[hr][/td]
      [td][url=http://...tev-miesbach...]...tev-miesbach...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...scr...][img width=38 height=38]http://independence-somewhere/Bilder/sc_riessersee.jpg[/img][/url][hr][/td]
      [td]SC Riessersee Garmisch-Partenkirchen[hr][/td]
      [td][url=http://...scr...]...scr...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...heilbronner-falken...][img width=38 height=38]http://independence-somewhere/Bilder/heilbronner_falken.jpg[/img][/url][hr][/td]
      [td]Heilbronner Falken[hr][/td]
      [td][url=http://...heilbronner-falken...]...heilbronner-falken...[/url][/td]
      [/tr]
    [tr]
      [td]
      [url=http://...esv-huegelsheim.../][img width=38 height=38]http://independence-somewhere/Bilder/esv_huegelsheim.jpg[/img][/url][/td]
      [td]ESV Hügelsheim Hornets[hr][/td]
      [td][url=http://...esv-huegelsheim...]...esv-huegelsheim...[/url][/td]
      [/tr]

  [/table]


Just like this.

Cu Tercel
Title: Re: Faster Parsecode
Post by: Anguz on November 22, 2004, 04:14:27 AM
Thank for finding that Tercel, I should've have checked the table parsing when this problem was found in my CSV tables mod.

I'm uploading an update in a moment.

BTW, found a way around the no apply-mod link in the packages browser. Upload the package using the form in the Download New Packages area, right after doing it you'll be given the option to apply it. Even if you get a warning in the preview, you still have the proceed link, which will apply the mod without a problem. ;)
Title: Re: Faster Parsecode
Post by: Anguz on November 22, 2004, 04:17:31 AM
1.03

Title: Re: Faster Parsecode
Post by: Kindred on November 22, 2004, 09:46:31 AM
Question:

Is 1.03 an update to 1.02 (in other words, do we install over 1.02 or uninstall 1.02 before installing 1.03?)
Title: Re: Faster Parsecode
Post by: Anguz on November 22, 2004, 04:31:47 PM
Quote from: kindred on November 22, 2004, 09:46:31 AM
Is 1.03 an update to 1.02 (in other words, do we install over 1.02 or uninstall 1.02 before installing 1.03?)

It's in addition to 1.02. They handle different things and you need them both. 1.02 was for the tag's case sensitivity and 1.03 for the parsing inside tables.
Title: Re: Faster Parsecode
Post by: Tercel on November 22, 2004, 08:17:36 PM
@Anguz

The pictures inside the tables are shown now.! ;D
But - somehow your code inserts too much <br />'s where no <br> is in the message. Everytime when a new line´s beginning in the original, the script inserts them. This causes more Carriage Returns than Jerry Lewis did in his typewriter Comedy  :D

What happens:

for ex.:
[tr]        ->     <tr><br />
[td]        ->    <td><br />

like this you get 2 empty lines inside the table, where they shouldn´t be.
There are also some Spaces I donna know where they come from: This is the resulting HTML!

<hr /><br /><table><br />   <tr><br />     <td valign="top"><br />      <a href="

Hope I could help U

CU! Tercel

Title: Re: Faster Parsecode
Post by: Anguz on November 23, 2004, 01:22:27 AM
SMF turns newlines in messages into <br />s. If you have <br />s after the <td>s and <hr />s, that's because you put a newline after the [td]s and [hr]s, respectively. I checked and there's no <br />s after the <tr>s or <table>s. I checked this with the message you provided in reply 26 (http://www.simplemachines.org/community/index.php?topic=18659.msg162949#msg162949).
Title: Re: Faster Parsecode
Post by: Tercel on November 23, 2004, 08:57:09 AM
So I´d have to edit my messages...  :(

Let´s see how much Coffee is in the House  ;)

CU Tercel
Title: Re: Faster Parsecode
Post by: theantidote on December 12, 2004, 12:27:24 AM
They all work until 1.03 then:
Parse error: parse error, expecting `')'' in /home/www/xbfclan.freesuperhost.com/forum/Sources/Subs.php on line 833

Is is because I'm using MkPortal and I edited my default subs so it could work? I'm running RC2 with the patch

Heres the site with the errors: http://www.xbfclan.tk
Title: Re: Faster Parsecode
Post by: theantidote on December 12, 2004, 12:32:51 AM
Never mind I fixed it. The 'match a table' code was inside the code_to_from array( thing and it wanted an ending ) for it. I just moved it above that array( stuff and it doesn't give me error, but will it still work?

EDIT: Never mind it doesn't work, whats wrong? Now the smilies wont work on my forum when posting, neither will the other buttons. The smilies and all the stuff appear on my previous posts, but I can't put them into posts via the buttons. This is annoying, I might just go back to my earlier subs.php. Is anyone else having a problem with 1.03?
Title: Re: Faster Parsecode
Post by: Anguz on December 12, 2004, 01:23:50 AM
Hmm... did you install 1.01 first? 1.02 and 1.03 don't replace 1.01. First install 1.01, then 1.02 and 1.03. I'm asking this cause you mentioned the $code_to_from array, which is in the original parsecode function, not in mine.
Title: Re: Faster Parsecode
Post by: theantidote on December 12, 2004, 01:26:05 AM
I accidentaly installed 1.00, then the others. After realizing my mistake I uninstalled all of them and replaced my subs.php with the back-up. Then I did 1.01 and so on. I just uninstalled them, but I'll try it in order again.

EDIT: Okay installed the mod by hand and it worked without errors. I'm still getting problems with adding smileys and such to my posts. Can anybody help me or analyze my subs.php for me?
Title: Re: Faster Parsecode
Post by: Anguz on December 12, 2004, 05:03:28 AM
If you could please save a copy of your Subs.php as .txt or zipped in your server and PM me the URL to it, I'll take a look at it. Do you have any other mods installed?
Title: Re: Faster Parsecode
Post by: theantidote on December 12, 2004, 11:01:20 AM
okay go here: http://xbfclan.freesuperhost.com/index.php?ind=downloads&op=entry_view&iden=1

And download it from my site. If you find the problem you can upload it back up to the site through that URL, just put it in the support section. I do have the following mods installed:


1.    SMF 1.0 RC2 Fix Package    1.0
2.    Visual Warning / Post Moderation    1.2
3.    Topic Solved    1.2

And I also had hide text installed, but I removed it because it wouldn't work with my theme.
Title: Re: Faster Parsecode
Post by: Anguz on December 12, 2004, 07:42:26 PM
Thanks. Could you also post a message with which you're having the problem in your forum so I can test it here?
Title: Re: Faster Parsecode
Post by: theantidote on December 12, 2004, 08:50:36 PM
Okay heres the message: http://xbfclan.freesuperhost.com/forum/index.php?topic=11.msg14

There are no problems in parsing it, but the buttons would not work. You would have to try this to see what I mean so use my test account

name: itakeabuse
pass: test

Other members please don't abuse this, although this is a pretty nice forum.
Title: Re: Faster Parsecode
Post by: Anguz on December 13, 2004, 03:03:54 AM
I see what you mean. The thing is that the buttons are in a totally different file, Faster Parsecode doesn't touch that at all. Are you sure you didn't change anything else? Did you try using other themes and see if they also don't work? I ask cause the JS for the snow flakes could be affecting it. I don't know how this mod could be causing that problem you have. :-\
Title: Re: Faster Parsecode
Post by: theantidote on December 13, 2004, 03:09:00 PM
Thanks for trying anyways. It's probably an issue with MkPortal or something, I'll reinstall SMF later today as soon as my host gets the databases back online!  >:(
Title: Re: Faster Parsecode
Post by: allfripou on December 13, 2004, 05:14:28 PM
@anguz

I do not know whethet this is exactly the right place to post that as it is more an extension of your mod than a real remark about it, anyway.

I would like to be able to post directly some links of this form exactly like http (the | and / are important).

bzzk://|file|myfile|736286526|A7E9ED9687E2DBDFEB00CC7AA282F558|/

OK I can add at the right line bzzk right after http but it will take only this part as the link bzzk://|file|myfile and not the other characters in the string.

I have done 2 things
1) use HTML tag and works OK
2) use custom BB code
but my users complain when they have a list to post : they would like to just make a cut and paste.

Sorry for my poor english :)
Title: Re: Faster Parsecode
Post by: theantidote on December 13, 2004, 06:29:38 PM
Try the code BB code. It looks like this: # and it does this:
bzzk://|file|myfile|736286526|A7E9ED9687E2DBDFEB00CC7AA282F558|/
Title: Re: Faster Parsecode
Post by: shishira on December 23, 2004, 10:42:31 AM
am totally confused how do i install the mod which version ? have updated the patches for the Php will that be a issue newbie here www.bangaloreforums.com
Title: Re: Faster Parsecode
Post by: Anguz on December 23, 2004, 11:31:14 AM
Quote from: shishira on December 23, 2004, 10:42:31 AM
am totally confused how do i install the mod which version ? have updated the patches for the Php will that be a issue newbie here www.bangaloreforums.com

Quote from: Anguz on December 12, 2004, 01:23:50 AM
1.02 and 1.03 don't replace 1.01. First install 1.01, then 1.02 and 1.03.

:)
Title: Re: Faster Parsecode
Post by: shishira on December 23, 2004, 01:03:06 PM
it dosen't let me install 1.03 there is no install option installed 1 2
Title: Re: Faster Parsecode
Post by: Jerry on December 23, 2004, 01:03:52 PM
you need to download and install 1.01 then you install the rest.
Title: Re: Faster Parsecode
Post by: shishira on December 23, 2004, 01:11:04 PM
now it say


Parse error: parse error, unexpected T_IF, expecting ')' in /home/shishira/public_html/bangaloreforums/Sources/Subs.php on line 833
Title: Re: Faster Parsecode
Post by: Anguz on December 23, 2004, 01:55:33 PM
Could you copy/paste that line? And one or two before/after it as well.

Regarding it not letting you install 1.03, what does it say?
Title: Re: Faster Parsecode
Post by: shishira on December 23, 2004, 02:43:09 PM
it installed fine couldn't get acess to the site at all there was a sub.php~ file in the sources direstory renamed it as sub.php and its working fine was wondering if u could fuse all the three files 1.01 and the rest into one  singe pack think that will be easier will mail u bith the files thanks
Title: Re: Faster Parsecode
Post by: shishira on December 23, 2004, 02:57:45 PM
have pasted the code as u requested let me know if u need to access the site


Quote// Fix things.
   $message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br />'));

   return $message;
}

// Parses the code in message, using the normal syntax used by some many forums...
function parsecode(&$message)
{
   global $modSettings, $scripturl, $txt, $settings, $context;
   static $codefromcache = array(), $codetocache = array();

   // If it wasn't already set, set it.
   if (empty($codefromcache))
   {
      // If any tags are disabled then we won't add them.
      if (!empty($modSettings['disabledBBC']))
      {
         $disabled = array_flip(explode(',', $modSettings['disabledBBC']));

         foreach ($disabled as $tag => $dummy)
            $disabled[trim($tag)] = true;
      }

      $code_to_from = array(
         // Match a table... hopefully with everything in the right place.
         if(isset($add['']) && isset($add['']) && isset($add['
'])){
            $arr1[] = '~\[table\](.*?)\[/table\](?:\s|\xA0|<br />|&nbsp;)?~ie';
            $arr2[] = '\'<table>\' . parse_table(\'$1\') . \'</table>\'';
         }
         // A named email address. me ([email protected])
         '~\(.+?)\[/email\]~ie' => isset($disabled['email']) ? '$2 ($1)' : '\'<a href="mailto:$1">\' . preg_replace(\'~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\])~\', \'\', strtr(\'$2\', array(\'@\' => \'&#64;\'))) . \'</a>\'',
         // Find an inside link. (named?) ie. [iurl=http://www.simplemachines.org]www.simplemachines.org[/iurl]
         '~\[iurl=([^\]]+?)\]([^\[\]]+?)\[/iurl\]~i' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '<a href="$1" target="_blank">$2</a>' : '$2 ($1)') : '<a href="$1">$2</a>',
         '~\[iurl=(.+?)\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '\'<a href="$1" target="_blank">\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', strtr(\'$2\', array(\'@\' => \'&#64;\'))) . \'</a>\'' : 'preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', \'$2\') . \' ($1)\'') : '\'<a href="$1">\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', strtr(\'$2\', array(\'@\' => \'&#64;\'))) . \'</a>\'',
         '~\[iurl\](.+?)\[/iurl\]~i' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '<a href="$1" target="_blank">$1</a>' : '$1') : '<a href="$1">$1</a>',
         // FTP link.  Named...?  [ftp=ftp://upload.sourceforge.net]Sourceforge[/ftp]
          ((.+?)\)
Title: Re: Faster Parsecode
Post by: Anguz on December 23, 2004, 05:43:00 PM
From what you posted, 1.01 is not installed.
Title: Re: Faster Parsecode
Post by: eSolutionsWork on December 26, 2004, 09:43:43 AM
well, it's killed my site. tried fixing, but no luck.  now i have to delete site.
happy christmas.
bye
Title: Re: Faster Parsecode
Post by: Jerry on December 26, 2004, 09:53:00 AM
all you need to do is upload fresh copies of /Sources/Subs.php or delete the ~ of the backup file for it and it should be gone ;)
Title: Re: Faster Parsecode
Post by: Anguz on December 26, 2004, 01:27:39 PM
Quote from: eSolutionsWork on December 26, 2004, 09:43:43 AM
well, it's killed my site. tried fixing, but no luck. now i have to delete site.
happy christmas.
bye

How did you manage to do that? Well, Faster Parsecode only touches Subs.php, like Jerry mentions. At most, the page is not displaying because of an error in the code that displays the content, but it's all there, just restore Subs.php. If when you're installing the package, a step of the install in the preview indicates failure, don't proceed! I'd like to know what you mean by "killed my site" and what you did to install it in order to help you. If the package installation goes fine, the mod works pretty well, as can be seen from the many downloads and little problems. Still, I don't discard that there may be a problem, but I need more information.
Title: Re: Faster Parsecode
Post by: shishira on December 26, 2004, 02:37:18 PM
honestly fuse all the three packages into one and we should be doing fine. Trying out them again tonight could i have ur email ID plz
Title: Re: Faster Parsecode
Post by: Anguz on December 26, 2004, 02:52:58 PM
Quote from: shishira on December 26, 2004, 02:37:18 PM
honestly fuse all the three packages into one and we should be doing fine. Trying out them again tonight could i have ur email ID plz

You can PM me here.
http://www.simplemachines.org/community/index.php?action=pm;sa=send;u=76

I'll post later an updated version, still for RC2, to integrate 1.01, 2 and 3 into one.
Title: Re: Faster Parsecode
Post by: Anguz on December 26, 2004, 03:06:53 PM
Updated to 1.04

Title: Re: Faster Parsecode
Post by: Webby on January 02, 2005, 10:20:50 AM
Is this required for the Final version ?!
Title: Re: Faster Parsecode
Post by: Anguz on January 02, 2005, 05:10:04 PM
Quote from: Webby on January 02, 2005, 10:20:50 AM
Is this required for the Final version ?!

You mean SMF 1.0? Not required! It is for other mods of mine that depend on this one, yes. I haven't updated the packages to SMF 1.0 yet, though.
Title: Re: Faster Parsecode
Post by: trenchteam on January 03, 2005, 12:41:04 AM
yes, anxiously waiting on it! THANKS!
Title: Re: Faster Parsecode
Post by: devilfish on January 03, 2005, 04:22:28 AM
ok i've been trying myself for ages so i'm gonna come out and ask..

i can't for the life of me get this thing to install. I've got other mods to work but when i try to install version 1.04 all i get is "There are no installation or uninstallation instructions defined"

Any help with this would be much appreciated

Devilfish
Title: Re: Faster Parsecode
Post by: Anguz on January 03, 2005, 05:04:27 AM
What SMF version are you using?
Title: Re: Faster Parsecode
Post by: devilfish on January 03, 2005, 05:07:21 AM
its the latest version.. 1.0 final i believe?
Title: Re: Faster Parsecode
Post by: Anguz on January 03, 2005, 05:13:21 AM
That may be why. Faster Parsecode is still for RC2, I haven't updated it yet. I've been too busy lately and will be for a few more days, but will get to it as soon as I can.
Title: Re: Faster Parsecode
Post by: devilfish on January 03, 2005, 05:15:41 AM
oh sorry...

thats my bad  :-[

anyway.. i like the idea... i'll be waiting with baited breath for the update :)
Title: Re: Faster Parsecode
Post by: Jerry on January 03, 2005, 07:23:28 AM
Quote from: Anguz on January 03, 2005, 05:13:21 AM
That may be why. Faster Parsecode is still for RC2, I haven't updated it yet. I've been too busy lately and will be for a few more days, but will get to it as soon as I can.
Seems to work no problem with SMF1.0, sorry I just installed to see if it still worked. ..
Title: Re: Faster Parsecode
Post by: Anguz on January 03, 2005, 07:35:30 AM
There were some changes in the parsecode function which I have to update in my mod one. There's also some new stuff I'm planning to add. ;)
Title: Re: Faster Parsecode
Post by: Jerry on January 03, 2005, 07:39:25 AM
Alright, can't wait :)
Title: Re: Faster Parsecode
Post by: Webby on January 04, 2005, 02:54:06 AM
I'll wait for it..... also because of the fact I want to implement the Custom BB Code mod......
Title: Re: Faster Parsecode
Post by: shishira on January 04, 2005, 01:58:06 PM
waiting waitin waiting  ;D
Title: Re: Faster Parsecode
Post by: Webrunner on January 05, 2005, 05:21:23 PM
and anticipating  ;)
Title: Re: Faster Parsecode
Post by: Waste on January 05, 2005, 11:47:35 PM
I have been trying to install this mod for some time now, but I always get this error when trying to install:

Package Manager - Install Actions
Install Actions for archive FasterParsecode104.tar.gz:
There are no installation or uninstallation actions defined!
Title: Re: Faster Parsecode
Post by: trenchteam on January 05, 2005, 11:59:20 PM
He has yet to upgrade the package for SMF1.0 FINAL
Title: Re: Faster Parsecode
Post by: Waste on January 06, 2005, 12:01:51 AM
I used to get the same error when trying to install it on RC2 as well.
Title: Re: Faster Parsecode
Post by: trenchteam on January 07, 2005, 02:52:13 AM
He prob didn't upgrade that script when you tried it as well... :P
Title: Re: Faster Parsecode
Post by: spl1nter on January 18, 2005, 12:13:58 PM
Little bump :P

I really want this so then I can get the spoiler tag.
Title: Re: Faster Parsecode
Post by: JRSofty on January 19, 2005, 05:27:32 AM
Which of the downloads do I need for this to work? Has it been updated for 1.0.1?
Title: Re: Faster Parsecode
Post by: Kindred on January 19, 2005, 08:17:35 AM
not yet....
Title: Re: Faster Parsecode
Post by: Anguz on January 29, 2005, 07:03:49 AM
1.05

Title: Re: Faster Parsecode
Post by: shishira on January 29, 2005, 07:16:52 AM
uploaded and installed  it asked for the ftp password to chmode the subs.php
how do i make sure that the mod has been installed

thanks for the cooooolest  mod

Title: Re: Faster Parsecode
Post by: shishira on January 29, 2005, 07:19:49 AM
and the speed of the board is super fast compared to before

long live ANGUZ
Title: Re: Faster Parsecode
Post by: Anguz on January 29, 2005, 07:22:31 AM
Glad you like it shishira. :)

Well, the package manager should say if the mod is installed.
Title: Re: Faster Parsecode
Post by: shishira on January 29, 2005, 07:26:00 AM
it does  8) 8) 8)
Title: Re: Faster Parsecode
Post by: Anguz on January 29, 2005, 07:27:03 AM
Quote from: shishira on January 29, 2005, 07:26:00 AM
it does 8) 8) 8)

There you go. ;)
Title: Re: Faster Parsecode
Post by: Waste on February 01, 2005, 11:56:33 AM
I keep getting a Failure error when appying the mod.

[edit]
n/m, I went ahead and did it manually.
Title: Re: Faster Parsecode
Post by: Anguz on February 01, 2005, 12:11:20 PM
What version is your SMF? And could you tell me what the error you were getting was? Would like to check it out to make sure it's not a problem others may get too. Thanks! :)
Title: Re: Faster Parsecode
Post by: Waste on February 01, 2005, 12:21:44 PM
Wasn't any errors.
I am using 1.0.1.
It works perfect after I manually installed it though.
Title: Re: Faster Parsecode
Post by: Anguz on February 02, 2005, 02:05:36 AM
That's good to know. :)

What I meant was, what error did you get when you tried to install it using the package manager that made you do it manually.
Title: Re: Faster Parsecode
Post by: Anguz on February 06, 2005, 01:57:25 PM
Updated to 1.06

Title: Re: Faster Parsecode
Post by: Kindred on February 06, 2005, 04:23:47 PM
question:

If I have installed FasterParseCode AND several of the other mods that require trhe faster parse code...   do I have to uninstall all of them and the reinstall from fasterparsecode up again?

I'm thinking yes...   so an "update mod" would be extremely useful...
Title: Re: Faster Parsecode
Post by: Anguz on February 06, 2005, 04:42:42 PM
I'll post an update mod tonight.
Title: Re: Faster Parsecode
Post by: Kindred on February 06, 2005, 05:48:55 PM
Thanks Anguz, you're the coolest. :)
Title: Re: Faster Parsecode
Post by: Anguz on February 07, 2005, 04:15:17 AM
kindred, please download the 1.06 package again, it now includes an upgrade from 1.05 if that version is found to be installed. ;)
Title: Re: Faster Parsecode
Post by: Kane-sama on February 15, 2005, 10:17:59 PM
Is there anyway to manualy install this? I was installing a load of mods I downloaded, and I though I had this isntalled. only to find I didn't and toasted my forums.
Title: Re: Faster Parsecode
Post by: Anguz on February 15, 2005, 10:25:25 PM
If you installed another mod that affects the parsecode function, then it would be a bit more trouble. If you didn't isntall something that modified that, then I don't understand why you can't install with the package manager. But, yes, you can install manually. Open the package and read the .mod file.
Title: Re: Faster Parsecode
Post by: trenchteam on February 16, 2005, 05:42:50 AM
yes. the parsecode doesnt work with 1.02. I tried to reload it after the upgrade and got sub.php file errors ???
Title: Re: Faster Parsecode
Post by: Kane-sama on February 16, 2005, 07:45:20 AM
Quote from: Anguz on February 15, 2005, 10:25:25 PM
If you installed another mod that affects the parsecode function, then it would be a bit more trouble. If you didn't isntall something that modified that, then I don't understand why you can't install with the package manager. But, yes, you can install manually. Open the package and read the .mod file.
Well I can't get at the package manager because it justsays:
Parse error: parse error, expecting `')'' in d:\domains\lordkane.co.uk\wwwroot\forums\Sources\Subs.php on line 891

edit: I sorted it by opening up the subs.php in notpad and removing the offending lines. I then was able to isntall the parsecode mod, and reinstall the offending mod. Thanks.
Title: Re: Faster Parsecode
Post by: Anguz on February 16, 2005, 12:34:37 PM
Quote from: trenchteam on February 16, 2005, 05:42:50 AM
yes. the parsecode doesnt work with 1.02. I tried to reload it after the upgrade and got sub.php file errors ???

I still have to check the code for 1.0.2 and update my mod for it.
Title: Re: Faster Parsecode
Post by: Anguz on February 16, 2005, 06:43:09 PM
1.07

Title: Re: Faster Parsecode
Post by: Gawc on March 18, 2005, 12:43:30 PM
Using 1.0.2 and got this error with 1.07:


2: copy(/usr/home/web/web30259/Sources/Subs.php~): failed to open stream: Permission denied
File: /usr/home/web/web30259/Sources/Subs-Package.php
Line: 1427
Title: Re: Faster Parsecode
Post by: Anguz on March 18, 2005, 01:24:49 PM
Quote from: Gawc on March 18, 2005, 12:43:30 PM
Using 1.0.2 and got this error with 1.07:


2: copy(/usr/home/web/web30259/Sources/Subs.php~): failed to open stream: Permission denied
File: /usr/home/web/web30259/Sources/Subs-Package.php
Line: 1427

Set your permissions correctly via FTP. :)
Title: Re: Faster Parsecode
Post by: Krispl on March 25, 2005, 09:18:12 PM
2: fopen(): SAFE MODE Restriction in effect. The script whose uid is 2057 is not allowed to access /home/ocm/site/vhost/forum/Packages/temp owned by uid 99
Plik: /home/ocm/site/vhost/forum/Sources/Subs-Package.php
Linia: 1454

what i can do about that ?
Title: Re: Faster Parsecode
Post by: [Unknown] on March 26, 2005, 01:22:15 AM
Quote from: Krispl on March 25, 2005, 09:18:12 PM
2: fopen(): SAFE MODE Restriction in effect. The script whose uid is 2057 is not allowed to access /home/ocm/site/vhost/forum/Packages/temp owned by uid 99
Plik: /home/ocm/site/vhost/forum/Sources/Subs-Package.php
Linia: 1454

what i can do about that ?

http://www.simplemachines.org/community/index.php?topic=28393.0

-[Unknown]
Title: Re: Faster Parsecode
Post by: xtremecruiser on March 31, 2005, 10:09:26 AM
Install Actions for archive FasterParsecode107.tar.gz:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Does not like to be installed on SMF 1.0.3. but works from any older version that was upgraded to the newest version
Title: Re: Faster Parsecode
Post by: Anguz on March 31, 2005, 03:52:22 PM
Not updated for 1.0.3 yet.
Title: Re: Faster Parsecode
Post by: duconihilum on April 03, 2005, 03:33:06 PM
when will it be updated for 1.0.3?
Title: Re: Faster Parsecode
Post by: Anguz on April 03, 2005, 10:49:10 PM
Quote from: duconihilum on April 03, 2005, 03:33:06 PM
when will it be updated for 1.0.3?

Soon. I apologize, I have to finish some work before I can do this.
Title: Re: Faster Parsecode
Post by: xtremecruiser on April 09, 2005, 05:23:10 PM
Quote from: Anguz on April 03, 2005, 10:49:10 PM
Quote from: duconihilum on April 03, 2005, 03:33:06 PM
when will it be updated for 1.0.3?

Soon. I apologize, I have to finish some work before I can do this.

If you have it running before you ugrade it seems to take fine
Title: Re: Faster Parsecode
Post by: Omar Bazavilvazo on April 09, 2005, 06:24:36 PM
It works for 1.1+ ? :P i'm tempted to install it :)
Title: Re: Faster Parsecode
Post by: Anguz on April 09, 2005, 07:19:19 PM
Quote from: Omar Bazavilvazo on April 09, 2005, 06:24:36 PM
It works for 1.1+ ? :P i'm tempted to install it :)

Hey, Omar. I haven't tested it yet. I'll download 1.1 Beta 1 today and take a look at the function.
Title: Re: Faster Parsecode
Post by: Omar Bazavilvazo on April 12, 2005, 04:00:17 PM
Quote from: Anguz on April 09, 2005, 07:19:19 PM
Quote from: Omar Bazavilvazo on April 09, 2005, 06:24:36 PM
It works for 1.1+ ? :P i'm tempted to install it :)

Hey, Omar. I haven't tested it yet. I'll download 1.1 Beta 1 today and take a look at the function.

Great! :)
Title: Re: Faster Parsecode
Post by: Phalin on April 19, 2005, 08:09:56 PM
Any Idea on a time frame for a Updated Parsecode that will work with SMF 1.0.3

Thanks
Title: Re: Faster Parsecode
Post by: Anguz on April 19, 2005, 08:40:39 PM
1.08

Title: Re: Faster Parsecode
Post by: dragon52225 on April 20, 2005, 08:21:24 AM
Quote from: Anguz on April 19, 2005, 08:40:39 PM
1.08


  • Updated for SMF 1.0.3.
yay! i am the first one to install it, but it is a failiure
   Type     Action     Description
1.    Execute Modification    ./Sources/Subs.php    Failure
Title: Re: Faster Parsecode
Post by: Anguz on April 20, 2005, 08:39:03 AM
You probably have installed another mod that affected the parsecode function in Subs.php.
Title: Re: Faster Parsecode
Post by: Omar Bazavilvazo on April 21, 2005, 12:03:50 PM
it works for 1.1? :P
Title: Re: Faster Parsecode
Post by: Lamer on April 23, 2005, 01:04:43 AM
Should we update it if we had 1.07 before the SMF 1.0.3 update?
Title: Re: Faster Parsecode
Post by: Anguz on April 24, 2005, 06:33:22 PM
Quote from: Lamer on April 23, 2005, 01:04:43 AM
Should we update it if we had 1.07 before the SMF 1.0.3 update?

No need to.
Title: Re: Faster Parsecode
Post by: azuregenesis on April 26, 2005, 10:37:41 AM
Quote from: Anguz on April 20, 2005, 08:39:03 AM
You probably have installed another mod that affected the parsecode function in Subs.php.

i got the same error he did and i checked all the other mods and none of them mess with subs.php
Title: Re: Faster Parsecode
Post by: Anguz on April 26, 2005, 02:28:23 PM
I wonder if it's a whitespace issue. It's working for me. You can apply it by hand if the package doesn't work, but then the install will also have to be by hand.
Title: Re: Faster Parsecode
Post by: hartiberlin on June 06, 2005, 05:33:25 PM
Hi,
I get the following error, when wanting to install the faster parsecode
mod on the same hosting server, that already suceeded in it  to install
with a different domain.

I already used fix_ownership.php and repair_settings.php
and when I try to install in SMF1.03 the mod at the step when it says:

Install Actions for archive FasterParsecode108_SMF103.tar.gz:
Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Subs.php Success

[ Proceed ] 

When I press then the Proceed link it gives the error:


An Error Has Occurred!
2: copy(/home4/sub002/sc11940-GNVW/dasalteberlin/Sources/Subs.php~): failed to open stream: Permission denied
File: /home4/sub002/sc11940-GNVW/dasalteberlin/Sources/Subs-Package.php
Line: 1449 



Could it be, that it is the case, because I am in Safe Mode now ?

But before it work on my other domain overunity.com
with the same procedure...

hmmm, maybe my hoster has now switched to safe mode ?
Before, the Safe Mode was off due to php_info.php

hmmm...

Any ideas ?

Many thanks.

Regards, Stefan.
Title: Re: Faster Parsecode
Post by: hartiberlin on June 06, 2005, 05:52:23 PM
Can I somehow execute this:
FasterParsecode108.mod

manually ?

Or will then the same error code appear ?

Hmm, with my other domain on the same hosting machine
the mod went through without any problems and I think now,
safe mode was also ON there already...

Hmm, why does this execution of the mod does not work now ??
Title: Re: Faster Parsecode
Post by: Grudge on June 06, 2005, 05:59:15 PM
hartiberlin,

I think it's failing because your Sources directory is not writable. The bit that's failing is actually the backup - you can disable that from the package manager settings (Tell it not to backup files before making changes if you wish).

You can manually make the changes in the mod by basically downloading a copy of your forum files to your local computer, making the changes by hand, and uploading them. The mod file is pretty human readable.

Grudge
Title: Re: Faster Parsecode
Post by: hartiberlin on June 06, 2005, 06:47:33 PM
Hi,
you were right.
The directory was set only to 755.

I change it to 777 but this did also not let it install.
Then I removed the Backup files function under Install option
and now it went through...

Hmm. I wonder why it went through without this hassle with my other domain... ?

Hmm, maybe I did set the permissions there already all to 777 ?

Anyway thankd for your help.
One last question:

Is it safe to have all files and directories set to 777 in the forum directory ?

Regards, Stefan.
Title: Re: Faster Parsecode
Post by: hartiberlin on June 06, 2005, 06:54:28 PM
Now , when finally installing the custom BB code
mod thereis another error:


An Error Has Occurred!
2: fopen(/home4/sub002/sc11940-GNVW/dasalteberlin/Themes/default/languages/Help.english.php): failed to open stream: Permission denied
File: /home4/sub002/sc11940-GNVW/dasalteberlin/Sources/Subs-Package.php
Line: 1476 



But the backup files function is still off.

I am now trying to set all directories and files to 777.

By the way, what is the UID / GID permission for ?

Title: Re: Faster Parsecode
Post by: Anguz on June 06, 2005, 06:56:44 PM
http://www.simplemachines.org/community/index.php?topic=2987.0
Title: Re: Faster Parsecode
Post by: hartiberlin on June 06, 2005, 06:57:00 PM
Setting the files and directories to 777 fixed also this error.

Hmm, now I wonder if it is really save to let all the files
being 777 permission ?

And waht is the GID / UID permission for which I can set in SmartFTP ?

Thanks.
Title: Re: Faster Parsecode
Post by: [Unknown] on June 06, 2005, 07:06:14 PM
Why chmod 777 is NOT a security risk (http://www.simplemachines.org/community/index.php?topic=2987.0)

-[Unknown]
Title: Re: Faster Parsecode
Post by: hartiberlin on June 06, 2005, 07:51:22 PM
I have now installed the Faster Parsecode and ModSettingsTextarea and
finally the cutom BB code mod
and
now I have under:


Edit Features and Options

4 times the

Custom BB Code tags

listed.
Why is this ?

P.S: How can I attach a picture here to show this ?
Under additional option I don´t have an "attach file" option !
Title: Re: Faster Parsecode
Post by: murmel on June 08, 2005, 05:44:13 AM
1.08 doesn't work for SMF 1.0.4, right?
When will a version for 1.0.4 be out? :)
Thanks ^_^
Title: Re: Faster Parsecode
Post by: Anguz on June 08, 2005, 03:43:11 PM
Not, it doesn't work. 1.0.4 changes the parsecode function iirc and I need to update my mod with that. No date, but I'll work on it soon.
Title: Re: Faster Parsecode
Post by: murmel on June 08, 2005, 04:12:16 PM
Wee, you're the man!
I'll look forward for it;)
Title: Re: Faster Parsecode
Post by: d3v on June 11, 2005, 12:30:30 AM
Does this have any purpose/advantages with SMF version 1.0.4? Thank you
Title: Re: Faster Parsecode
Post by: azuregenesis on June 11, 2005, 08:48:36 AM
Quote from: d3v on June 11, 2005, 12:30:30 AM
Does this have any purpose/advantages with SMF version 1.0.4? Thank you

well, several mods are dependent on this mod to work, namely the "spoiler tag" and "custom bb code" mods.

also, the "streaming" mod.

i await an update dear Anguz :)
Title: Re: Faster Parsecode
Post by: agridoc on June 15, 2005, 04:56:25 PM
Faster Parsecode is also required for the excellent mod Table From CSV  (http://www.simplemachines.org/community/index.php?topic=18917.0).

I don' t yet update to 1.04 as this mod is a must, if your subjects require tables in the messages.
Title: Re: Faster Parsecode
Post by: d3v on June 15, 2005, 04:58:45 PM
works fine with 1.0.4 here
Title: Re: Faster Parsecode
Post by: agridoc on June 15, 2005, 05:31:35 PM
What works fine and where?
Quote from: d3v on June 15, 2005, 04:58:45 PM
works fine with 1.0.4 here
Title: Re: Faster Parsecode
Post by: d3v on June 15, 2005, 05:35:13 PM
catchmydr1ft.com/smf - 1.0.4 with Faster Parsecode mode. Just changed the .xml file setting to 1.0.4


Or maybe it doesn't do anything.... ???
Title: Re: Faster Parsecode
Post by: NightOwl on June 17, 2005, 07:38:48 AM
Same here, I am still waiting for this mod to be compatable with 1.0.4.
Title: Re: Faster Parsecode
Post by: ivo2296 on June 17, 2005, 11:18:01 PM
I'm waiting too  :(

i'll never update till most of my mods are updated too.
Title: Re: Faster Parsecode
Post by: ivo2296 on June 22, 2005, 08:34:20 PM
I have edited .xml file but i got that:

Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Subs.php Failure

[ Proceed ]
Title: Re: Faster Parsecode
Post by: trenchteam on June 22, 2005, 09:32:27 PM
so is this working for 1.04 I want the hide tags back!
Title: Re: Faster Parsecode
Post by: JRSofty on June 24, 2005, 06:06:01 AM
Well it was but now we're up to 1.0.5 and I don't think it works  :'(
Title: Re: Faster Parsecode
Post by: ivo2296 on June 24, 2005, 10:20:52 AM
I'll be glad to see some words from Anguz, what he thinks about update this mod.

May be he waits for SMF 1.1 to finalize this mod?
Just cause other mods need Faster Parsecode to be installed.
Title: Re: Faster Parsecode
Post by: Kindred on June 24, 2005, 10:44:44 AM
Well, the install will not work on 1.0.4 or 1.0.5, because 1.0.4 changes the code that the mod looks to orient itself...

However, if you installed on 1.0.3 and want to upgrade to 1.0.4, [unknown] has released a special upgrade just for you...
(and 1.0.5 doens't touch this code, so, the upgrade to 1.0.5 should be easily done through the package manager.
Title: Re: Faster Parsecode
Post by: Anguz on June 24, 2005, 05:05:42 PM
I apologize for the lack of update on my mods. I have been very busy with my life and I haven't had time for my SMF code. I'm not planning to wait for 1.1 final to be released to do it, though, I just haven't had the time yet. Regarding 1.1, it has a completely new parsecode function written by [Unknown] and in all honesty, if I haven't had much time to change a version number to my mods, much less will I probably re-write the whole code again, so FasterParsecode will more probably remain for 1.0.x only. I know that the tags that depend on it are very used by many, so I plan write those for 1.1, don't worry. Sorry again for taking my time with this, many of you must know how supporting a family can be, money and timewise. I hope I'll have these mods updated soon.
Title: Re: Faster Parsecode
Post by: ivo2296 on June 24, 2005, 07:37:49 PM
That realy made me happy!


Thanks Anzug and take your time
Title: Re: Faster Parsecode
Post by: huijaa on June 30, 2005, 04:53:07 PM
I've problem with Faster Parsecode 1.08 with SMF 1.0.5 (Still running on 1.0.3)

Anyone knows?
Title: Re: Faster Parsecode
Post by: Omar Bazavilvazo on June 30, 2005, 04:54:39 PM
due that since 1.0.4 that code changed, as stated before, this mod won't work
Title: Re: Faster Parsecode
Post by: Sheepy on June 30, 2005, 07:24:38 PM
Quote from: huijaa on June 30, 2005, 04:53:07 PM
I've problem with Faster Parsecode 1.08 with SMF 1.0.5 (Still running on 1.0.3)

Anyone knows?
You're in luck. I privately upgraded it to 1.0.5.  I posted in some other topic, but figured I better post it here as well.

http://www.anetcity.com/bbs/index.php?topic=999.0

Or, if the server is down, download it directly & rename it with .zip extension:

http://www.anetcity.com/bbs/attachments/279_FasterParsecode108_SMF105_zip7139ff5467ac5255f17d31feee7bebdd
Title: Re: Faster Parsecode
Post by: ivo2296 on June 30, 2005, 09:11:53 PM
Works super with 1.0.5 !

Thanks Sheepy
Title: Re: Faster Parsecode
Post by: NightOwl on June 30, 2005, 11:59:25 PM
Quote from: Sheepy on June 30, 2005, 07:24:38 PM
Quote from: huijaa on June 30, 2005, 04:53:07 PM
I've problem with Faster Parsecode 1.08 with SMF 1.0.5 (Still running on 1.0.3)

Anyone knows?
You're in luck. I privately upgraded it to 1.0.5.  I posted in some other topic, but figured I better post it here as well.

http://www.anetcity.com/bbs/index.php?topic=999.0

Can it install with package manager?
Title: Re: Faster Parsecode
Post by: ivo2296 on July 01, 2005, 12:14:10 AM
just download it in folder Packages http://www.anetcity.com/bbs/index.php?topic=999.0

and then use package manager to install
Title: Re: Faster Parsecode
Post by: azuregenesis on July 01, 2005, 11:17:10 AM
Quote from: ivo2296 on June 30, 2005, 09:11:53 PM
Works super with 1.0.5 !

Thanks Sheepy

same here!

thank you very much!!

*goes to install spoiler tags* (which is updated to 1.0.5 as well. did it myself. very simply by changing the xml file)
Title: Re: Faster Parsecode
Post by: stargazer_1017 on July 01, 2005, 05:45:54 PM
Wow! I've been waiting for this! I was hoping that the upgraded version would come out before I upgrade my forum in about a week, and this is perfect! I haven't tried it out yet, but I'm going to soon. Do I uninstall the previous version and then uploadthis one?

-Shayna
Title: Re: Faster Parsecode
Post by: Sheepy on July 01, 2005, 06:06:46 PM
Quote from: stargazer_1017 on July 01, 2005, 05:45:54 PMDo I uninstall the previous version and then uploadthis one?
Yes you'll have to, I afraid... and it can get messy if you installed some custom tags.  Perhaps someone can make an upgrade mod?  Text diff should make it a simple job.  (I'm trying to batch-process multiple member group info...)
Title: Re: Faster Parsecode
Post by: stargazer_1017 on July 01, 2005, 07:08:24 PM
So I should uninstall all of the previous codes that use Faster Parsecode (Language tags, spoiler tag, etc.) and then the old version, and then reinstall from there? I'm sorry to be sounding so stupid, but I want to make sure before I go ahead.

With all the other mods, I just can just change the xml files, right?

-Shayna
Title: Re: Faster Parsecode
Post by: huijaa on July 01, 2005, 07:53:34 PM
Thanks, it works now greatfully....
Title: Re: Faster Parsecode
Post by: Anguz on July 02, 2005, 05:49:00 AM
Sheepy, I know you did it to help, but there's a couple of things I want to point out:


I suggest that those that installed Sheepy's, uninstall it and use mine, please. I wasn't planning to spend time on this yet, but I had to make sure no problems would arise from the wrong code.

As a bonus to apologize for the long time it took me to do this update, I added an upgrader from version 1.08 to the package, which may save you the trouble of unistalling tag mods. I didn't have a forum to test the upgrade, though, so please let me know how that goes to know if it's fine or I need to fix something.

1.09

FasterParsecode109_SMF105.tar.gz (http://mods.simplemachines.org/index.php?a=download;mod=39;id=8072)


I thought I'd update the tag mods now as well, but it took longer than I expected to do this one, so I'll work on more tomorrow. I'll try to do all my other 14 mods in the next couple of days.
Title: Re: Faster Parsecode
Post by: hartiberlin on July 02, 2005, 06:16:24 AM
Hi,
I am still using SMF 1.03
with Fasterparsecode 1.08.

So what is now the best method to upgrade top SMF 1.05 ?

Should I first install the Fasterparsecode 1.09 and then
upgrade SMF to 1.05 from the admin section ?

What about the ModSettingsTextarea MOD ?
As this was required for Fasterparsecode 1.08 must this also be updated
or not ?

Many thanks to Anguz  for the MOD update !

Regards, Stefan.
Title: Re: Faster Parsecode
Post by: Anguz on July 02, 2005, 06:38:19 AM
I'd suggest you first backup, try upgrading to SMF 1.0.5 and then FasterParsecode 1.09 without uninstalling 1.08 or the tag mods.

That's for those that like upgrading with all their mods still installed, I personally prefer uninstalling them all first, upgrading and then re-installing, but that's me.
Title: Re: Faster Parsecode
Post by: stargazer_1017 on July 02, 2005, 02:46:57 PM
Thank you, Anguz :) I'm one of those people that like to upgrade without installing the mods  ;D I still haven't gotten the chance to try it yet, but I will soon. I'll also wait for the updates on the other mods.

-Shayna
Title: Re: Faster Parsecode
Post by: Sheepy on July 02, 2005, 06:36:34 PM
Quote from: Anguz on July 02, 2005, 05:49:00 AM
Sheepy, I know you did it to help, but there's a couple of things I want to point out:
I wrote this mod and you didn't ask for permission to alter and distribute it, so please remove the file from your server.
Sure, it's done.   With an apologise.

Sorry for not asking you first.  I hope it didn't make you angry.  :(  I had multiple site that need to be updated, so I helped myself... and, perhaps too quickly, others.
Quote from: Anguz on July 02, 2005, 05:49:00 AM
You changed the order of the code parsing, which may give unexpected problems.
Hmm. My thought is that since the lines are changed anyway, I might as well rearrange the email so they stick together and will be easier to read.  I should have been aware that this may cause problems.  Sigh.  So many traps...
Title: Re: Faster Parsecode
Post by: Anguz on July 03, 2005, 12:22:41 AM
No problem. I know I took too long to update, sorry about that. Thank you for removing the package. On the parsing order, it is pretty important in some cases.
Title: Re: Faster Parsecode
Post by: Phoenixoverlord on July 04, 2005, 12:19:39 PM
Hi!

I'm very happy that this has been upgraded but I'm having a little problem here... We have SMF 1.0.5 and I can upload the mod with no problem, only it won't install. I get this:

Execute Modification     ./Sources/Subs.php     Failure

Is there any reason for this? All files have attrib 777...

I proceeded anyway, but when I installed the spoiler tag it crashed my board (luckily I had a backup of the subs.php)
Title: Re: Faster Parsecode
Post by: Anguz on July 04, 2005, 12:54:40 PM
Do you have other mods previously installed? It may be that another one changed the function before you tried installing mine and that's why it fails.
Title: Re: Faster Parsecode
Post by: Phoenixoverlord on July 05, 2005, 02:40:00 AM
I had to replace Subs.php. So it's working now! Thanks. :)

But one more thing... it does work under IE, but for some reason I get errors in the javascript console in Firefox (script not defined?). Any idea here?

Edit works now... weird :P
Title: Re: Faster Parsecode
Post by: Anguz on July 05, 2005, 05:50:28 AM
Faster Parsecode doesn't use JS, but spoiler does. The JS code for it goes in the default theme's script.js file. Maybe the browser was using a cached version of the file at first and then got the modified one.
Title: Re: Faster Parsecode
Post by: stargazer_1017 on July 10, 2005, 10:14:33 PM
Can you uninstall Faster Parsecode? I clicked uninstall, and for some reason, the modifications on Subs.php fails. I also noticed that when I upgraded to 1.0.4., the Subs.php failed as well.

I'm currently at 1.0.4. right now, but I'm afraid to move forward.

-Shayna
Title: Re: Faster Parsecode
Post by: Phoenixoverlord on July 11, 2005, 03:18:34 AM
You need to uninstall the other mods first I think.
Title: Re: Faster Parsecode
Post by: Anguz on July 11, 2005, 03:26:33 AM
Quote from: Phoenixoverlord on July 11, 2005, 03:18:34 AM
You need to uninstall the other mods first I think.

Yup. Otherwise, the Faster Parsecode package doesn't find the code it installed, cause it was modified by yet another mod. So remove the mods in the reverse order you installed them and it should go smoothly.
Title: Re: Faster Parsecode
Post by: stargazer_1017 on July 11, 2005, 03:14:43 PM
Ahh *nods* Okay, I found out what the problem was. I think I had Faster Parsecode, Language Tag, and Spoiler tag on and I just deleted the Spoiler tag. No wonder it didn't work when I tried deleting the Faster Parsecode.

-Shayna
Title: Re: Faster Parsecode
Post by: trenchteam on July 24, 2005, 04:54:45 AM
I've never used faster parse code, but I have a load of mods and I keep getting FAILURE in the SUBS. How can I install this manually?
Title: Re: Faster Parsecode
Post by: trenchteam on July 25, 2005, 08:18:05 PM
bump.
Title: Re: Faster Parsecode
Post by: Anguz on July 26, 2005, 03:22:58 PM
Quote from: trenchteam on July 24, 2005, 04:54:45 AM
I've never used faster parse code, but I have a load of mods and I keep getting FAILURE in the SUBS. How can I install this manually?

Hi Trenchteam. Sorry, I've been moving the last 2 weeks and without internet for days.

To do it manually, you have to open the mod file in the package and follow the intructions. If you're getting failures, it'd be good to find in your code the reason for them and see if it won't give you trouble with other mods to remove them.
Title: Re: Faster Parsecode
Post by: trenchteam on July 26, 2005, 07:02:08 PM
yeah. I tried to follow the instructions manually, but there are two files? Which one do I use?  One says 109 and the other says 108-9 or something like that.  Both had install instructions and were packaged in the 1.05 compatible version
Title: Re: Faster Parsecode
Post by: Anguz on July 26, 2005, 09:19:38 PM
The 1.09 one.
Title: Re: Faster Parsecode
Post by: umanga on August 22, 2005, 09:28:06 AM

i am using smf1.0.5 and want to install faster parsecode mod.  can i install 1.09 directly or do i have to install the other updates first?

thanks
Title: Re: Faster Parsecode
Post by: Anguz on August 22, 2005, 06:28:48 PM
Quote from: umanga on August 22, 2005, 09:28:06 AM

i am using smf1.0.5 and want to install faster parsecode mod.  can i install 1.09 directly or do i have to install the other updates first?

thanks

Just that one.
Title: Re: Faster Parsecode
Post by: umanga on August 23, 2005, 06:59:34 AM

thanks a lot :)
Title: Re: Faster Parsecode
Post by: umanga on August 23, 2005, 09:03:49 AM
one more thing..!!

do i have to unistall all my other mods and then reinstall them or have i misunderstood some of the other posts?!
Title: Re: Faster Parsecode
Post by: Anguz on August 23, 2005, 11:55:08 AM
Depends on what the other mods are.
Title: Re: Faster Parsecode
Post by: umanga on August 23, 2005, 04:27:50 PM
Modification Packages
   Mod Name Version   
1. OnLine Users Today 1.3   [ Uninstall ] [ List Files ] [ Delete ] 
2. Streaming_4.1 4.1   [ Uninstall ] [ List Files ] [ Delete ] 
3. Spoiler Tag 1.04  [ Apply Mod ] [ List Files ] [ Delete ] 
4. Faster Parsecode 1.09   [ Uninstall ] [ List Files ] [ Delete ] 
5. Spam-me-not 1.0.1   [ List Files ] [ Delete ] 
6. "New Topic/Poll" buttons in Display.template.php 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
7. Ultimate Shoutbox 1.31   [ Uninstall ] [ List Files ] [ Delete ] 
8. Simple ImageShack 1.0.2  [ Apply Mod ] [ List Files ] [ Delete ] 
9. SMF 1.0.5 Update Package 1.0.5   [ List Files ] [ Delete ] 
10. Lots_o_Smileys 1.0  [ Apply Mod ] [ List Files ] [ Delete ] 
11. G&S_Sticky 1.1   [ Uninstall ] [ List Files ] [ Delete ] 
12. Board Default Sort 1.25  [ List Files ] [ Delete ] 
13. SSI NewsArchive 1.3   [ Uninstall ] [ List Files ] [ Delete ] 
14. SMF 1.0.4 Update Package 1.0.4   [ List Files ] [ Delete ] 
15. Location Mod 1.1.2  [ List Files ] [ Delete ] 
16. Group Moderators 1.0c   [ Uninstall ] [ List Files ] [ Delete ] 
17. Integrated Chat 2.3   [ Uninstall ] [ List Files ] [ Delete ] 
18. SMF Arcade 1.2.1  [ Apply Mod ] [ List Files ] [ Delete ] 
19. Message Icon Manager (Quick Reply) 1.2   [ Uninstall ] [ List Files ] [ Delete ] 
20. PHP 4.4.0 Compatibility Update 1.0   [ List Files ] [ Delete ] 
21. VisualWarning 1.26   [ Uninstall ] [ List Files ] [ Delete ] 

Title: Re: Faster Parsecode
Post by: stargazer_1017 on August 23, 2005, 08:58:47 PM
I upgraded from 1.0.3. to 1.0.5. and before the upgrade removed all Faster Parsecode and all related mods. When I tried to install 1.09, it didn't work--it had a failure in subs. Is it just a bad package or something else? As soon as I saw that, I left it as is and didn't hit proceed. It doesn't install until I hit proceed, right?

-Shayna
Title: Re: Faster Parsecode
Post by: Anguz on August 23, 2005, 10:03:07 PM
umanga, I don't see a parsecode related mod other than the spoiler tag one, which is fine if it's the last version of it.

stargazer_1017, you have SMF 1.0.5 and are trying to install Faster Parsecode 1.09? As long as you don't hit proceed, it won't try to install. What other mods have you installed? There's probably one that already modified that code and that's why the the install fails.
Title: Re: Faster Parsecode
Post by: stargazer_1017 on August 23, 2005, 10:41:21 PM
These are the mods I had installed:

       Mod Name     Version
1.    The Bar Of Experience    1.2    [ Uninstall ]
2.    Location Mod    1.1.1    [ Uninstall ]
3.    Location Mod - Additional Maps    1.1.1    [ Uninstall ]
4.    Location Mod - Who Flags    1.1.1    [ Uninstall ]
5.    OnLine Users Today    1.2    [ Uninstall ]
6.    Ultimate Shoutbox    1.22    [ Uninstall ]
7.    SMFShop    1.1    [ Uninstall ]
8.    Karma Log    1.0    [ Uninstall ]
9.    Googlebot & Spiders Mod    1.0.1    [ Uninstall ]
10.    G&S_Sticky    1.1    [ Uninstall ]
11.    SMF 1.0.4 Update Package    1.0.4    [ Uninstall ]
12.    SMF 1.0.5 Update Package    1.0.5    [ Uninstall ]
13.    PHP 4.4.0 Compatibility Update    1.0    [ Uninstall ]

As I mentioned, I uninstalled Faster Parsecode and all of the related mods in order to upgrade, and then when I tried to reinstall it, it wouldn't let me. I don't know which of the ones above would've modified to code, except for the upgrade ones.

-Shayna
Title: Re: Faster Parsecode
Post by: Anguz on August 23, 2005, 11:47:51 PM
Hmm... I don't see any other that could modify that function either except the upgrade ones, and this mod would install fine since it's for version 1.0.5. Could you open the file Subs.php in the Sources directory and copy the parsecode function and paste it here inside code tags?
Title: Re: Faster Parsecode
Post by: umanga on August 24, 2005, 07:05:22 AM

Cheers Anguz  :)
Title: Re: Faster Parsecode
Post by: stargazer_1017 on August 24, 2005, 05:23:27 PM
Quote from: Anguz on August 23, 2005, 11:47:51 PM
Hmm... I don't see any other that could modify that function either except the upgrade ones, and this mod would install fine since it's for version 1.0.5. Could you open the file Subs.php in the Sources directory and copy the parsecode function and paste it here inside code tags?

Sorry to be a nuisance, but I don't know which I should post exactly. I searched for "parsecode" and there are a lot of functions. I found this one:

// Parse code.....
parsecode($php_parts[$php_i]);


What that the right one?

-Shayna
Title: Re: Faster Parsecode
Post by: Anguz on August 25, 2005, 01:21:08 AM
No, look for the block that starts with

function parsecode(&$message)
{


until where the next function begins.
Title: Re: Faster Parsecode
Post by: stargazer_1017 on August 25, 2005, 03:53:29 PM
Okay, I found that one:

function parsecode(&$message)
{
global $modSettings, $scripturl, $txt, $settings, $context;
static $codefromcache = array(), $codetocache = array();

// If it wasn't already set, set it.
if (empty($codefromcache))
{
// If any tags are disabled then we won't add them.
if (!empty($modSettings['disabledBBC']))
{
$disabled = array_flip(explode(',', $modSettings['disabledBBC']));

foreach ($disabled as $tag => $dummy)
$disabled[trim($tag)] = true;
}


-Shayna
Title: Re: Faster Parsecode
Post by: Anguz on August 26, 2005, 01:28:04 AM
It's that one, but it's incomplete. Could you look for it again until the next function that starts like this

// Parse smileys in the passed message.
function parsesmileys(&$message)
Title: Re: Faster Parsecode
Post by: stargazer_1017 on August 26, 2005, 03:21:41 PM
Whoops! Sorry about that, Anguz. Here it is:

function parsecode(&$message)
{
global $modSettings, $scripturl, $txt, $settings, $context;
static $codefromcache = array(), $codetocache = array();

// If it wasn't already set, set it.
if (empty($codefromcache))
{
// If any tags are disabled then we won't add them.
if (!empty($modSettings['disabledBBC']))
{
$disabled = array_flip(explode(',', $modSettings['disabledBBC']));

foreach ($disabled as $tag => $dummy)
$disabled[trim($tag)] = true;
}

$code_to_from = array(
// A named email address. [[email protected]]me[/email]  And, you can't have []s in your email, I should know.
'~\[email=(.+?)\](.+?)\[/email\]~ie' => isset($disabled['email']) ? '"$2 ($1)"' : '"<a href=\"mailto:" . strtr("$1", array("\"" => "&quot;", "]" => "", "[" => "")) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
// An image.  Width and height can be are optional.
'~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:<br />)*(.+?)(?:<br />)*\[/img\]~ie' => isset($disabled['img']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "&#64;")))' : '"<img src=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "&#64;", "\"" => "&quot;"))) . "\" alt=\"\"" . ("$2" != "" ? " width=\"$2\"" : "") . ("$4" != "" ? " height=\"$4\"" : "") . " border=\"0\" />"',
// Find an inside link. (named?) ie. [iurl]www.simplemachines.org[/iurl]
'~\[iurl=(.+?)\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"' : 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"') : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
'~\[iurl\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">$1</a>"' : '"$1"') : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\">$1</a>"',
// FTP link.  Named...?  [ftp=upload.sourceforge.net]Sourceforge[/ftp]
'~\[ftp\](.+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$1")' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array("@" => "&#64;"))) . "</a>"',
'~\[ftp=(.+?)\](.+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
// Find a (named?) URL... [url]www.simplemachines.org[/url] or [url=www.simplemachines.org]SMF[/url]
'~\[url=([^:\]]+?)\]([^\]]*?\[url(?:=[^\]]+?)?\].+?\[/url\].*?)\[/url\]~ie' => isset($disabled['url']) ? 'preg_replace("~(\[url.*?\]|\[/url\])~i", "", "$2") . " ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
'~\[url=(.+?)\](.+?)\[/url\]~ie' => isset($disabled['url']) ? '"$2 ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . strtr("$2", array("@" => "&#64;")) . "</a>"',
'~\[url\](?:<br />)*(.+?)(?:<br />)*\[/url\]~ie' => isset($disabled['url']) ? '"$1"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">$1</a>"',
// Bold, italics, underline, strikeout.
'~\[b\](.+?)\[/b\]~i' => isset($disabled['b']) ? '$1' : '<b>$1</b>',
'~\[i\](.+?)\[/i\]~i' => isset($disabled['i']) ? '$1' : '<i>$1</i>',
'~\[u\](.+?)\[/u\]~i' => isset($disabled['u']) ? '$1' : '<span style="text-decoration: underline;">$1</span>',
'~\[s\](.+?)\[/s\]~i' => isset($disabled['s']) ? '$1' : '<del>$1</del>',
// A quote.  May or may not specify an author and/or link and date.
'~\[quote(?: author)?=&quot;(.{1,80}?)&quot;\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'~\[quote author=(.{1,80}?) link=(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?) date=(\d+)\](?:<br />)?~ei' => isset($disabled['quote']) ? '\'<div>\'' : '\'<div class="quoteheader"><a href="' . $scripturl . '?$2">' . $txt['smf239'] . ': $1 ' . $txt[176] . ' \' . timeformat(\'$3\') . \'</a></div><div class="quote">\'',
'~\[quote author=(.{1,80}?)\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'~\[quote\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf240'] . '</div><div class="quote">',
'~\[/quote\](?:<br />)?~i' => isset($disabled['quote']) ? '</div>' : '</div>',
// Size the font.  [size=large]HELLO![/size]
'~\[size=([\d]{1,2}p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '<span style="font-size: $1;">$2</span>',
'~\[size=([\d])\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '<font size="$1">$2</font>',
// Performat/justify text.  [center]Justifying is good.[/center]
'~\[pre\](.+?)\[/pre\]~i' => isset($disabled['pre']) ? '$1' : '<pre>$1</pre>',
'~\[left\](.+?)\[/left\]~i' => isset($disabled['left']) ? '$1' : '<div align="left">$1</div>',
'~\[right\](.+?)\[/right\]~i' => isset($disabled['right']) ? '$1' : '<div align="right">$1</div>',
'~\[center\](.+?)\[/center\]~i' => isset($disabled['center']) ? '$1' : '<div align="center">$1</div>',
// Teletyped text.  Monospace, in other words.
'~\[tt\](.+?)\[/tt\]~i' => isset($disabled['tt']) ? '$1' : '<tt>$1</tt>',
// Subscript and superscript.  6[sup]2[/sup] = 36.
'~\[sub\](.+?)\[/sub\]~i' => isset($disabled['sub']) ? '$1' : '<sub>$1</sub>',
'~\[sup\](.+?)\[/sup\]~i' => isset($disabled['sup']) ? '$1' : '<sup>$1</sup>',
// An email address. [email][email protected][/email]
'~\[email\](?:<br />)*(.+?)(?:<br />)*\[/email\]~ie' => isset($disabled['email']) ? '"$1"' : '"<a href=\"mailto:" . strtr("$1", array(":" => "&#58;", "\"" => "&quot;", "[" => "", "]" => "")) . "\">$1</a>"',
// Specify a specific font.  [font=Comic Sans]Blah![/font]
'~\[font=([\w,\-\s]+?)\](.+?)\[/font\]~i' => isset($disabled['font']) ? '$2' : '<span style="font-family: $1;">$2</span>',
// Colors.... [red]See?[/red]
'~\[color=(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[\w]{1,12})\](.*?)\[/color\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: $1;">$2</span>',
'~\[(black|white|red|green|blue)\](.+?)\[/\1\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: $1;">$2</span>',
'~\[(chr|k)issy\](.+?)\[/\1issy\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: #CC0099;">$2 :-*</span>',
// Lists... [list][*]First, ...[o]Second![li]THIRD!!![/li][/list]
'~\[list\](?:<br />)?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '<ul style="margin-top: 0; margin-bottom: 0;">',
'~\[/list\](?:<br />)?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '</ul>',
'~(?:<br />|&nbsp;|\s)*\[li\](.+?)\[/li\](?:<br />|&nbsp;|\s)*~i' => isset($disabled['list']) || isset($disabled['li']) ? '<br />$1<br />' : '<li>$1</li>',
// Horizontal rule. [hr] => ------------------.
'~\[hr(?:\s*/)?\]~i' => isset($disabled['hr']) ? '' : '<hr />',
// A break.  [br] or [br /]. (it makes no sense to disable this one :P.)
'~\[br(?:\s*/)?\]~i' => '<br />',
// Right-to-left and left-to-right strings.
'~\[(ltr|rtl)\](.+?)\[/\1\]~i' => isset($disabled['ltr']) || isset($disabled['rtl']) ? '$2' : '<div dir="$1">$2</div>',
// Acronyms and abbreviations... [acronym=Bulletin Board Code]BBC[/acronym]
'~\[abbr=((?:&quot;)?)(.+?)\\1\](.+?)\[/abbr\]~ie' => isset($disabled['abbr']) ? '"$3 ($2)"' : '"<abbr title=\"" . strtr("$2", array("\"" => "&quot;")) . "\">$3</abbr>"',
'~\[acronym=((?:&quot;)?)(.+?)\\1\](.+?)\[/acronym\]~ie' => isset($disabled['acronym']) ? '"$3 ($2)"' : '"<acronym title=\"" . strtr("$2", array("\"" => "&quot;")) . "\">$3</acronym>"',
// [me=Comment]does something[/me]
'~\[me=((?:&quot;)?)(.{1,80}?)\\1\](.+?)\[/me\](?:<br />)?~i' => isset($disabled['ftp']) ? '/me $3<br />' : '<div class="meaction">* $2 $3</div>',
// An email address they just typed in.  Don't match if there's already a mailto: or = before it.
'~(?<=[\?\s\xA0[\]()*\\\;>]|^)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?,\s\xA0\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;|\.(?:\.|&nbsp;|\s|$|<br />))~i' => '<a href="mailto:$1">$1</a>',
'~(?<=<br />)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?\.,\s\xA0\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;)~i' => '<a href="mailto:$1">$1</a>',
// This last one fixes spaces at the beginning of lines.
'~<br /> ~' => '<br />&nbsp;',
// Match a table... hopefully with everything in the right place.
'~\[table\](?:\s|\xA0|<br />|&nbsp;)*((?:\[tr\](?:\s|\xA0|<br />|&nbsp;)*\[td\]).*?(?:(?:\s|\xA0|<br />|&nbsp;)*\[/td\]\[/tr\])*)(?:\s|\xA0|<br />|&nbsp;)*\[/table\](?:\s|\xA0|<br />|&nbsp;)?~i' => '<table>$1</table>',
);

$codefromcache = array_keys($code_to_from);
$codetocache = array_values($code_to_from);

// GLOWING or /shadowed/ text.
$codefromcache[] = '~\[glow=([#\w]{3,12}),([012]\d{1,2}|\d{1,2})(,[^]]+)?\](.+?)\[/glow\]~i';
$codetocache[] = isset($disabled['glow']) ? '$4' : '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">$4</td></tr></table> ';
$codefromcache[] = '~\[shadow=([#\w]{3,12}),(left|right|top|bottom|[0123]\d{0,2})\](.+?)\[/shadow\]~ei';
$codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\'))' : '\'<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Shadow(color=$1, direction=\' . (isset($shadow_directions[\'$2\']) ? $shadow_directions[\'$2\'] : (int) \'$2\') . \'); font: inherit;">\' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'</td></tr></table> \'';

// Moving text... [move]stuff[/move]
$codefromcache[] = '~\[move\](.+?)\[/move\]~i';
$codetocache[] = isset($disabled['move']) ? '$1' : '<marquee>$1</marquee>';

// Handle flash.
$codefromcache[] = '~\[flash=(\d+),(\d+)\](?:<br />)*([^<>]+?)(?:<br />)*\[/flash\]~ie';
if (empty($modSettings['enableEmbeddedFlash']) || isset($disabled['flash']))
$codetocache[] = isset($disabled['url']) ? '"$3"' : '"<a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a>"';
// Internet Explorer for Windows.
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$codetocache[] = '"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"$1\" height=\"$2\"><param name=\"movie\" value=\"" . strtr("$3", array("\"" => "&quot;")) . "\" /><param name=\"play\" value=\"true\" /><param name=\"loop\" value=\"true\" /><param name=\"quality\" value=\"high\" /><param name=\"AllowScriptAccess\" value=\"never\" /><embed src=\"" . strtr("$3", array("\"" => "&quot;")) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a></noembed></object>"';
// Anything else.
else
$codetocache[] = '"<embed type=\"application/x-shockwave-flash\" src=\"" . strtr("$3", array("\"" => "&quot;")) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a></noembed>"';
}

// Nothing to parse... ?
if (!strstr($message, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '&lt;'))
return;

$message = strtr($message, array('$' => '&#036;'));
// Replace <a href="something">somewhere</a> with HTML.
if (!empty($modSettings['enablePostHTML']) && strstr($message, '&lt;'))
{
$message = preg_replace('~&lt;a\s+href=(?:&quot;)?(?:\[url\])?((?:http://|ftp:/\|https://|ftps://|mailto:).+?)(?:\[/url\])?(?:&quot;)?&gt;(.+?)&lt;/a&gt;~ie', '\'<a href="$1">\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', \'$2\') . \'</a>\'', $message);

// Do <img ... /> - with security... action= -> action-.
preg_match_all('~&lt;img\s+src=(?:&quot;)?(?:\[url\])?((?:http://|ftp://|https://|ftps://).+?)(?:\[/url\])?(?:&quot;)?(?:\s+alt=(?:&quot;)?(.*?)(?:&quot;)?)?(?:\s?/)?&gt;~i', $message, $matches, PREG_PATTERN_ORDER);
if (!empty($matches[0]))
{
$replaces = array();
foreach ($matches[1] as $match => $imgtag)
{
// No alt?
if (!isset($matches[2][$match]))
$matches[2][$match] = '';

// Remove action= from the URL - no funny business, now.
if ($imgtag != preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag))
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" alt="' . $matches[2][$match] . '" border="0" />';

// Check if the image is larger than allowed.
if (!empty($modSettings['maxwidth']) && !empty($modSettings['maxheight']))
{
list ($width, $height) = url_image_size($imgtag);

if ($width > $modSettings['maxwidth'] || $height > $modSettings['maxheight'])
{
if ($width > $modSettings['maxwidth'] && !empty($modSettings['maxwidth']))
{
$height = floor($modSettings['maxwidth'] / $width * $height);
$width = $modSettings['maxwidth'];
if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight']))
{
$width = floor($modSettings['maxheight'] / $height * $width);
$height = $modSettings['maxheight'];
}
}
else
{
if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight']))
{
$width = floor($modSettings['maxheight'] / $height * $width);
$height = $modSettings['maxheight'];
}
}
}

// Set the new image tag.
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" width="' . $width . '" height="' . $height . '" alt="' . $matches[2][$match] . '" border="0" />';
}
elseif (strpos($matches[0][$match], '[url]') !== false || substr($matches[0][$match], 0, 4) == '&lt;')
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" alt="' . $matches[2][$match] . '" border="0" />';
}

$message = strtr($message, $replaces);
}
}

// Do the code if necessary.
if (strstr($message, '[') || strstr($message, '://') || strstr($message, '@') || strstr($message, '/me'))
{
$shadow_directions = array('left' => '270', 'right' => '90', 'top' => '0', 'bottom' => '180');

$message = preg_replace($codefromcache, $codetocache, $message);

// Tables need to be done twice or they won't work properly.
if (strpos($message, '<table>') !== false)
{
for ($i = 0; $i < 2; $i++)
$message = preg_replace(
array(
'~((?:<table>|</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*(?:<tr>|\[tr\])|</td>|\[/td\])(?:\s|\xA0|<br />|&nbsp;)*\[td\](?:\s|\xA0|<br />|&nbsp;)*(.*?)(?:\s|\xA0|<br />|&nbsp;)*\[/td\](?:\s|\xA0|<br />|&nbsp;)*((?:</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*(?:<tr>|\[tr\]|</table>)|<td(?: valign="top")?>|\[td\])~i',
'~(<table>|</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*\[tr\](?:\s|\xA0|<br />|&nbsp;)*(.*?)(?:\s|\xA0|<br />|&nbsp;)*\[/tr\](?:\s|\xA0|<br />|&nbsp;)*(</table>|<tr>|\[tr\])~i'
),
array(
'$1<td valign="top">$2</td>$3',
'$1<tr>$2</tr>$3'
), $message
);
}
}

// Enable Basic HTML?
if (!empty($modSettings['enablePostHTML']) && strstr($message, '&lt;'))
{
// b, u, i, s, pre... basic tags.
$closable_tags = array('b', 'u', 'i', 's', 'pre', 'blockquote');
foreach ($closable_tags as $tag)
{
$opens = substr_count($message, '&lt;' . $tag . '&gt;');
$closes = substr_count($message, '&lt;/' . $tag . '&gt;');
$message = str_replace(array('&lt;' . $tag . '&gt;', '&lt;/' . $tag . '&gt;'), array('<' . $tag . '>', '</' . $tag . '>'), $message);

if ($closes < $opens)
$message .= str_repeat('</' . $tag . '>', $opens - $closes);
}

// <br /> should be empty.
$empty_tags = array('br');
foreach ($empty_tags as $tag)
$message = str_replace(array('&lt;' . $tag . '&gt;', '&lt;' . $tag . '/&gt;', '&lt;' . $tag . ' /&gt;'), '<' . $tag . ' />', $message);
}
}


-Shayna
Title: Re: Faster Parsecode
Post by: Anguz on August 27, 2005, 01:14:32 AM
OK, you seem to be missing a line, that's why the mod doesn't install. Find

$message = strtr($message, array('$' => '&#036;'));


and replace with

$message = strtr($message, array('$' => '&#036;'));



and save. Now try installing the mod.
Title: Re: Faster Parsecode
Post by: stargazer_1017 on August 29, 2005, 07:21:11 PM
Thanks Anguz! That worked like a charm!

-Shayna
Title: Re: Faster Parsecode
Post by: Anguz on August 29, 2005, 10:30:20 PM
:)
Title: Re: Faster Parsecode
Post by: Joshua Dickerson on August 31, 2005, 06:39:33 AM
There is a new parse engine in 1.1
Title: Re: Faster Parsecode
Post by: Anguz on September 01, 2005, 12:40:02 AM
Quote from: groundup on August 31, 2005, 06:39:33 AM
There is a new parse engine in 1.1

Oh, I know that. Thanks.
Title: Re: Faster Parsecode
Post by: Snickers on September 17, 2005, 04:52:54 PM
Install Actions
Installations actions for "Faster Parsecode":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I downloaded the FasterParsecode108_SMF103.tar.gz and my version is 1.0.3 beta 3, my template is the classic... help?
Title: Re: Faster Parsecode
Post by: Anguz on September 17, 2005, 06:47:43 PM
Hmm... beta 3? Do you mean 1.1 then? This mod is not for that verison.
Title: Re: Faster Parsecode
Post by: Snickers on September 17, 2005, 06:53:14 PM
yeah, sorry, that was what I meant.

Does that mean I can't get the [hide] and [spoiler] mod!?  :'(
Title: Re: Faster Parsecode
Post by: Anguz on September 17, 2005, 08:45:04 PM
Quote from: Snickers on September 17, 2005, 06:53:14 PM
yeah, sorry, that was what I meant.

Does that mean I can't get the [hide] and [spoiler] mod!?  :'(

Not yet, at least not from me. I'm gonna wait until 1.1 reaches final before upgrading any of my mods to it. BTW, I didn't do a hide tag mod that I remember.
Title: Re: Faster Parsecode
Post by: Snickers on September 18, 2005, 04:06:13 AM
I know, but someone has, and it requires faster parsecode to work  :'(

crap crap crap  :'( :'( :'(
Title: Re: Faster Parsecode
Post by: huijaa on September 29, 2005, 09:57:59 AM
Faster Parsecode is not compitable with SMF 1.1 RC1,  right ? Is itn't required anymore?

Pity :( ...some of mods (such as EscapeTag) needs Faster Parsercode have to get newer version.
Title: Re: Faster Parsecode
Post by: Valodim on September 29, 2005, 10:29:40 AM
the 11rc parse engine is far superior to the faster parsecode one, doesn't really make all that much sense to keep using this now... and there are spoiler and hide tag mods iirc. (not sure about the latter, though)
Title: Re: Faster Parsecode
Post by: Anguz on September 29, 2005, 03:36:53 PM
huijaa, there's a new tag in 1.1 to escape bbcode parsing. I think it was nobbc. Let me see:

[nobbc][b]hello[/b][/nobbc]

[b]hello[/b]
Title: Re: Faster Parsecode
Post by: thardferr on October 10, 2005, 06:52:28 AM
when i try to install the parse mod i get this error

The package you tried to upload either is not a valid package or has become corrupted.

im running smf 1.0.5 and i downloaded the newest one... what the problem?
Title: Re: Faster Parsecode
Post by: Anguz on October 10, 2005, 03:58:37 PM
I don't know. Could you attach it here so I take a look at the file you have? Or just download it again, maybe something went wrong when you downloaded it the first time.
Title: Re: Faster Parsecode
Post by: thardferr on October 11, 2005, 10:05:06 AM
i dowloaded again... uploaded that tar.gz file but still got an error
Title: Re: Faster Parsecode
Post by: Anguz on October 11, 2005, 12:30:14 PM
Okay. Could you attach it here so I take a look at the file you have?
Title: Re: Faster Parsecode
Post by: thardferr on October 11, 2005, 03:23:33 PM
http://mods.simplemachines.org/index.php?a=download;mod=39;id=8072

this is the one i have.
Title: Re: Faster Parsecode
Post by: Anguz on October 11, 2005, 03:42:15 PM
I know that's the one you downloaded, but the thing is that so have hundreds of others that didn't have that problem you do. That's why I'm asking for the file in your machine, so I can see if it's getting corrupt when you download it.
Title: Re: Faster Parsecode
Post by: thardferr on October 12, 2005, 12:10:09 PM
http://www.windborn.fh-net.com/underground/script/FasterParsecode109_SMF105.tar.gz

this is the script i have
Title: Re: Faster Parsecode
Post by: Anguz on October 12, 2005, 01:31:54 PM
WinRAR says the file is corrupt.
Title: Re: Faster Parsecode
Post by: thardferr on October 12, 2005, 02:30:02 PM
so what to do now?
Title: Re: Faster Parsecode
Post by: Anguz on October 12, 2005, 04:28:07 PM
What are you downloading it with? Maybe try downloading it with something else?
Title: Re: Faster Parsecode
Post by: remus on October 17, 2005, 12:44:17 AM
I'm getting the same error message. Fresh download from the mod site. WinRAR says the file is corrupt. Me thinks the file truely is corrupt.

SMF gives the following error:

The package you tried to upload either is not a valid package or has become corrupted.
Title: Re: Faster Parsecode
Post by: ivo2296 on October 17, 2005, 09:15:15 PM
There is no problem at all if you use wirar v3.50 or v3.51 - i just have tested all archives and there was no error.
Title: Re: Faster Parsecode
Post by: remus on October 17, 2005, 11:34:01 PM
Actually I think it's a firefox thing. If I download with IE it's fine - for the most part - still get errors on install though.
But when I download it with Firefox it says the file is corrupt.
Title: Re: Faster Parsecode
Post by: Sandwich on November 07, 2005, 01:41:34 PM
Is it possible that this Mod is breaking the parsing of CAPITALIZED closing quote tags?

For example, I've imported a vB forum, where much of the BB Code is capitalized, among them the quote tag. I've notice that in any of the old, imported posts where there is a quote, the quote extends to the end of the post, even though there is a closing /QUOTE tag. When I change that closing tag to /quote, the post parses as it should.

EDIT: It's definitely this MOD. I tested before/after scenarios on a clean SMF 1.0.5 install.
Title: Re: Faster Parsecode
Post by: Anguz on November 08, 2005, 10:57:17 AM
Hmm... I thought I had already fixed the issue with caps long ago. Thanks for noticing this, I'll take a look at it and provide an update hopefully soon.
Title: Re: Faster Parsecode
Post by: TimeJunky on November 14, 2005, 06:52:50 PM
hello, wouldn't it be much easier to work with utf-8... what we have to do, to do so ???
Title: Re: Faster Parsecode
Post by: Anguz on November 14, 2005, 07:11:31 PM
What do you mean?
Title: Re: Faster Parsecode
Post by: TimeJunky on November 14, 2005, 07:43:30 PM
sorry, I slided into your thread... this question belongs to a lang-mod...
Title: Re: Faster Parsecode
Post by: Faustus on November 15, 2005, 03:52:08 AM
Just to be clear. I should NOT install this on 1.1RC1 right?
Title: Re: Faster Parsecode
Post by: Anguz on November 15, 2005, 02:47:34 PM
Yup, don't. It won't anyway.
Title: Re: Faster Parsecode
Post by: Prasad007 on December 01, 2005, 03:26:44 AM
not working!
says package is corrupt! ::)
Title: Re: Faster Parsecode
Post by: Anguz on December 01, 2005, 06:28:19 PM
Try downloading it with another program, it may be a problem in your download.
Title: Re: Faster Parsecode
Post by: Prasad007 on December 02, 2005, 03:20:50 AM
i tried doing it thru the package manager
then tried downloading it from this site
either way, it said the package was corrupt
and i had no other mods installed for any clash or something
it was a fresh 1.1 rc1 install
Title: Re: Faster Parsecode
Post by: Anguz on December 02, 2005, 12:35:31 PM
Ah, that's why, then. This mod is not for 1.1.
Title: Re: Faster Parsecode
Post by: Prasad007 on December 03, 2005, 08:25:30 AM
Quote from: Anguz on December 02, 2005, 12:35:31 PM
Ah, that's why, then. This mod is not for 1.1.
oh okay
wont an update be released then?
Title: Re: Faster Parsecode
Post by: Amu420 on December 30, 2005, 02:59:04 AM
Ok I am a dumb person. How does this stuff work. I get an zipped file to my desktop then what? Do I need all the previous versions of faster parsecode? Do I unzip then upload to the package manager?
Title: Re: Faster Parsecode
Post by: Anguz on December 30, 2005, 03:25:19 PM
Just the version of the mod that's for your version of SMF. Upload to Package Manager and install.
Title: Re: Faster Parsecode
Post by: the_knight on January 18, 2006, 11:08:39 AM
Every time some software was "open source" the same problem occur :

Most recent version does not include hack or mod that could comply with it ...
It's such a shame ... but nothing could help it so , better keep on searching solution and not spend too much time complaining about.
( I experienced the same with the new version of joomla and a hack that depend on the version... and now woth SMF 1.1RC2 and faster parsecode ... )

Should it be a way to have an "all version compatible" Faster parsecode or directly include it into the sources of SMF as an optional component ( by optional i mean that if you doesn't need it you could disable it. )

more and more people are using faster parsecode. so why not add it like an improvement to the source and not only a simple mod ?
Title: Re: Faster Parsecode
Post by: Ben_S on January 18, 2006, 11:18:13 AM
1.1 has a totally different bbc parser to 1.0x.
Title: Re: Faster Parsecode
Post by: Prasad007 on January 19, 2006, 12:19:37 AM
do i need this mod for my forum running smf version 1.1 rc2 ?
Title: Re: Faster Parsecode
Post by: Anguz on January 19, 2006, 12:58:35 AM
No, SMF is perfectly capable of parsing bb code without this mod. :)
Title: Re: Faster Parsecode
Post by: agridoc on January 29, 2006, 06:22:13 PM
I did a test install of SMF 1.06 in my PC today and Faster Parsecode for 1.05 doesn't install.

My main concern is Table from CSV but Faster Parsecode must be installed first.

I understand this must be a headneck for you Anguz   :(
Title: Re: Faster Parsecode
Post by: RoarinRow on January 30, 2006, 08:55:10 PM
I had to un-install Faster Parsecode 1.0.9 for my now 1.0.6 forum.  Any fixes for 1.0.6.  I do notice a performance difference without it.
Title: Re: Faster Parsecode
Post by: Anguz on January 31, 2006, 01:57:57 AM
I just checked and there's a small difference in 9 lines of the original parsecode function between 1.0.5 and 1.0.6, which I have to change in the mod file when searching and also in the faster parsecode function.

I'll have it done tomorrow, packaged and uploaded in the mod site. Sorry I can't finish it right now. As usual, I'll post a reply here when the update is up.
Title: Re: Faster Parsecode
Post by: agridoc on January 31, 2006, 07:48:20 AM
Thank you Anguz  :) I hope you will also have a look at Table from CSV to see if something is needed there too.
Title: Re: Faster Parsecode
Post by: Anguz on January 31, 2006, 01:03:10 PM
1.10
Title: Re: Faster Parsecode
Post by: RoarinRow on January 31, 2006, 02:06:55 PM
I just tried it on one my test forum and got a failure.  :(  The other worked o.k.
Title: Re: Faster Parsecode
Post by: Anguz on January 31, 2006, 02:34:01 PM
Is your test forum a clean 1.0.6 or an update from a previous version, or does it have another mod installed already?
Title: Re: Faster Parsecode
Post by: RoarinRow on January 31, 2006, 02:37:11 PM
Quote from: Anguz on January 31, 2006, 02:34:01 PM
Is your test forum a clean 1.0.6 or an update from a previous version, or does it have another mod installed already?

I was previously on 1.0.5 and applied the 1.0.6 update this past weekend.

Edit - no other mod other than the 1.0.6 patch.
Title: Re: Faster Parsecode
Post by: agridoc on January 31, 2006, 02:58:24 PM
I tried Faster Parsecode for SMF 1.06 in a fresh 1.06. No problems with install, forum seems to work OK.

Unfortunatately Table From CSV for 1.05 couldn't be installed after that
Title: Re: Faster Parsecode
Post by: Anguz on January 31, 2006, 04:37:41 PM
Just posted the update for Table From CSV, agridoc, let me know how it goes.
Title: Re: Faster Parsecode
Post by: RoarinRow on January 31, 2006, 08:58:32 PM
Quote from: RoarinRow on January 31, 2006, 02:37:11 PM
Quote from: Anguz on January 31, 2006, 02:34:01 PM
Is your test forum a clean 1.0.6 or an update from a previous version, or does it have another mod installed already?

I was previously on 1.0.5 and applied the 1.0.6 update this past weekend.

Edit - no other mod other than the 1.0.6 patch.

I resolved the issue myself.  Just took my original subs.php file from my working site and copied over to my test site, then ran the install again. 
Title: Re: Faster Parsecode
Post by: Anguz on February 01, 2006, 04:23:17 AM
Good. :)
Title: Re: Faster Parsecode
Post by: Skipdawg on February 01, 2006, 03:38:50 PM
Quote from: Anguz on January 31, 2006, 01:03:10 PM
1.10
  • Updated for SMF 1.0.6.

    agridoc, Table From CSV should install fine after Faster Parsecode. If you have any trouble, let me know in its topic.

    I actually packaged the update last night, but had some trouble uploading the file. It's there now.

    FasterParsecode1-10_SMF1-0-6.zip (http://mods.simplemachines.org/index.php?a=download;mod=39;id=13217)
Thanks very much. I can see already this has made a bit of a difference. Cool beans!  ;D ;)
Title: Re: Faster Parsecode
Post by: agridoc on February 01, 2006, 04:54:46 PM
 It really does Skipdawg.

Anguz, have you noticed the topic Wrong parsing of UTF characters in board names categories and posts in 1.1 RC2 (http://www.simplemachines.org/community/index.php?topic=63235.0)?

Altough I would like to follow a more simplified approach for multilingual (Multilingual in SMF 1.1RC2 without UTF for Greek and other languages? (http://www.simplemachines.org/community/index.php?topic=64142.0)) I think it' s an interesting programming challenge to do a Faster Parsecode Mod for 1.1 RC2 without these UTF problems.  ;)
Title: Re: Faster Parsecode
Post by: Anguz on February 02, 2006, 12:54:16 AM
Heh, thanks for the challenge.

I really don't know what to do with this mod for 1.1 yet, though. I don't really feel like re-writting the whole thing, so if actually did release it, it'd probably be the same code. I still am not sure what disadvantages it'd pose compared to the new function, really.

I'll look into the UTF thing, which I'm not familiar with, and see if I can think of something.

Thanks, Skipdawg, I'm glad you like it. :)
Title: Re: Faster Parsecode
Post by: agridoc on February 02, 2006, 08:54:52 AM
I believe you will come with a surprise Anguz  8)
Title: Re: Faster Parsecode
Post by: Washi on February 02, 2006, 04:47:04 PM
I had to manually add this and the spoiler tag on one of the forums (post-upgrade). I got a failure in Subs.php on the Faster Parse code, so I just modded everything myself.
Everything works nicely when you do it yourself, but I think there might be a mistake in the coding of the mod. I might be wrong. As for the spoiler tag, we just need to change the 1.0.5 to 1.0.6 for it to work.
I'm afraid of even trying this on my other forum, because I have so many mods, and I don't wanna make everything go poof.
Title: Re: Faster Parsecode
Post by: Anguz on February 02, 2006, 05:29:13 PM
Hmm... I wonder if the function's code is different in a clean install compared to an upgrade or update. I'll check.

Regarding things going poof, if you don't have any mods that modified the parsecode function, then it's as safe as installing it in an unmodified forum.
Title: Re: Faster Parsecode
Post by: Anguz on February 02, 2006, 05:38:05 PM
Well, I updated a 1.0.5 install to 1.0.6 and then installed Faster Parsecode v1.10 and it went fine. Dunno what the problem is. If you have a failure when trying to install the mod to your other forum, could you please copy your parsecode function in Subs.php and paste it here between code tags so I see what the problem could be? If you know that you don't have another mod that changed that code, that is. What other mods did you have installed in the forum you modified by hand?
Title: Re: Faster Parsecode
Post by: Washi on April 01, 2006, 05:44:46 PM
Anguz, this works ok with 1.0.7? Hopefully, it does. Lemme know.
Title: Re: Faster Parsecode
Post by: GJ-tje on April 15, 2006, 09:43:34 AM
Hello, I have tried all versions of this mod,
but I can't install any package, it says that it needs some installation actions?

I use SMF 1.1 RC2 with the security update from March

Many thanks in advance!
Title: Re: Faster Parsecode
Post by: agridoc on April 15, 2006, 01:30:53 PM
GJ-tje there is no yet version for 1.1. Anguz waits for the final release. This is also the only reason I haven't upgraded to 1.1. RC2.
Title: Re: Faster Parsecode
Post by: GJ-tje on April 15, 2006, 01:35:10 PM
Quote from: agridoc on April 15, 2006, 01:30:53 PM
GJ-tje there is no yet version for 1.1. Anguz waits for the final release. This is also the only reason I haven't upgraded to 1.1. RC2.

Do you know when a 1.1RC2 compatible version is comming up? :D Or do we really have to wait untill 1.1 is being released?
Title: Re: Faster Parsecode
Post by: agridoc on April 15, 2006, 01:42:16 PM
1.1 RC2 is a release candidate, 1.1 final must be released first, then it's up to Anguz.

I don' t think that 1.1 final is far away.
Title: Re: Faster Parsecode
Post by: GJ-tje on April 15, 2006, 01:46:51 PM
Quote from: agridoc on April 15, 2006, 01:42:16 PM
1.1 RC2 is a release candidate, 1.1 final must be released first, then it's up to Anguz.

I don' t think that 1.1 final is far away.
To bad... :( But I can wait! :D (And I can't wait untill the day that 1.1 final comes out! :P)
Title: Re: Faster Parsecode
Post by: Vinspire^ on April 17, 2006, 05:37:07 AM
Which  Faster Parsecode must i download for SMF RC 2 ?

I know we need to edit it or something right ? Couldn't find that post.

Wanted to have a spoiler tag for my board : http://www.simplemachines.org/community/index.php?topic=19831.0

Hope to hear from you guys soon. Thanks in advance :)
Title: Re: Faster Parsecode
Post by: ivo2296 on April 17, 2006, 09:38:42 AM
Quote from: kokorobox on April 17, 2006, 05:37:07 AM
Which  Faster Parsecode must i download for SMF RC 2 ?

I know we need to edit it or something right ? Couldn't find that post.

Wanted to have a spoiler tag for my board : http://www.simplemachines.org/community/index.php?topic=19831.0

Hope to hear from you guys soon. Thanks in advance :)

There isn't version for 1.1 RC2 cause this is beta.
Title: Re: Faster Parsecode
Post by: GJ-tje on April 17, 2006, 09:43:42 AM
Quote from: ivo2296 on April 17, 2006, 09:38:42 AM
Quote from: kokorobox on April 17, 2006, 05:37:07 AM
Which  Faster Parsecode must i download for SMF RC 2 ?

I know we need to edit it or something right ? Couldn't find that post.

Wanted to have a spoiler tag for my board : http://www.simplemachines.org/community/index.php?topic=19831.0

Hope to hear from you guys soon. Thanks in advance :)

There isn't version for 1.1 RC2 cause this is beta.

And there won't be a version coming out too... The author of the mod, is waiting for SMF 1.1 final...
Title: Re: Faster Parsecode
Post by: Vinspire^ on April 18, 2006, 03:14:13 AM
Then i will have to wait till 1.1 Final is out or ?
Title: Re: Faster Parsecode
Post by: GJ-tje on April 18, 2006, 03:51:20 AM
Quote from: kokorobox on April 18, 2006, 03:14:13 AM
Then i will have to wait till 1.1 Final is out or ?

Yep, we all have to wait... :(
Title: Re: Faster Parsecode
Post by: Vinspire^ on April 18, 2006, 06:56:28 AM
I tot there is some part in the threads said we could hack the thing so its usable in 1.1 RC 2 ?
Title: Re: Faster Parsecode
Post by: geraintw1uk on May 07, 2006, 07:03:18 PM
Hi
I have just tried to install this mod on a clean fresh install of 1.1 RC2 but get the following errors.


Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Subs.php Test failed


I have the following mods installed on my forum


*1. Faster Parsecode 1.10  [ Apply Mod ] [ List Files ] [ Delete ] 
2. TinyPortal 0.86   [ Uninstall ] [ List Files ] [ Delete ] 
3. Merge Double Posts 1.05   [ Uninstall ] [ List Files ] [ Delete ] 
4. VisualWarning 1.3   [ Uninstall ] [ List Files ] [ Delete ] 
*5. No Changing Moderator's Edit 0.3  [ Apply Mod ] [ List Files ] [ Delete ] 
6. Member Color Link 1.87   [ Uninstall ] [ List Files ] [ Delete ] 
7. Group Moderators 1.3d   [ Uninstall ] [ List Files ] [ Delete ] 
*8. Create Topic on Report to Moderator 0.2  [ Apply Mod ] [ List Files ] [ Delete ] 
9. Custom Profile Field Mod 3.01   [ Uninstall ] [ List Files ] [ Delete ] 
10. Hide Board 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
11. Redirection Boards 2.0   [ Uninstall ] [ List Files ] [ Delete ] 
12. SMF 1.0.7 / 1.1 RC2 Update 1.0   [ Uninstall ] [ List Files ] [ Delete ] 


some of these mods are not installed, ones marked with *

Please could you have a look at this for me

Thanks
Geraint
Title: Re: Faster Parsecode
Post by: GJ-tje on May 07, 2006, 07:15:33 PM
Quote from: geraintw1uk on May 07, 2006, 07:03:18 PM
Hi
I have just tried to install this mod on a clean fresh install of 1.1 RC2 but get the following errors.


Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Subs.php Test failed


I have the following mods installed on my forum


*1. Faster Parsecode 1.10  [ Apply Mod ] [ List Files ] [ Delete ] 
2. TinyPortal 0.86   [ Uninstall ] [ List Files ] [ Delete ] 
3. Merge Double Posts 1.05   [ Uninstall ] [ List Files ] [ Delete ] 
4. VisualWarning 1.3   [ Uninstall ] [ List Files ] [ Delete ] 
*5. No Changing Moderator's Edit 0.3  [ Apply Mod ] [ List Files ] [ Delete ] 
6. Member Color Link 1.87   [ Uninstall ] [ List Files ] [ Delete ] 
7. Group Moderators 1.3d   [ Uninstall ] [ List Files ] [ Delete ] 
*8. Create Topic on Report to Moderator 0.2  [ Apply Mod ] [ List Files ] [ Delete ] 
9. Custom Profile Field Mod 3.01   [ Uninstall ] [ List Files ] [ Delete ] 
10. Hide Board 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
11. Redirection Boards 2.0   [ Uninstall ] [ List Files ] [ Delete ] 
12. SMF 1.0.7 / 1.1 RC2 Update 1.0   [ Uninstall ] [ List Files ] [ Delete ] 


some of these mods are not installed, ones marked with *

Please could you have a look at this for me

Thanks
Geraint

If you read the topic, before you posted, you would allready know that this mod isn't supported in SMF 1.1RC2. The creator of this mod waits until SMF 1.1 goes final... :D
Title: Re: Faster Parsecode
Post by: Anguz on May 10, 2006, 02:28:08 AM
Quote from: Vinspire^ on April 18, 2006, 06:56:28 AM
I tot there is some part in the threads said we could hack the thing so its usable in 1.1 RC 2 ?

IIRC, there was a reply to this topic where I said how you could use this mod in 1.1 RC2, but there's not a package for it, you'd have to edit it by hand. HIH.
Title: Re: Faster Parsecode
Post by: Vinspire on May 11, 2006, 12:08:27 AM
Quote from: Anguz on May 10, 2006, 02:28:08 AM
Quote from: Vinspire^ on April 18, 2006, 06:56:28 AM
I tot there is some part in the threads said we could hack the thing so its usable in 1.1 RC 2 ?

IIRC, there was a reply to this topic where I said how you could use this mod in 1.1 RC2, but there's not a package for it, you'd have to edit it by hand. HIH.

So, this means you are not gonna make a version which is compatible wif 1.1 RC 2 ?  :( :( :(

I think you should as a lot of ppls would appreciate it ....
Title: Re: Faster Parsecode
Post by: Anguz on May 11, 2006, 03:14:17 AM
I don't know if I will at all. At worst, I'll just package the code I have for this mod now and make an installer for 1.1, at best, I'll re-write the whole code trying to make it even faster. The problem I have is that this took me quite a bit of time the first time and it looks like that much more to do it better, and I don't have time for this lately. That's why I'm also waiting for 1.1 Final, because so many things change between each pre-final version, that updating is pretty time-consuming. I hope you understand my reason.
Title: Re: Faster Parsecode
Post by: Vinspire on May 11, 2006, 03:57:57 AM
Quote from: Anguz on May 11, 2006, 03:14:17 AM
I don't know if I will at all. At worst, I'll just package the code I have for this mod now and make an installer for 1.1, at best, I'll re-write the whole code trying to make it even faster. The problem I have is that this took me quite a bit of time the first time and it looks like that much more to do it better, and I don't have time for this lately. That's why I'm also waiting for 1.1 Final, because so many things change between each pre-final version, that updating is pretty time-consuming. I hope you understand my reason.

Yeap. Then i guess what i have to do best is to pray that SMF 1.1 Final will come out asap which the developer itself didn't know when is the release date for it  :( :( :(
Title: Re: Faster Parsecode
Post by: borizb on August 01, 2006, 11:42:16 PM
Not working with 1.07 english/german so far. I'm still trying to make it work.
Title: Re: Faster Parsecode
Post by: GJ-tje on August 02, 2006, 05:44:10 AM
Quote from: Anguz on May 11, 2006, 03:14:17 AM
I don't know if I will at all. At worst, I'll just package the code I have for this mod now and make an installer for 1.1, at best, I'll re-write the whole code trying to make it even faster. The problem I have is that this took me quite a bit of time the first time and it looks like that much more to do it better, and I don't have time for this lately. That's why I'm also waiting for 1.1 Final, because so many things change between each pre-final version, that updating is pretty time-consuming. I hope you understand my reason.
Well, I think it would really be appreciated if you made a version for SMF1.1RC2 plus the fact that 1.1RC2 is available quite long allread... ;)

I don't expect that SMF 1.1 Final will come soon... ;)
Title: Re: Faster Parsecode
Post by: SlyBaldGuy on August 06, 2006, 02:03:01 AM
Does anyone know what download I should use if I'm running SMF 1.0.7?  Can you let me know where I can get it?
Title: Re: Faster Parsecode
Post by: Skipdawg on August 06, 2006, 02:51:59 AM
Well rumor dose have it that SMF 1.1 rc3 is close.  ??? 8)
Title: Re: Faster Parsecode
Post by: Abdull on August 07, 2006, 08:15:42 PM
does it works for the new SMF 1.7   ??? ???
Title: Re: Faster Parsecode
Post by: windirect on August 21, 2006, 04:39:32 PM
Hi,
I get "Execute Modification ./Sources/Subs.php Test failed"
the mods I have installed are:
1. Enchanced post template 1.0.1
2. Reason For Editing Mod 1.12
3. php BBC Button 1.0
4. Hide Tag 1.18
5. Googlebot & Spiders Mod 1.0.5 
6. Contact Page 1.0 
7. Reg Bar 1.0
8. Skype Name Mod 2.0
9. Ad Managment 2.0
10. AutoSig 1.1
11. Referral Module 1.1 
12. Moderator Activity Report for SMF1.1RC2 1.1a 
13. Custom Profile Field Mod 3.11 
14. Spoiler Tag 0.2.5
15. User Email System 1.0 
16. Guest Nag 1.1 
17. SMF Staff Page 1.2
18. Redirection Boards 2.0
19. CAPTCHA (code verification) 0.1
20. Global Announcements 1.0 
21. Users Online Today Mod 1.4.0 Beta 2
22. VisualWarning 1.3
23. Skype Name Mod 1.0
24. Username Tag 1.2
25. Lots_o_Smileys 1.0
26. SMF 1.0.7 / 1.1 RC2 Update 1.0
27. Paid Subscriptions 0.7

Avatar Packages
Mod Name Version 
1. Horoscope Avatars 1.0
2. WOW dancing avatars 1.0

Is this because I have 1.1rc2, if so please can you make it for 1.1rc2 noob friendly  ;)
I need a mod but it says Faster Parsecode most be installed first, so please help

Many thanks  :)
Title: Re: Faster Parsecode
Post by: Ben_S on August 21, 2006, 05:11:44 PM
1.1 has an entirely different bbc parser to 1.0 so it isn't needed.
Title: Re: Faster Parsecode
Post by: heartless bowser on September 05, 2006, 01:04:12 PM
Hi, I tried to install it, but now I'm getting this message:

Parse error: parse error, unexpected T_IF, expecting ')' in /storage/mijndomein/users/042093/public/sites/www.vgmemporium.com/smf/Sources/Subs.php on line 947

I tried to un-install it and delete the mod, but I can't access my Package Manager because of the install failure.

I can't get anywhere now, what do I have to do?
Title: Re: Faster Parsecode
Post by: GJ-tje on September 05, 2006, 01:12:52 PM
Quote from: heartless bowser on September 05, 2006, 01:04:12 PM
Hi, I tried to install it, but now I'm getting this message:

Parse error: parse error, unexpected T_IF, expecting ')' in /storage/mijndomein/users/042093/public/sites/www.vgmemporium.com/smf/Sources/Subs.php on line 947

I tried to un-install it and delete the mod, but I can't access my Package Manager because of the install failure.

I can't get anywhere now, what do I have to do?
Which version do you use? Because this mod doesn't work on any RC... ;)
Title: Re: Faster Parsecode
Post by: heartless bowser on September 05, 2006, 01:17:51 PM
Version 1.0.8.

I'm kinda new at using SMF... I've been on SMF forums before as a regular member. But this is my first time as an Admin. (for SMF that is, I've been Admin on a Invision Power Board before SMF, but SMF's Admin Panel differs very much (in a better way too!) from IPB.)

Well, it has been said to install the spoiler tag mod, you needed to change the XML file from 1.0.5 to 1.0.8.

I figured that would work for the FasterParsecode mod too, but appearently I must've missed something.
Title: Re: Faster Parsecode
Post by: Bill.Ramby on December 28, 2006, 12:00:16 PM
Failure on Subs.php in SMF 1.0.10. Forum has the following mods running:

Streaming
LSP Enigma 2.0
LSP Captcha
Title: Re: Faster Parsecode
Post by: Vanscot on January 24, 2007, 07:52:28 AM
There'll be a ny update to the SMF 1.1.1 ?
Since, I need this mod to install other mods, I'm waiting an update of this.

TIA.

Vanscot
Title: Re: Faster Parsecode
Post by: Anguz on February 08, 2007, 12:06:14 AM
I believe I've said it before, but in case I didn't, here it goes: I would love to re-write the parsecode function for 1.1, but I seriously doubt I'll have the time or drive to do it. If you want to use my mod in 1.1, though, you could getting your hands a little dirty with the code, but I would advice to just use the default function, since it'll be updated for security issues or improvement by the excellent development team here. I believe that a better approach to the resources used when displaying the messages, rather than working on this function, it'd be to have a caching of parsed messages, but that'd use more disk space in servers. But even that'd probably not be needed, since there's server caching tools that work with SMF, AFAIK.

There's a couple or so bbcode mods I wrote that I do want to make available for 1.1 and I'll find a way to write them using the standard parsecode function, though.
Title: Re: Faster Parsecode
Post by: drgnfireinferno on February 09, 2007, 08:38:00 PM
would your language and spoiler tag mods happen to be among them?
Title: Re: Faster Parsecode
Post by: SoftDux on February 12, 2007, 10:04:04 AM
Any news on updating this mod to work with SMF 1.1.1 ? I need it in order to use the [anchor] tags, which is a simple thing, but won't work on SMF 1.1.1 without this mod.  
Title: Re: Faster Parsecode
Post by: emrys01 on February 15, 2007, 09:44:11 AM
Quote from: SoftDux on February 12, 2007, 10:04:04 AM
Any news on updating this mod to work with SMF 1.1.1 ? I need it in order to use the [anchor] tags, which is a simple thing, but won't work on SMF 1.1.1 without this mod. 

look three posts up from this one (2 up from your post i'm replying to).

Title: Re: Faster Parsecode
Post by: nami_eiku on February 22, 2007, 05:16:57 PM
It would be great to have the custom bbcode mod and the spoiler tag for default parsecode function. I need them so badly xD
Title: Re: Faster Parsecode
Post by: ham1299 on June 30, 2007, 10:05:35 PM
Quote from: drgnfireinferno on February 09, 2007, 08:38:00 PM
would your language and spoiler tag mods happen to be among them?
I was wondering the same thing.
Title: Re: Faster Parsecode
Post by: perro88 on July 26, 2007, 09:40:56 AM
I´m working with the smf 1.1.3. There´s a version compatible with this one? there will be one? if I won´t use what´s will be the diference? I can´t install some others mods?
thanks
Title: Re: Faster Parsecode
Post by: Jori on September 02, 2007, 06:51:07 AM
Can you please make one for SMF 1.1.3? If u do, u wil be great.
Title: Re: Faster Parsecode
Post by: Dragooon on September 02, 2007, 06:57:18 AM
I dont think so it is required for 1.1.3 since things have changed.
Title: Re: Faster Parsecode
Post by: agridoc on September 02, 2007, 01:31:38 PM
Right Dragooon, Anguz has already updated one of his mods, requiring Faster Parsecode mod in SMF 1.0x, Table from CSV (http://custom.simplemachines.org/mods/index.php?mod=40) for SMF 1.1.3 and uses the existing parsing code.

I believe, if he decides to update some more of his mods, he will follow the same way.
Title: Re: Faster Parsecode
Post by: Anguz on September 02, 2007, 03:40:26 PM
Quote from: agridoc on September 02, 2007, 01:31:38 PMI believe, if he decides to update some more of his mods, he will follow the same way.

Correct.

I don't feel like re-writting the whole function again and have you guys waiting for my updates after every new SMF release.
Title: Re: Faster Parsecode
Post by: bfeo on October 17, 2008, 04:41:54 PM
Feeling in the mood for 1.1.6?  :)
Title: Re: Faster Parsecode
Post by: Kindred on October 17, 2008, 07:31:06 PM
this has not been posted to for over a year...   I doubt it.
Title: Re: Faster Parsecode
Post by: highlawn on August 25, 2009, 05:30:10 PM
OK, I'm not sure what sort of reply I'm going to get - given the age of previous posts. But, I wanted to install the spoiler mod (http://custom.simplemachines.org/mods/index.php?mod=50) and it states that this one is a pre-requisite.

I'm on 1.1.10 so I went to the manual install instructions for 1.1.10 and it said to search for

Quote// Parses the code in message, using the normal syntax used by some many forums...
function parsecode(&$message)
{
   global $modSettings, $scripturl, $txt, $settings, $context;
   static $codefromcache = array(), $codetocache = array();

   // If it wasn't already set, set it.
   if (empty($codefromcache))
   {

So, I looked in my Sources/Subs.php - and there is no code like that. I do have something like this:

Quotefunction parse_bbc($message, $smileys = true, $cache_id = '')
{
   global $txt, $scripturl, $context, $modSettings, $user_info;
   static $bbc_codes = array(), $itemcodes = array(), $no_autolink_tags = array();
   static $disabled;

   // Never show smileys for wireless clients.  More bytes, can't see it anyway :P.
   if (WIRELESS)
      $smileys = false;
   elseif ($smileys !== null && ($smileys == '1' || $smileys == '0'))
      $smileys = (bool) $smileys;

   if (empty($modSettings['enableBBC']) && $message !== false)
   {

Anyone any ideas?

Many Thanks
Title: Re: Faster Parsecode
Post by: agridoc on August 26, 2009, 12:39:17 AM
Faster Parsecode was written for SMF 1.0x, is abandoned now. It's not compatible with SMF 1.1, 2.0 has even more changes in parse code.

If you want Spoiler Tag mod, it's code should be changed, so better ask in Spoiler Tag (http://www.simplemachines.org/community/index.php?topic=19831.0).

Anguz had written some excellent mods for SMF 1.0.
Title: Re: Faster Parsecode
Post by: highlawn on August 26, 2009, 03:58:57 PM
Hi - and thanks. I found another one written by AzaToth and Motoko-chan - which works for 1.1.10, so no need to persist here.

So, my issue is solved now.

Cheers
Title: Re: Faster Parsecode
Post by: Mr. Pirate on December 21, 2009, 05:24:29 PM
This doesnt work for SMF RC1.2 theres a manual install for it, but this isnt even in the subs.php

// Parses the code in message, using the normal syntax used by some many forums...
function parsecode(&$message)
{
global $modSettings, $scripturl, $txt, $settings, $context;
static $codefromcache = array(), $codetocache = array();

// If it wasn't already set, set it.
if (empty($codefromcache))
{
// If any tags are disabled then we won't add them.
if (!empty($modSettings['disabledBBC']))
{
$disabled = array_flip(explode(',', $modSettings['disabledBBC']));

foreach ($disabled as $tag => $dummy)
$disabled[trim($tag)] = true;
}

$code_to_from = array(
// A named email address. [[email protected]]me[/email]  And, you can't have []s in your email, I should know.
'~\[email=([^<">]+?)\](.+?)\[/email\]~ie' => isset($disabled['email']) ? '"$2 ($1)"' : '"<a href=\"mailto:" . strtr("$1", array("\"" => "&quot;", "]" => "", "[" => "")) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
// An image.  Width and height can be are optional.
'~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:<br />)*([^<">]+?)(?:<br />)*\[/img\]~ie' => isset($disabled['img']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "&#64;")))' : '"<img src=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "&#64;", "\"" => "&quot;"))) . "\" alt=\"\"" . ("$2" != "" ? " width=\"$2\"" : "") . ("$4" != "" ? " height=\"$4\"" : "") . " border=\"0\" />"',
// Find an inside link. (named?) ie. [iurl]www.simplemachines.org[/iurl]
'~\[iurl=([^<">]+?)\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[flash.*?\]|\[/flash\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"' : 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"') : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
'~\[iurl\]([^<">]+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">$1</a>"' : '"$1"') : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\">$1</a>"',
// FTP link.  Named...?  [ftp=upload.sourceforge.net]Sourceforge[/ftp]
'~\[ftp\]([^<">]+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$1")' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array("@" => "&#64;"))) . "</a>"',
'~\[ftp=([^<">]+?)\](.+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
// Find a (named?) URL... [url]www.simplemachines.org[/url] or [url=www.simplemachines.org]SMF[/url]
'~\[url=([^:\]<">]+?)\]([^\]]*?\[url(?:=[^\]<">]+?)?\][^<">]+?\[/url\].*?)\[/url\]~ie' => isset($disabled['url']) ? 'preg_replace("~(\[url.*?\]|\[/url\])~i", "", "$2") . " ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
'~\[url=([^<">]+?)\](.+?)\[/url\]~ie' => isset($disabled['url']) ? '"$2 ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . strtr("$2", array("@" => "&#64;")) . "</a>"',
'~\[url\](?:<br />)*([^<">]+?)(?:<br />)*\[/url\]~ie' => isset($disabled['url']) ? '"$1"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[flash.*?\]|\[/flash\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">$1</a>"',
// Bold, italics, underline, strikeout.
'~\[b\](.+?)\[/b\]~i' => isset($disabled['b']) ? '$1' : '<b>$1</b>',
'~\[i\](.+?)\[/i\]~i' => isset($disabled['i']) ? '$1' : '<i>$1</i>',
'~\[u\](.+?)\[/u\]~i' => isset($disabled['u']) ? '$1' : '<span style="text-decoration: underline;">$1</span>',
'~\[s\](.+?)\[/s\]~i' => isset($disabled['s']) ? '$1' : '<del>$1</del>',
// A quote.  May or may not specify an author and/or link and date.
'~\[quote(?: author)?=&quot;(.{1,80}?)&quot;\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'~\[quote author=(.{1,80}?) link=(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?) date=(\d+)\](?:<br />)?~ei' => isset($disabled['quote']) ? '\'<div>\'' : '\'<div class="quoteheader"><a href="' . $scripturl . '?$2">' . $txt['smf239'] . ': $1 ' . $txt[176] . ' \' . timeformat(\'$3\') . \'</a></div><div class="quote">\'',
'~\[quote author=(.{1,80}?)\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'~\[quote\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf240'] . '</div><div class="quote">',
'~\[/quote\](?:<br />)?~i' => isset($disabled['quote']) ? '</div>' : '</div>',
// Size the font.  [size=large]HELLO![/size]
'~\[size=([\d]{1,2}p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '<span style="font-size: $1;">$2</span>',
'~\[size=([\d])\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '<font size="$1">$2</font>',
// Performat/justify text.  [center]Justifying is good.[/center]
'~\[pre\](.+?)\[/pre\]~i' => isset($disabled['pre']) ? '$1' : '<pre>$1</pre>',
'~\[left\](.+?)\[/left\]~i' => isset($disabled['left']) ? '$1' : '<div align="left">$1</div>',
'~\[right\](.+?)\[/right\]~i' => isset($disabled['right']) ? '$1' : '<div align="right">$1</div>',
'~\[center\](.+?)\[/center\]~i' => isset($disabled['center']) ? '$1' : '<div align="center">$1</div>',
// Teletyped text.  Monospace, in other words.
'~\[tt\](.+?)\[/tt\]~i' => isset($disabled['tt']) ? '$1' : '<tt>$1</tt>',
// Subscript and superscript.  6[sup]2[/sup] = 36.
'~\[sub\](.+?)\[/sub\]~i' => isset($disabled['sub']) ? '$1' : '<sub>$1</sub>',
'~\[sup\](.+?)\[/sup\]~i' => isset($disabled['sup']) ? '$1' : '<sup>$1</sup>',
// An email address. [email][email protected][/email]
'~\[email\](?:<br />)*(.+?)(?:<br />)*\[/email\]~ie' => isset($disabled['email']) ? '"$1"' : '"<a href=\"mailto:" . strtr("$1", array(":" => "&#58;", "\"" => "&quot;", "[" => "", "]" => "")) . "\">$1</a>"',
// Specify a specific font.  [font=Comic Sans]Blah![/font]
'~\[font=([\w,\-\s]+?)\](.+?)\[/font\]~i' => isset($disabled['font']) ? '$2' : '<span style="font-family: $1;">$2</span>',
// Colors.... [red]See?[/red]
'~\[color=(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[\w]{1,12})\](.*?)\[/color\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: $1;">$2</span>',
'~\[(black|white|red|green|blue)\](.+?)\[/\1\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: $1;">$2</span>',
'~\[(chr|k)issy\](.+?)\[/\1issy\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: #CC0099;">$2 :-*</span>',
// Lists... [list][*]First, ...[o]Second![li]THIRD!!![/li][/list]
'~\[list\](?:<br />)?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '<ul style="margin-top: 0; margin-bottom: 0;">',
'~\[/list\](?:<br />)?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '</ul>',
'~(?:<br />|&nbsp;|\s)*\[li\](.+?)\[/li\](?:<br />|&nbsp;|\s)*~i' => isset($disabled['list']) || isset($disabled['li']) ? '<br />$1<br />' : '<li>$1</li>',
// Horizontal rule. [hr] => ------------------.
'~\[hr(?:\s*/)?\]~i' => isset($disabled['hr']) ? '' : '<hr />',
// A break.  [br] or [br /]. (it makes no sense to disable this one :P.)
'~\[br(?:\s*/)?\]~i' => '<br />',
// Right-to-left and left-to-right strings.
'~\[(ltr|rtl)\](.+?)\[/\1\]~i' => isset($disabled['ltr']) || isset($disabled['rtl']) ? '$2' : '<div dir="$1">$2</div>',
// Acronyms and abbreviations... [acronym=Bulletin Board Code]BBC[/acronym]
'~\[abbr=((?:&quot;)?)(.+?)\\1\](.+?)\[/abbr\]~ie' => isset($disabled['abbr']) ? '"$3 ($2)"' : '"<abbr title=\"" . strtr("$2", array("\"" => "&quot;")) . "\">$3</abbr>"',
'~\[acronym=((?:&quot;)?)(.+?)\\1\](.+?)\[/acronym\]~ie' => isset($disabled['acronym']) ? '"$3 ($2)"' : '"<acronym title=\"" . strtr("$2", array("\"" => "&quot;")) . "\">$3</acronym>"',
// [me=Comment]does something[/me]
'~\[me=((?:&quot;)?)(.{1,80}?)\\1\](.+?)\[/me\](?:<br />)?~i' => isset($disabled['ftp']) ? '/me $3<br />' : '<div class="meaction">* $2 $3</div>',
// An email address they just typed in.  Don't match if there's already a mailto: or = before it.
'~(?<=[\?\s\xA0[\]()*\\\;>]|^)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?,\s\xA0\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;|\.(?:\.|&nbsp;|\s|$|<br />))~i' => '<a href="mailto:$1">$1</a>',
'~(?<=<br />)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?\.,\s\xA0\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;)~i' => '<a href="mailto:$1">$1</a>',
// This last one fixes spaces at the beginning of lines.
'~<br /> ~' => '<br />&nbsp;',
// Match a table... hopefully with everything in the right place.
'~\[table\](?:\s|\xA0|<br />|&nbsp;)*((?:\[tr\](?:\s|\xA0|<br />|&nbsp;)*\[td\]).*?(?:(?:\s|\xA0|<br />|&nbsp;)*\[/td\]\[/tr\])*)(?:\s|\xA0|<br />|&nbsp;)*\[/table\](?:\s|\xA0|<br />|&nbsp;)?~i' => '<table>$1</table>',
);

$codefromcache = array_keys($code_to_from);
$codetocache = array_values($code_to_from);

// GLOWING or /shadowed/ text.
$codefromcache[] = '~\[glow=([#\w]{3,12}),([012]\d{1,2}|\d{1,2})(,[^]]+)?\](.+?)\[/glow\]~i';
$codetocache[] = isset($disabled['glow']) ? '$4' : '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">$4</td></tr></table> ';
$codefromcache[] = '~\[shadow=([#\w]{3,12}),(left|right|top|bottom|[0123]\d{0,2})\](.+?)\[/shadow\]~ei';
$codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\'))' : '\'<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Shadow(color=$1, direction=\' . (isset($shadow_directions[\'$2\']) ? $shadow_directions[\'$2\'] : (int) \'$2\') . \'); font: inherit;">\' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'</td></tr></table> \'';

// Moving text... [move]stuff[/move]
$codefromcache[] = '~\[move\](.+?)\[/move\]~i';
$codetocache[] = isset($disabled['move']) ? '$1' : '<marquee>$1</marquee>';

// Handle flash.
$codefromcache[] = '~\[flash=(\d+),(\d+)\](?:<br />)*([^<>]+?)(?:<br />)*\[/flash\]~ie';
if (empty($modSettings['enableEmbeddedFlash']) || isset($disabled['flash']))
$codetocache[] = isset($disabled['url']) ? '"$3"' : '"<a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a>"';
// Internet Explorer for Windows.
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$codetocache[] = '"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"$1\" height=\"$2\"><param name=\"movie\" value=\"" . strtr("$3", array("\"" => "&quot;")) . "\" /><param name=\"play\" value=\"true\" /><param name=\"loop\" value=\"true\" /><param name=\"quality\" value=\"high\" /><param name=\"AllowScriptAccess\" value=\"never\" /><embed src=\"" . strtr("$3", array("\"" => "&quot;")) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a></noembed></object>"';
// Anything else.
else
$codetocache[] = '"<embed type=\"application/x-shockwave-flash\" src=\"" . strtr("$3", array("\"" => "&quot;")) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a></noembed>"';
}

// Nothing to parse... ?
if (!strstr($message, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '&lt;'))
return;

$message = strtr($message, array('$' => '&#036;'));

// Replace <a href="something">somewhere</a> with HTML.
if (!empty($modSettings['enablePostHTML']) && strstr($message, '&lt;'))
{
$message = preg_replace('~&lt;a\s+href=(?:&quot;)?(?:\[url\])?((?:http://|ftp:/\|https://|ftps://|mailto:).+?)(?:\[/url\])?(?:&quot;)?&gt;(.+?)&lt;/a&gt;~ie', '\'<a href="$1">\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', \'$2\') . \'</a>\'', $message);

// Do <img ... /> - with security... action= -> action-.
preg_match_all('~&lt;img\s+src=(?:&quot;)?(?:\[url\])?((?:http://|ftp://|https://|ftps://).+?)(?:\[/url\])?(?:&quot;)?(?:\s+alt=(?:&quot;)?(.*?)(?:&quot;)?)?(?:\s?/)?&gt;~i', $message, $matches, PREG_PATTERN_ORDER);
if (!empty($matches[0]))
{
$replaces = array();
foreach ($matches[1] as $match => $imgtag)
{
// No alt?
if (!isset($matches[2][$match]))
$matches[2][$match] = '';

// Remove action= from the URL - no funny business, now.
if ($imgtag != preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag))
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" alt="' . $matches[2][$match] . '" border="0" />';

// Check if the image is larger than allowed.
if (!empty($modSettings['maxwidth']) && !empty($modSettings['maxheight']))
{
list ($width, $height) = url_image_size($imgtag);

if ($width > $modSettings['maxwidth'] || $height > $modSettings['maxheight'])
{
if ($width > $modSettings['maxwidth'] && !empty($modSettings['maxwidth']))
{
$height = floor($modSettings['maxwidth'] / $width * $height);
$width = $modSettings['maxwidth'];
if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight']))
{
$width = floor($modSettings['maxheight'] / $height * $width);
$height = $modSettings['maxheight'];
}
}
else
{
if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight']))
{
$width = floor($modSettings['maxheight'] / $height * $width);
$height = $modSettings['maxheight'];
}
}
}

// Set the new image tag.
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" width="' . $width . '" height="' . $height . '" alt="' . $matches[2][$match] . '" border="0" />';
}
elseif (strpos($matches[0][$match], '[url]') !== false || substr($matches[0][$match], 0, 4) == '&lt;')
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" alt="' . $matches[2][$match] . '" border="0" />';
}

$message = strtr($message, $replaces);
}
}

// Do the code if necessary.
if (strstr($message, '[') || strstr($message, '://') || strstr($message, '@') || strstr($message, '/me'))
{
$shadow_directions = array('left' => '270', 'right' => '90', 'top' => '0', 'bottom' => '180');

$message = preg_replace($codefromcache, $codetocache, $message);

// Tables need to be done twice or they won't work properly.
if (strpos($message, '<table>') !== false)
{
for ($i = 0; $i < 2; $i++)
$message = preg_replace(
array(
'~((?:<table>|</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*(?:<tr>|\[tr\])|</td>|\[/td\])(?:\s|\xA0|<br />|&nbsp;)*\[td\](?:\s|\xA0|<br />|&nbsp;)*(.*?)(?:\s|\xA0|<br />|&nbsp;)*\[/td\](?:\s|\xA0|<br />|&nbsp;)*((?:</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*(?:<tr>|\[tr\]|</table>)|<td(?: valign="top")?>|\[td\])~i',
'~(<table>|</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*\[tr\](?:\s|\xA0|<br />|&nbsp;)*(.*?)(?:\s|\xA0|<br />|&nbsp;)*\[/tr\](?:\s|\xA0|<br />|&nbsp;)*(</table>|<tr>|\[tr\])~i'
),
array(
'$1<td valign="top">$2</td>$3',
'$1<tr>$2</tr>$3'
), $message
);
}
}

// Enable Basic HTML?
if (!empty($modSettings['enablePostHTML']) && strstr($message, '&lt;'))
{
// b, u, i, s, pre... basic tags.
$closable_tags = array('b', 'u', 'i', 's', 'pre', 'blockquote');
foreach ($closable_tags as $tag)
{
$opens = substr_count($message, '&lt;' . $tag . '&gt;');
$closes = substr_count($message, '&lt;/' . $tag . '&gt;');
$message = str_replace(array('&lt;' . $tag . '&gt;', '&lt;/' . $tag . '&gt;'), array('<' . $tag . '>', '</' . $tag . '>'), $message);

if ($closes < $opens)
$message .= str_repeat('</' . $tag . '>', $opens - $closes);
}

// <br /> should be empty.
$empty_tags = array('br');
foreach ($empty_tags as $tag)
$message = str_replace(array('&lt;' . $tag . '&gt;', '&lt;' . $tag . '/&gt;', '&lt;' . $tag . ' /&gt;'), '<' . $tag . ' />', $message);
}
}
Title: Re: Faster Parsecode
Post by: Kindred on December 21, 2009, 06:12:33 PM
well, since the last update for this mod was in 2006, I am fairly certain that it will not work on smf 2.0 at all
Title: Re: Faster Parsecode
Post by: Mr. Pirate on December 22, 2009, 04:51:52 PM
can someone update this a lot of bbcode mods need this
Title: Re: Faster Parsecode
Post by: Joshua Dickerson on December 22, 2009, 11:04:08 PM
Better off updating the mods than updating this mod.