Il sito web dellsa Fondazione è stato sviluppato con Drupal 7.
Nella sezione patrimonio è stato integrato uno strumento grafico per disegnare le particelle dei possedimenti e la loro presentazione al visitatore. Le singole proprietà possone contenere fotografie e documenti d'interessse.
Si è cercato di introdurre alcune caratteristiche di CSS3 come le ombre del testo (text-shadow) o dei font embed (@font-face)
Il sito dell'APSP di Borgo Valsugana offre un sito informativo ricco e facilmente gestibile internamente. E' disponibile inoltre anche l'Albo Telematico che raccoglie le pubblicazioni pubbliche secondo le normative attuali.
Inviato da luca il Dom, 01/07/2012 - 15:58
- Install Deploy http://drupal.org/node/408774 both on server/client sites
- Create a feature with vocabularies, content types, other.. on one site and install on the other. If the entities exists before enabling the feature, consider to delete them and revert from feature
- go to admin/content and add content to a plan (create one if it doesn't exists)
- deploy
Inviato da luca il Mar, 15/05/2012 - 08:38
// Pest, rest client
// https://github.com/educoder/pest
include_once "Pest/Pest.php";
$c = new Pest("https://my.servic.es/endpoint");
// Xml specialized
//$c = new PestXml("https://my.servic.es/endpoint");
// Throw exceptions on errors ?
$c->throw_exceptions = true;
// Array with stored request results, body & meta
//krumo( $c->last_response['body'], $c->last_response['meta']);
// login with Session auth
$data = array(
"username" => "superuser",
"password" => "superpassword"
);
$raw = $c->post( "/user/login", $data );
Inviato da luca il Gio, 26/04/2012 - 19:07
Inviato da luca il Mar, 31/01/2012 - 11:10
/**
*
* set new password for user by uid
* @param $uid User' uid
* @param $new_pwd New password
*/
function __change_pwd($uid, $new_pwd)
{
//global $user;
require_once DRUPAL_ROOT . '/includes/password.inc';
$user = user_load( $uid );
$user->pass = user_hash_password($new_pwd);
user_save($user);
}then eg. in index.php, add
__change_pwd(1, "tMp-pWd");
and run once then remove. Write somewhere the password and login again.
Inviato da luca il Ven, 16/12/2011 - 11:59
Drupal 7 offers a great set of caching functionality like CSS and Javascript aggregation. However seems(due a php bug?) in some server enviroment the cached files cannot be written.
In my case I had to delete and recreate both files/css and files/js folders and recreate theme from the ftp account to get it working again.
Ref: http://drupal.org/node/1240256
Inviato da luca il Mar, 04/10/2011 - 09:55
/**
* hook_node_load
*/
function {hook}_node_load($nodes, $types){
// webform id
$wfnid = 123;
if(isset( $nodes[ $wfnid ] ))
{
$node = $nodes[ $wfnid ];
foreach ($node->webform[ 'components' ] as &$comp){
if( $comp['form_key'] == 'some_markup'){
$comp['value'] = "<p>This is a <b>markup</b> content</p>";
}
if( $comp['form_key'] == 'my_list'){
$view = views_get_view( "view_name" );
$view->set_display("display_id");
Inviato da luca il Mer, 17/08/2011 - 17:33
UPDATE 2012-04-23:
(Patch for modules/system/image.gd.inc, imageapi module not needed anymore.)
*****
Inviato da luca il Sab, 13/08/2011 - 09:45
(function($) {
Drupal.behaviors.Slideshow = {
attach: function (context, settings) {
var slide = new Slideshow( {
// debug: true,
container: 'div.node div.content div.field-name-field-image.field-type-image',
rows: 'div.field-item',
images: 'img',
autoplay: true,
rowsNavigation: false,
imagesNavigation: false
});
}
};
/*
Pagine