| 1 |
<?php |
<?php |
| 2 |
//$Id: attached_node.module,v 1.6.2.4 2004/11/09 00:05:37 javanaut Exp $ |
//$Id: attached_node.module,v 1.10 2004/11/09 00:07:25 javanaut Exp $ |
| 3 |
/* |
/* |
| 4 |
This file is attached_node module - It allows users to |
This file is attached_node module - It allows users to |
| 5 |
attach a node to another node. |
attach a node to another node. |
| 24 |
|
|
| 25 |
|
|
| 26 |
/** |
/** |
| 27 |
|
* Adds attached_node stylesheet to html head section of pages |
| 28 |
|
*/ |
| 29 |
|
function attached_node_init() { |
| 30 |
|
global $base_url; |
| 31 |
|
drupal_set_html_head("<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"$base_url/modules/attached_node/attached_node.css\" />"); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
/** |
| 36 |
* Hook which handles filtering. |
* Hook which handles filtering. |
| 37 |
*/ |
*/ |
| 38 |
function attached_node_filter($op, $delta = 0, $format = -1, $text = '') { |
function attached_node_filter($op, $delta = 0, $format = -1, $text = '') { |
| 187 |
* Puts a box around the attached_node's content |
* Puts a box around the attached_node's content |
| 188 |
*/ |
*/ |
| 189 |
function theme_attached_node_format($content) { |
function theme_attached_node_format($content) { |
| 190 |
return "<div style='background-color: #DDD; margin: 10px; padding: 10px;'>" . $content . "</div>\n"; |
return "<div class='attached_node' >" . $content . "</div>\n"; |
| 191 |
} |
} |
| 192 |
|
|
| 193 |
/** |
/** |