Backup your data on Thunderbird

•Ottobre 27, 2009 • Lascia un Commento

A little trick for back up your data (email,addresses) on mozilla thunderbird.

In this web page there is a solution http://kb.mozillazine.org/MozBackup

I’ve changed my office pc and i had to move my emails and data from the old pc to the new one. The target is the profile folder and with this software we accomplished the task.Yes!

UltraVNC installation by Group policies

•Ottobre 13, 2009 • Lascia un Commento

@ this site http://www.waynezim.com/2009/05/how-to-deploy-vnc-using-group-policy/ there is a good tutorial for network installation of VNC Server.

Don’t forget to open the dialog box “Properties” on the line of  new package added to the policy and select the options: “Install this application at logon”. Click “Install immediately and “Assign”.

Good chance for network administrators that don’t want to lift up their rear from the chair ;-)

UPDATE: With the linked article we can get in error at configuration time of VNC. In fact, there are one or two options with a warning: the DSMPlugin must not be activated(for a loss of rights with a shared key that have to be exchanged from client 2 server) and the loopback connection must be not a activated, in these cases there are many problems to make a connection between server and viewer.

XCACLS for user rights verification

•Ottobre 12, 2009 • Lascia un Commento

For best experience in user rights management on windows system i suggest the script xcacls.vbs from microsoft http://www.microsoft.com/downloads/details.aspx?FamilyID=0ad33a24-0616-473c-b103-c35bc2820bda

With this tool we can gain some detailed info about user/groups rights on shared network resources and local resources like files and folders.

Get a shared resource shortcut on user desktop with Group policy

•Ottobre 12, 2009 • Lascia un Commento

If you want to make your lan users life easier(if you know the user usual level of  experience with pc in italy you can understand) here a trick to obtain a shared resource link on their desktop:

- Create a batch file(ora script) with these lines(here with kixtart script but it’s similar with a batch file):

if InGroup(“INTRANET\grsala”)
use q: “\\leonardo\Sala operatoria”
copy “p:\CartelleDesktop\Sala operatoria su Leonardo.lnk” “c:\documents and settings\all users\desktop\”
AT (20,25) “Premere un tasto per continuare…”
get $x
endif

if InGroup(“INTRANET\YOURGROUPNAME”)

use q: “\\SHAREDRESOURCEPATH”

copy “p:\shortcutfileWithLinkTOSHAREDRESOURCE.lnk” “c:\documents and settings\all users\desktop\”

endif

—-

In this case, we can link some similar files for OU or Shared resource (obviously depends on the size of your lan) just with an “if-else” command.

This trick apply on W2k3 servers.

Apply group policies per machine

•Ottobre 12, 2009 • Lascia un Commento

Yesterday, in a windows network and resource planning session, i’ve realized that my company have the need of segmentation for computer and lan usage, depending on department user affiliation.
In our case the policy to be applied must be per machine instead the usual per-user policy.

For the first moment we get in trouble. In fact the usual group policy we have ever applied was per-user(it’s simple by the windows server mmc snap-in).

I found some links very useful:

http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/944b7d5c-3cf1-4d8c-b755-17cc9c1a4650

http://www.petri.co.il/forums/showthread.php?t=39069

The trick is  on a particular field of Group Policy options: group policy Loopback Processing

Link from microsoft: http://support.microsoft.com/kb/231287

With this option we gain a process of policy application with very interesting results, in fact the policies were applied to a user on a particular location(computer). In this case the GP object must be linked on a computer object on the domain tree enclosed (in case) inside  organizational unit.

N.b.  after the link of a GPO to an OU, on the physical machine the best is to run the command  gpupdate /force, to apply the changes fast. Another tool to verify the results is “gpresults” always by command line.

Yes i’m back!

•Ottobre 12, 2009 • Lascia un Commento

After 6 months now it’s the time to return writing my blog.

I’ve been graduated in Computer Science five-year degree in Pisa on  IT security.
Now i’m  involved in a position of CIO in a health company with head office in Forte dei Marmi(LU) and branch office in Genova.

Thickbox with drupal menu unleashed

•Dicembre 24, 2008 • Lascia un Commento

Finally i resolved the hard work of making drupal menu system calling a page in a thickbox “view”.

In the last post i missed some things that in this day i learned.

The first thing to know it’s the drupal menu system. The menus in drupal works great but are not so flexible like their cms. Once a menu link is clicked, the menu system with a series of map tables and hooks checks the original menu link that fired the request and go through http requests to the browser for displaying the target page.

This kind of work isn’t the same of a simple static href link,  in fact the thickbox module works great with these links because the request fired by the click event passes through him.

In the first case,  that is my own, we must intercept the call of menu system. i tried by Jquery onload modification of the <li><a> tags attributes, either with adding the onload event, either with other tricks but the only things i could add are described in the previous post.

Then i added this code on the top of the page.tpl.php on a section reserved to jquery scripts:

//simple modification to some menu element’s class to enable thickbox
$(‘#menu-182 a’).addClass(‘thickbox’);//add to menu “item” the thickbox

$(‘#menu-182 a’).attr(“href”, “thickbox1″);
//some tricks to display thickbox on menu link click

var norm=’?height=300&width=300′;//the thickbox normal option
var iframe=’?keepThis=true&TB_iframe=true&height=250&width=400′;//iframed content
var iframemodal= ‘?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=200&width=300&modal=true’;
//first of all we must check the request uri
<?php $curi = urldecode(request_uri());
if($curi==”/thickbox1″){
?>

tb_show(“Libri Esteri”,”http://mysite/page_in_thickbox”+iframemodal,”");

<?php         //return drupal_goto();

}?>

Some little explanation, the first line is the onload modification of the menu-item’s class and href.

With this modification i can intercept the fire event happened with the click on this element.

After that i’ve defined a series of jscript variables with some common options of thickbox, to use manually when i would change the visualization.

In the end, with a check on the uri passed with $_GET variable in php i can check the page target, if it’s the right that i would intercept i call the function that display the thickboxed content.

But there is a problem. Infact in this manner, the page displayed under the thickbox on the screen is the same, and i don’t want this poor work.

The solution is in some little passes. We first must define a new content type, for esample, “thickbox”.

We then can create a sample content and assign to it a clean url.

A problem with the dinamically loaded content in thickbox on drupal is a complete page load on the thickbox, with sidebars and so on, but we will display only the brief content of the node. We then have to add a simple file page-thickbox.tpl.php(thickbox in my case, but must comply with your content type name). This file it’s a simple version of your page.tpl.php, without all unnecessary things.

Now we add at the top of the page.tpl.php this snippet of code:

<?php

if ($node->type == “thickbox” || $node->type == “popup”) {
include ‘page-thickbox.tpl.php’;
return;
}
?>

Now the drupal system when laod a page check if the content type is “thickbox”.

In the code above we have checked an url called “thickbox1″, this url in my system doesn’t exist, but it’s used to intercept the call. If we will make the things better, we must check, in the php code above some things in the url, in fact if we would like to use some other links in menus, we must differentiate the request url, e.g. thickbox1,thickbox2 etc.., in this case we can check for an identifier for example thickbox&1 to redirect the correct page to thickbox.

And the page displayed under the thickbox? For now is the typical Not Found page of Drupal, but with some intelligent tricks we’ve a good system also with a page that point to the home page for example.

Merry Christmas to all!

drupal menu system and thickbox

•Dicembre 23, 2008 • Lascia un Commento

Hi all,

i tryed a simple trick useful for adding thickbox effects to links on the infamous drupal menu system, something of more inflexible isn’t on this earth!

The trick is by JQuery, you must add this  sample code(modified by your tags):

$('#myelement').addClass('thickbox');

Remind that this code must be esecuted at load time on the page with the usual code

jQuery(document).ready(function() {………..});
in the header. after that you must insert the link to the content that you would display on thickbox for example:

<a href="ajax.PHP?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">Example 1</a>

Found the problem!

•Novembre 17, 2008 • 1 Commento

There was a bug in JSimpleXML php parser included in the ubercart package. I guess that some characters(in my case was ‘-’) isn’t supported by the parser. I investigate……

D.

Ubercart import debugging

•Novembre 17, 2008 • Lascia un Commento

I didn’t already realized how this module for ubercart works. In my previous post i’ve explained some useful discovered things. But i’ve an xml file of 60 Mb of data , well formatted that i must import. I don’t know why the import page results “Upload completed” but the system only update the items already listed in db(that i’ve just inserted with small files but that are contained also at the top of the big file).

I’m trying to debug with watchdog and a file where i print data from watchdog for all the products imported. Till now no errors are returned, and this doesn’t make sense!!

Now i see the options of the module importer to understand better.