Tag: wordpress
Fuori.tv on-line

Laboratorio Caffeina rilascia l’ultimo progetto: “Fuori.tv”.
Fuori Tv racconta la quotidianità attraverso le voci dei protagonisti che diventano così i veri narratori della trasmissione. L’idea portante è quella di un giornalismo dal basso, che nasca dalla vita delle persone.
Nata un anno fa dall’idea di un gruppo di videomakers modenesi, Fuori Tv nella prima edizione ha avuto un grande successo: oltre 500 visitatori al giorno per il sito web www.fuori.tv
La prima serie, conclusasi nel giugno 2007, era composta da sedici puntate, accomunate da un denominatore comune: dire quello che si vuole. Il progetto vuole introdurre tematiche e contenuti innovativi rispetto ai palinsesti delle tv locali e sfruttare la televisione e il web per diffondere informazioni importanti e significative destinate a tutta la cittadinanza.
Fuori Tv si basa sul concetto di redazione aperta per sviluppare i contenuti in modo orizzontale, ovvero con un dialogo costante con chiunque voglia proporre, suggerire e realizzare nuove idee e progetti.
Laboratorio Caffeina ha contribuito al progetto realizzando il design del sito. Sviluppato su piattaforma WordPress.
Remove whitespace from wordpress tagcloud
I hate whitespace in html code: if I need them I'll use css rules.
so that's a simple plugin edited from this one.
if you need both merge them
-
<?php
-
/*
-
Plugin Name: Tag Cloud noWhitespace
-
Plugin URI: http://www.laboratoriocaffeina.it/design/2008/04/03/remove-whitespace-from-wordpress-tagcloud.html
-
Description: Makes wordpress dump out a tag cloud without whitespace between each word in tags (edit from http://www.185vfx.com/2007/10/wordpress-tag-cloud-formatting/)
-
Author: cedmax
-
Version: 1.0
-
Author URI: http://www.dioblog.it
-
*/
-
-
-
// This just echoes the chosen line, we'll position it later
-
function tci_kill_breaks($taglist) {
-
}
-
-
// Now we set that function up to execute when the tag list is generated
-
add_filter('wp_generate_tag_cloud', 'tci_kill_breaks',50);?>
download, rename to .php, upload to plugin folder and activate
(tested on 2.5)
Add TinyMCE to author description in Wordpress
Ok, second chance to me, after the Restrict authors access to edit comments plugin I did the second one.
I think that the name is quite explicative: I wanted to add the wysiwyg to the user description .
-
<?php
-
/*
-
Plugin Name: Add TinyMce to Author Profile
-
Plugin URI: http://www.laboratoriocaffeina.it/development/2007/08/22/add-tinymce-to-author-description-in-wordpress.html
-
Description: Adds WYSIWYG to Author profile
-
Version: 0.1
-
Author: cedmax
-
Author URI: http://www.dioblog.it
-
*/
-
-
add_action('admin_head', 'add_tinymce');
-
}
-
-
remove_filter('pre_user_description', 'wp_filter_kses');
-
add_filter('pre_user_description', 'wpautop');
-
-
function add_tinymce() {?>
-
-
<script type="text/javascript" src="<?php echo get_settings('home'); ?>/wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20070326"></script>
-
<script type="text/javascript">
-
//<![CDATA[
-
-
function brstonewline(element_id, html, body) {
-
html = html.replace(/<br\s*\/>/gi, '\n');;
-
return html;
-
}
-
-
function insertHTML(html) {
-
tinyMCE.execCommand('mceInsertContent',false, html);
-
}
-
-
tinyMCE.init({
-
mode : "exact",
-
elements : "description",
-
theme : "advanced",
-
theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,undo,redo,link,unlink",
-
force_p_newlines : false,
-
force_br_newlines : true,
-
gecko_spellcheck : true,
-
theme_advanced_buttons2 : "",
-
theme_advanced_buttons3 : "",
-
theme_advanced_toolbar_location : "top",
-
theme_advanced_toolbar_align : "left",
-
save_callback : "brstonewline",
-
height : "300",
-
extended_valid_elements : "a[name|href|title],font[face|size|color|style],span[class|align|style]"
-
});
-
//]]>
-
</script>
-
-
<?php } ?>
INSTRUCTION:
download v.0.1 and copy the file into wp-content/plugins.
activate it.
Now you should see in the edit user details the wysiwyg editor.
You can manage to modify TinyMCE script, following instruction
Hope you like it
tested on wordpress 2.2
IN ORDER TO LET IT WORK IN 2.5
replace this part of code:
-
function add_tinymce() {?>
-
-
<script type="text/javascript" src="<?php echo get_settings('home'); ?>/wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20070326"></script>
-
<script type="text/javascript">
-
//<![CDATA[
-
-
function brstonewline(element_id, html, body) {
-
html = html.replace(/<br\s*\/>/gi, '\n');;
-
return html;
-
}
-
-
function insertHTML(html) {
-
tinyMCE.execCommand('mceInsertContent',false, html);
-
}
-
-
tinyMCE.init({
-
mode : "exact",
-
elements : "description",
-
theme : "advanced",
-
theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,undo,redo,link,unlink",
-
force_p_newlines : false,
-
force_br_newlines : true,
-
gecko_spellcheck : true,
-
theme_advanced_buttons2 : "",
-
theme_advanced_buttons3 : "",
-
theme_advanced_toolbar_location : "top",
-
theme_advanced_toolbar_align : "left",
-
save_callback : "brstonewline",
-
height : "300",
-
extended_valid_elements : "a[name|href|title],font[face|size|color|style],span[class|align|style]"
-
});
-
//]]>
-
</script>
-
<?php } ?>
with this:
-
function add_tinymce() {?>
-
-
<script type="text/javascript" src="<?php echo get_settings('home'); ?>/wp-admin/js/editor.js?ver=20080325"></script>
-
-
<script type="text/javascript" src="<?php echo get_settings('home'); ?>/wp-includes/js/tinymce/tiny_mce_config.php?ver=20080327"></script>
-
<script type="text/javascript">
-
//<![CDATA[
-
window.onload= function() {
-
tinyMCE.execCommand("mceAddControl", false, "description");
-
}
-
// ]]>
-
-
</script>
-
-
<?php } ?>
Velvet Box on-line

