Blog Archives

5 years, 8 months ago 0
Posted in: Programování

In case you are suffering with the category page breadcrumbs, which look like nonsence, showing totally unrelated categories, solution may be quite simple (eventhough unacceptable). There may be wrong categories in table ps_category, which have parent category id linking to non existing category. In the moment you delete all rows with not-existing parent-ids, the breadcrumbs will be fixed.

This happen in the case you created some categories and deleted them, but the deletion mechanism in Prestashop is buggy.

5 years, 10 months ago 0

WordPress allows you to use custom text editors with the function wp_editor. There is one very annoying issue, which is cause in combination with qTranslate plugin. It means, while you are using qTranslate and in the same time for example in admin you have custom wp_editor ‘s, you are not able to insert any files (uploads neither images) in the wp_editor.

There is fix available. Editing file

[YOUR_SITE_ROOT]/wp-content/plugins/qtranslate/qtranslate_javascript.php

and make the block on line 238 look following:

$q_config['js']['qtrans_wpActiveEditorOverload'] = "
	jQuery('.wp-editor-wrap').unbind('mousedown');
	jQuery('.wp-editor-wrap').mousedown(function(e){
		/*wpActiveEditor = 'qtrans_textarea_'+this.id.slice(3, -5);*/
		 var sliced = this.id.slice(3, -5);
            if (sliced == 'content'){
 	            wpActiveEditor = 'qtrans_textarea_content';
            } else {
                wpActiveEditor = sliced;
            }
});
";
6 years ago 0
Posted in: Programování

Create user defined tag with parameters named alias and param_name

if( !isset($params['alias']) ) {
	return;
}
if( !isset($params['param_name']) ) {
	return;
}
$gCms = cmsms();
$hierarchy_manager = $gCms->GetHierarchyManager();
$node = $hierarchy_manager->sureGetNodeByAlias($params['alias']);
$content = $node->getContent();
$property_value = $content->GetPropertyValue($params['param_name']);
if($property_value != "-1"){
	echo $property_value;
}
6 years, 2 months ago 0
Posted in: Novinky

Na adrese http://www.hcdavidservis.cz/ byly suštěny stránky českobudějovického hokejového klubu. Více v referencích.

6 years, 4 months ago 0
Posted in: Programování
CREATE TABLE IF NOT EXISTS `okresy` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nazev` text NOT NULL,
  PRIMARY KEY (`id`)
);

INSERT INTO `okresy` (`id`, `nazev`) VALUES
(1, 'Beroun'),
(2, 'Blansko'),
(3, 'Brno-město'),
(4, 'Benešov'),
(5, 'Brno-venkov'),
(6, 'Bruntál'),
(7, 'Břeclav'),
(8, 'České Budějovice'),
(9, 'Cheb'),
(10, 'Český Krumlov'),
(11, 'Česká Lípa'),
(12, 'Chrudim'),
(13, 'Chomutov'),
(14, 'Děčín'),
(15, 'Domažlice'),
(16, 'Frýdek-Místek'),
(17, 'Havlíčkův Brod'),
(18, 'Hradec Králové'),
(19, 'Hodonín'),
(20, 'Jičín'),
(21, 'Jeseník'),
(22, 'Jindřichův Hradec'),
(23, 'Jihlava'),
(24, 'Jablonec nad Nisou'),
(25, 'Kutná Hora'),
(26, 'Karviná'),
(27, 'Kladno'),
(28, 'Kroměříž'),
(29, 'Kolín'),
(30, 'Klatovy'),
(31, 'Karlovy Vary'),
(32, 'Liberec'),
(33, 'Louny'),
(34, 'Litoměřice'),
(35, 'Mladá Boleslav'),
(36, 'Mělník'),
(37, 'Most'),
(38, 'Náchod'),
(39, 'Nymburk'),
(40, 'Nový Jičín'),
(41, 'Olomouc'),
(42, 'Opava'),
(43, 'Ostrava'),
(44, 'Příbram'),
(45, 'Pelhřimov'),
(46, 'Praha-město'),
(47, 'Praha-východ'),
(48, 'Písek'),
(49, 'Plzeň-jih'),
(50, 'Plzeň-město'),
(51, 'Přerov'),
(52, 'Plzeň-sever'),
(53, 'Prachatice'),
(54, 'Pardubice'),
(55, 'Prostějov'),
(56, 'Praha-západ'),
(57, 'Rakovník'),
(58, 'Rychnov nad Kněžnou'),
(59, 'Rokycany'),
(60, 'Semily'),
(61, 'Sokolov'),
(62, 'Strakonice'),
(63, 'Šumperk'),
(64, 'Svitavy'),
(65, 'Tábor'),
(66, 'Tachov'),
(67, 'Teplice'),
(68, 'Třebíč'),
(69, 'Trutnov'),
(70, 'Uherské Hradiště'),
(71, 'Ústí nad Labem'),
(72, 'Ústí nad Orlicí'),
(73, 'Vsetín'),
(74, 'Vyškov'),
(75, 'Zlín'),
(76, 'Znojmo'),
(77, 'Žďár nad Sázavou');
6 years, 4 months ago 0
Posted in: Nezařazené

Na adrese www.sonorista.cz byla spuštěna webová prezentace pro oficiální české zastoupení firmy SONOR.

6 years, 4 months ago 0
Posted in: WordPress
global $query_string;
query_posts($query_string . '&orderby=id&order=ASC');
if (have_posts()) : while (have_posts()) : the_post();
6 years, 5 months ago 0

Temporary solving of the problem where I am not able to change display brightness using Fn keys, nor in the system settings.

sudo setpci -s 00:02.0 F4.B=XX
6 years, 5 months ago 0
Posted in: Novinky

Ode dneška běží hlasování na stránkách soutěže RR ROP Kompas. Web je postaven na WordPressu, využívá jQuery a podporuje např. export hlasujících do Excelu z administračního rozhraní.

KOMPAS - Hledá se nejlepší projekt ROP Jihozápad

7 years, 4 months ago 0
Posted in: Programování

Run these commands:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo apt-get install sun-java6-jdk