PDA

View Full Version : vbList


elmuerte
02-20-2006, 12:29 AM
There's a new filestore2 entry added:

vbList (http://www.vbdrupal.org/node/28)



This module will allow you to list the latest couple of threads, including the first post, from specified forums within Drupal. It was intended as a "news" modules that uses a forum as source. It is not meant for content management.
A live demo of this module can be see at this site (http://www.magicball.net).
I wrote it to replace "node" as default front page module. vbCode used in the body of the first post will be parsed by vBulletin's engine, therefor all vbCode tags work as they would within the forum.
This module only works with vbDrupal and therefor isn't listed on the drupal.org site.

elmuerte
02-20-2006, 12:32 AM
Theming information
The entries will be displayed through the normal node display system, it will identity the entries as nodes of type 'vblist' Because it will use the node display system modifying the durpal_node template will also have an effect on this module. Eventhough it displays as nodes the entries do not use any other part of the node system, other Drupal modules that change the behavior of the node have no effect on this. Because of this the the '$submitted' field might be empty. See below for more about this.

The nodes are displayed by calling the theme function theme_node(...). The following entries are set for the node passed to this function:

type : always 'vblist'
created : UNIX timestamp of the thread creation
changed : UNIX timestamp of the last reply
title : the title of the thread
body : the body of the first post in the thread
uid : the UID of the poster
name : the name of the thread poster
sticky : true if it's a sticky thread
threadid : the ID of the thread
links : the array contains a link to the forum thread

In order for the news submitter, or thread starter, to be set I modified the theme_node(...) function. I changed the following:

$submitted = theme_get_setting("toggle_node_info_$node->type") ? array(t('By %author at %date', array('%author' => format_name($node), '%date' => format_date($node->created, 'medium')))) : array();

to

$submitted = theme_get_setting("toggle_node_info_$node->type")||($node->type == "vblist") ? array(t('By %author at %date', array('%author' => format_name($node), '%date' => format_date($node->created, 'medium')))) : array();

Dave|Xoxide
08-09-2006, 11:42 AM
Is it possible to have this module show on the frontpage of vBDrupal as a sticky along with any other content that I create for the site?
As opposed to it's own node page? This seems easy enough since other pages generated are nodes themselves.

elmuerte
08-11-2006, 10:15 AM
it's not really possible for the simply reason that they are not actual nodes, therefor the normal node modules doesn't see them.

Dave|Xoxide
08-11-2006, 10:50 AM
it's not really possible for the simply reason that they are not actual nodes, therefor the normal node modules doesn't see them.

Would it be possible to hardcode anything into the template that I am using?

It really is a great feature and would serve us well, but my understanding of the markup being used isn't that great so I haven't really been able to tear it apart and figure out what is doing what.

sifuhall
08-11-2006, 11:36 AM
Is it possible to have this module show on the frontpage of vBDrupal as a sticky along with any other content that I create for the site?
As opposed to it's own node page? This seems easy enough since other pages generated are nodes themselves.

You could replicate this with the front_page module and a php-mysql snippet.