Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Unlike in POSIX (ereg* functions), PCRE (preg*) regexes need delimiters around the expression, mostly to separate it from any flags (case-insensitivity and such). Often you can simply add a character at the front and back (making sure to escape it if it's used in the expression) with / and # being the most common. /^[A-Z]'?[- a-zA-Z]( [a-zA-Z])*$/By the way your expression seems a bit too loose: it'll accept names like A' and A-.
  2. Probably: I doubt they'll drop support for 5.2 (considering how they're only now dropping 4) so if you use that then you should be fine.
  3. If you want someone to do it for you then you'll probably have to pay someone. Meanwhile the tutorial does start off saying so perhaps you should just find another one. In fact I would suggest that anyways: the method presented using symlinks is silly when there are much simpler and more portable methods available. Take a look.
  4. Oh, I didn't realize: RewriteMap is only allowed at the server configuration level - you can't put it in a .htaccess. The only other thing I can think of is writing loops to find and replace characters in the request URI but that's a horrible thing to resort to, and I'm not even 100% sure how.
  5. Do they not offer PHP 5 right now? Transition your web site to it while you still have the luxury of being able to use both. Otherwise just grab a normal version of 5.4 and try your site on it. If you've had to work around the hosting provider's configuration (like safe mode or open_basedir) then you will probably have to in the new configuration to some degree as well (safe mode is gone but open_basedir is still around).
  6. It isn't directly associated with the Rule. Think of it like a function definition: it should be put somewhere out of the way and not in the middle of a variable assignment or a loop. "Out of the way" like Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteMap esc int:escape RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (?!^infos/)^(.+?)/?$ /dl.php?f=${esc:$1} [L,QSA,NC] RewriteRule ^$ http://www.pirate-punk.net [R=301,L]
  7. If you have to do it in the .htaccess then that RewriteMap thing I posted would be the way to go. 500 you say? What does the error log say about why? Also, insert the typical spiel about allowing people to upload files without doing anything to the filename and about putting them in the root directory and about not giving links to the files.
  8. Still works for me. For timeupdate I'm talking about a.addEventListener("timeupdate", function() { // update label and slider according to a.currentTime });
  9. ...You don't happen to be rawurlencode()ing those filenames before you put them into links, right? You need to. Do you have any examples that don't use plus signs or accented characters?
  10. Give you a hand with what? How far have you gotten into it? Is there something in particular you don't understand or can't get working?
  11. You sure it's happening exactly like that? mod_rewrite normally escapes things for you and you have to explicitly tell it not if you don't want it. If so, RewriteMap esc int:escapeand RewriteRule (?!^infos/)^(.+?)/?$ /dl.php?f=${esc:$1} [L,QSA,NC]
  12. And you think this is to do with APC? Classic reason for a blank page is a fatal error or a exit/die in the code. Either of those happening?
  13. It's working for me... No matter what I do it always ends at 1:21. Your code is using the loadedmetadata event to get the length of the audio. (Trying: it doesn't seem to show correctly on the page.) I was saying you can also use the timeupdate event to follow along with the player as it goes, rather than repeatedly draw()ing and checking the currentTime.
  14. (cough thread will be one year old next week)
  15. Then it's a good thing OP didn't actually ask if it was working and only asked if his code was correct (according to the instructions given).
  16. What is the code you have now that uses the timeupdate event?
  17. So basically your question is how to take the user's input, search a database, and output a "journal" thing? What input do you get, what database do you have, and what output do you need to generate?
  18. The function definitions should not be in the loop. Move them to the top of your script.
  19. There are a number of events related to playback. timeupdate looks particularly promising.
  20. It's actually just a couple overlapping divs: one has the waveform as an image and the other provides the blue highlighting. After some quick searching I found these: * Extract Wavelength from MP3 as an Image * Optimizing the PHP MP3 waveform generator (followup to Generating MP3 waveforms with PHP) * Reading 16 bit wav file The file gets converted from MP3 to WAV so actually it would work on any audio file format - if you can convert it, which may mean you need one or more programs to support it (eg, ffmpeg and lame).
  21. Only on the New Content page, only for threads that have pagination to show (duh). Couldn't find it mentioned with a quick search through IPBoard bugs. Sample for Help, Pretty Please : stuck Page 1's LI: <li><a href="http://forums.phpfreaks.com/topic/279310-help-pretty-please-stuck/page-1" title='<a href='http://forums.phpfreaks.com/index.php?app=forums&module=forums&section=findpost&pid=1436739'><span class='ipsBadge has_icon ipsBadge_green'><img class='icon' src='http://forums.phpfreaks.com/public/style_images/phpfreaks/icon_check_white_8px.png'> Answered</span></a> <a href='http://forums.phpfreaks.com/index.php?showtopic=279310&hl='>Help, Pretty Please : stuck</a> - page 1'>1</a></li>Looks like the thread title in that title got ran through filters it shouldn't. Full TD: <td> <h4><a href='http://forums.phpfreaks.com/topic/279310-help-pretty-please-stuck/' title='View result'><a href='http://forums.phpfreaks.com/index.php?app=forums&module=forums&section=findpost&pid=1436739'><span class='ipsBadge has_icon ipsBadge_green'><img class='icon' src='http://forums.phpfreaks.com/public/style_images/phpfreaks/icon_check_white_8px.png'> Answered</span></a> <a href='http://forums.phpfreaks.com/index.php?showtopic=279310&hl='>Help, Pretty Please : stuck</a></a></h4> <span class='desc blend_links'> <span class='desc lighter'>in</span> <a href='http://forums.phpfreaks.com/forum/13-php-coding-help/'>PHP Coding Help</a> </span> <span class='desc lighter blend_links toggle_notify_off'> <br />Started by <a hovercard-ref="member" hovercard-id="158974" data-ipb="noparse" class="_hovertrigger url fn name " href='http://forums.phpfreaks.com/user/158974-tinaoconnell/' title='View Profile'><span itemprop="name">TinaOConnell</span></a>, Today, 06:25 AM <img src='http://forums.phpfreaks.com/public/style_images/phpfreaks/icon_tag.png' /> <a href="http://forums.phpfreaks.com/tags/forums/php%2Bform%2Band%2Bconnect/" data-tooltip="Find more content tagged 'php form and connect'"><span>php form and connect</span></a> </span> <ul class='mini_pagination toggle_notify_off'> <li><a href="http://forums.phpfreaks.com/topic/279310-help-pretty-please-stuck/page-1" title='<a href='http://forums.phpfreaks.com/index.php?app=forums&module=forums&section=findpost&pid=1436739'><span class='ipsBadge has_icon ipsBadge_green'><img class='icon' src='http://forums.phpfreaks.com/public/style_images/phpfreaks/icon_check_white_8px.png'> Answered</span></a> <a href='http://forums.phpfreaks.com/index.php?showtopic=279310&hl='>Help, Pretty Please : stuck</a> - page 1'>1</a></li> <li><a href="http://forums.phpfreaks.com/topic/279310-help-pretty-please-stuck/page-2" title='<a href='http://forums.phpfreaks.com/index.php?app=forums&module=forums&section=findpost&pid=1436739'><span class='ipsBadge has_icon ipsBadge_green'><img class='icon' src='http://forums.phpfreaks.com/public/style_images/phpfreaks/icon_check_white_8px.png'> Answered</span></a> <a href='http://forums.phpfreaks.com/index.php?showtopic=279310&hl='>Help, Pretty Please : stuck</a> - page 2'>2</a></li> <li><a href="http://forums.phpfreaks.com/topic/279310-help-pretty-please-stuck/page-3" title='<a href='http://forums.phpfreaks.com/index.php?app=forums&module=forums&section=findpost&pid=1436739'><span class='ipsBadge has_icon ipsBadge_green'><img class='icon' src='http://forums.phpfreaks.com/public/style_images/phpfreaks/icon_check_white_8px.png'> Answered</span></a> <a href='http://forums.phpfreaks.com/index.php?showtopic=279310&hl='>Help, Pretty Please : stuck</a> - page 3'>3</a></li> </ul> </td>
  22. You're missing the ending / delimiters. [edit] Which is exactly what the error message says. Weird, huh?
  23. if (you do want to show that stuff) { ?> the stuff } ?>
  24. Then it's a good thing OP didn't actually ask for a solution and only asked if his code was correct.
×
×
  • 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.