The page you are looking at now is at this URL: http://pastoid.com/b0m
This paste was last updated on March 1, 2010 at 3:18 pm.
//create the vocabulary in hconsole $x = Vocabulary::get( 'categories' ); foreach($x->get_tree() as $t) {$x->delete_term($t);} $x->add_term( 'A' ); $x->add_term( 'G' ); $x->add_term( 'H' ); $x->add_term( 'B',$x->get_term('A') ); $x->add_term( 'E',$x->get_term('A') ); $x->add_term( 'C',$x->get_term('B') ); $x->add_term( 'D',$x->get_term('B') ); $x->add_term( 'F',$x->get_term('E') ); $out = array(); foreach($x->get_tree() as $t) {$out[] = $t->mptt_left.$t->term. $t->mptt_right;} Utils::debug($x->get_options(), implode(' ', $out)); $source = $x->get_term('E'); $target = $x->get_term('H'); $x->move_term($source,$target,true); $out = array(); foreach($x->get_tree() as $t) {$out[] = $t->mptt_left.$t->term. $t->mptt_right;} Utils::debug($x->get_options(),implode(' ', $out));
| Referring Domain | Hits |
|---|---|
| Unknown Referer | 108 |
| pastoid.com | 1 |
Tip: Use Pastoid to shorten URLs with this bookmarklet: Pastoid This