Hola por aqui

... tengo un problemita que no acabo de encontrar la forma de darle solucion. El caso es que tengo un proyecto basado en Drigg, entonces tenemos una parte en el sidebar en la que queremos mostrar los titulares de los articulos publicados, pero en forma de pestañas, que es algo bien usado ahora por su facilidad y rapidez de navegacion, esta parte ya la tenemos resuelta con jquery y css, el problema es es que para mostrar los tipos de menu (Publicados, Subiendo y Archivados) drigg lo hace llamando la funcion
drigg_ui_type_menu():
Código php:
Ver original<?php
if ($page == 0 && module_exists('drigg')) {
print drigg_ui_type_menu();
}
?>
Asi, se genera una lista en html que muestra el menu y ademas, los articulos que esten en el menu activo (
class="active")
Código html:
Ver original<ul class="drigg-viewtype"> <li class="active"><a class="active" href="/">publicado
</a></li> <li><a href="/upcoming/newest">upcoming
</a></li> <li><a href="/archived/newest">archived
</a></li>
Esto como es logico lo puedo controlar con un poco de CSS y jQuery para crear las pestañas.
Ahora es cuando se me complica el
inning, la funcion en el modulo que me controla esto es esta:
Código php:
Ver original<?php
/**
* Returns the top menu ("published", "upcoming", "archived")
* This function ALSO preservs all of the links, whenever possible.
*
* @return
* The top menu
*/
function drigg_ui_type_menu() {
$output = '';
$selected_string = ' class="active" ';
$p0 = arg(0);
$p1 = arg(1);
$p2 = arg(2);
// This will make sure that even the home page will work OK
if ((arg(0) == 'node' || arg(0)== variable_get('drigg_home_name', 'drigg_home') ) && arg(1) == '' ) {
$p0 = 'published';
$p1 = 'newest';
}
// This will make sure that even /Section works fine
if (drigg_is_section_valid( $p0 ) && $p1 == '' ) {
$p0 = 'published';
$p1 = 'newest';
$p2 = arg(0);
}
// This avoids doing anything if the URL is incorrect
if ($p0 != 'published' && $p0 != 'upcoming' && $p0 != 'archived') {
return '';
}
// Hide the "archived" menu entry, UNLESS you _ARE_ in "archived"
if (variable_get('drigg_hide_archived_menu', FALSE) && $p0 != 'archived') {
$items = array('published', 'upcoming'); }
else {
$items = array('published', 'upcoming', 'archived'); }
// For each item, prints it, but with a twist...
// At this point, things are "normalised". So, no matter what,
// the format is for example published/top24h/Community or
// published/top24h
foreach ($items as $item ) {
$selected = '';
$pp1 = $p1;
// Mark it as selected if it's the same as the current one
if ($item == $p0) {
$selected = $selected_string;
}
// Last minute change: you can't jump from 'published/top24h' to
// 'upcoming/24h'!!! So, if things are not right, fix them on the
// spot. From now on, $pp1 needs to be considered, rather than
// $p1
//
if ($item == 'upcoming' || $item == 'archived') {
if ($p1 != 'oldest' && $p1 != 'mostpopular' && $p1 != 'leastpopular') {
$pp1 = 'newest';
}
}
if ($item == 'published') {
if ($p1 != 'top7days' && $p1 != 'top24h' && $p1 != 'top30days' && $p1 != 'top365days') {
$pp1 = 'newest';
}
}
// If the link is going to be /published/newest, then change it
// last minute to just /
if ($item == 'published' && $pp1 == 'newest' && $p2 == '') {
$link = drigg_ui_home_url();
// Otherwise, business as normal
}
else {
$link = "$item";
if ($pp1 != '') {
$link .= "/$pp1";
}
if ($p2 != '') {
$link .= "/$p2";
}
#$link="/$item" . $pp1 != '' ? "/$pp1/$p2" : '';
}
// NOW that link is set, I will add the Drupal's root to it
// in case there is one
//
#$bp = base_path();
#if ($bp != '/') {
# $link = substr($bp, 0, -1) . $link;
#}
$output .= "<li $selected><a ". $selected .' href="'. url($link) .'">'. t($item) .'</a></li>';
}
return "<ul class=\"drigg-viewtype\">$output</ul>";
}
?>
Lo que necesito es lograr que me genere tres listas y me muestre todos los articulos, independientemente del tipo que sea... algo asi:
Código html:
Ver original <li><h3><a href="#pub" title="Publicados">Publicados
</a></h3></li> <li><h3><a href="#sub" title="Subiendo">Subiendo
</a></h3></li> <li><h3><a href="#arch" title="Archivados">Archivados
</a></h3></li> <div class="block_content"> <ul class="active_type current" id="pub"> <ul class="active_type" id="sub"> <ul class="active_type" id="arch">
Y no se como hacerlo...


Alguien allá afuera con un alma caritativa que me ayude?