Autor Zpráva
Falcon
Profil
ahojte nemohli by ste mi odstrániť všetko čo je v divu "end_page"?-
<?php


/*
$HeadURL: http://svn.textpattern.com/releases/4.0.6/source/textpattern/lib/txpli b_html.php $
$LastChangedRevision: 2696 $
*/

define("t","t");
define("n","n");
define("br","<br />");
define("sp"," ");
define("a","&");

// -------------------------------------------------------------
function end_page()
{
global $txp_user,$event;
if($event!='tag') {
echo '<div id="end_page">',
navPop().n,
'<a href="http://www.textpattern.com"><img src="txp_img/carver.gif" width="60" height="48" border="0" alt="" /></a>'.n;
echo graf('Textpattern · '.txp_version).n;
echo($txp_user)
? graf(gTxt('logged_in_as').' '.span(htmlspecialchars($txp_user)).br.
'<a href="index.php?logout=1">'.gTxt('logout').'</a>', ' id="moniker"').n.'</div>'
: '</div>';
echo n.'</body>'.n.'</html>';
}
}

// -------------------------------------------------------------

function column_head($value, $sort = '', $event = '', $is_link = '', $dir = '', $crit = '', $method = '', $class = '')
{
return column_multi_head( array(
array ('value' => $value, 'sort' => $sort, 'event' => $event, 'is_link' => $is_link,
'dir' => $dir, 'crit' => $crit, 'method' => $method)
), $class);
}

// -------------------------------------------------------------

function column_multi_head($head_items, $class='')
{
$o = n.t.'<th'.($class ? ' class="'.$class.'"' : '').'>';
$first_item = true;
foreach ($head_items as $item)
{
if (empty($item)) continue;
extract(lAtts(array(
'value' => '',
'sort' => '',
'event' => '',
'is_link' => '',
'dir' => '',
'crit' => '',
'method' => '',
),$item));

$o .= ($first_item) ? '' : ', '; $first_item = false;

if ($is_link)
{
$o .= '<a href="index.php?step=list';

$o .= ($event) ? a."event=$event" : '';
$o .= ($sort) ? a."sort=$sort" : '';
$o .= ($dir) ? a."dir=$dir" : '';
$o .= ($crit) ? a."crit=$crit" : '';
$o .= ($method) ? a."search_method=$method" : '';

$o .= '">';
}

$o .= gTxt($value);

if ($is_link)
{
$o .= '</a>';
}
}
$o .= '</th>';

return $o;
}

// -------------------------------------------------------------
function hCell($text="",$caption="")
{
$text = (!$text) ? sp : $text;
return tag($text,'th');
}

// -------------------------------------------------------------
function sLink($event,$step,$linktext,$class='')
{
$c = ($class) ? ' class="'.$class.'"' : '';
return '<a href="?event='.$event.a.'step='.$step.'"'.$c.'>'.$linktext.'</a>';
}

// -------------------------------------------------------------
function eLink($event,$step='',$thing='',$value='',$linktext,$thing2='',$val2=' ')
{
return join('',array(
'<a href="?event='.$event,
($step) ? a.'step='.$step : '',
($thing) ? a.''.$thing.'='.urlencode($value) : '',
($thing2) ? a.''.$thing2.'='.urlencode($val2) : '',
'">'.escape_title($linktext).'</a>'
));
}

// -------------------------------------------------------------
function wLink($event,$step='',$thing='',$value='')
{
return join('',array(
'<a href="index.php?event='.$event,
($step) ? a.'step='.$step : '',
($thing) ? a.''.$thing.'='.urlencode($value) : '',
'" class="dlink">'.sp.'!'.sp.'</a>'
));
}

// -------------------------------------------------------------

function dLink($event, $step, $thing, $value, $verify = '', $thing2 = '', $thing2val = '', $get = '', $remember = null) {
if ($remember) {
list($page, $sort, $dir, $crit, $search_method) = $remember;
}

if ($get) {
$url = '?event='.$event.a.'step='.$step.a.$thing.'='.urlencode($value);

if ($thing2) {
$url .= a.$thing2.'='.urlencode($thing2val);
}

if ($remember) {
$url .= a.'page='.$page.a.'sort='.$sort.a.'dir='.$dir.a.'crit='.$crit.a.'searc h_method='.$search_method;
}

return join('', array(
'<a href="'.$url.'" class="dlink" onclick="return verify('',
($verify) ? gTxt($verify) : gTxt('confirm_delete_popup'),
'')">×</a>'
));
}

return join('', array(
'<form method="post" action="index.php" onsubmit="return confirm(''.gTxt('confirm_delete_popup').'');">',
fInput('submit', '', '×', 'smallerbox'),
eInput($event).
sInput($step),
hInput($thing, $value),
($thing2) ? hInput($thing2, $thing2val) : '',
($remember) ? hInput('page', $page) : '',
($remember) ? hInput('sort', $sort) : '',
($remember) ? hInput('dir', $dir) : '',
($remember) ? hInput('crit', $crit) : '',
($remember) ? hInput('search_method', $search_method) : '',
'</form>'
));
}

