phpbb forum Přidávání tlačítek pro psaní příspěvků
AD MOB
Pro psaní příspěvků můžeme vkládat další vlastní tlačítka, která vkládají tagy v hranatých závorkách
Podrobně o této tématice na odkaze níže.
//www.phpbb.com/kb/article/adding-custom-bbcodes-in-phpbb3/
**VIDEO YOUTUBE
Podrobně o této tématice na odkaze níže.
//www.phpbb.com/kb/article/adding-custom-bbcodes-in-phpbb3/
**VIDEO YOUTUBE
77LW NO topic_id
AD
Další témata ....(Topics)
Některé funkce pracující s polem v JavaScriptu
var myArray = []; // smazat obsah, nebo inicializovat nove pole
concat([item1[, item2[, . . . [, itemN]]]])
concat([string2[, string3[, . . . [, stringN]]]])
/* spoji stringy nebo pole a vraci novy string nebo pole */
join(separator)
/* vrati v string spojene itemy poli oddelene separatorem*/
push([item1 [item2 [. . . [itemN ]]]])
/* prida na konec pole novy item a vraci delku pole*/
pop()
/* odebere posledni element z pole a vrati jeho hodnotu*/
reverse()
/*vraci obracene poradi itemu pole*/
shift()
/* odebere prvni item z pole a vrati jej*/
slice(start, [end])
/* varaci cast pole*/
var numArray = new Array(3,2,5,9);
var newNumArray = numArray.slice(1,3); // 2,5
sort() // string
sort(sortFunction)
/* setridi pole cisel od nejvetsiho - descending */
sort(function(a, b){return b-a})
/* setridi od nejmensiho cisla - ascendant*/
sort(function(a, b){return a-b})
splice(start, deleteCount, [item1[, item2[, . . . [,itemN]]]])
/* odebere element z pole, popripade vlozi novy a vrati odebrany element*/
var numArray = new Array(3,2,5,9);
var newNumArray = numArray.splice(1,1); // 3,5,9
unshift([item1[, item2 [, . . . [, itemN]]]])
/* prida na pocatek item, ktery je parametrem funkce */
var myA = new Array(10,11,12);
myA.unshift(1); // 1,10,11,12
toString([radix])
/* prevede objekt na string */
toLocaleString()
var myDate = new Date();
document.write( myDate.toLocaleString());
// 24. února 2009 10:50:02
valueOf()
var number = new Number();
number = Number(100);
if (!isNaN(number))
document.write(number.valueOf()); // 100
hasOwnProperty(proName)
var theObj = { prom : 'bla' };
if ( theObj.hasOwnProperty )
{
document.write( "Has 'prom': " + theObj.hasOwnProperty( 'prom' ) + 'n' ); // true
document.write( "Has 'prom2': " + theObj.hasOwnProperty( 'prom2' ) + 'n' ); // false
}
isPrototypeOf(object2)
function fc(){
var reg = new RegExp();
return (RegExp.prototype.isPrototypeOf(reg)); // return true.
}
propertyIsEnumerable(proName)
var a = new Array("apple", "banana", "cactus");
document.write(a.propertyIsEnumerable(2)); // true
Tthis code works in all previous versions of browsers
Pause code by alert
Set timeout
Pause code by alert
var n = 1;
alert(n);
n = 5;
alert(n);
Set timeout
var n = 5;
// wait 5 second / do next code
// next code put into function and call this function by setTimeout
setTimeout("nextCodeFc (n)",5000); // wait for 5000 millisecond == 5 second and execute
// how put string as parameter into setTimeout
var str = "Hello string parameter!";
setTimeout('nextCodeFc("str")',3000); // produce "str"
setTimeout('nextCodeFc("'+str+'")',3000); // produce "Hello string parameter!"
setTimeout("nextCodeFc(str)",3000); // produce Hello string parameter!
function nextCodeFc (n){
// do work .........
alert(n);
}
$country[0] = "cz"
$country[1] = "sk"
$country[2] = "de"
$country[3] = "uk"
$country[4] = "fr"
// this do same
$country[] = "cz"
$country[] = "sk"
$country[] = "de"
$country[] = "uk"
$country[] = "fr"
// or
$country = array('cz','sk','de','uk','fr');
// get array items count
$length = count($country);
for($i=0;$i<$length;$i++){
print $country[$i].'<br>';// cz sk de uk fr
}
// or like this
$country[50] = 'ca';
$country[10] = 'fr';
$country[20] = 'us'
// now country will index 51
$country[] = 'ru';
// or
$country = array('5'=>'cz','sk','de','uk','fr');
/*
Array
(
[5] => cz
[6] => sk
[7] => de
[8] => uk
[9] => fr
)
*/
// you can do this
$country["cz"] = 1571;
$country["sk"] = 1572;
$country["de"] = 1573;
$country["uk"] = 1574;
$country["fr"] = 1575;
print $country["uk"]; // 1574
// print all items key and value
foreach ($country as $key => $value){
print $key; // cz, sk, de, uk, fr
print $value; // 1571, 1572, 1573, 1574, 1575
}
Editace: 9.6.2020 - 20:31
Počet článků v kategorii: 77
Url:pridavani-tlacitek-pro-psani-prispevku-id-23
AD