}
        ?>
					
					<?php 
        if ($context_menu_item->isCurrent()) {
            ?>
					<span class="submenu_current">
					<?php 
        }
        ?>
					
				<a href="<?php 
        echo te_link($context_menu_item->node);
        ?>
"><?php 
        echo te_short($context_menu_item->getTitle(), 25);
        ?>
</a><br/>
					
					<?php 
        if ($context_menu_item->isCurrent()) {
            ?>
					</span>
					<?php 
        }
        ?>
				
					<?php 
        if ($context_menu_item->node->getLevel() == 3) {
            ?>
					</div>
Ejemplo n.º 2
0
			<a class="<?php 
        echo te_get_section_name($my_relation);
        ?>
_sub" href="<?php 
        echo te_link($my_relation);
        ?>
" title="<?php 
        echo $my_relation->getTitle();
        ?>
">
<img src="<?php 
        echo te_design();
        ?>
/sources/fleche.gif">
<?php 
        echo te_short($my_relation->getTitle(), 25);
        ?>
</a>

			</div>

<?php 
    }
    ?>
</div>
<?php 
}
?>


    foreach ($breadcrumb->getArray() as $menuitem) {
        ?>
				<?php 
        if ($menuitem->isEnd()) {
            ?>
					<?php 
            echo te_short($menuitem->getTitle(), 40);
            ?>
				<?php 
        } else {
            ?>
					<a href="<?php 
            echo $menuitem->getUrl();
            ?>
"><?php 
            echo te_short($menuitem->getTitle(), 20);
            ?>
</a>&gt;
				<?php 
        }
        ?>
		<?php 
    }
}
?>
<!--Parents &gt; Lectures &gt; Les &quot;temps d'arr&ecirc;t&quot;-->
</td>
</tr>
</table>
</td>
</tr>
            ?>
				
				
				
				<div class="intro">
				<?php 
            if ($sub_content->get('intro')) {
                ?>
				<?php 
                echo te_short($sub_content->get('intro'), 200);
                ?>
				<?php 
            } else {
                ?>
				<?php 
                echo te_short($sub_content->get('body'), 200);
                ?>
				<?php 
            }
            ?>
				<br/>
				<a href="<?php 
            echo te_link($child);
            ?>
" class="link_intro color100">Entrez &gt;</a>
				</div>
				<?php 
        }
        ?>
				
		<?php 
