Everything posted by Ade
-
Firefox 3 no longer opens files with .php suffix
I found the answer to this myself today, after a lot of digging. In case it helps anyone else.... It's down to Firefox's MIME type handling, or not handling in this case as it started ignoring the text/html MIME type that I'd specified. Any unwanted MIME type handlers can be deleted by editing the file called mimeTypes.rdf, in the Firefox profile. Removing the PHP entry has fixed the problem and if it ever returns, it'll be easy enough to fix again. If only this was possible for Chrome and Safari.
-
[jQuery] How do i run a function depending on wether my nav contains a subnav
That should be doable, although I have never needed to do it. Try this: if ( $("#myid").length > 0 ) { //perform an action }
-
PHP form script no longer working
When I say that there is no error in the HTML, it is because there is no error in the HTML. But thank you for the useful insight anyway.
-
PHP form script no longer working
Can anyone else help?
-
PHP form script no longer working
I can't post a link. Besides, there is definitely no error in the HTML.
-
Firefox 3 no longer opens files with .php suffix
This is - for me - a fairly major PITA, because I do not (cannot, for unknown reasons) run Apache locally on my home PC. Normally, all the browsers that I use (except Safari 4 and Chrome 2) will display the HTML from files with .php suffixes correctly (IE7 takes a refresh each time, but it's then OK). But now, Firefox asks me if I want to download the file or open it with another program. Of its own choosing, it has added a PHP file entry in its application list, which cannot be cleared as far as I can make out. Has anyone ever experienced this and do you know how to fix it? Or am I doomed to have to constantly FTP my modified files to a server when working at home? One other weird, and possibly related, thing: IE7 no longer needs a refresh to display the files. Good in itself, but it makes me think that something strange is going on.
-
PHP form script no longer working
Never a good idea, is it? To change something that works fine...... My PHP form script (a very slightly tweaked version of Jem's script) no longer works as intended if there is nothing in the comments box. This field is not included as one of the mandatory fields (and never has been), so it should go through as it used to. Any attempt to trigger an error message (eg. "Please provide...." etc.) does nothing. It repopulates the form as normal, but the error messages are not displayed. Filling in the required fields and the message box results in a successful submission. I ruled out the points system: changing it doesn't fix the issue. There must be an error in the code somewhere, but I'm stumped, so anyone who can spot the problem has my thanks. The PHP is in the supplied attachment. example.php
-
Frog CMS and missing database tables
Well, I haven't given it much time lately, but it seems to be no more than average. It was rated as easy to use, but there is a difference between what us developers can handle and what clients will be happy with. The documentation is a weak spot (compare it to the WordPress docs for example). I usually provide MODx, which is very good, but could be a bit easier for non-techy clients to learn about. An easy CMS means less time spent providing support.
-
MySQL error message in phpMyAdmin
Thanks for responding. I can see that it might be a password issue, but how can that affect an attempt to view the phpMyAdmin page? And how can it be fixed?
-
MySQL error message in phpMyAdmin
When I try to access phpMyAdmin on my local setup (using WAMPserver) I get a MySQL error, as follows: #1045 - Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. I don't know enough about MySQL to figure the cause or any possible solution, apart from removing and re-installing the WAMPserver. But I did that recently when this problem first occurred (which was right after installing WAMP) and I'd prefer a more permanent fix if this is going to happen repeatedly. I haven't really had a chance to do anything that might have screwed it up (as far as I know) and I just have a couple of CMS setups installed for testing. They are installed OK and still run OK, though I haven't started using them yet.
-
jQuery: Click an anchor to display a div below it
Bocaj, your mark up is exactly what I had in mind. I will give your JS a go when I get to start work on this project tomorrow: play around a bit, and see how it goes. Thanks a lot for helping out.
-
jQuery: Click an anchor to display a div below it
Thanks for replying, but like I wrote above, I know how to do it with CSS. The client has requested styling/behaviour that CSS can't do, though.
-
jQuery: Click an anchor to display a div below it
That's not a problem, per se - I always position hidden elements off-screen rather than setting display to none, for that reason.
-
Frog CMS and missing database tables
No worries. Fixed it eventually. Played around with ways to get Frog to play ball with a different database and it eventually worked.
-
jQuery: Click an anchor to display a div below it
Wizely - that looks possible at first glance, but would that not make the div visible until the DOM is ready? It looks like your code hides it, but I would definitely need to hide it with CSS I reckon. Bocaj - No, not a modal window. That would be no problem, as I use a few different plugins for those. I felt that this little task would not be worth a plugin, though - I prefer to keep things as light as possible. The content of the div will be some text and maybe a small image, because the client wants a short biography to be displayed in this way instead of on a separate page (which it wouldn't fill anyway). As for closure of the div, I would favour keeping it until mouseout, plus a brief delay if possible, then a fade or slide up, etc. I used to do this sort of thing with CSS only, but I think that a click rather than a hover is better for this instance.
-
jQuery: Click an anchor to display a div below it
Just a bit patronising, don't you think? I'm familiar with PHP, but I am not interested in a server-side solution - otherwise, I would not have requested help with a JS solution. Neither am I interested in any legacy JS. Thank you for replying, but that reply was useless, frankly.
-
jQuery: Click an anchor to display a div below it
I though that this would be easy to figure out, but the jQuery documentation is perpetually poor and Google found nothing really relevant. I just want to display a small div, positioned absolutely over other content, when an anchor is clicked and then furl it back up again on mouseout. Or something very much along those lines. I see this done often enough but I can't think of exactly how it's done (I usually cheat and use plugins!).
-
Frog CMS and missing database tables
I'm trying out Frog CMS (and a couple of others) locally, but it's throwing an error during installation. Click the Install button and it says "Unable to connect to the database! Tables are not loaded!" OK, so I haven't added any tables manually yet (having not had to do that before) but is Frog expecting me to do it (no mention of this in the docs) or is it supposed to do it itself? Either way, what's the solution?
-
password change in phpadmin
Wow! I came here (back after far too long) to ask exactly the same question after getting exactly the same error. WAMP constantly gives me headaches like this. Can't find that file, though. Do you know where it is? No worries - I got it.
-
Function (or script) to add URL and title into links
Good thanks, Gareth. Busy, so I can't complain! I might try SocioFluid and see if it's lighter than AddThis. I will probably keep looking around for my own method as well, just 'cause I like the CIM approach. (Code It Myself!) Just got to learn more about PHP first. Thanks guys.
-
Function (or script) to add URL and title into links
I wanted to avoid AddThis. A bit of a heavyweight solution to a lightweight problem.
-
Function (or script) to add URL and title into links
Hi Gareth, how you doing? I had already looked at a couple of the relevant sites, but tools like this one at StumbleUpon don't get what I want. You still need to add the URL and title manually. I want to add some PHP to the client's site that will do that part for me.
-
Function (or script) to add URL and title into links
I need to add a few social bookmark links to a few pages in the usual format, like: <a href="http://www.stumbleupon.com/submit?url=http://example.com&title=Title of page" title="Submit to StumbleUpon">StumbleUpon</a> and I'm having to do it the old fashioned way because there is no CMS involved in this case, unfortunately. I would prefer to make it quicker by using a bit of PHP to fetch the URL and page title into each link. (Or even generate the entire links if that's more doable.) That way, at least I could just duplicate the required links (6 of them on each page) and call them in an SSI on each page. I don't particularly want to add in all that data manually. Is that possible?
-
PHP contact form XHTML strict
Dazza, if you're testing locally and you are not running a PHP server, then seeing the code (in some form or another) is expected and normal. Firefox, for example, will show the PHP as plain text in an otherwise normal HTML page. IE7 shows just code until you hit the refresh button, and then it will mimic Firefox's view. The simple expedient answer is to comment out the PHP code (use HTML comment marks) while you're testing locally. Then Firefox won't show any oddities and IE7 only needs a refresh to "look" normal, albeit with an "error on page" icon at bottom left, but that's not a concern at the testing stage. Hope that helps.
-
Notepad++ BOM!?
I have had problems with avoiding the BOM in Notepadd++, too. For me, it had a tendency to revert when a file was next opened after a seemingly successful attempt to convert it. The problem went away after an update, but I don't know for sure whether that was related. Nothing in the revision notes to suggest that it was. Re: your apostrophe issue. If you're declaring UTF-8, all forms of apostrophes and quote marks should show without being escaped. Might be your browser, possibly.