Zadejte hledaný výraz...

Rozkódování patičky

Z důvodu smazání jednoho tagu, který šablonu činí nevalidní, potřebuji rozkódovat patičku.
Ještě bych potřeboval, kdyby někdo uměl, přidat do příspěvků zvětšování písma (malé, střední, velké).
Díky za případné rady.
10. 5. 2010 10:54:55
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502807
Nodon
verified
rating uzivatele
(1 hodnocení)
10. 5. 2010 12:11:50
Stačí zkopírovat zdrojový kod který ti zobrazí prohlížeč, ve firefoxu kliknes kdekoliv ve stránce a dáš zobrazit zdrojový kod zkopíruješ kod patičky a nahradíš jim ten PHP kod. Zvětšování písma by měl zvládnou jednoduchý javascript.
10. 5. 2010 12:11:50
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502806
Jakmile naruším PHP kód, patička se nezobrazí.
10. 5. 2010 12:23:07
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502805
Nodon
verified
rating uzivatele
(1 hodnocení)
10. 5. 2010 12:24:20
I pokud odstraníš celý ten PHP kod a nahradíš nečím jiným?
10. 5. 2010 12:24:20
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502804
Ano.
10. 5. 2010 12:27:43
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502803
kaspa
verified
rating uzivatele
(5 hodnocení)
10. 5. 2010 13:32:33
Tak je to ošetrené na inom mieste v šablóne. Musíš hľadať ;)
10. 5. 2010 13:32:33
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502802
zkus
10. 5. 2010 13:42:27
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502801
Bohužel, nejde :-( Nahradím-li PHP kód jiným kódem, patička se nezobrazí.
Našel jsem ještě jeden soubor, ve kterém je něco o patičce:
/*
Hack Name: Wordpress Theme Toolkit
Plugin URI: http://planetozh.com/blog/my-projects/wordpress-theme-toolkit-admin-menu/
Description: Helps theme authors set up an admin menu. Helps theme users customise the theme.
Version: 1.12
Author: Ozh
Author URI: http://planetOzh.com/
*/
/************************************************************************************
* DO NOT MODIFY THIS FILE !
************************************************************************************/
/* RELEASE HISTORY :
* 1.0 : initial release
* 1.1 : update for Wordpress 2.0 compatibility
* 1.11 : added {separator} template
* 1.12 : more or less minor bug fixing (one when no plugin activated, other with rare mod_security issue) and better compliancy with WP 2.0 roles
*/
if (!function_exists('themetoolkit')) {
function themetoolkit($theme='',$array='',$file='') {
global ${$theme};
if ($theme == '' or $array == '' or $file == '') {
die ('No theme name, theme option, or parent defined in Theme Toolkit');
}
${$theme} = new ThemeToolkit($theme,$array,$file);
}
}
if (!class_exists('ThemeToolkit')) {
class ThemeToolkit{
var $option, $infos;
function ThemeToolkit($theme,$array,$file){
global $wp_version;
// is it WP 2.0+ and do we have plugins like "../themes/foo/functions.php" running ?
if ( $wp_version >= 2 and count(@preg_grep('#^../themes/+/functions.php$#', get_settings('active_plugins'))) > 0 ) {
wp_cache_flush();
$this->upgrade_toolkit();
}
$this->infos = '../themes/' . basename(dirname($file));
/* Create some vars needed if an admin menu is to be printed */
if ($array) {
if ((basename($file)) == $_GET) $this->infos = 1;
unset($array);
}
if ((basename($file)) == $_GET){
$this->infos = $array;
$this->infos = $theme;
}
$this->option=array();
/* Check this file is registered as a plugin, do it if needed */
$this->pluginification();
/* Get infos about the theme and particularly its 'shortname'
* which is used to name the entry in wp_options where data are stored */
$this->do_init();
/* Read data from options table */
$this->read_options();
/* Are we in the admin area ? Add a menu then ! */
$this->file = $file;
add_action('admin_menu', array(&$this, 'add_menu'));
}
/* Add an entry to the admin menu area */
function add_menu() {
global $wp_version;
if ( $wp_version >= 2 ) {
$level = 'edit_themes';
} else {
$level = 9;
}
//add_submenu_page('themes.php', 'Configure ' . $this->infos, $this->infos, 9, $this->infos . '/functions.php', array(&$this,'admin_menu'));
add_theme_page('Configure ' . $this->infos, $this->infos . ' Options', 'edit_themes', basename($this->file), array(&$this,'admin_menu'));
/* Thank you MCincubus for opening my eyes on the last parameter :) */
}
/* Get infos about this theme */
function do_init() {
$themes = get_themes();
$shouldbe= basename($this->infos);
foreach ($themes as $theme) {
$current= basename($theme);
if ($current == $shouldbe) {
if (get_settings('template') == $current) {
$this->infos = TRUE;
} else {
$this->infos = FALSE;
}
$this->infos = $theme;
$this->infos = $current;
$this->infos = $theme;
$this->infos = $theme;
$this->infos = preg_replace("#>s*(*)#", ">\1", $theme);
}
}
}
/* Read theme options as defined by user and populate the array $this->option */
function read_options() {
$options = get_option('theme-'.$this->infos.'-options');
$options = 'ozh is my god';
foreach ($options as $key=>$val) {
$this->option = stripslashes($val);
}
array_pop($this->option);
return $this->option;
/* Curious about this "junk-entry" ? :) A few explanations then.
* The problem is that get_option always return an array, even if
* no settings has been previously saved in table wp_options. This
* junk entry is here to populate the array with at least one value,
* removed afterwards, so that the foreach loop doesn't go moo. */
}
/* Write theme options as defined by user in database */
function store_options($array) {
update_option('theme-'.$this->infos.'-options','');
if (update_option('theme-'.$this->infos.'-options',$array)) {
return "Options successfully stored";
} else {
return "Could not save options !";
}
}
/* Delete options from database */
function delete_options() {
/* Remove entry from database */
delete_option('theme-'.$this->infos.'-options');
/* Unregister this file as a plugin (therefore remove the admin menu) */
$this->depluginification();
/* Revert theme back to Kubrick if this theme was activated */
if ($this->infos) {
update_option('template', 'default');
update_option('stylesheet', 'default');
do_action('switch_theme', 'Default');
}
/* Go back to Theme admin */
print '';
echo "";
exit;
}
/* Check if the theme has been loaded at least once (so that this file has been registered as a plugin) */
function is_installed() {
global $wpdb;
$where = 'theme-'.$this->infos.'-options';
$check = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->options WHERE option_name = '$where'");
if ($check == 0) {
return FALSE;
} else {
return TRUE;
}
}
/* Theme used for the first time (create blank entry in database) */
function do_firstinit() {
global $wpdb;
$options = array();
foreach(array_keys($this->option) as $key) {
$options='';
}
add_option('theme-'.$this->infos.'-options',$options, 'Options for theme '.$this->infos);
return "Theme options added in database (1 entry in table '". $wpdb->options ."')";
}
/* The mother of them all : the Admin Menu printing func */
function admin_menu () {
global $cache_settings, $wpdb;
/* Process things when things are to be processed */
if (@$_POST == 'store_option') {
unset($_POST);
$msg = $this->store_options($_POST);
} elseif (@$_POST == 'delete_options') {
$this->delete_options();
} elseif (!$this->is_installed()) {
$msg = $this->do_firstinit();
}
if (@$msg) print "

" . $msg . "

n";
echo '

Thank you !

';
echo '

Thank you for installing ' . $this->infos . ', a theme for Wordpress. This theme was made by '.$this->infos.'.

';
if (!$this->infos) { /* theme is not active */
echo '

(Please note that this theme is currently not activated on your site as the default theme.)

';
}
$cache_settings = '';
$check = $this->read_options();
echo '

Configure ',$this->infos,' Theme

';
echo '

This theme allows you to configure some variables to suit your blog, which are :

';
/* Print form, here comes the fun part :) */
foreach ($this->infos as $key=>$val) {
$items='';
preg_match('/s*(*)s*({(*)})*s*(*s*(.*))/', $val, $matches);
if ($matches) {
$items = split("|", $matches);
}
echo '',"n";
break;
case 'radio':
echo '>',$matches,'',"n",'n";
}
echo '
if (@$items) {
$type = array_shift($items);
switch ($type) {
case 'separator':
echo ' colspan="2">',"n",'

',$matches,'

';
while ($items) {
$v=array_shift($items);
$t=array_shift($items);
$checked='';
if ($v == $this->option) $checked='checked';
echo '';
if (@$items) echo '
',"n";
}
break;
case 'textarea':
$rows=array_shift($items);
$cols=array_shift($items);
echo '>',"n",'
';
echo '';
break;
case 'checkbox':
echo '>',$matches,'',"n",'
';
while ($items) {
$k=array_shift($items);
$v=array_shift($items);
$t=array_shift($items);
$checked='';
if ($v == $this->option) $checked='checked';
echo '';
if (@$items) echo '
',"n";
}
break;
case 'select':
echo '>',"n",'
';
break;
}
} else {
echo '>',"n",'
';
}
if ($matches) echo '
'. $matches;
echo "

';
if ($this->infos and $this->option) {
$g = '';
$b = '';
$o = '';
$r = '';
echo '

Programmer's corner

';
echo '

The array $'. $this->infos . '->option is actually populated with the following keys and values :

';
$count = 0;
foreach ($this->option as $key=>$val) {
$val=str_replace('<','<',$val);
if ($val) {
echo '',$g,'$'.$this->infos,'',$b,'->',$g,'option',$b,'',$g,' = "',$o,$val,'',$g,""n";
$count++;
}
}
if (!$count) print "nn";
echo '

To disable this report (for example before packaging your theme and making it available for download), remove the line " 'debug' => 'debug' " in the array you edited at the beginning of this file.

';
}
echo '

Delete Theme options

To completely remove these theme options from your database (reminder: they are all stored in a single entry, in Wordpress options table '. $wpdb->options. '), click on

the following button. You will be then redirected to the Themes admin interface';
if ($this->infos) {
echo ' and the Default theme will have been activated';
}
echo '.

Special notice for people allowing their readers to change theme (i.e. using a Theme Switcher on their blog)

Unless you really remove the theme files from your server, this theme will still be available to users, and therefore will self-install again as soon as someone selects it. Also, all custom variables as defined in the above menu will be blank, this could lead to unexpected behaviour.
Press "Delete" only if you intend to remove the theme files right after this.

';
ob_start(array(&$this,'footercut'));
echo '

Credits

';
echo '

'.$this->infos.' has been created by '.$this->infos.'. ';

echo 'This administration menu uses Wordpress Theme Toolkit by Ozh and modify by misbah. And everything was made possible thanks to Wordpress.

';
}
/* Make this footer part of the real #footer DIV of Wordpress admin area */
function footercut($string) {
return preg_replace('#
.*
10. 5. 2010 13:48:24
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502800
milan
verified
rating uzivatele
10. 5. 2010 14:10:12
To bys sem musel dát celé theme. Ale nejspíš lžeš a cílem je krádež placeného tématu, protože v tom zakódovaném obsahu nic nevalidního není :)
10. 5. 2010 14:10:12
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502799
Dostal jsem ke zvalidování šablonu a tato šablona obsahuje nevalidní tag "target="blank", který mám odstranit.
10. 5. 2010 14:16:03
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502798
Písma se řešili asi o tři příspěvky níž.
10. 5. 2010 15:37:01
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502797
milan
verified
rating uzivatele
10. 5. 2010 16:40:45
on ještě někdo věří v XHTML a nevalidní target? ale dobře, tomu se dá věřit.
ale jak jsem psal - musíš sem dát celý balík se všemi soubory, protože si to zřejmě hlídá odjinud. zabal a někam nahrej
10. 5. 2010 16:40:45
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502796
Posílal jsem ti to do PM, Milane.
10. 5. 2010 17:17:13
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502795
milan
verified
rating uzivatele
10. 5. 2010 21:29:41
je tam přesně to co říkal Martis78 a normálně to funguje, žádná další kontrola tam není.
10. 5. 2010 21:29:41
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502794
Ten muj kod fungovat musi, protoze je to presne to, co jsi poslal. Pokud chces, sam ti to tam nakopiruju tak, aby to chodilo, posli mi do PM pristupy na FTP.
11. 5. 2010 05:55:40
https://webtrh.cz/diskuse/rozkodovani-paticky/#reply502793
Pro odpověď se přihlašte.
Přihlásit