As requested by Rick_Deckhard here's a temporary support thread for the FlexiMAX patch for flexinode.module.

The current status is:

  1. it's being updated to Drupal 4.7 at the moment and will be submitted as a patch for flexinode.module once the other issues about those extra DIVs is sorted.
  2. Kiev1 has updated his version to 4.7 if you want to try it out/test
  3. the original thread has become too long, so post your messages/questions up here<.li>

Cheers

Dub

about flexiMAX

It's based on code that Kiev1.org has pulled together and I have uploaded a simple patched version of flexinode.module (4.6.x) to my sandbox.

The key functionality of the patch is as follows:

  1. Allows users to very simply and easily customise the way teasers and full nodes are displayed for each flexinode type from within Drupal.
  2. The Fleximax patch strips out the $node->flexinode-n fields an replaces them with simple to use {n} fields you can insert within custom HTML code to get very flexible with your layouts.
  3. The interface is illustrated in this screenshot. You simply go to ADMINISTER -->> CONTENT -->> CONTENT TYPES and click on the appropriate EDIT CONTENT TYPE link to customise the layout.
    The fleximax patch automatically generates a list of flexinode fields for you on that page, so it makes it very simple and intuitive to use.

I have been using it for a few days and I have found it very useful to the point that I think it might be a good addition to the core flexinode.module.

