English
Português
Freedomson
Perguntas mais frequentes
Você está aqui:
 www.freedomson.com  / Perguntas mais frequentes

Mostrar Todas / Esconder Todas

Agrupar Faq

TYPO3 backend framed v 4.5.2+

Add to typo3/templates/template_page_backend.html

after ###CSS_INLINE### the following snippet:

 

<script language="javascript">

top=self;

</script>

 

Agrupar Faq

Iframe resize based on content

-- Javascript

 

function iResizeOther(frameid)

{

Frame = jQuery("#"+frameid)[0];

Frame.style.height = (Frame.contentWindow.document.body.scrollHeight+20) + 'px';

}

 

 

function iResize(frameid){

 

Frame = jQuery("#"+frameid);

 

if (jQuery.browser.safari || jQuery.browser.opera)

{

iResizeOther(frameid);

}

else

{

Frame[0].style.height = Frame[0].contentWindow.document.body.scrollHeight + 'px';

}

 

 

}

 

-- Calling

 

<iframe src="http://freedomson.com" id="sso-frame-3" onload="iResize('sso-frame-3');" ></iframe>

Categoria: Php
Agrupar Faq

Install PHP 4.3.3 Linux Ubuntu 10.04+

#sudo apt-get install flex tar
#cd /usr/local/
#mkdir phpsrc
#cd phpsrc
#wget museum.php.net/php4/php-4.3.3.tar.gz
#tar -xvf php-4.3.3.tar.gz
#./configure --prefix=/usr/local/php4.3.3

Remove static keyword at:
/usr/local/php/php-4.3.3/sapi/cgi/cgi_main.c:120:
/usr/local/php/php-4.3.3/sapi/cgi/cgi_main.c:121:
/usr/local/php/php-4.3.3/sapi/cli/php_cli.c:95:
/usr/local/php/php-4.3.3/sapi/cli/php_cli.c:94

#make
#make install

#/usr/local/php4.3.3/bin/php -v
PHP 4.3.3 (cgi) (built: Mar 19 2011 00:26:04)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

Categoria: Php
Especialista: Philip Almeida (support.freedomson.com)
Agrupar Faq

Reconfigure and restart fluxbox via shell

1. First activate in init file:

session.screen0.allowRemoteActions:     true

2. Run shell command

fluxbox-remote "Reconfigure"
fluxbox-remote "Restart"

Categoria: Sistemas Linux
Agrupar Faq

Adicionar menu de impressão para documentos Open Office

Para adicionar no menu de contexto do nautilus a opção para
imprimir documentos do openoffice  faça o seguinte:

1. Instalação do nautilus-actions
apt-get install nautilus-actions

2. Instalação no configurador do nautilus do ficheiro schema
Aceder a Sistema -> Preferências -> Configuração do Nautilus Actions
Importar o seguinte ficheiro de schema:

imprimir.schemas

Nota: Após importar editar o registo e validar o caminho para o programa scalc.

O ficheiro imprimir.schemas assume o seguinte caminho por defeito:
/opt/openoffice.org3/program/scalc

3. Reiniciar o Gnome
sudo /etc/init.d/gdm restart

---------------------------------------
Nota:
exemplo testado em Ubuntu - Debian

Categoria: Sistemas Linux
Especialista: Philip Almeida (support.freedomson.com)
Agrupar Faq

EXT:realurl - Multilang Simple Setup ( ext:commerce )

Fonts:
www.medienprofiler.net/page_has_INTincScript.138.0.html

localconf.php

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(

    'init' => array(
        'enableCHashCache' => true,
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => true,
        'enableUrlDecodeCache' => true,
        'emptyUrlReturnValue' => '/',
    ),

    'pagePath' => array(
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => 300,
        'excludePageIds' => '128,130',
        'rootpage_id'=>128,
        'segTitleFieldList'=>'tx_realurl_pathsegment,alias,nav_title,title',
        'autoUpdatePathCache' => 1,
    ),

    'preVars' => array(
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                'pt' => '2',
                'en' => '0'
            ),
            'valueDefault' => 'pt',
        ),
    ),


    'fixedPostVars' => array(
       '_DEFAULT' => array(

         array(
           'GETvar' => 'tx_commerce_pi1[catUid]',
           'lookUpTable' => array(
               'table' => 'tx_commerce_categories',
               'id_field' => 'uid',
               'alias_field' => 'title',
               'addWhereClause' => ' AND NOT deleted',
               'useUniqueCache' => 1,
               'useUniqueCache_conf' => array(
                   'strtolower' => 1,
                   'spaceCharacter' => '-',
               ),
            'languageGetVar' => 'L',
            'languageExceptionUids' => '',
            'languageField' => 'sys_language_uid',
            'transOrigPointerField' => 'l18n_parent'
           ),
       ),
       array(
           'GETvar' => 'tx_commerce_pi1[showUid]',
           'lookUpTable' => array(
               'table' => 'tx_commerce_products',
               'id_field' => 'uid',
               'alias_field' => 'title',
               'addWhereClause' => ' AND NOT deleted',
               'useUniqueCache' => 1,
               'useUniqueCache_conf' => array(
                       'strtolower' => 1,
                       'spaceCharacter' => '-',
               ),
            'languageGetVar' => 'L',
            'languageExceptionUids' => '',
            'languageField' => 'sys_language_uid',
            'transOrigPointerField' => 'l18n_parent'
           )
       )


       ),

    ),



    'postVarSets' => array(

       '45' => array(

          array(
          'GETvar' => 'cHash',
          ),
       ),

    ),

 'fileName' => array (

        'index' => array(

            'index.html' => array(

                'keyValues' => array(

                )

            ),

        ),

    ),

);

