Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. i know i need these to transfer id, class, color, size, face and... just because i know i'll need it... i also need to make one going back.
  2. i want to change all "font" classes to "span style="""
  3. [code] <a href="pagename.php"><?=$tablename?></a> [/code]
  4. does anybody have a funtion that would change [code]<font color=""></font>[/code] into [code]<span style="color:;"></font>[/code] or any clues as to where should start to build one ?
  5. $_POST[] vars are [u]read only[/u] you cant activly create/change/alter/delete these vars other then by a form, or by changing to a different page.
  6. taith

    wysiwyg

    it has script tags... and no, no errors... why doesnt ajax load script?
  7. taith

    wysiwyg

    question... when i load my wysiwyg directly(without ajax) it loads perfectly fine, but when i try loading with ajax, nothing shows... any ideas? it seems that ajax loaded files wont run any onload javascript... i can include some code if you want... but theres lots of it...
  8. [code]<?php function TimeAgo($timestamp){ $current_time = time(); $difference = $current_time - $timestamp; $periods = array("minute", "hour", "day", "week", "month", "year", "decade"); $lengths = array(60, 3600, 86400, 604800, 2630880, 31570560, 315705600); for($val = sizeof($lengths) - 1; ($val >= 0) && (($number = $difference / $lengths[$val]) < 1); $val--); if($val < 0) $val = 0; $new_time = $current_time - ($difference % $lengths[$val]); $number = floor($number); if($number != 1) $periods[$val].= "s"; $text = sprintf("%d %s ", $number, $periods[$val]);    if(($val >= 1) && (($current_time - $new_time) > 0)) $text .= TimeAgo($new_time); return $text; } echo TimeAgo('6435421'); ?>[/code]
  9. [code] <? function get_mybrowser(){ if(strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko')){   if(strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape')) return 'netscape';   elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')) return 'firefox';   else return 'mozilla'; }elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')){   if(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera')) return 'opera';   else return 'ie'; }else return 'other'; } switch(get_mybrowser()){ default: header('Location: unauthor.php'); break; case "ie": header('Location: unauthor.php'); break; } ?> [/code]
  10. thats it! str_replace... lol... knew i was doin somin wrong ;-) thanks :-P
  11. trying to remove all ,'s from a string, but i get a nice error... [code] $i= preg_replace(",", '', $i); [/code] Warning: preg_replace() [function.preg-replace]: No ending delimiter ',' found in /home/.sites/16/site168/web/taith/md5.php on line 3
  12. what is this supposed to do? what is it doing?
  13. as much as you might not like ie, 70%+ of people use it... so you do need it to work.
  14. well... theres your problem... $picture1 has no value... you have to set it somewhere...
  15. nonono... look at the page, right click, view source. find that line... that'll tell you why its not showing...
  16. ya... but if you view your source your [code] <img src=""> [/code] does $picture1 have value?
  17. you can cut out the whole get_actualfilename() part if your not intending on putting a full url in :)
  18. sorry... here ya go... [code] <? function get_actualfilename($string){ if(stristr($string,'?')){   $pos = strpos($string, "?");   $string = substr($string, 0, $pos); } $string=basename($string); return $string; } ?> [/code]
  19. what gets outputted to your sourcecode?
  20. theres prolly an easier way... but this one has always worked wonders for me :-) [code] <? function get_filename($filepath,$extension=4){ $filepath = get_actualfilename($filepath); $length = strlen($filepath) - $extension; return substr($filepath,0,$length); } ?> [/code]
  21. [code] <?php if($handle = opendir(".")){ while(false !== ($file = readdir($handle))){   if(($file!='.')&&($file!='..')){   $files[filemtime($file)]=$file;   } } closedir($handle); } sort($files); foreach($files as $file) echo "$file<br>\n"; ?> [/code] or just [code] $file=explode('=>',$file); echo trim($file[1]); [/code]
  22. [code] <?php if($handle = opendir(".")){ while(false !== ($file = readdir($handle))){   $files[]=$file; } closedir($handle); } ksort($files); foreach($files as $file) echo "$file<br>\n"; ?> [/code]
  23. no... php doesnt have the ability(that i know of) to forcevly stop in the middle of a script, the only way of doing it would be to split the script up into sections [code] switch($_GET[stage]){ default:   #first stage, then header to stage 2 break; case "stage2":   yes|no break; case "no":   redirect break; case "stage3":   #continue break; } [/code]
  24. lol... but ajax is the greatest thing since sliced bread ;-) and not that hard to set up... lol
  25. true... but i was talking about doing it without reloading the page...
×
×
  • 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.