Laboratorio Caffeina rilascia l'ultimo progetto: "Velvet Box - pop up store".
Velvet Box è un'associazione che unisce un gruppo internazionale di artisti di ogni disciplina: moda, fotografia, disegno, pittura, video, illustrazione, architettura e design.
Il progetto, che partirà da Bilbao il 28 settembre, prevede una serie di mostre itineranti in diverse città europee: oltre Bilbao, Madrid, Barcellona, Berlino, Milano e Parigi.
Laboratorio Caffeina ha contribuito al progetto studiando prima il logo e successivamente realizzando il design del sito, la grafica e la comunicazione. Sviluppato su piattaforma WordPress.
Restrict authors access to edit comments, the plugin
It's my first wordpress plugin, please be kind ;-)
I've noticed that in wordpress (surely 2.2, not tested on previous, so please tell me if it works) there's no capability separation for editing post and comments (on their post). Even using the Role Manager Plugin.
from wordpress codex:
Manage->Comments -- meaning: "show post"-link; "edit post"-, "edit comment"- and "delete comment"-links only on own posts since edit-comment.php (http://trac.wordpress.org/file/trunk/wp-admin/edit-comments.php) looks for "current_user_can('edit_post', $comment->comment_post_ID)"'
I run a lot of multiple authors blogs and sometimes I need only administrators to edit comments (and I'm not the only one).
So I developed this:
-
<?php
-
/*
-
Plugin Name: Restrict author access to edit comments
-
Plugin URI: http://www.laboratoriocaffeina.it/development/2007/07/20/restrict-authors-access-to-edit-comments-the-plugin.html
-
Description: Block author access to edit comments, leave it only for admin and editors
-
Version: 0.3
-
Author: cedmax
-
Author URI: http://www.dioblog.it
-
*/
-
-
function check_user_capabilities() {
-
global $user_level;
-
-
-
if ($user_level <9){
-
echo "<div class='wrap'><h2>Restricted area</h2></div>";
-
include('admin-footer.php');
-
-
}
-
}
-
}
-
-
add_action('init', 'check_user_capabilities');
-
-
?>
update
thanks to brad I found out that the direct edit comment link in wordpress points to comments.php and not to edit-comments.php.
so I've changed the script.
update 2
Thanks to Fred (sorry I didn't understand immediatly) and Claus I spotted out another error in version 0.2
Now I've done the v.0.3 changing the hook function: now it works not on the content but on the initialization of the page, so it is not possible for the author to work on comments at all. thanks to everyone :-)
simply download v.0.3, unzip, put the .php file under wp-contents/plugins and activate it from wordpress plugins panel.
