From 49e903820067403db97d5abc260af274887870f3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 29 Oct 2015 10:24:58 -0200 Subject: Rename stuff to nuvemdario_ --- common_methods.php | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'common_methods.php') diff --git a/common_methods.php b/common_methods.php index 6510107..78306c6 100644 --- a/common_methods.php +++ b/common_methods.php @@ -6,7 +6,7 @@ * Generate the HTML representing a given menu with Artisteer style. * */ -function art_menu_worker($content = NULL, $show_sub_menus, $menu_class) { +function nuvemdario_menu_worker($content = NULL, $show_sub_menus, $menu_class) { if (!$content) { return ''; } @@ -25,7 +25,7 @@ function art_menu_worker($content = NULL, $show_sub_menus, $menu_class) { } if (class_exists('DOMDocument')) { - $output = art_menu_xml_parcer($output, $show_sub_menus, $menu_class); + $output = nuvemdario_menu_xml_parcer($output, $show_sub_menus, $menu_class); /* Support Block Edit Link module */ $output = str_replace('', $empty_str, $output); } @@ -36,10 +36,10 @@ function art_menu_worker($content = NULL, $show_sub_menus, $menu_class) { return $output; } -function art_menu_xml_parcer($content, $show_sub_menus, $menu_class) { +function nuvemdario_menu_xml_parcer($content, $show_sub_menus, $menu_class) { $parent_id = $menu_class . '-id'; - $doc = art_xml_document_creator($content, $parent_id); + $doc = nuvemdario_xml_document_creator($content, $parent_id); if ($doc === FALSE) { return $content; // An error occurred while reading XML content } @@ -56,7 +56,7 @@ function art_menu_xml_parcer($content, $show_sub_menus, $menu_class) { } if ($ul_element == NULL) return $content; - $ul_children = art_menu_style_parcer($doc, $ul_element->childNodes, $show_sub_menus); + $ul_children = nuvemdario_menu_style_parcer($doc, $ul_element->childNodes, $show_sub_menus); $parent->appendChild($ul_element); while ($ul_element->previousSibling) @@ -65,8 +65,8 @@ function art_menu_xml_parcer($content, $show_sub_menus, $menu_class) { return html_entity_decode($doc->saveHTML(), ENT_NOQUOTES, "UTF-8"); } -function art_xml_document_creator($content, $parent_id) { - $old_error_handler = set_error_handler('art_handle_xml_error'); +function nuvemdario_xml_document_creator($content, $parent_id) { + $old_error_handler = set_error_handler('nuvemdario_handle_xml_error'); $dom = new DOMDocument(); /* Support Block Edit Link module */ $doc_content = <<< XML @@ -82,14 +82,14 @@ XML; return $dom; } -function art_handle_xml_error($errno, $errstr, $errfile, $errline) { +function nuvemdario_handle_xml_error($errno, $errstr, $errfile, $errline) { if ($errno==E_WARNING && (substr_count($errstr,"DOMDocument::loadXML()")>0)) return false; // An error occurred while reading XML content else return true; // Successful } -function art_menu_style_parcer($doc, $elements, $show_sub_menus) { +function nuvemdario_menu_style_parcer($doc, $elements, $show_sub_menus) { $parentNodes_to_delete = array(); $childNodes_to_delete = array(); foreach ($elements as $element) { @@ -134,12 +134,12 @@ function art_menu_style_parcer($doc, $elements, $show_sub_menus) { } } - art_remove_elements($childNodes_to_delete); - art_remove_elements($parentNodes_to_delete); + nuvemdario_remove_elements($childNodes_to_delete); + nuvemdario_remove_elements($parentNodes_to_delete); return $elements; } -function art_remove_elements($elements_to_delete) { +function nuvemdario_remove_elements($elements_to_delete) { if (!isset($elements_to_delete)) return; foreach($elements_to_delete as $element) { if ($element != null) { @@ -148,9 +148,9 @@ function art_remove_elements($elements_to_delete) { } } -function art_node_worker($node) { - $links_output = art_links_woker($node->links); - $terms_output = art_terms_worker($node->taxonomy); +function nuvemdario_node_worker($node) { + $links_output = nuvemdario_links_woker($node->links); + $terms_output = nuvemdario_terms_worker($node->taxonomy); $output = $links_output; if (!empty($links_output) && !empty($terms_output)) { @@ -168,7 +168,7 @@ function art_node_worker($node) { * * @ingroup themeable */ -function art_terms_worker($terms) { +function nuvemdario_terms_worker($terms) { $result = ''; $terms = get_terms_D7($content); if (!empty($terms)) { @@ -191,7 +191,7 @@ $terms = get_terms_D7($content); * @return * A string containing an unordered list of links. */ -function art_links_woker($links, $attributes = array('class' => 'links')) { +function nuvemdario_links_woker($links, $attributes = array('class' => 'links')) { $output = ''; if (!empty($links)) { @@ -285,7 +285,7 @@ function get_html_link_output($link) { return $output; } -function art_content_replace($content) { +function nuvemdario_content_replace($content) { $first_time_str = '
@@ -422,7 +422,7 @@ ob_start();?> return $output; } -function is_art_links_set($links) { +function is_nuvemdario_links_set($links) { $size = sizeof($links); if ($size == 0) { return FALSE; @@ -441,7 +441,7 @@ function is_art_links_set($links) { * Method to define node title output. * */ -function art_node_title_output($title, $node_url, $page) { +function nuvemdario_node_title_output($title, $node_url, $page) { $output = ''; if (!$page) $output = '' . $title . ''; @@ -450,11 +450,11 @@ function art_node_title_output($title, $node_url, $page) { return $output; } -function art_vmenu_output($subject, $content) { +function nuvemdario_vmenu_output($subject, $content) { if (empty($content)) return; - $output = art_menu_worker($content, true, 'b2-vmenu'); + $output = nuvemdario_menu_worker($content, true, 'b2-vmenu'); $bvm = "
\r\n
\r\n"; $bvmt = "
\r\n
\r\n
\r\n

"; $evmt = "

\r\n
\r\n"; -- cgit v1.2.3