// -------------------------------------------------------------
function aLink($event,$step,$thing,$value,$thing2,$value2)
{
$o = '<a href="?event='.$event.a.'step='.$step.
a.$thing.'='.urlencode($value).a.$thing2.'='.urlencode($value2).'"' ;
$o.= ' class="alink">+</a>';
return $o;
}

// -------------------------------------------------------------
function prevnext_link($name,$event,$step,$id,$titling='')
{
return '<a href="?event='.$event.a.'step='.$step.a.'ID='.$id.
'" class="navlink" title="'.$titling.'">'.$name.'</a> ';
}

// -------------------------------------------------------------

function PrevNextLink($event, $page, $label, $type, $sort = '', $dir = '', $crit = '', $search_method = '')
{
return '<a href="?event='.$event.a.'step=list'.a.'page='.$page.
($sort ? a.'sort='.$sort : '').
($dir ? a.'dir='.$dir : '').
($crit ? a.'crit='.$crit : '').
($search_method ? a.'search_method='.$search_method : '').
'" class="navlink">'.
($type == 'prev' ? '‹'.sp.$label : $label.sp.'›').
'</a>';
}

// -------------------------------------------------------------

function nav_form($event, $page, $numPages, $sort, $dir, $crit, $search_method)
{
if ($numPages > 1)
{
$option_list = array();

for ($i = 1; $i <= $numPages; $i++)
{
if ($i == $page)
{
$option_list[] = '<option value="'.$i.'" selected="selected">'."$i/$numPages".'</option>';
}

else
{
$option_list[] = '<option value="'.$i.'">'."$i/
Venca V
Profil
Falcon
Myslíš, že zde na diskuzi se vyskytuje nějaký jasnovidec?
Falcon
Profil
prečo?
kletely
Profil
Falcon
No napíseš sem nejaký kód a my ti máme niečo zistit? A čo keby si sám pokúsil?
Venca V
Profil
Aha, teď jsem si všimnul, že jedna ta funkce ti vypisuje div end_page...

	function end_page()
	{
		global $txp_user,$event;
		if($event!='tag') {
			echo '<div id="end_page">',
			navPop().n,
			'<a href="http://www.textpattern.com"><img src="txp_img/carver.gif" width="60" height="48" border="0" alt="" /></a>'.n;
			echo graf('Textpattern · '.txp_version).n;
			echo($txp_user)
			?	graf(gTxt('logged_in_as').' '.span(htmlspecialchars($txp_user)).br.
					'<a href="index.php?logout=1">'.gTxt('logout').'</a>', ' id="moniker"').n.'</div>'
			:	'</div>';
			echo n.'</body>'.n.'</html>';
		}
	}


Obsahem divu end_page je všechno mezi <div id="end_page"> a </div>

Další edit: Jsem vůl, nevšimnul jsem si ternárního operátoru:-)
Falcon
Profil
to som skúšal ako 1. ale som zmazal a vyhodilo mi-
Parse error: parse error, expecting `')'' in /3w/chytrak.cz/s/skuska/textpattern/lib/txplib_html.php on line 137

Fatal error: Call to undefined function: strong() in /3w/chytrak.cz/s/skuska/textpattern/include/txp_article.php on line 31
kletely
Profil
Falcon
Čo si všetko smazal? Mohol by si zaktualzovať ten kód?

OT: Inak robyť niečo s PHP keď nemaš ani potuchy o PHP je to dosť odvážne :)
Medvídek
Profil
neni to nahodou copyright ? :D

echo '<div id="end_page">',
			navPop().n,
			'<a href="http://www.textpattern.com"><img src="txp_img/carver.gif" width="60" height="48" border="0" alt="" /></a>'.n;
			echo graf('Textpattern · '.txp_version).n;
			echo($txp_user)
			?	graf(gTxt('logged_in_as').' '.span(htmlspecialchars($txp_user)).br.
					'<a href="index.php?logout=1">'.gTxt('logout').'</a>', ' id="moniker"').n.'</div>'
			:	'</div>';
Falcon
Profil
Medvídek
Je.Robim si vlastný vzhľad textpaterrnu a chcem odstrániť tie obrazky a tak...
peta
Profil
Falcon
Jenze do copyright sahat nesmis, proto se tomu rika copyright. Obvykle to jde pouze v pripade zakoupeni Texpaternu, coz jsi zrejme neudelal.

pokud bych to chtel cele zrusit, tak staci zrusit volani funkce
end_page()

pokud si tam neco promazaval, tak viz Venca, pekne ti to zvyraznil odkud pokud to tam je.
Je tam neco jako:
echo 'a';
echo (b) ? 'c' : 'd';
echo 'e';
Fakt by bylo nejlepsi dat odkaz na soubor.txt , kde to mas upravene.
Podle te chyby mas na radku 'on line 137' problem s uvozovkou a zavorkou, pravdepodobne pozustatek funkce
graf(gTxt('logged_in_as')
Jenze to se da tezko odpocitat radek, kdyz forum to zalamuje po 40ti znacich a pridava si tam vlastni radky, daloby se rici nahodile.

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0