Click to download the fleximax patch of flexinode.module
(it's very easy to install if you already have the fleixnode.module installed. Full installation instructionsare included in the readme.txt in that folder)

Screenshot of the fleximax patch interface and a good illustration of how it works

The nice thing about the patch is that it will work with all template engines. Discussions on this topic tend to be centred around phptemplate based themes.

I've tested it in drupal 4.6.x and it works well. So you can use as is if you want. I hope that helps other newbies like me who found it tricky to pull together override files.

I have called it fleximax.module in the sandbox to avoid confusion with people searching for the proper flexinode.module. It is not intended as a new module but as a patch for flexinode if people find it useful and if JonBob (flexinode.module maintainer) deems it worthy of inclusion.

Comments

mr.deke’s picture

Hello,

I've been playing with flexinode and I'm hoping that flexi-max will help me solve a problem. Say I have ten nodes, all in the category "food." When I click "food," it shows me the teasers for the nodes in that category. But they're a vertical list. I want the teasers to all show up in a table/gallery format so that many more can be shown without having to scroll.

My nodes consist of a title, a description, and an image. So I'd like the teaser to include just the title and image. That should display nicely in a gallery-style format. Is there a way I can modify the "fleximode teaser" layout to end up showing up like that?

Thanks!

venkat-rk’s picture

You can get a table view for any of your flexinodes by visiting www.yourdomain.com/flexinode/table/flexinode-id where flex-id is a number. You can get the id by hovering the mouse over the 'Edit' button of your flexinode content type. For a nicer url, you can alias flexinode/table/flexinode-id to whatever you want at administer>>url aliases>>add alias.

To control what appears in the table view, just remember to check the checkbox for each field you add to your flexinode content type.

alexmc’s picture

but I cant have taxonomy items appear in this table, right?
Do you know of a way? I am scarily thinking of having flexinode/fleximax fields which are copies of the taxonomy terms :-(

hadishon’s picture

I think I'm looking for a simular thing.

I would like my visitors to be able to view a listing of taxonomy in which all nodes are a flexinode in tabular view (that is sortable).

I think I might be able to get something to work combining views.module and FlexiMax but, haven't figured out all the quirks yet. I have a few ideas. I'll let you know if I come up with something that works good.

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

forresto’s picture

from what i understand flexinode + views modules will do what you want once drupal and both of those modules reach 4.7 final

mr.deke’s picture

That's interesting. But it's just a table. It doesn's show all the information.

Each of my nodes has a picture, for example, that doesn't show up in the table. I would like to the flexinodes to show up in a photo-gallery format with just the photo and title.

StevenSokulski’s picture

I am attempting to use an image in FlexiMAX and there seems to be something wrong with that functionality. Or possibly something wrong with my site...

Let me know if anybody is able to use images in their Flexinodes with FlexiMAX operating.

Also, the {array} command is the default for the body, yet it just returns the text {array}.

alexmc’s picture

I think that {array} just doesnt work.

I suggest you look into theming the fleximax node using template files. You'll thank yourself for learning it :-)

If you dont want to do that then try replacing {array} with the sort of format used for the teaser above - but use all the fields you want to see.

If however you dont like the extra div tags which fleximax puts in then you will need to learn how to theme it instead.

goodluck

StevenSokulski’s picture

Are you saying the DIV commands that FlexiMAX adds are causing my issues with the images? I'm not sure I know what you mean by template files. Can you point me to where I could find out more info on this?

Shoshanna’s picture

I would love to use FlexiMAX for the site I am currently building. But I am having some of the same issues that others have had. The host I use has PHP 5 and while running the standard Flexinode module I never got the array_merge and implode warnings in the Settings -> Flexinode page. When I upgraded to FlexiMAX I did get those errors. Updating the module via the instructions on this page fixed that error. However it is still not working like it should (I think). I am trying to create a node type that contains these fields...

FlexiMAX Teaser:
Image
Text Area (named teaser)

FlexiMAX Node:
Image (same as in teaser)
Text Area (named information)

It seems to work but when I go to the edit content type page it only lists the text area content type on the node section and NOT the image type as well, like it should be. When I view a node created with this node type the picture shows up like it should in the teaser. But it does not show up in the node view:(

I am still a newbie at PHP but I am a quick learner. So if anyone has any information it would be greatly appreciated.

I am using Drupal 4.6.5 and version 1.8 FlexiMAX Module

Thanks in advance,
Shoshanna

forresto’s picture

I want all of the information in my rss feed, but abbreviated versions in the teaser. Will this be possible with fleximax?

forresto’s picture

Full versions in RSS can be done in 4.7 with admin/settings > RSS feed settings > Full text

ardas’s picture

Greetings,

I carefully read all threads about flexinode and found them very interesting. I recently implemented another theming idea for flexinode and would like to ask your opinion about it.

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.

My idea is not to make cool interface to customize node's layout without accessing the code. I thought that newbies won't do it and for professionals it may be not enogh.

In my case, there is almost no changes in the code and there is a flexible way for developers to customize node's layout by creating a module with theme_flexinode_xxx procedures. Here is an example of such one:

function theme_flexinode_book_product(&$node, &$fields, $teaser, $page)
{
	// field IDs
	$BOOK_IMAGE		=	"flexinode_". $fields['image']->field_id;
	$BOOK_AUTHOR	=	"flexinode_". $fields['author']->field_id;
	$BOOK_YEAR		=	"flexinode_". $fields['year']->field_id;
	$BOOK_PUBLISHER	=	"flexinode_". $fields['publisher']->field_id;
	$BOOK_ISBN		=	"flexinode_". $fields['isbn']->field_id;
	$BOOK_PAGES		=	"flexinode_". $fields['pages']->field_id;
	$BOOK_COVER		=	"flexinode_". $fields['cover']->field_id;

	if ($teaser == 1) {
		$desc	= $node->teaser;
		$image	= dirname($node->$BOOK_IMAGE->filepath)."/".IMG_THUMBNAIL."/". $node->$BOOK_IMAGE->filename;
	} else {
		$desc	= $node->body;
		$image	= $node->$BOOK_IMAGE->filepath;
	}
	$desc		= /*t("Description").*/"{$desc}";
	$image		= (!empty($node->price)) ? l_html(theme('image', $image, t('view product'), t('View this product details')), "node/".$node->nid)/*."<br/>"*/ : "";/*, 'class="picture"'*/

	$author		= "<label>".t("Author").":</label>&nbsp;". $node->$BOOK_AUTHOR;
	$publisher	= "<label>".t("Published").":</label>&nbsp;". $fields['publisher']->options[$node->$BOOK_PUBLISHER]. " (". $node->$BOOK_YEAR. ") ";
	$isbn		= "<label>".t("ISBN").":</label>&nbsp;". $node->$BOOK_ISBN;
... etc ...

What do you think about it ?

ardas’s picture

Why I prefer this solution ?

I'm widly using flexinode and very interested in its success. My main are of development is e-commerce solutions.

I'm using flexinode to create different types of product with their own attributes.

E-commerce solutions extremely need such ability as well as ability to customize output for each product type. I found that there is no need to often change this output (may be 1 time in a year) but I need all abilities of PHP and Drupal API in my product node output (I need to access prices, shopping cart, flexinode fields, any other parts of my site, etc.)

So, my way is a 'flexible way for developers to customize output'.

Of course your may is more powerfull and I think it may be better to leave it but you may find my idea of using internal names for nodes and fields access more flexible than

beautyblog’s picture

I am wondering if any thought has been given to expanding the flexibility of this patch to use the forms API to trigger different form functions.

For instance: a check box and value box for 'text field' and 'text area' to allow for limiting the text to a certain number of characters.

I think this funtionality would be very useful for a lot of different user generated content types.

thanks - Brandon

hadishon’s picture

The first post in this thread states that "Kiev1 has updated his version to 4.7." Is it still up-to-date with CVS 4.7? Does it have any problems? Anyone have success with it on 4.7?

Thanks,
Michael
2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

forresto’s picture

but when i tried it didn't seem to work

Jazzer’s picture

I'm a newb to Drupal and compared to other CMS' I've tried it does have a steep learning curve but I'm impressed with what it can do (once you work out how to do it!) Anyway, a quick question about FlexiMAX. How do you stop it inserting unwanted breaks inbetween fields? I've got a nice table-like CSS format that's rendered all but useless because of this.

sami_k’s picture

okay, to get back to a topic i started a while back and then didn't comment on... how to get content for the block... you need the following function that uses the path to get the nid... then you can load the node and pretty much output whatever you want in the node to the side block. something similiar should be in the core, but with chx's plans with changing the path I don't know if this code will work in future versions. So using this code and a bit in the admin interface you could create some interface to allow creation of a block based on the content of a fleximax node.

function _getnid(){
    $path = drupal_lookup_path('source', $_GET['q']);
    if($path == false){
        $path = $_GET['q'];
    }
    $pathvars = explode('/', $path);
    if ($pathvars[0] == 'node'){
        $nid = $pathvars[1];
        return (int) $nid;
    }else{
    	return false;
    }	
}
danethomas’s picture

I'm running 4.6.5 and php 4 and when I install this I can create the content type, but when I actually go to create - content - my flexinode content it lets me fill in the title but then just has the words 'array' (withouth the ' ') for each content type i have added.

Any ideas how to get this working?

I did some further searching and found some threads on issues with images and flexinode (one of my content types is an image) but even after removing that it still displays this error.

Dublin Drupaller’s picture

I'm using fleximax in a 4.6.5 sites..so I'll have a quick look to see why that might be happening to you.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

danethomas’s picture

I just tried it in my hosted webserver and got the same problem.

danethomas’s picture

I did a file compare on the fleximax and the flexinode and that that the function flexinode_invoke_all() was quite different. I did some more searching and found this http://drupal.org/node/21673

If you fix that code up in the fleximax module it works now.

I assume this should be updated in the CVS.

danethomas’s picture

I tried to upgrade my testing server today and followed the upgrading instructions in the install file.

One of the mysql entries didn't seem to work. I manually ran

ALTER TABLE `flexinode_data` ADD field_descr varchar(255) NOT NULL default '' ;

and everything appears to be working ok.

danethomas’s picture

While the upgraded fleximax nodes displayed ok there is no way that you can add new nodes in the 4.7 version.

When you add fields they are recorded into the DB but they aren't displayed.

Has anyone been able to get fleximax working with 4.7?

FFred’s picture

I'm looking into fleximax as the engine to make a small database of sailing courses inside a non profit sailing school website.
I'll probably have to change the <div> to <span> in the module though to make it simpler to theme.

I'm also wondering if there could be a way of having some sort of basic theming selection in the fleximax document creation interface, at least regarding the structure of the theme, maybe along the lines of "should this be a block or inline?"... I'll see if I can come with any bright ideas there.

Next I'm going to have to poke at flexisearch. There doesn't seem to have been much work done there so far :(
I need it to be able to use more complex forms (either related to what's in the corresponding flexinodes or more constrained, such as single choice drop-down menus for multi-choice lists) and if possible make it useable as a sidebar block.