// Default Portuguese
$_GET['L'] = 2;

if (preg_match( '/\/en\//', $_SERVER["HTTP_HOST"] ) ) {
     $_GET['L'] = 0;
}

Categoria: Typo3 Typoscript
Especialista: Philip Almeida (support.freedomson.com)
Agrupar Faq

Typoscript conditional display based on pi_vars

  20 = COA
20 {
10 = TEXT
10.value = &tx_svdgbseminar_pi1[theme]=
20 = TEXT
20.data = GPvar : tx_svdgbseminar_pi1 | theme
if {
isTrue.data = GPvar : tx_svdgbseminar_pi1 | theme
}
}
Categoria: Typo3 Typoscript
Especialista: Philip Almeida (support.freedomson.com)
Agrupar Faq

Como posso alterar a senha da pasta encriptada utilizando o Truecrypt?

De forma a alterar a sua senha siga os seguintes passos:

1.
Seleccione a opção TrueCrypt a partir do menu "Aplicações -> Outro -> TrueCrypt"
( ver imagem 1 ponto 1)

2.
Indique o caminho para o ficheiro do volume
Clique no botão "Volume Tools..."
( ver imagem 1 ponto 2 )

3. Preencha os campos necessários para alterar a sua senha:
"Password", "password" e "Confirm password", um novo ecrã surgirá no qual deve clicar no único botão disponível após mexer um pouco o rato para gerar um código de protecção aleatório.
( ver imagem 1 ponto 3 )

Nota: Após a conclusão do ponto 3 aguarde um pouco pois a actualização pode levar alguns minutos.

 

 

 

Agrupar Faq

Autenticação via POST utilizando cURL

$username = urlencode( "myuser" );
$password = urlencode( "mypass" );
$url = "http://mydomain.com";
$cookieFile = "/mydir/" . md5( $user_name ) . ".txt";

// Create cookiefile
touch( $cookieFile );
$postdata = "_user=$username&_pass=$password&_action=login&_task=mail";

/**
* Visit site one first time to set cookie file.
*/
$cr = curl_init( $url );
#curl_setopt($cr, CURLOPT_INTERFACE, $_SERVER['REMOTE_ADDR'] );
curl_setopt($cr, CURLOPT_RETURNTRANSFER, true);        // Get returned value as string (don’t put to screen)
curl_setopt($cr, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]); // Spoof the user-agent to be the browser that the user is on (and accessing the php script)
curl_setopt($cr, CURLOPT_COOKIEJAR, $cookieFile );    // Use cookie.txt for STORING cookies
curl_setopt($cr, CURLOPT_COOKIEFILE, $cookieFile );   // Use cookie.txt for GET cookies
$output = curl_exec($cr); // Execute!
curl_close($cr); // Free the memory

/**
* Visit site to set authentication.
*/
// Initialize the curl object
$cr = curl_init( $url );
#curl_setopt($cr, CURLOPT_INTERFACE, $_SERVER['REMOTE_ADDR'] );
curl_setopt($cr, CURLOPT_RETURNTRANSFER, true);        // Get returned value as string (don’t put to screen)
curl_setopt($cr, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]); // Spoof the user-agent to be the browser that the user is on (and accessing the php script)
curl_setopt($cr, CURLOPT_COOKIEJAR, $cookieFile );    // Use cookie.txt for STORING cookies
curl_setopt($cr, CURLOPT_COOKIEFILE, $cookieFile );   // Use cookie.txt for GET cookies
curl_setopt($cr, CURLOPT_POST, true); // Tell curl that we are posting data
curl_setopt($cr, CURLOPT_POSTFIELDS, $postdata); // Post the data in the array above
$output = curl_exec($cr); // Execute!
echo $output; // Spit out what we found
curl_close($cr); // Free the memory

unlink( $cookieFile );

Categoria: Php
Especialista: Philip Almeida (support.freedomson.com)

(c) 2008-2012 freedomson.com  "free software for free people"

HOSTED BY
Hosted by netzhaut.de