News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Faster Parsecode

Started by Anguz, October 22, 2004, 06:28:53 PM

Previous topic - Next topic

Anguz

Thanks. Could you also post a message with which you're having the problem in your forum so I can test it here?
Cristián Lávaque http://cristianlavaque.com

theantidote

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.

Anguz

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. :-\
Cristián Lávaque http://cristianlavaque.com

theantidote

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!  >:(

allfripou

@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 :)

theantidote

Try the code BB code. It looks like this: # and it does this:
bzzk://|file|myfile|736286526|A7E9ED9687E2DBDFEB00CC7AA282F558|/

shishira

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
It always takes longer than you expect, even when you take into account Hofstadter's Law.

http://shiroid.com
http://bangaloreforums.com

Anguz

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.

:)
Cristián Lávaque http://cristianlavaque.com

shishira

it dosen't let me install 1.03 there is no install option installed 1 2
It always takes longer than you expect, even when you take into account Hofstadter's Law.

http://shiroid.com
http://bangaloreforums.com

Jerry

you need to download and install 1.01 then you install the rest.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

shishira

now it say


Parse error: parse error, unexpected T_IF, expecting ')' in /home/shishira/public_html/bangaloreforums/Sources/Subs.php on line 833
It always takes longer than you expect, even when you take into account Hofstadter's Law.

http://shiroid.com
http://bangaloreforums.com

Anguz

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?
Cristián Lávaque http://cristianlavaque.com

shishira

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
It always takes longer than you expect, even when you take into account Hofstadter's Law.

http://shiroid.com
http://bangaloreforums.com

shishira

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\]~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]
         
It always takes longer than you expect, even when you take into account Hofstadter's Law.

http://shiroid.com
http://bangaloreforums.com

Anguz

From what you posted, 1.01 is not installed.
Cristián Lávaque http://cristianlavaque.com

eSolutionsWork

well, it's killed my site. tried fixing, but no luck.  now i have to delete site.
happy christmas.
bye

Jerry

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 ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Anguz

#57
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.
Cristián Lávaque http://cristianlavaque.com

shishira

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
It always takes longer than you expect, even when you take into account Hofstadter's Law.

http://shiroid.com
http://bangaloreforums.com

Anguz

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.
Cristián Lávaque http://cristianlavaque.com

Advertisement: