diff options
Diffstat (limited to 'common_methods.php')
-rw-r--r-- | common_methods.php | 52 |
1 files changed, 26 insertions, 26 deletions
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('<!DOCTYPE root>', $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 = '<div id="first-time"'; $article_str = ' class="b2-article"'; $pos = strpos($content, $first_time_str); @@ -320,7 +320,7 @@ EOT; return $output; } -function art_placeholders_output($var1, $var2, $var3) { +function nuvemdario_placeholders_output($var1, $var2, $var3) { $output = ''; if (!empty($var1) && !empty($var2) && !empty($var3)) { $output .= <<< EOT @@ -384,7 +384,7 @@ EOT; return $output; } -function art_get_sidebar($sidebar, $vnavigation, $class) { +function nuvemdario_get_sidebar($sidebar, $vnavigation, $class) { $result = 'b2-layout-cell '; if (empty($sidebar) && empty($vnavigation)) { $result .= 'b2-content'; @@ -397,11 +397,11 @@ function art_get_sidebar($sidebar, $vnavigation, $class) { return $output; } -function art_get_content_cell_style($left, $vnav_left, $right, $vnav_right, $content) { +function nuvemdario_get_content_cell_style($left, $vnav_left, $right, $vnav_right, $content) { return 'b2-layout-cell b2-content'; } -function art_submitted_worker($date, $author) { +function nuvemdario_submitted_worker($date, $author) { $output = ''; if ($date != '') { ob_start();?> @@ -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 = '<a href="' . $node_url . '" title="' . $title . '">' . $title . '</a>'; @@ -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 = "<div class=\"b2-vmenublock\">\r\n <div class=\"b2-vmenublock-body\">\r\n"; $bvmt = "<div class=\"b2-vmenublockheader\">\r\n <div class=\"l\"></div>\r\n <div class=\"r\"></div>\r\n <h3 class=\"t subject\">"; $evmt = "</h3>\r\n</div>\r\n"; |