Concealment of point of the menu by defaultСкрытие пункта меню по умолчанию

Happens so that there is no necessity to show in the menu point by default, and there is also a necessity to clean this point of the menu. But in Joomla necessarily there should be a menu point by default that will get rid of display of this, it is necessary in a file modules/mod_mainmenu/helper.php in the cycle beginningСлучается так, что нет необходимости показывать в меню пункт по умолчанию, а бывает и необходимость убрать этот пункт меню. Но в Joomla обязательно должен быть пункт меню по умолчанию, чтобы избавится от показа оного, нужно в файле modules/mod_mainmenu/helper.php в начале цикла

11
22
33
44
while (count ($rows) &&! is_null ($row = array_shift ($rows)))while (count($rows) && !is_null($row = array_shift($rows)))
{ {
...
}

To addдобавить

11
if ($row-> id == 1) continue;if ($row->id == 1) continue;

In this case 1 it ItemId point of the menu which is necessary for hiding.в данном случае 1 это ItemId пункта меню, который необходимо скрыть.
UPD: UPD:
That in Joomla 1.7 to hide main it is necessary after Чтобы в Joomla 1.7 скрыть главную нужно после

11
22
33
44
{{
  unset ($items [$i]);   unset($items[$i]);
  continue;   continue;
}

To addДобавить

11
22
33
44
if ($item-> id == 1) {if ($item->id == 1){
  unset ($items [$i]);   unset($items[$i]);
  continue;   continue;
}

Klikabelnye headings of modulesКликабельные заголовки модулей

It was required to make headings of modules кликабельными i.e. that the administrator could add in headings of modules of the reference. To look at the decisionПотребовалось сделать заголовки модулей кликабельными, т.е. чтобы админ мог добавлять в заголовки модулей ссылки. посмотреть решение

c99madshellc99madshell

As it has appeared функционала this shell to me insufficiently, and there were in it bugs. A bug in exhibiting of the rights to files. New values of the rights to a file were calculated correctly, but the line of a kind “0xxx” as a result turned out and it is a line was transferred as argument in function chmod. While the number should be the second parameter of function, and php safely transformed a line to number … in decimal notation, here and all problem. After correction has still added recursive possibility of change of the rights since that was necessary to work with a site to which not on ssh there is no access, but also on фтп, and at all loaded files the rights 600, and accordingly are exposed if it is picture that to see them it is impossible, незнаю that for a paranoia at the administrator. Also has added possibility of renaming of files/folders, and has replaced $HTTP_POST_FILES on $ _FILES for loading of filesКак оказалось функционала этого шелла мне недостаточно, да и были в нём баги. Баг в выставлении прав на файлы. Новые значения прав на файл вычислялись правильно, но в результате получалась строка вида “0xxx” и это строка передавалась как аргумент в функцию chmod. В то время как вторым параметром функции должно быть число, и php благополучно преобразовывал строку в число…в десятичной системе счисления, вот и вся проблема. После исправления ещё добавил рекурсивную возможность смены прав, т.к. пришлось работать с сайтом к которому не то-что по ssh нет доступа, но и по фтп, и у всех загружаемых файлов выставляются права 600, и соответственно если это картинки то просмотреть их невозможно, незнаю что за паранойя у админа. Также добавил возможность переименования файлов/папок, и заменил $HTTP_POST_FILES на $_FILES для загрузки файлов
С99 Mad Shell (574)С99 Mad Shell (574)

hack toolshack tools

On work it is necessary to change often something in scripts or in бд on sites to which there is an access only on ftp, and phpmyadmin somewhere in the control panel to which not always there is an access. With such cases help I of a useful script — MySQL RST/GHC Manager for work from a DB and c99madshell – Web Shell.По работе приходится часто что-то менять в скриптах либо в бд на сайтах, к которым есть доступ только по ftp, а phpmyadmin где-то в панели управления к которой не всегда есть доступ. В таких случаях помогают я полезных скрипта — MySQL RST/GHC Manager для работы с БД и c99madshell – Web Shell.
MySQL RST/GHC Manager – all it is good, besides has been copied on post inquiries by the Antichat, but there were in it defects: editing of the data if at them there was a symbol "'" and ‘ ”‘, didn't occur or occurred not correctly besides if in the field of long more than 40 symbols were тег <textarea> гуи parted, I all it has corrected and has compressed, so the size makes it 30кб against 113кб MySQL RST/GHC Manager – всем хорош, к тому же был переписан на post запросы Античатом, но были в нём недочёты: правка данных, если в них присутствовал символ ” ‘ ” и ‘ ” ‘, не происходила либо происходила не правильно, к тому же если в поле длинной более 40 символов был тег <textarea>, то гуи разъезжалось, всё это я поправил и сжал, так что размер его составляет 30кб против 113кб
Mysql RST/GHC Manager (140)Mysql RST/GHC Manager (140)
With c99madshell all is much easier, there bugs (like) aren't present, but delivered inconvenience that names in the left part, and operating elements in the right part of the screen and on 21 ”the monitor сложновато to define to what file action concerns, I have added allocation by color of a line of the table at which the mouse is induced, it became much more convenient, and is sensitive have reduced the size С c99madshell всё гораздо проще, там багов(вроде) нет, но доставляло неудобство то, что имена в левой части, а управляющие элементы в правой части экрана и на 21” мониторе сложновато определять к какому файлу относится действие, я добавил выделение цветом строки таблицы, на которую наведена мышь, стало гораздо удобнее, и чуток уменьшил размер
c99madshell - Web shell (118)c99madshell - Web shell (118)

anti iframeranti iframer

Has got to me похаканый a site on joomla which was cruelly проифрэймлен. Symptoms such, in all folders to 3rd level of an enclosure where there is one of files index.html, index.php, default.php it is added.htaccess and втсавлены iframe in these files. It was necessary to write “удалятор” these dirty tricks. Since it joomal that index.html are used to forbid only viewing of contents of catalogs on a site I simply clear them, and it was necessary to cut out muck from the others: to Read completely»Достался мне похаканый сайтик на joomla, который был жестоко проифрэймлен. Симптомы такие, во всех папках до 3-го уровня вложенности, где есть один из файлов index.html, index.php, default.php добавлен .htaccess и втсавлены iframe в эти файлы. Пришлось писать “удалятор” этих пакостей. Т.к. это joomal то index.html используются лишь для того, чтобы запретить просмотр содержимого каталогов на сайте, то их я просто очищаю, а из остальных пришлось гадость вырезать: Читать полностью »

ODBC, MSAccess and other evil spiritsODBC, MSAccess и прочая нечисть

Under FreeBSD I something haven't dared to be engaged in it, well тат like as replacement to Windows and was necessary to do. The problem is that: there is a program on java which through ODBC communicates with MSAccess base, here this perversion it was necessary to force to work under ubuntu. Have been to begin with established unixodbc and mdbtools. The field of their installation of any labels in the menu hasn't appeared, commands аля unixodbc mdbtools not прокатили, through search надыбыл/usr/share/menu/unixodbc-bin and that there already ODBCConfig, it is necessary to tell to sense from this гуишной covers not much, and hasn't understood as normally what there to make, all errors gave out, by practical consideration and Google has been found out that all that is necessary is in /etc/odbc.ini and /etc/odbcinst.ini. In odbcinst.ini there were driver MSAccess options which to me всётаки it was possible to push. And in odbc.ini options System DNS where actually also should is описалово конекта to base, anything difficult there wasn'tПод FreeBSD я что-то не решился этим заниматься, ну тат вроде как замена винде и делать пришлось. Задача такова: есть прога на java, которая через ODBC общается с MSAccess базой, вот это извращение нужно было заставить работать под ubuntu. Для начала были установлены unixodbc и mdbtools. Поле их установки никаких ярлыков в меню не появилось, команды аля unixodbc mdbtools не прокатили, через поиск надыбыл /usr/share/menu/unixodbc-bin а то туда уже ODBCConfig, надо сказать толку от этой гуишной оболочки не много, так и не разобрался как нормально что там сделать, всё ошибки выдавал, опытным путём и гуглом было выяснено, что все что надо находится в /etc/odbc.ini и /etc/odbcinst.ini. В odbcinst.ini находились настройки драйвера MSAccess которые мне всётаки удалось запихнуть. а в odbc.ini настройки System DNS где собственно и должно находится описалово конекта к базе, ничего сложного там не было

11
22
33
44
55
66
77
88
[myConnection][myConnection]
Description = Microsoft AccessTS Description = Microsoft AccessTS
Driver = MDB1 Driver = MDB1
Database = /home/vampirus/db1.mdb Database = /home/vampirus/db1.mdb
Servername = localhost Servername = localhost
UserName = UserName =
Password = Password =
Port = 5432 Port = 5432

помойму only Driver, Database here are necessary but time works and so that has left)помойму только Driver,Database тут нужны но раз работает и так то оставил)
Has checked up work проверил работу

11
22
isql-v myConnectionisql -v myConnection
 select * from Realtion  select * from Realtion

Works, well I think hurt, so it is simple, I will check up in the evening, how there java with it will make friends, and has gone for work.работает, ну думаю зашибись, так просто, вечером проверю, как там java с этим подружится, и пошёл на работу.
In the evening. Вечером.
About attempt of start the program dropped out with an exception, still after all I have for some reason solved that it will be better if to put Open-jdk вмето sun’овского. All right has put сановкий jdk. And here I was waited by a surprise, probably the driver clumsy or that, but at any deal was Result Set Type is not supported. It turns out from MSAccess it was necessary отказыватся, I am better than anything mysql haven't thought up. It is necessary to tell to put mysql php apache I didn't want, since for these purposes I wanted to put FreeBSD on an old computer. Well all right I think it is useful mysql for something. Since php it would not be desirable to put, has solved well I will try through perl it should be not difficult, but the module (or how it there?) DBD:ODBC It has not appeared, about its attempt to deliver Makefile.pl has given out what that errors, to understand in which небыло any desire. Then for import, has solved поробовать mdbtools, knowingly put, but on how many I could understand import went only in csv, well I think here on python I will try, the blessing with csv I on it already worked, but here for me waited подлянка, for work with mysql it was necessary to deliver something, and there was already a laziness. It like in mysql to me was last attempt kexi under FreeBSD has thrown (or not, непомню), but here she refused to do it and fell. про попытке запуска прога выпадала с исключением, ещё бы ведь я почему-то решил что будет лучше если поставить Open-jdk вмето sun’овского. Ладно поставил сановкий jdk. И тут меня ждал сюрприз, видимо драйвер корявый или что, но при любом раскладе было Result Set Type is not supported. Получается от MSAccess надо было отказыватся, ничего лучше mysql я не придумал. Надо сказать ставить mysql php apache я не хотел, т.к. для этих целей я хотел поставить FreeBSD на старый комп. Ну ладно думаю пригодится mysql ещё для чего-нибудь. т.к. php ставить не хотелось, решил ну попробую через perl не сложно должно быть, но модуля(или как он там?) DBD:ODBC не оказалось, про попытке его доставить Makefile.pl выдал какие то ошибки, разбираться в которых небыло никакого желания. потом для импорта, решил поробовать mdbtools, не зря же ставил, но на сколько я смог понять импорт шёл только в csv, ну думаю тут на python попробую, благо с csv я на нём уже работал, но тут меня ждала подлянка, для работы с mysql надо было что-то доставить, а было уже лень. Последней попыткой была kexi под FreeBSD она вроде в mysql мне перекинула(или нет, непомню), но тут она отказывалась это делать и падала.
Уторо evenings мудренее. Уторо вечера мудренее.
It was necessary to put at once php and not to show off, ah moreover it was necessary to rock the driver odbcmysql and to adjust, but these are trifles. скриптик idle time of anything difficult Надо было сразу поставить php и не выпендриваться, ах да ещё пришлось качнуть драйвер odbcmysql и настроить, но это мелочи. скриптик простой ничего сложного

11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
<? php <?php
$r = odbc_connect ("myConnection", "", ""); $r = odbc_connect("myConnection","","");
$q = odbc_exec ($r, "select * from Relation"); $q = odbc_exec($r,"select * from Relation");
$conn = mysql_connect ("localhost", "root", "password"); $conn = mysql_connect("localhost","root","password");
mysql_selectdb ("db1"); mysql_selectdb("db1");
while (odbc_fetch_row ($q)) { while(odbc_fetch_row($q)){
  $PS=odbc_result ($q, "PS");   $PS=odbc_result($q,"PS");
  $Parg = odbc_result ($q, "Parg");   $Parg = odbc_result($q,"Parg");
  $X = odbc_result ($q, "X");   $X = odbc_result($q,"X");
  $R = odbc_result ($q, "relation");   $R = odbc_result($q,"relation");
  $Y = odbc_result ($q, "Y");   $Y = odbc_result($q,"Y");
  mysql_query ("INSERT INTO Relation (PS, Parg, X, relation, Y) VALUE (' $PS', ' $ Parg ', ' $X ', ' $R ', ' $Y ')");   mysql_query("INSERT INTO Relation (PS,Parg,X,relation,Y) VALUE ('$PS','$Parg','$X','$R','$Y')");
}
?> ?>

And here I from the reliable start a program, and it to me go wood, table RELATION isn't present, how so? There is it speak (well I haven't got used still that the register matters), all right I rename the table in RELATION, and it to me isn't present table Relation, ah you a sou … = in what mean делат a program in Windows to group the person. Having translated all to the uniform register, java all has eaten and has started to work)и вот я с надежной запускаю прогу, а она мне идите лесом, таблицы RELATION нету, как так? есть она говорю(ну не привык я ещё что регистр имеет значение), ладно переименовываю таблицу в RELATION, а она мне нету таблицы Relation, ах ты су… @= во что значит делат прогу в винде группе человек. Переведя всё к единому регистру, java всё скушала и начала работать)

backupbackup

For вордпресса there is a good plug-in which does бэкап time at an o'clock, put week, it how to adjust, and there is a possibility of its sending on soap. Has decided to make same for phpbb3, not a plug-in certainly, and so скриптик. Here that has turned out:Для вордпресса есть хороший плагин, который делает бэкап раз в час, день неделю, это уж как настроить, и есть возможность отсылки его на мыло. Решил сделать такое же для phpbb3, не плагин конечно, а так скриптик. Вот что получилось:

11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
1919
2020
2121
2222
2323
2424
2525
2626
2727
2828
2929
3030
3131
3232
3333
3434
3535
3636
3737
3838
3939
4040
4141
4242
4343
4444
4545
4646
4747
<? php<?php
define (' IN_PHPBB ', true); define('IN_PHPBB', true);
$phpbb_root_path = (defined (' PHPBB_ROOT_PATH '))? PHPBB_ROOT_PATH: '. / '; $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr (strrchr (__ FILE __, '. '), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);
include ($phpbb_root_path. ' common. '. $phpEx); include($phpbb_root_path . 'common.' . $phpEx);
include ($phpbb_root_path. ' includes/acp/acp_database. '. $phpEx); include($phpbb_root_path . 'includes/acp/acp_database.' . $phpEx);
include ($phpbb_root_path. ' includes/functions_install. '. $phpEx); include($phpbb_root_path . 'includes/functions_install.' . $phpEx);

$time = time (); $time = time();
$filename = ' backup _ '. $time. ' _ '. unique_id (); $filename = 'backup_' . $time . '_' . unique_id();
$mail = ' backup@mail.com '; $mail = 'backup@mail.com';
$subj = ' backup '; $subj = 'backup';
$tables = get_tables ($db); $tables = get_tables($db);
$ext = new mysql_extractor (false, true, ' gzip ', $filename, $time); $ext = new mysql_extractor(false, true, 'gzip', $filename, $time);
$ext-> write_start ($table_prefix); $ext->write_start($table_prefix);
foreach ($tables as $table_name) { foreach ($tables as $table_name){
  $ext-> write_table ($table_name);   $ext->write_table($table_name);
  $ext-> write_data ($table_name);   $ext->write_data($table_name);
}
$ext-> write_end (); $ext->write_end();

//send A mail //send mail
$path = $phpbb_root_path. ' store / '. $filename. '.sql.gz '; $path = $phpbb_root_path . 'store/' . $filename . '.sql.gz';
$boundary = "== PHPBB-BY-VAMPIRUS -". md5 (time ()); $boundary = "==PHPBB-BY-VAMPIRUS-".md5(time());
$fp = fopen ($path, "rb"); $fp = fopen($path,"rb");
$file = fread ($fp, filesize ($path)); $file = fread($fp,filesize($path));
fclose ($fp); fclose($fp);
$data = chunk_split (base64_encode ($file)); $data = chunk_split(base64_encode($file));
$headers = "MIME-Version: 1.0\n"; $headers = "MIME-Version: 1.0\n";
$headers. = "Content-Type: multipart/mixed; boundary = \" $ boundary \"\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
$headers. = ' From: vampirus@site.ru '. "\n"; $headers .= 'From: vampirus@site.ru'. "\n";
$message = "blabla\nThis is a multi-part message in MIME format.\n\n". $message = "blabla\nThis is a multi-part message in MIME format.\n\n" .
          "- {$boundary} \n".           "--{$boundary}\n" .
        "Content-Type: text/plain; charset=koi8-r\n".         "Content-Type: text/plain; charset=koi8-r\n" .
        "Content-Transfer-Encoding: 8bit\n\n".         "Content-Transfer-Encoding: 8bit\n\n" .
        "backup\n\n";         "backup\n\n";
$message. = "- {$boundary} \n". $message .= "--{$boundary}\n" .
        "Content-Type: application/octet-stream; \n".         "Content-Type: application/octet-stream;\n" .
        "name = \" {$ filename}.sql.gz \"\n".         " name=\"{$filename}.sql.gz\"\n" .
        "Content-Disposition: attachment; \n".         "Content-Disposition: attachment;\n" .
        "filename = \" {$ filename}.sql.gz \"\n".         " filename=\"{$filename}.sql.gz\"\n" .
        "Content-Transfer-Encoding: base64\n\n".         "Content-Transfer-Encoding: base64\n\n" .
        $data. "\n\n".         $data . "\n\n" .
        "- {$boundary} - \n";         "--{$boundary}--\n";
mail ($mail, $subj, $message, $headers); mail($mail,$subj,$message,$headers);
unlink ($path); unlink($path);
?> ?>

Naturally on a host expansion zlib for php should be established.естественно на хосте должно быть установлено расширение zlib для php.
Remains now only in cron task to add. Бэкапы шлуются on soap on гмэйле, помойму the best variant). Осталось теперь только в cron задание добавить. Бэкапы шлуются на мыло на гмэйле, помойму самый лучший вариант).