• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP HTMLTags_URL类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中HTMLTags_URL的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTags_URL类的具体用法?PHP HTMLTags_URL怎么用?PHP HTMLTags_URL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了HTMLTags_URL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_html_url_in_public_images

 public function get_html_url_in_public_images()
 {
     $image_row = $this->get_element();
     $html_url = new HTMLTags_URL();
     $html_url->set_file('/hc-database-img-cache/' . $image_row->get_id() . '.' . $image_row->get_file_extension());
     return $html_url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:7,代码来源:Database_ImageRowRenderer.inc.php


示例2: get_rss_titles_ul

 public function get_rss_titles_ul(RSS_RSS $rss, $limit = 10)
 {
     //                print_r($rss->get_xml());exit;
     $items = $rss->get_items();
     $tempCounter = 0;
     $ul = new HTMLTags_UL();
     $ul->set_attribute_str('class', 'rss');
     foreach ($items as $item) {
         # DISPLAY ONLY 10 ITEMS.
         if ($tempCounter < $limit + 1) {
             $li = new HTMLTags_LI();
             if ($tempCounter % 2 == 0) {
                 $li->set_attribute_str('class', 'odd');
             }
             $a = new HTMLTags_A();
             $url = new HTMLTags_URL();
             $url->set_file($item->get_url_filename());
             $a->set_href($url);
             $a->append($item->get_title());
             $li->append($a);
             $ul->append($li);
         }
         $tempCounter += 1;
     }
     return $ul;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:26,代码来源:RSS_RSSHelper.inc.php


示例3: get_frame_png_thumbnail_img

 public static function get_frame_png_thumbnail_img(Oedipus_Frame $frame, $max_width = 250, $max_height = 185)
 {
     $url = new HTMLTags_URL();
     $url->set_file('/frames/images/thumbnails/frame-' . $frame->get_id() . '_' . $max_width . 'x' . $max_height . '.png');
     $img = new HTMLTags_IMG();
     $img->set_src($url);
     $img->set_alt($frame->get_name());
     return $img;
 }
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:9,代码来源:Oedipus_FrameImageHelper.inc.php


示例4: get_admin_section_home_page_href

 public function get_admin_section_home_page_href()
 {
     $admin_section_home_page_href = new HTMLTags_URL();
     $admin_section_home_page_href_str = '/admin/hpi/';
     $admin_section_home_page_href_str .= $this->get_identifying_name();
     $admin_section_home_page_href_str .= '/home.html';
     $admin_section_home_page_href->set_file($admin_section_home_page_href_str);
     return $admin_section_home_page_href;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:9,代码来源:HaddockProjectOrganisation_PlugInModuleDirectory.inc.php


示例5: get_home_page_url

 public static function get_home_page_url()
 {
     $url = new HTMLTags_URL();
     $url->set_file('/');
     return $url;
     // return self
     // ::get_oo_page_url(
     // '/'
     // );
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:10,代码来源:VideoLibrary_URLHelper.inc.php


示例6: get_oedipus_png_frame

 private function get_oedipus_png_frame(Oedipus_Frame $frame)
 {
     $max_width = 100;
     $max_height = 100;
     $url = new HTMLTags_URL();
     $url->set_file('/frames/images/thumbnails/option-frame-' . $frame->get_id() . '_' . $max_width . 'x' . $max_height . '.png');
     $img = new HTMLTags_IMG();
     $img->set_src($url);
     return $img;
 }
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:10,代码来源:Oedipus_AllDramasUL.inc.php


示例7: get_image_img

 public function get_image_img()
 {
     $img = new HTMLTags_IMG();
     $url = new HTMLTags_URL();
     $url->set_file($this->image_url);
     $img->set_src($url);
     $img->set_attribute_str('alt', $this->get_name());
     $img->set_attribute_str('title', $this->get_description());
     return $img;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:10,代码来源:PhotoGallery_Photograph.inc.php


示例8: get_spans

 public static function get_spans($str_to_split, $num_displayed_char)
 {
     $spans = array();
     $str_to_split_shortened = '';
     # Shorten the string if it needs it
     $max_length = $num_displayed_char;
     if (strlen($str_to_split) > $max_length) {
         # $str_to_split_shortened = substr($str_to_split, 0, $max_length);
         # $pos = strrpos($str_to_split, " ");
         #
         # if($pos === false) {
         #        $str_to_split_shortened = substr($str_to_split, 0, $max_length)."...";
         #
         # }
         #
         #$str_to_split_shortened =  substr($str_to_split, 0, $pos)."...";
         $str_to_split_shortened = substr($str_to_split, 0, $max_length);
         $truncated_span = new HTMLTags_Span();
         $truncated_span->set_attribute_str('class', 'truncated');
         $truncated_span->append_str_to_content($str_to_split_shortened);
         $truncated_span->append_str_to_content('&nbsp;');
         $truncated_span_show_link = new HTMLTags_A('More...');
         #$truncated_span_show_link->set_attribute_str('onclick', 'javascript: showInline(');
         $truncated_span_show_link->set_attribute_str('class', 'show');
         $truncated_span_show_link->set_attribute_str('title', 'Show the rest of this text');
         $truncated_span_show_location = new HTMLTags_URL();
         $truncated_span_show_location->set_file('#');
         $truncated_span_show_link->set_href($truncated_span_show_location);
         $truncated_span->append_tag_to_content($truncated_span_show_link);
         array_push($spans, $truncated_span);
         $full_span = new HTMLTags_Span();
         $full_span->set_attribute_str('class', 'full');
         $full_span->append_str_to_content($str_to_split);
         $full_span->append_str_to_content('&nbsp;');
         $full_span_hide_link = new HTMLTags_A('...Hide');
         $full_span_hide_link->set_attribute_str('class', 'hide');
         $full_span_hide_link->set_attribute_str('title', 'hide the rest of this text');
         $full_span_hide_location = new HTMLTags_URL();
         $full_span_hide_location->set_file('#');
         $full_span_hide_link->set_href($full_span_hide_location);
         $full_span->append_tag_to_content($full_span_hide_link);
         array_push($spans, $full_span);
     } else {
         $full_span = new HTMLTags_Span();
         $full_span->append_str_to_content($str_to_split);
         array_push($spans, $full_span);
     }
     return $spans;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:49,代码来源:HTMLTags_TruncatedSpanFactory.inc.php


示例9: get_url

 /**
  * Just because I was getting bored of typing out this minchia all the time...
  * 
  * No error checking at this point, is it necessary or desirable?
  *
  * If the section is 'project-specific', the module should be set to NULL.
  */
 public static function get_url($section, $module, $page, $type)
 {
     $url = new HTMLTags_URL();
     $url->set_file('/');
     $url->set_get_variable('section', 'haddock');
     $url->set_get_variable('module', 'admin');
     $url->set_get_variable('page', 'admin-includer');
     $url->set_get_variable('type', $type);
     $url->set_get_variable('admin-section', $section);
     if (isset($module)) {
         $url->set_get_variable('admin-module', $module);
     }
     $url->set_get_variable('admin-page', $page);
     return $url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:22,代码来源:Admin_AdminIncluderURLFactory.inc.php


示例10: get_base_url

 public static function get_base_url()
 {
     $url = new HTMLTags_URL();
     #$ph_cm = Configuration_ConfigManagerHelper
     #	::get_config_manager(
     #		'haddock',
     #		'public-html'
     #	);
     #if ($ph_cm->server_has_mod_rewrite()) {
     if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) {
         $url->set_file('/');
     } else {
         $url->set_file('/haddock/public-html/public-html/index.php');
     }
     return $url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:16,代码来源:PublicHTML_URLHelper.inc.php


示例11: get_body_div_header

 public function get_body_div_header()
 {
     /*
      * Create the HTML tags objects.
      */
     $div_header = new HTMLTags_Div();
     $div_header->set_attribute_str('id', 'header');
     /* 
      * Project Logo IMG,
      * for filename look in config, 
      * default should be some haddock fish
      */
     $image_div = new HTMLTags_Div();
     $image_div->set_attribute_str('id', 'logo_image');
     $logo_img = new HTMLTags_IMG();
     $logo_src_url = new HTMLTags_URL();
     $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance();
     /*
      * The admin module has been moved to the plug-ins directory.
      *
      * RFI 2009-10-08
      */
     #$config_manager = $cmf->get_config_manager('haddock', 'admin');
     $config_manager = $cmf->get_config_manager('plug-ins', 'admin');
     $logo_config_filename = $config_manager->get_logo_image_filename();
     $logo_src_url->set_file($logo_config_filename);
     $logo_img->set_src($logo_src_url);
     $image_div->append($logo_img);
     $div_header->append($image_div);
     /* 
      * There are two headers: 
      * Project Title Link (H1)
      * and Page Title (H2)
      */
     $h1_title = new HTMLTags_Heading(1);
     $h1_title->append_str_to_content($this->get_body_div_header_project_heading_content());
     $div_header->append_tag_to_content($h1_title);
     $h2_title = new HTMLTags_Heading(2);
     $h2_title->append_str_to_content($this->get_body_div_header_heading_content());
     $div_header->append_tag_to_content($h2_title);
     $div_header->append($this->get_log_in_state_div());
     $div_header->append($this->get_admin_header_navigation_link_div());
     return $div_header;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:44,代码来源:Admin_HTMLPage.inc.php


示例12: do_actions

 protected function do_actions()
 {
     if (isset($_GET['action'])) {
         /*
          * The action name.
          */
         $an = $_GET['action'];
         $amm = $this->get_action_method_map();
         /*
          * The acton method name.
          */
         if (isset($amm[$an])) {
             $amn = $amm[$an];
         } else {
             throw new Exception("Unknown action '{$an}'!");
         }
         /*
          * Do it.
          */
         try {
             ObjectOrientation_NamedMethodCaller::call_method_by_name($this, $amn);
             /*
              * Is this actually necessary?
              *
              * They will all get set again when the user is taken
              * back to the page.
              *
              * Does no harm and the user might be returning to a page
              * other than the standard crud.
              */
             if (isset($_SESSION['select-vars'])) {
                 unset($_SESSION['select-vars']);
             }
             #} catch (ReflectionException $e) {
             #	echo $e->getMessage();
             #	exit;
         } catch (Database_CRUDException $e) {
             /*
              * If there was a problem changing the database,
              * go back to whence we came.
              *
              * Hope that the session vars have been set for
              * any forms.
              *
              * Also hope that the browser isn't playing silly buggars with
              * the HTTP_REFERER field.
              */
             $return_to = HTMLTags_URL::parse_and_make_url($_SERVER['HTTP_REFERER']);
             $return_to->set_get_variable('error', urlencode($e->getMessage()));
             #print_r($return_to); exit;
             $this->set_return_to($return_to->get_as_string());
         }
     } else {
         throw new Exception('No action set for Database_CRUDAdminRedirectScript!');
     }
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:56,代码来源:Database_CRUDAdminRedirectScript.inc.php


示例13: redirect_to_url

 public static function redirect_to_url(HTMLTags_URL $url)
 {
     #throw new Exception('Testing exception handling');
     #print_r($url);
     $url_as_string = $url->get_as_string();
     #echo "\$url_as_string: $url_as_string\n";
     #
     #exit;
     #/*
     # * See http://uk.php.net/manual/en/function.header.php#73583
     # */
     #header('Pragma: private');
     #header('Cache-control: private, must-revalidate');
     $header_directive = 'Location: ' . $url_as_string;
     #echo "\$header_directive: $header_directive\n";
     #exit;
     header($header_directive);
     exit;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:19,代码来源:PublicHTML_RedirectionHelper.inc.php


示例14: get_db_page_url

 public static function get_db_page_url($page_name)
 {
     #$ph_cm = Configuration_ConfigManagerHelper
     #	::get_config_manager(
     #		'haddock',
     #		'public-html'
     #	);
     #
     #if ($ph_cm->server_has_mod_rewrite()) {
     if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) {
         #echo "has mod_rewrite!\n";
         $url = new HTMLTags_URL();
         $url->set_file("/db-pages/{$page_name}.html");
     } else {
         $url = PublicHTML_URLHelper::get_base_url();
         $url->set_get_variable('oo-page');
         $url->set_get_variable('pcro-factory', 'DBPages_PCROFactory');
         $url->set_get_variable('page', $page_name);
     }
     return $url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:21,代码来源:DPPages_URLsHelper.inc.php


示例15: make_local_url

 /**
  * Makes a local URL.
  *
  * Assumes that you want an OO page.
  */
 public static function make_local_url($page_class, $get_variables = NULL)
 {
     $url = new HTMLTags_URL();
     #if (isset($get_variables)) {
     #	$url->set_file('/');
     #
     #	$url->set_get_variable('oo-page');
     #	$url->set_get_variable('page-class', $page_class);
     #
     #	foreach ($get_variables as $k => $v) {
     #		$url->set_get_variable($k, $v);
     #	}
     #} else {
     #	$url->set_file("/$page_class");
     #}
     $url->set_file('/');
     $url->set_get_variable('oo-page');
     $url->set_get_variable('page-class', $page_class);
     if (isset($get_variables)) {
         foreach ($get_variables as $k => $v) {
             $url->set_get_variable($k, $v);
         }
     }
     return $url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:30,代码来源:PublicHTML_URLFactory.inc.php


示例16: get_admin_page_html_table_tr

 public function get_admin_page_html_table_tr()
 {
     $page_row = $this->get_element();
     $admin_pages_html_table_tr = new HTMLTags_TR();
     $name_td = new HTMLTags_TD();
     $name_td->append_str_to_content($page_row->get_name());
     $admin_pages_html_table_tr->append_tag_to_content($name_td);
     $author_td = new HTMLTags_TD();
     $author_td->append_str_to_content($page_row->get_author());
     $admin_pages_html_table_tr->append_tag_to_content($author_td);
     $title_td = new HTMLTags_TD();
     #$title_td->append_str_to_content($page_row->get_title());
     $title_td->append_tag_to_content($this->get_title_a());
     $admin_pages_html_table_tr->append_tag_to_content($title_td);
     /*
      * The actions
      */
     $confirmation_url_base = new HTMLTags_URL();
     $confirmation_url_base->set_file('/');
     $confirmation_url_base->set_get_variable('section', 'haddock');
     $confirmation_url_base->set_get_variable('module', 'admin');
     $confirmation_url_base->set_get_variable('page', 'admin-includer');
     $confirmation_url_base->set_get_variable('type', 'html');
     $confirmation_url_base->set_get_variable('admin-section', 'haddock');
     $confirmation_url_base->set_get_variable('admin-module', 'database');
     /*
      * Edit the page's details.
      */
     $edit_td = new HTMLTags_TD();
     $edit_url = clone $confirmation_url_base;
     $edit_url->set_get_variable('admin-page', 'edit-page');
     $edit_url->set_get_variable('page_id', $page_row->get_id());
     $edit_a = new HTMLTags_A('Edit');
     $edit_a->set_href($edit_url);
     $edit_td->append_tag_to_content($edit_a);
     $admin_pages_html_table_tr->append_tag_to_content($edit_td);
     /*
      * Delete the page.
      */
     $delete_td = new HTMLTags_TD();
     $delete_url = clone $confirmation_url_base;
     $delete_url->set_get_variable('admin-page', 'delete-page');
     $delete_url->set_get_variable('page_id', $page_row->get_id());
     $delete_a = new HTMLTags_A('Delete');
     $delete_a->set_href($delete_url);
     $delete_td->append_tag_to_content($delete_a);
     $admin_pages_html_table_tr->append_tag_to_content($delete_td);
     return $admin_pages_html_table_tr;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:49,代码来源:Database_PageRowRenderer.inc.php


示例17: get_link_a_with_span

 public static function get_link_a_with_span($node)
 {
     $span = new HTMLTags_Span();
     $span->append($node['url_title']);
     $a = new HTMLTags_A();
     $a->append($span);
     $a->set_href(HTMLTags_URL::parse_and_make_url($node['url_href']));
     $a->set_attribute_str('title', $node['url_title']);
     if ($node['open_in_new_window'] == 'Yes') {
         #echo ' target="_blank" ';
         $a->set_attribute_str('target', '_blank');
     }
     return $a;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:14,代码来源:Navigation_NodesHelper.inc.php


示例18: get_first_tier_navigation_ul

 public function get_first_tier_navigation_ul()
 {
     $pages = $this->get_pages_for_first_tier_navigation();
     $ul = new HTMLTags_UL();
     foreach ($pages as $page) {
         $li = new HTMLTags_LI();
         if (($this->get_current_page_class_string() == 'VideoLibrary_SearchPage' || $this->get_current_page_class_string() == 'VideoLibrary_HomePage') && $page['name'] == 'home' || $this->get_current_page_class_string() == 'VideoLibrary_TagsPage' && $page['name'] == 'tags') {
             $li->set_attribute_str('class', 'selected');
         }
         $a = new HTMLTags_A();
         $url = new HTMLTags_URL();
         $url->set_file($page['href']);
         $a->set_href($url);
         if ($page['open-in-new-window'] == 'yes') {
             $a->set_attribute_str('target', '_blank');
         }
         $span = new HTMLTags_Span($page['title']);
         $a->append($span);
         $li->append($a);
         $ul->append($li);
     }
     return $ul;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:23,代码来源:VideoLibrary_PageBuilder.inc.php


示例19: get_current_url

 public function get_current_url()
 {
     $current_url = new HTMLTags_URL();
     if ($_SERVER['HTTPS']) {
         $current_url->set_scheme('https');
     } else {
         $current_url->set_scheme('http');
     }
     if (preg_match('/([-\\w.]+):(\\d+)/', $_SERVER['HTTP_HOST'], $matches)) {
         $current_url->set_domain($matches[1]);
         $current_url->set_port($matches[2]);
     } else {
         $current_url->set_domain($_SERVER['HTTP_HOST']);
     }
     $file = $_SERVER['REQUEST_URI'];
     if (preg_match('/(.*)\\?/', $file, $matches)) {
         $file = $matches[1];
     }
     $current_url->set_file($file);
     foreach (array_keys($_GET) as $get_var_key) {
         $current_url->set_get_variable($get_var_key, $_GET[$get_var_key]);
     }
     return $current_url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:24,代码来源:PublicHTML_RedirectionManager.inc.php


示例20: get_admin_url

 protected function get_admin_url()
 {
     $admin_url = new HTMLTags_URL();
     $admin_url->set_file('/');
     $admin_url->set_get_variable('section', 'haddock');
     $admin_url->set_get_variable('module', 'admin');
     $admin_url->set_get_variable('page', 'admin-includer');
     $admin_url->set_get_variable('admin-section', 'haddock');
     $admin_url->set_get_variable('admin-module', 'database');
     $admin_url->set_get_variable('admin-page', 'table');
     $table = $this->get_element();
     $admin_url->set_get_variable('table', $table->get_name());
     return $admin_url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:14,代码来源:Database_TableRenderer.inc.php



注:本文中的HTMLTags_URL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP HTMLWriter类代码示例发布时间:2022-05-23
下一篇:
PHP HTMLTags_Div类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap