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


PHP find_in_path函数代码示例

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


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

示例1: snippets_fond_exporter

function snippets_fond_exporter($table,$find = true){
	if (substr($table,0,5)=="spip_") $table = substr($table,5);
	$f = "snippets/$table/exporter";
	if ($find)
		$f = find_in_path("$f.html");
	return $f;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:7,代码来源:snippets.php

示例2: balise_FOREACH

function balise_FOREACH($p) {
	$_tableau = interprete_argument_balise(1,$p);
	$_tableau = str_replace("'", "", strtoupper($_tableau));
	$_tableau = sinon($_tableau, 'ENV');
	$f = 'balise_'.$_tableau;
	$balise = function_exists($f) ? $f : (function_exists($g = $f.'_dist') ? $g : '');

	if($balise) {
		$_modele = interprete_argument_balise(2,$p);
		$_modele = str_replace("'", "", strtolower($_modele));
		$__modele = 'foreach_'.strtolower($_tableau);
		$_modele = (!$_modele AND find_in_path('modeles/'.$__modele.'.html')) ?
			$__modele : 
			($_modele ? $_modele : 'foreach');

		$p->param = @array_shift(@array_shift($p->param));
		$p = $balise($p);
		$filtre = chercher_filtre('foreach');
		$p->code = $filtre . "(unserialize(" . $p->code . "), '" . $_modele . "')";
	}
	//On a pas trouve la balise correspondant au tableau a traiter
	else {
		erreur_squelette(
			_L(/*zbug*/'erreur #FOREACH: la balise #'.$_tableau.' n\'existe pas'),
			$p->id_boucle
		);
		$p->code = "''";
	}
	return $p;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:30,代码来源:193_fonctions.php

示例3: roles_header_prive_css

/**
 * Ajoute Bootstrap (minimal) aux css chargées
 * 
 * @param string $texte Contenu du head HTML concernant les CSS
 * @return string       Contenu du head HTML concernant les CSS
**/
function roles_header_prive_css($texte) {

	$css = find_in_path('css/bootstrap-button-dropdown.css');
	$texte .= "<link rel='stylesheet' type='text/css' media='all' href='$css' />\n";

	return $texte;
}
开发者ID:samszo,项目名称:open-edition,代码行数:13,代码来源:roles_pipelines.php

示例4: comments_insert_head_css

/**
 *
 * Inserer des styles
 *
 * @param string $flux
 * @return string
 */
function comments_insert_head_css($flux)
{
    if ($f = find_in_path("css/comments.css")) {
        $flux .= '<link rel="stylesheet" href="' . direction_css($f) . '" type="text/css" media="all" />';
    }
    return $flux;
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:14,代码来源:comments_fonctions.php

示例5: cpub_insert_head

function cpub_insert_head($flux)
{
    $js = '<script type="text/javascript" src="' . find_in_path('javascript/lodash.js') . '"></script>' . "\n";
    $js .= '<script type="text/javascript" src="' . find_in_path('javascript/jquery.isonscreen.js') . '"></script>' . "\n";
    $js .= '<script type="text/javascript" src="' . find_in_path('javascript/cpub.js') . '"></script>' . "\n";
    return $flux . $js;
}
开发者ID:Arterrien,项目名称:cpub,代码行数:7,代码来源:cpub_pipelines.php

示例6: html_3002936b70d02a85d3d71dc952115155

function html_3002936b70d02a85d3d71dc952115155($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '<' . '?php header("X-Spip-Cache: 604800"); ?' . '>' . '<' . '?php header("' . 'Content-Type: text/css; charset=utf-8' . '"); ?' . '>' . '<' . '?php header("' . 'Vary: Accept-Encoding' . '"); ?' . '>' . barre_outils_css_icones('') . '

/* roue ajax */
.ajaxLoad{
		position:relative;
}
.ajaxLoad:after {
		content:"";
		display:block;
		width:40px;
		height:40px;
		border:1px solid #eee;
		background:#fff url(\'' . protocole_implicite(url_absolue(find_in_path('images/searching.gif'))) . '\') center no-repeat;
		position:absolute;
		left:50%;
		top:50%;
		margin-left:-20px;
		margin-top:-20px;
}
.fullscreen .ajaxLoad:after {
		position:fixed;
		left:75%;
}
';
    return analyse_resultat_skel('html_3002936b70d02a85d3d71dc952115155', $Cache, $page, 'plugins-dist/porte_plume/barre_outils_icones.css.html');
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:32,代码来源:html_3002936b70d02a85d3d71dc952115155.php

示例7: formulaires_configurer_metas_infos

function formulaires_configurer_metas_infos($form)
{
    $path = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/');
    if (!$path) {
        return '';
    }
    // cas traite en amont normalement.
    if (!preg_match(_EXTRAIRE_PLUGIN, $path, $m)) {
        return array('path' => $path, 'meta' => 'meta');
    }
    $plugin = $m[2];
    $get_infos = charger_fonction('get_infos', 'plugins');
    $infos = $get_infos($plugin, false, $m[1]);
    if (!is_array($infos)) {
        return _T('erreur_plugin_nom_manquant');
    }
    if (isset($infos['erreur'])) {
        return $infos['erreur'][0];
    }
    $prefix = $infos['prefix'];
    $infos['path'] = $path;
    if (!isset($infos['meta'])) {
        $infos['meta'] = $prefix . '_metas';
    }
    return $infos;
}
开发者ID:nursit,项目名称:SPIP,代码行数:26,代码来源:configurer_metas.php

示例8: install_debut_html

function install_debut_html($titre = 'AUTO', $onLoad = '') {
	global $spip_lang_right,$spip_lang_left;
	
	utiliser_langue_visiteur();

	http_no_cache();

	if ($titre=='AUTO')
		$titre=_T('info_installation_systeme_publication');

	# le charset est en utf-8, pour recuperer le nom comme il faut
	# lors de l'installation
	if (!headers_sent())
		header('Content-Type: text/html; charset=utf-8');

	// au cas ou minipres() est appele avant spip_initialisation_suite()
	if (!defined('_DOCTYPE_ECRIRE')) define('_DOCTYPE_ECRIRE', '');
	return  _DOCTYPE_ECRIRE.
		html_lang_attributes().
		"<head>\n".
		"<title>".
		textebrut($titre).
		"</title>
		<link rel='stylesheet' href='".direction_css(find_in_path('minipres.css')).
		"' type='text/css' media='all' />\n" .
 // cet appel permet d'assurer un copier-coller du nom du repertoire a creer dans tmp (esj)
		http_script('',  "spip_barre.js") .
"</head>
<body".$onLoad." class='minipres'>
	<div id='minipres'>
	<h1>".
	  $titre .
	  "</h1>
	<div>\n";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:35,代码来源:minipres.php

示例9: photoswipe_insert_head

function photoswipe_insert_head($flux)
{
    $flux = photoswipe_insert_head_css($flux);
    // au cas ou il n'est pas implemente
    $flux .= '
<script src="' . find_in_path('photoswipe_insert.js') . '" type="text/javascript"></script>
<script type="text/javascript">
// configuration
photoswipe = {
  path: "' . find_in_path('lib/photoswipe/') . '/",
  selector: "img[data-photo],a[type]",
  gallery: true, // galerie
  debug: true, // debug
};
$(function() {
    photoswipe_init();
    if (!!$.fn.on) {
      $(document).on("mouseover", photoswipe.selector, photoshow_hover);
      $(document).on("click", photoswipe.selector, photoshow);
    } else if (!!$.fn.live) {
      $(photoswipe.selector).live("mouseover", photoshow_hover);
      $(photoswipe.selector).live("click", photoshow);
    }
});
</script>
';
    return $flux;
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:28,代码来源:photoswipe_pipelines.php

示例10: load_charset

function load_charset ($charset = 'AUTO', $langue_site = 'AUTO') {
	if ($charset == 'AUTO')
		$charset = $GLOBALS['meta']['charset'];
	$charset = trim(strtolower($charset));
	if (isset($GLOBALS['CHARSET'][$charset]))
		return $charset;

	if ($langue_site == 'AUTO')
		$langue_site = $GLOBALS['meta']['langue_site'];

	if ($charset == 'utf-8') {
		$GLOBALS['CHARSET'][$charset] = array();
		return $charset;
	}
	
	// Quelques synonymes
	if ($charset == '') $charset = 'iso-8859-1';
	else if ($charset == 'windows-1250') $charset = 'cp1250';
	else if ($charset == 'windows-1251') $charset = 'cp1251';
	else if ($charset == 'windows-1256') $charset = 'cp1256';

	if (find_in_path($charset . '.php', 'charsets/', true)) {
		return $charset;
	} else {
		spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'");
		$GLOBALS['CHARSET'][$charset] = array();
		return false;
	}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:29,代码来源:charsets.php

示例11: bootstrap_affichage_final

function bootstrap_affichage_final($flux)
{
    if ($GLOBALS['html'] and isset($GLOBALS['visiteur_session']['statut']) and $GLOBALS['visiteur_session']['statut'] == '0minirezo' and $GLOBALS['visiteur_session']['webmestre'] == 'oui' and strpos($flux, "<!-- insert_head -->") !== false and $p = stripos($flux, "</body>") and $f = find_in_path("js/hashgrid.js")) {
        $flux = substr_replace($flux, '<script type="text/javascript" src="' . $f . '"></script>', $p, 0);
    }
    return $flux;
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:7,代码来源:bootstrap_fonctions.php

示例12: chatons_PP_icones

function chatons_PP_icones($flux) {
	$chatons = cs_lire_data_outil('chatons');
	$flux['cs_chatons_drop'] = chatons_creer_icone_barre(find_in_path('img/chatons/lol.png'));
	$path = find_in_path('img/chatons').'/';
	foreach($chatons[4] as $i=>$v) $flux[$i] = chatons_creer_icone_barre($path.$v);
	return $flux;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:7,代码来源:chatons.php

示例13: configuration_ie6config

function configuration_ie6config()
{
	$iecompat = $GLOBALS['meta']["iecompat"];
	if (!$iecompat) $iecompat = "non";

	$res = _T("msiecompat:choix_explication");
	
	$res .= afficher_choix('iecompat', $iecompat,
		array('non' => _T("msiecompat:choix_non"),
			'ifixpng' => _L('iFixPng'),
			'IE7' => _L("IE7.js"),
			'IE7squish' => _L("IE7.js + ie7-squish.js"),
			'IE8' => _L('IE8.js'),
			'IE8squish' => _L('IE8.js + ie7-squish.js')
			/*,
			'IE9' => _L('IE9.js'),
			'IE9squish' => _L('IE9.js + ie7-squish.js')
			*/
		), 
		" <br /> ");
	
	
	$res = debut_cadre_trait_couleur(find_in_path("imgs/ie6-logo24.png"), true, "", _T("msiecompat:choix_titre"))
	. ajax_action_post('configurer', 'ie6config', 'configuration','',$res)
	. fin_cadre_trait_couleur(true);

	return ajax_action_greffe('configurer-ie6config', '', $res);

}
开发者ID:rhertzog,项目名称:lcs,代码行数:29,代码来源:ie6config.php

示例14: affiche_boutons_admin

function affiche_boutons_admin($contenu) {
	include_spip('inc/filtres');

	// Inserer le css d'admin
	$css = "<link rel='stylesheet' href='".url_absolue(find_in_path('spip_admin.css'))
	. "' type='text/css' />\n";
	if ($f = find_in_path('spip_admin_perso.css'))
		$css .= "<link rel='stylesheet' href='"
		. url_absolue($f) . "' type='text/css' />\n";

	($pos = stripos($contenu, '</head>'))
	    || ($pos = stripos($contenu, '<body>'))
	    || ($pos = 0);
	$contenu = substr_replace($contenu, $css, $pos, 0);


	// Inserer la balise #FORMULAIRE_ADMIN, en float
	$boutons_admin = inclure_balise_dynamique(
		balise_FORMULAIRE_ADMIN_dyn('spip-admin-float'),
	false);

	($pos = strripos($contenu, '</body>'))
	    || ($pos = strripos($contenu, '</html>'))
	    || ($pos = strlen($contenu));
	$contenu = substr_replace($contenu, $boutons_admin, $pos, 0);


	return $contenu;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:29,代码来源:admin.php

示例15: surligner_mots

function surligner_mots($page, $surcharge_surligne = '')
{
    $surlignejs_engines = array(array("," . str_replace(array("/", "."), array("\\/", "\\."), $GLOBALS['meta']['adresse_site']) . ",i", ",recherche=([^&]+),i"), array(",^http://(www\\.)?google\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?search\\.yahoo\\.,i", ",p=([^&]+),i"), array(",^http://(www\\.)?search\\.msn\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?search\\.live\\.,i", ",query=([^&]+),i"), array(",^http://(www\\.)?search\\.aol\\.,i", ",userQuery=([^&]+),i"), array(",^http://(www\\.)?ask\\.com,i", ",q=([^&]+),i"), array(",^http://(www\\.)?altavista\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?feedster\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?search\\.lycos\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?alltheweb\\.,i", ",q=([^&]+),i"), array(",^http://(www\\.)?technorati\\.com,i", ",([^\\?\\/]+)(?:\\?.*)\$,i"));
    $ref = $_SERVER['HTTP_REFERER'];
    //avoid a js injection
    if ($surcharge_surligne) {
        $surcharge_surligne = preg_replace(",(?<!\\\\)((?:(?>\\\\){2})*)('),", "\$1\\\\\$2", $surcharge_surligne);
        $surcharge_surligne = str_replace("\\", "\\\\", $surcharge_surligne);
        if ($GLOBALS['meta']['charset'] == 'utf-8') {
            include_spip('inc/charsets');
            if (!is_utf8($surcharge_surligne)) {
                $surcharge_surligne = utf8_encode($surcharge_surligne);
            }
        }
    }
    foreach ($surlignejs_engines as $engine) {
        if ($surcharge_surligne || preg_match($engine[0], $ref) && preg_match($engine[1], $ref)) {
            //good referrer found or var_recherche is not null
            include_spip('inc/filtres');
            $script = "\n      <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script>\n      <script type='text/javascript'>/*<![CDATA[*/\n      if (window.jQuery)\n        (function(\$){\$(function(){\n          \$(document).SearchHighlight({\n            tag_name:'" . (html5_permis() ? 'mark' : 'span') . "',\n            style_name:'spip_surligne',\n            exact:'whole',\n            style_name_suffix:false,\n            engines:[/^" . str_replace(array("/", "."), array("\\/", "\\."), $GLOBALS['meta']['adresse_site']) . "/i,/recherche=([^&]+)/i],\n            highlight:'.surlignable',\n            nohighlight:'.pas_surlignable'" . ($surcharge_surligne ? ",\n            keys:'{$surcharge_surligne}'" : "") . ",\n            min_length: 3\n          })\n        });\n      })(jQuery);\n      /*]]>*/</script>\n      ";
            // on l'insere juste avant </head>, sinon tout en bas
            if (is_null($l = strpos($page, '</head>'))) {
                $l = strlen($page);
            }
            $page = substr_replace($page, $script, $l, 0);
            break;
        }
    }
    return $page;
}
开发者ID:nursit,项目名称:SPIP,代码行数:30,代码来源:surligne.php


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