Some advices for common programmers problems

Instalacja faksu:

Pakiety
apt-get install hylafax-server
apt-get install hylafax-client

eDokumenty
.forward

Modem
..

Testy
czy przechodzi do edokumentów:
/tmp/mail.eml
/tmp/maillog-edokumenty

Postfix
musi być w grupie edokumenty - ale jako pierwszej!!! (/etc/passwd/
dopiero w /etc/group może być w postfix


Na koniec UWAGA:
ustawić konto w config.inc - MAIL_ACOUNT - na to konto które używa system edokumenty np. edokumenty@edokumenty.beta

1. Zainstaluj pakiet qemu (kqemu)
2. Utwórz plik obrazu dysku, na którym będziesz mógł zainstalować system
qemu-img create test.img 2G
gdzie:
test.img - nazwa pliku
2G - rozmiar pliku
3. Uruchom qemu wskazując napęd z płytą instalacyjną Windows za pomocą parametru -cdrom (można też wskazać plik obrazu ISO płyty instalacyjnej np. -cdrom image.iso)
qemu -hda test.img -cdrom /dev/cdrom -boot d
gdzie:
-hda test.img - wskazuje stworzony wcześniej plik obrazu dysku
-cdrom /dev/cdrom - wskazuje napęd z płytą instalacyjną Windows
-boot d - nakazuje uruchomienie wirtualnego systemu z napędu d: (w tym przypadku z napędu CD)
4. Po instalacji systemu Windows uruchom qemu
qemu -hda test.img -boot c -m 192
gdzie:
-hda test.img - wskazuje plik obrazu dysku gdzie został zainstalowany Windows
-boot c - uruchamia system z napędu c:
-m 192 - ustala wielkość pamięci w MB

Przydatne linki:

http://www.szarp.com.pl/howto/howto/html/qemu.html


http://fabrice.bellard.free.fr/qemu/user-doc.html


http://compsoc.dur.ac.uk/~djw/qemu.html

Przedruk z artykułu z debianusersgang
Problemy z GPG

Gdzie te klucze?? Czyli troszkę o kluczach GPG

Nowsze wersje apt-get weryfikują autentyczność ściąganych pakietów i używają do tego celu GPG. Jeżli pojawia się taki błąd - wynik komendy apt-get update:

W: GPG error: http://www.kadu.net stable Release:
The following signatures couldn't be verified because the public key
is not available: NO_PUBKEY 5EC42C53D86A66BA
W: GPG error: http://www.backports.org sarge-backports Release:
The following signatures couldn't be verified because the public key
is not available: NO_PUBKEY EA8E8B2116BA136C

Znaczy to, że GPG nie ma wymaganego klucza by zweryfikować dane pakiety. Należy sobie taki klucz zaimportować:

$ gpg --keyserver subkeys.pgp.net --recv-keys ID_KLUCZA
$ gpg --armor --export ID_KLUCZA | sudo apt-key add -

Oczywiście w miejscu ID_KLUCZA należy wprowadzi? ciąg znaków, który pojawi się w komunikacie apta.
Wygląda to mniej więcej tak:

$ gpg --keyserver subkeys.pgp.net --recv-keys 5EC42C53D86A66BA
$ gpg --armor --export 5EC42C53D86A66BA | sudo apt-key add -

No i po wszystkim
apt-get update

i cieszymy się świętym spokojem w komunikatach apta ;)

Znalezione w internecie.
Autor Zbooj

First:
Create module with ModuleGenerator.
Remember to set name with Starting Upper Letter ex. Regions, Examples etc.
If the name must be 2-words then start second word with lower letter

Then create table with PRIMARY KEY field named regions_id

WARNING!
For CRUD actions to work watch out to the names
if the table name is “fruits”
primary key field should be “fruits_id” (NOT fruit_id)

Edit the conf.ini file (put this two lines for module name testmodule)
[table]
testmodule = testmodule

Then, don’t forget to rebuild DataObjects.

Then You can arrange the templates/*.html files to fit fields in database.

If You want to edit with Admin module only, then put in conf.ini line smth like this
[ModuleConfigMgr]
requiresAuth = true
adminGuiAllowed = true

If collecting multiple prefs .e.g checkboxList then remember to get those data to the input ine validate method.
Look at the example below:

function validate($req, input) {
...
$input->aServices = $req->get('frmServices');
$input->aRegions = $req->get('frmRegions');
}
// where frmServices is the name from the template. look to the module departments/DepartmentsMgr.php

On the third screen Leave default “page language” as English language as English.

Allow to put sample data - if not there are problems with Publisher module

Create articles
Create Navigation
Change navigation (delete unused)
Uninstall unused blocks
Create theme CreatingASimpleSite

after instalation script should execute:
chmod o+w modules
chmod o+w var
chmod o+w www/images/Image

find . -name conf.ini | xargs chmod o+w

Common problems:
ContactUS module is serializing twice.
It is couse of the line: $input->masterTemplate = ‘masterLeftCol.html’; int contactUsMgr.php
Change this to master.html

Setting default language:
Go to admin > User > Preferences
Set dafault Settings

To remove additional informations in Article List:
change templates:
modules/publisher/templates/articleView.html
modules/publisher/templates/articleViewHtmlArticle.html

role visibility
After adding new role, you have to add at least one right to the role to become it visible

Rola EDITOR
Po zalogowaniu na EDITORA user nie ma prawa do domyślnego modulu panela administraotra.

Nie wyświetla się lista templatów dodanych w katalogu themes
Sprawdź czy na pewno są katalogu public_html a nie np. domyślnym www

Automatyczna publikacja edytowanych artykułów
ArticleMgr : line ~360 - $item->set(’statusID’, SGL_STATUS_PUBLISHED); Aby usunąć >Kontakt< nawiasy z nieprzetłumaczonych słów przejdź do modułu Konfiguracja, zakładka Debugowanie i skorzystaj z opcji “Zaznacz nieprzetłumaczone słowa”

# Wybieramy definiowalne pola dokumentu
SELECT * FROM features_view
WHERE ent_id = 1
AND tblnam = ‘types_of_documents_view’
AND (tbl_id IS NULL OR tbl_id = 33)
AND (is_del = FALSE OR is_del IS NULL)
ORDER BY prior_, featid

#wybieramy pozostałe pola
SELECT * FROM custom_documents_fields_view
WHERE dctpid = 33 ORDER BY prior_

#For each pole w dokumencie - Builer init
SELECT * FROM features_text_view
WHERE featid = 60
AND tblnam = ‘types_of_documents_view’
AND tbl_id = 27026