Ejemplo n.º 5
0
/*********** handle actions **********/
if ($url->get('action') == 'relate') {
    //echo 'I must relate';
    $target = $url->getObject('target_');
    $relation->relate($source, $target);
}
if ($url->get('action') == 'unrelate') {
    //echo 'I must relate';
    $target = $url->getObject('target_');
    $relation->unrelate($source, $target);
}
$relations = $relation->getRelations($source);
if ($relations) {
    foreach ($relations as $relation_object) {
        $relation_object->load();
        $item['title'] = te_short($relation_object->getTitle(), 50);
        $item['icon'] = $relation_object->getIcon();
        $url->set('action', 'unrelate');
        $url->addObject($relation_object, 'target_');
        $item['remove_url'] = $url->render();
        $out['relation']['data'][] = $item;
    }
}
$url = new url();
$url->set('mode', 'relation');
$out['browse_url'] = $url->render('browser.php');
debug($out, 'OUT');
debug($relations);
$out['title'] = 'Relations';
// include template file
include 'relation.template.php';
Ejemplo n.º 6
0
        }
        //$nodes[] = $current_node->getChildren();
    }
}
if (isset($nodes) && is_array($nodes)) {
    $i = 0;
    foreach ($nodes as $node_item) {
        // reset node_info for next loop
        $node_info = false;
        /********************* Visit link *****************/
        $url = new url();
        $url->set('node_id', $node_item->getId());
        $content = $node_item->getContent();
        $content->load();
        $node_info['id'] = $node_item->getId();
        $node_info['title'] = te_short($node_item->getTitle(), 60);
        // . ' (' . $node_item->getOrder() . ')';
        $node_info['full_title'] = $node_item->getTitle();
        //$node_info['title'] .= $node_item->getLevel(); // . ' (' . $node_item->getOrder() . ')';
        $node_info['icon'] = $content->getIcon();
        $node_info['url'] = $url->render();
        $node_info['level'] = $node_item->getLevel() + 1;
        /********************* Visit link *****************/
        // a node can be "visited" only if it is allowed to add something inside it
        // else users could go inside a node and nothing could be done there
        if ($node_item->getAllowedItems()) {
            $url = new url();
            $url->set('node_id', $node_item->getId());
            $node_info['visit_url'] = $url->render();
        }
        /********************* Delete link *****************/
            $class = "tr_on";
        }
        $i++;
        ?>

<tr class="<?php 
        echo $class;
        ?>
">

<td class="power_cell power_cell_border"><img src="<?php 
        echo $item['icon'];
        ?>
"/></td>
<td class="power_cell power_cell_border"><?php 
        echo te_short($item['title'], 30);
        ?>
</td>
<td class="power_cell power_cell_border">
<a class="action_button" href="<?php 
        echo $item['remove_url'];
        ?>
">
<img src="ressource/image/icon/small/list-remove.png">
<?php 
        echo translate('unrelate');
        ?>
</a>
</td>

</tr>
Ejemplo n.º 8
0
    }
    // build a list of nodes within the current node :
    // if we are in root
    if ($we_are_root) {
        $nodes[] = $current_node;
    } else {
        if ($current_node->hasChildren()) {
            $nodes = $current_node->getChildren();
        }
    }
    if (isset($nodes) && is_array($nodes)) {
        $i = 0;
        foreach ($nodes as $node_item) {
            $content = $node_item->getContent();
            $content->load();
            $item['title'] = te_short($content->getTitle(), 40);
            $item['icon'] = $content->getIcon();
            $url = new url();
            $url->keep('class');
            $url->keep('mode');
            $url->set('node_id', $node_item->getId());
            $item['visit_url'] = $url->render();
            if ($mode == 'relation') {
                $url->addObject($node_item, 'target_');
                $url->set('action', 'relate');
                $item['url'] = $url->render('relation.php');
            }
            $out['items'][] = $item;
        }
    }
}
Ejemplo n.º 9
0
$root = $thinkedit->newNode();
$root->loadRootNode();
echo '<title>' . strip_tags($root->getTitle()) . '</title>' . "\n";
echo '<link>TODO</link>' . "\n";
$root_content = $root->getContent();
echo '<description><![CDATA[' . "\n" . strip_tags($root_content->get('body')) . "\n" . ']]></description>';
echo '';
$db = $thinkedit->getDb();
$results = $db->select('select * from node where publish = 1 order by created_date desc, id desc limit 1, 20');
if ($results) {
    foreach ($results as $result) {
        $node = $thinkedit->newNode();
        $node->load($result['id']);
        echo '<item>' . "\n";
        echo '<title>' . ' <![CDATA[' . "\n" . $node->getTitle() . "\n" . ']]>' . '</title>' . "\n";
        echo '<link>' . ' <![CDATA[' . "\n" . 'http://' . $_SERVER["SERVER_NAME"] . te_link($node) . "\n" . ']]>' . '</link>' . "\n";
        $content = $node->getContent();
        $content->load();
        if ($content->get('intro')) {
            $intro = $content->get('intro');
        } elseif ($content->get('body')) {
            $intro = te_short($content->get('body'), 200);
        } else {
            $intro = 'no description available';
        }
        echo '<description>' . ' <![CDATA[' . "\n" . $intro . "\n" . ']]>' . '</description>' . "\n";
        echo '</item>' . "\n";
    }
}
echo '</channel>' . "\n";
echo '</rss>' . "\n";
Ejemplo n.º 10
0
check_user();
if ($url->get('action') == 'init') {
    if (isset($_SERVER['HTTP_REFERER'])) {
        $session->set('action', 'relate');
        $session->set('referrer', $_SERVER['HTTP_REFERER']);
    } else {
        trigger_error('no referrer found, cannot relate currently');
    }
}
if ($url->get('action') == 'relate') {
    $session->delete('action');
    echo 'I need to do a relation';
}
if ($url->get('action') == 'cancel') {
}
$source = $url->getObject();
debug($source, 'Source');
require_once ROOT . '/class/relation.class.php';
$out['title'] = 'Relations';
$relation = new relation();
$relations = $relation->getRelations($source);
if ($relations) {
    foreach ($relations as $relation_object) {
        $item['title'] = te_short(20, $relation_object->getTitle());
        $item['icon'] = $relation_object->getIcon();
        $out['relation']['data'][] = $item;
    }
}
debug($out, 'OUT');
debug($relations);
die;
        if (is_array($sibling_menu->getArray(true))) {
            ?>
								<?php 
            foreach ($sibling_menu->getArray(true) as $sibling_menu_item) {
                ?>
								<option value="<?php 
                echo $sibling_menu_item->getUrl();
                ?>
" <?php 
                if ($sibling_menu_item->isCurrent()) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo te_short($sibling_menu_item->getTitle(), 50);
                ?>
</option>
								<?php 
            }
            ?>
						<?php 
        }
        ?>
				</select>
				<div style="margin-bottom: 30px;"></div>
		<?php 
    }
}
?>
                ?>
">
										<?php 
            } else {
                ?>
										<img src="<?php 
                echo te_design();
                ?>
/sources/vignette.gif">
										<?php 
            }
            ?>
										<br/>
										<div class="vignette_title">
										<?php 
            echo te_short($sub_content->getTitle(), 25);
            ?>
										</div>
										</a>
										</div>
		
						<?php 
        }
        ?>
				
				<?php 
    }
    ?>
		
<?php 
}
            	<?php if ($sub_content_file): ?>
            		<div class="cover_intro">
            		<a href="<?php echo te_link($child);?>">
            		<img src="<?php echo $sub_content_file->getThumbnail(array('w'=>80, 'h'=>80, 'zc'=>1)); ?>"/>
            		</a>
            		</div>
            	<?php endif; ?>
            <?php endif; ?>
            */
            ?>
				
				
				
				<div class="intro">
				<?php 
            echo te_short($sub_content->get('intro'), 120);
            ?>
				<br/>
				<a href="<?php 
            echo te_link($child);
            ?>
" class="link_intro color100">Entrez &gt;</a>
				</div>
				<?php 
        }
        ?>
				
		<?php 
    }
    ?>
		</div>