Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. in answer to solarpitch's initial question... NO! The problem is how these browsers implement the box model. [url=http://css-discuss.incutio.com/?page=BoxModelHack]http://css-discuss.incutio.com/?page=BoxModelHack[/url] For future reference using strict doc type decalrations does make IE 6 do things properly (mostly) - ie it renders box model in standards mode instead of quirks...
  2. Why? This is all in line with web standards. Opening a page in a new window is most definitely a document efect and as such should be implemented with javascript. The window.open(this.href); retrun false; method is perfect because it allows js to control the effect and degrades when js is off to opening in teh current window. If you want to use the target attribute and remove the document from the realm of js control then just use a different doctype its not compicated. If you are using a strict doctype then code as such - as compliant browsers SHOULD fail if you don't (unfortunatley they still work!!!!!)
  3. Through your research you will know that this value can only be altered in php.ini, httpd.conf or .htaccess. In addition you need the server that your site is on to allow you to alter php flags in the htaccess file. This is dependant on what AllowOverride si set to in the server config file - something you have no control over. I am not sure what the seting needs to be to allow you to set php_flags in teh .htacces file but your server support people should be able to help. Note: some hosts won't enable anything extra for you on shared hosting - they will say you need a dedicated server (as fasthosts did to one of my sites recently) you DON'T need a dedicated server but you may have to switch hosts
  4. need some fast help with manipulating xml files. I have an rss feed like so <?xml version="1.0" encoding="iso-8859-1" ?> <?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/xml/xsl/nolsol.xsl" ?> <rss version="2.0"> <channel> <title>Mysite</title> <link>http://www.mysite.co.uk/news</link> <feed>http://www.mysite.co.uk/xml/news.xml</feed> <description>News from mysite</description> <category>Sport</category> <copyright>2007 mysite. All rights reserved.</copyright> <language>en</language> <managingEditor>me@mysite.co.uk</managingEditor> <item> <title>50 Years and Still Young</title> <link>http://www.mysite.co.uk/news/2007/1/1</link> <description>mysite are clebrating 50 years.</description> <pubDate>1 Jan 2007 09:00:00 GMT</pubDate> <author>Rob Charlton</author> <guid isPermaLink="false">http://www.mysite.co.uk/news/2007/1/1</guid> </item> <item> <title>Footy Rules</title> <link>http://www.www.waring-netts.co.uk/news/2006/10/25</link> <description>Football is the biggest game on earth.</description> <pubDate>25 Oct 2006 09:00:00 GMT</pubDate> <author>Someone</author> <guid isPermaLink="false">http://www.mysite.co.uk/news/2006/10/25</guid> </item> <item> <title>A New House for Gran</title> <link>http://www.mysite.co.uk/news/2006/10/15</link> <description>Gran has a new house.</description> <pubDate>15 Oct 2006 09:00:00 GMT</pubDate> <author>Mum</author> <guid isPermaLink="false">http://www.mysite.co.uk/news/2006/10/15</guid> </item> </channel> </rss> All I need to do is add a new child node 'item' and if the number of childnodes of channel called item is greater than 50 remove them. here is what I have tried so far with limited (no) success.... $file = $_SERVER['DOCUMENT_ROOT'] . '/xml/test.xml'; $dom = domxml_open_file($file); $elements = $dom->get_elements_by_tagname ('item'); $nonodes = count($elements); if ( $nonodes > 4 ) { $remove = $elements[$nonodes - 1]; $child = $dom->dump_node($remove); } $element = $elements[0]; $newnode = $element->insert_before($element, $element); $children = $newnode->children(); $attr = $children[1]->set_attribute("align", "left"); $xmlfile = $dom->dump_mem(true); echo htmlentities($xmlfile); now all that is doing is replacing the first item node with a line!!!!! I need some kind fo loop to remove child nodes as there could be a situation where a few nodes get added manually so teh script needs to remove all nodes after the 50th one. If anyone can help I woudl be very greatful.
  5. are you instantiating the class? If you are then I honestly don't know - unless of course you have a version of mysql before 4.1 (I think its 4.1 anyway)
  6. If a check box is not selected then it is not even sent to the next page - ie. isset($_REQUEST['chkbx']) will be false. This behaviour is particular to checkboxes and radio buttons. All the other field types in html are sent even if their value is empty. The example you have above uses 2 boxes - you only need 1; they either check it or not so you can check in your code if that field has been set.
  7. hmm that is an interesting one. Its kind of odd as the img tag is (IMO) a special tag. Padding in other tags dictates the amount of 'white space' to render before any content. The image however has no 'content' its just a pciture. In that respect I actually agree with the output from IE (it makes more sense to me). The solutions as far as I can see would be: a, try using display: block; for the image. b, placing the image in a div and apply border and padding to that.
  8. businessman ... do you make money out of your work? If so how? Where do you find the clients prepared to part with money for your services?
  9. unless you have access to the apache config yourself OR the server allows you to alter settings using a htaccess file (all this assuming you have apache of course) then you can select which page shoudl be served by default. Hot hot on apache stuff but if you do have either option open to you then I believe the command you'd use is: DirectoryIndex aboutus.php
  10. I like the new IE7 - it won't work if you don't code properly!!!! ;)
  11. if you are making the site accessible also use: onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;" you don't need the _blank in there...
  12. or jsut use $_SERVER['DOCUMENT_ROOT'] . '/path/to/file.jpg'
  13. preg_replace('/(?!http(s)?\/\/)www/', 'http://www' , $string); Or something like that anyway.
  14. It looks like you are doing everything in your power to prevent the spiders from indexing all you site that this could be a chapter entitled Don't Do... html redirects are one of the things that cause a few spiders to immediately leave your site and not bother indexing anything. I suggest you take a fresh look at how you can change your site so that redirects are nor required. If your server configuration allows it (most do) simply delete your index.html / index.htm file and the index.php (or index.asp etc.) will be served by default. There are other issues in there like how a bot carries on from a form etc etc. but somethings you just can't avoid. Perhaps your site would benefit if there was more information pages that can be viewed prior to the client having to agree to the eula; that way you could guarantee more opportunity for crawlers to index the site. I am positive others will have better an more helpful comments to make...
  15. this is server side technology like asp or php... If you are asking this question then I suspect what you want to do is currently beyond your capabilites. Not being horrid here but that is a fundamental subject in coding for the web...
  16. [quote author=dbrimlow link=topic=123524.msg512528#msg512528 date=1169664959] Remember the rule of CORRECT css coding: 1. if it works in FF, Opera and/or Safari, but not in IE 6 or below ... the css and mark-up is 100% correct ... you need to add proper hacs to your css. 2. if it works in any, every and all IEs but NOT in FF, Opera and/or Safari ... there's a bug in your code or markup. Period. 3. if it works in every browser in the world, but not IE 7 ... the css and markup is perfect, the hacks work like a charm and you are a master ... you NOW need to make a seperate ie 7 only css AND put a conditional comment link to it in your head tag (welcome to what it was like during the browser wars ... gee, thanks again MS!). [/quote] Designing a site that has the same fell cross-browser is not neccessarily dependant on writing css and then adding hacks/additional css for IE. All the factors come into play - one most commonly overlooked is the use of strict doctype declarations.  If you design your html with the problems of teh box model in mind you can erradicate the need for css hacks or even separate style sheets.  I have not had to do so on any site I  have worked on in a long time.
  17. safari does a couple of odd things but it is essentially compliant. Not that many use it and those who do are used to pages not looking quite right...
  18. OK I am having a problem on my development machine using mod rewrite in htaccess.  All works fine on the live server but I need to emulate this on my machine. I am running apache 2.0.59 on winXP sp2 (plus all updates). This is my .htaccess file... [code] Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^/admin/(.*)? /admin/$1 [NC,L] RewriteRule !\.(gif|jpg|png|css|pdf|mp4|mpg|mov|swf)$ index.php [NC,L] [/code] The only way I can get mod_rewrite to run successfully on my local dvelopment machin is to have the following in the httpd.conf [code] <VirtualHost 127.0.0.1>     ServerAdmin toonmariner_at_here.com     DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/pcis"     ServerName www.pcis.dev     RewriteEngine on     RewriteRule ^/admin/(.*) /admin/$1 [NC,L]     RewriteRule !\.(gif|jpg|png|css|pdf|mp4|mpg|mov|swf)$ /index.php [NC,L] </VirtualHost> [/code] Problem being is that it isn't accessible on the server so I need to do it the .htaccess route. I have [code] <Directory "C:/Program Files/Apache Group/Apache2/htdocs/pcis">     Options +FollowSymLinks     AllowOverride All </Directory> [/code] Which I was lead to believe tells apache to allow the htaccess file to set what ever config settings it chooses. I would really appreciate some pointers here including which load_modules i must uncomment (obviously i have uncommented teh mod_rewrite one !) Thank you for your time and efforts...
  19. IF all your pdfs are in one directory then this should work RewriteRule \/(!?\/)*+\.pdf$ global_pdf/$1.pdf [NC,L]
  20. If you could be so kind as to visit this page... [url=http://waringnetts.contrastcompany.co.uk/showreel]http://waringnetts.contrastcompany.co.uk/showreel[/url] There is a 10M mp4 on there (30M mpg if you aint got quicktime!) This all runs fine in IE but FF doesn't show anything but the text. Any advice very much appreciated.
  21. Let the content do teh work. Fixed height layouts often fall over whne they don't account for lower screen resolutions. I hate fixed height layouts but If they are wahat is honetsly wanted i think it best to make a content area of fied height and gve it over-flow: auto;
  22. if you remove the width or add white-space: no-wrap; (it will be wider then 70 after that so be careful. OR switch your document type declaration to a strict mode - that way IE renders the box model correctly.
  23. you need to style inputs to alter their default settings. Font is not a valid attribute of input so it won't make a blind bit of difference. you can do this in-line with teh style="font-family: TrebuchetMS;" (use teh sty;le attribute to do ALL the alterations you want including font size etc.) Trebuchet is not a font that is defined in default font-families - choose a set of fonts to follow trebuchet (a comma after each) that WILL be available to all. Empty line under teh submt could be a padding on the parent or a magin on teh submit button itself.
×
×
  • 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.