CVS edit link for harijari

Description of module:
The module "single_field_viewer" is simple module, which allows user to present selected CCK field on dedicated page.

User can select (in node type configuration), which fields can be displayed on separate page. Rendered HTML code depends on template. User can create template for specific field or specific field assigned to node type.

Motivation behind this module:
This module was created to solve such problem: We wanted to display images on videos on separate pages. It was important for us because SEO policy. We considered two ways: using images as separate nodes and using nodereference fields or using images as node fields. Our experiences with image as node policy were bad, because large count of image nodes leads to performance problems (in one of our project we have over 250 000 image nodes).
This module allows to display in this way all CCK field types. It's not constrained to imagefield or emfield.

Duplication:
I haven't found module with similar functionality.

Motivation behind publishing this module:
This module is quite simple piece of code, but I thing this could be usefull. More users => more feedback => Better quality of module :)

Comments

jsobiecki’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new3.01 KB

Added module code.

avpaderno’s picture

Issue tags: +Module review

Hello, and thank you for applying for a CVS account. As per requirements, the motivation should include a description of the module features (more than two sentences).

avpaderno’s picture

Status: Needs review » Needs work
jsobiecki’s picture

Status: Needs work » Needs review

Module description:
Module has implements one feature. Site administrator can select CCK fields. For each of selected field type,
under path in form node/%node/field/{field_name}/{delta} field value will be displayed. HTML code is based on phptemplate templates. Templates can be created on field name level, or on field name in specific node type.
This module was designed as solution for browsing photos on site, which are stored as CCK fields. We needed to display all photos on separate pages.

jsobiecki’s picture

StatusFileSize
new9.87 KB

I attach upgraded module. I added support for pathauto and tokens modules. I wrote README file. This is a description of module:

This module allows CCK fields to be displayed on separate pages. Site builder
can select fields, which will be used in this way.
For each field assigned to specific node type, themer can prepare proper templates.
If you are using pathauto module,
this module allows to create path patterns for each of fields displayed in
this mode. This module implements also basic support for tokens (built-in
support for imagefield and emvideo title and description attributes).
Fields inherit view access right from node, so if node is unpublished or
node access denies viewing of node, CCK field will be inaccessible as well.

This module was created in order to replace old approach of media handling used
at our websites (it was image as node approach and nodereference as glue between
parent nodes (like articles) and child as images). In our case it was big impact
for performance (we got over 300 000 image nodes for only 70 000 "parent nodes")
This solution is quite lightweight (it doesn't requires views) and uses cck
content cache, so it works really fast.
This solution has some disadvantages. CCK field is not powerful like node, so
you cannot do many things like comment such nodes and do other thins.
But if you need to display fields on separate pages, with various layout. If you
need some basic support for tokens and pathauto, this module might serve you well.

jsobiecki’s picture

Do I have to prepare any additional information? I hope now everything is complete :)

uday4ru’s picture

Component: Miscellaneous » miscellaneous

warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/XXX/public_html/XXXX/sites/all/modules/single_field_viewer/single_field_viewer.module on line 221

can u plz help me where it is going wrong. i need something like this ofr my website.

avpaderno’s picture

Component: miscellaneous » new project application
jsobiecki’s picture

@uday4ru

Ok, I will check this warning message and fix it. It should be done this week.

uday4ru’s picture

Thanks Sir , i,am waiting for patch. I whant seo friendly images which google can index links. This module is best method to do it.

jsobiecki’s picture

StatusFileSize
new5.21 KB

@uday4ru

This version shouldn't generate reported warnings.

uday4ru’s picture

Thanks for update , now error is not displaying , But i,am not able to make it work as i,am new to drupal.
http://udaymovies.com/ , i have installed modules and in cck node types i cheked it and i got

"Please select fields for which single field value can be displayed on separate page. If enabled, field value will be displayed at node/%nid/field/%field_name/%delta"

now after this how to check module is working? . what i have to type in place of delta. my plan is when users click on uploaded images it should open in page.

thanks

jsobiecki’s picture

@uday4ru

Lets assume that you added CCK imagefield "field_article_image". %delta is order number of cck field value. (CCK field values are stored in database in deterministic order)

So, if you added article with set of few (lets say 3) images at field_article_image, you can display them on separate page under
node/%nid/field/field_article_image/0, node/%nid/field/field_article_image/1 and node/%nid/field/field_article_image/2.

If you need SEO friendly urls, you need to configure pathauto module (this is explained at README.TXT)

Last important thing:
I found documentation bug (missing section in README.txt, i will fix it later)
In order to display those values, you have to prepare template for those values. Proper template names are
single_field_viewer.tpl.php
single_field_viewer-{field_name}.tpl.php
single_field_viewer-{nodetype}-{field_name}.tpl.php

You can use single_field_viewer.tpl.php as generic template (you will find available template variables there)

Ok, I hope it will help :)

avpaderno’s picture

Status: Needs review » Postponed

Please read all the following and the links provided as this is very important information about your CVS Application.

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:Migrating from CVS Applications to (Git) Full Project Applications.

  • If your application has been "needs work" (or "postponed (maintainer needs more info)"), your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
  • if the status of this application is a different one, it will be changed to "postponed"; you will be able to reopen it by following the instructions in the above link.
jsobiecki’s picture

Status: Postponed » Needs review

I added experimental project: http://drupal.org/sandbox/harijari/1125692

Now I'm waiting for review of project ;)

jsobiecki’s picture

Project: Drupal.org CVS applications » Drupal.org security advisory coverage applications
Component: new project application » module
sreynen’s picture

Title: harijari [harijari] » Single field viewer

Updating title.

jsobiecki’s picture

Nobody interested in review?

jthorson’s picture

Priority: Normal » Critical

Updating issue priority, as per the new application priority guidelines.

grendzy’s picture

Status: Needs review » Reviewed & tested by the community

looks ok to me.

greggles’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, harijari! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Issue summary: View changes
Issue tags: -Module review