This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Flexinode improvements

Greetings,

I carefully read all threads about flexinode and found them very interesting. I also looked through flexinode 4.7 and noticed that my ideas may be usefull for it also. I recently implemented another theming idea for flexinode and would like to ask your opinion about it. Shortly, the idea - is to create a theme_ procedure for each content type. It will be very easy then to make a specific output for every content type. Since, flexinode is very good for e-commerce sites to create different product types with various fields (to cover the lack of attributes in e-com package), I found very convinient to have an ability to simply customize product pages and listing layouts.
I would like to share my ideas with community.

The idea is the following:
1. I patched flexinode_view with the following code:

$ctype = flexinode_load_content_type($node->ctype_id);
$node->body = theme('flexinode_'.$ctype->name, $node, $ctype->fields, $teaser, $page);

If theme_flexinode_{content type name} exists it will return the custom theming.

2. I am using content type name as an 'internal name', description - for 'visible name' (for menus and links), help text - for detailed description.

3. I also added an internal name column for flexinode fields to be able to refer them by name instead of ID.

Here is an example of such procedure created to display content type 'book_product':

assign multiple authors per node bounty

We need a module developed that will allow multiple authors to be assigned to each story node, please contact me with your infomation/ rates to develop such a module. We would like to move on this ASAP.

How add taxonomy dropdown to a flexinode?

Hi,

For my own node that I have made with Flexinode I want to add the taxonomy (category) dropdown menu that is used for pages and articles (when taxonomy is turned on). As far as I can understand, there are several types of fields you can add to a flexinode, but the connection to the site's taxonomy is not one of them.

Please advise.

Thanks!
Karl

hook_access - can't edit other users' nodes?

I'm trying to create a custom node type that supports two levels of user editing: one set of unrestricted-users can edit all of the node's contents, and another set of restricted-users can edit only a subset of the node's contents.

node + i18node solution without using aliases

What do you think about this code. This code makes possible to load different language versions of node without using path aliases.

For example:
we have node language versions:
node/10 - english (en)
node/11 - french (fr)
node/12 - german (de)

Now it will work so:
en/node/10 will load english version - node 10
fr/node/10 will load english version - node 11
de/node/10 will load english version - node 12

The code itself: [node.module]

---...---

// Retrieve the node.
$node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.*, u.uid, u.name, u.picture, u.data FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE '. implode(' AND ', $cond))));
$node = drupal_unpack($node);

// the new part
if ( $node->language != $GLOBALS['locale'] ) // comparing active language and node language
{
$translations = db_query("SELECT trid FROM {i18n_node} WHERE nid = $conditions[nid]"); // finding translations
$trid_ids = db_fetch_array($translations);
$trid_ids['trid'];

if ( $trid_ids['trid'] )
{
$node_translation = db_query("SELECT n.nid, n.language FROM {i18n_node} iln, {node} n WHERE n.nid = iln.nid AND iln.trid = $trid_ids[trid]");

while ( $node_lang = db_fetch_array($node_translation) )
{
if ( $node_lang['language'] == $GLOBALS['locale'] ) // If we found it - then reload the node info
{
$node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.*, u.uid, u.name, u.picture, u.data FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE n.nid = ' . $node_lang['nid'])));

Simple node module - attach a required file?

Hi,
I'm trying to make a module with a specific handling of a file, so I do not want to use upload module, thanks.
I've resumed my problem in a toto module, which is below. I've tried several things, without success. I have always a "toto file field is required.".

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions