Jump to content

jack_

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by jack_

  1. If you are doing massive grouping I would suggest looking into mod_rewrite. It is far far easier than php'ing everything through statements. But it can be somewhat intensive. So to clearify, if you wanted to group say, id's 1-500 to somepage1.html, then 501-1000 to somepage2.html then 1001-1500 to somepage3.html etc, it would probably be your best bet. Your pages will be read by whatever attribs you have, apache just redirects them to the pages you specify. In the above example you could do it all in 3 lines in your htaccess versus whatever you were looking for via php.
  2. hey and thanks in advance. i have been working on some forums and I am attempting to limit the amount of quotes users can do to 2 per post. Relative quote formatting is: if ((substr_count($in, '[quote]') + substr_count($in, '[quote=')) == substr_count($in, '[/quote]')) { $search[] = '~\[quote=(.+?)]~i'; $search[] = '~\[quote]~i'; $search[] = '~\[/quote]~i'; $replace[] = '<table style="width:90%; margin-left:5%; margin-right:5%;" border="0" cellpadding="3" cellspacing="0"><tr><td><b> Said:</b></td></tr><tr><td class="quote">'; $replace[] = '<table style="width:90%; margin-left:5%; margin-right:5%;" border="0" cellpadding="3" cellspacing="0"><tr><td><b> Quote:</b></td></tr><tr><td class="quote">'; $replace[] = '</td></tr></table>'; } $in = preg_replace($search, $replace, $in); I'm looking to include a function to loop through $search, allow the last and second to last occurences, but remove earlier ones, if possible then add it to $search[] and then $replace[], i'm pretty lost here. All of the search[]'s can occur at least twice, and i'm not sure how to only allow the last two quotes; pretty danged lost ???. Any help would be appreciated, thank you! (currently this works fine but it allows infinite quoting and pyramiding which is what i don't want.)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.