Event.observe(window, ‘load’, function() { document.body.innerHTML = document.body.innerHTML.replace(“CDL”, “bar”); } );
Category Archives: Programming
Truncate long text with PHP (excerpt function)
Truncate is a handy function which can truncate a long text into specific length string and adds elipsis (…) after it. This is an example of how the function “truncate($text,47)” works : function truncate ($str, $length=10, $trailing=’…’) { /* ** $str -String to truncate ** $length – length to truncate ** $trailing – the trailing …
Continue reading “Truncate long text with PHP (excerpt function)”
PHP array first-last value
< ?php $fruits = array('apple', 'banana', 'cranberry'); echo end($fruits); // cranberry echo current($fruits); // apple ?>
Ktinterakt view last import ID with PHP
How I know this function when I use insert Record transaction (advanced) and the redirect page has recordset that use $_POST[‘name for mysql_insert_id() ‘] for select record from db? $ins_sivut->registerTrigger(“END”, “Trigger_Default_Redirect”, 99, “sisallot_edit.php?Id={the_field_from_the_transaction_selected_as_primary_key}”);
Tinymce Full Flash valid_elements
Full FlashMX 2004 rule set: The following will validate that the page complies fully with the flashMX 2004 specification. valid_elements : “” +”a[href|target],” +”b,” +”br,” +”font[color|face|size],” +”img[src|id|width|height|align|hspace|vspace],” +”i,” +”li,” +”p[align|class],” +”h1,” +”h2,” +”h3,” +”h4,” +”h5,” +”h6,” +”span[class],” +”textformat[blockindent|indent|leading|leftmargin|rightmargin|tabstops],” +”u” add custom buttons http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/theme_advanced_buttons_1_n
Flash var loop over php
onClipEvent (load) { //this.loadVariables(_global.VARGAL1+”tips.php”); this.loadVariables(“all_pdf.php”); } onClipEvent (data) { xcount = 0; yxount = 0; trace(total); for (var i = 1; i <= total; i++) { media0.duplicateMovieClip(“media” + i, i); eval(“media” + i).pdfpath = eval(“pdfpath” + i); eval(“media” + i).pdftitle = eval(“pdftitle” + …