当前位置: 首页>>代码示例>>PHP>>正文


PHP HTMLTags_URL::set_file方法代码示例

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


在下文中一共展示了HTMLTags_URL::set_file方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: get_url

 /**
  * DEPRECATED!
  *
  * Use PublicHTML_URLHelper::get_pm_page_url(...) instead!
  */
 public static function get_url($section, $module, $page, $type)
 {
     $url = new HTMLTags_URL();
     $url->set_file('/');
     $url->set_get_variable('section', $section);
     if (isset($module)) {
         $url->set_get_variable('module', $module);
     }
     $url->set_get_variable('page', $page);
     $url->set_get_variable('type', $type);
     return $url;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:17,代码来源:PublicHTML_PublicURLFactory.inc.php

示例11: 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

示例12: 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

示例13: 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

示例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: 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


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