ImageField not showing in CCK under Drupal 6 - drupal-6

I'm running Drupal 6.12 and I've installed the CCK, ImageField, FileField and ImageCache modules. I've create a new content type called 'Photo' and then click on 'Manage Fields', so that I can add an ImageField to this content type.
When I do this, ImageField isn't in the drop-down list. I've searched around and other people don't seem to be having this issue, so clearly I must be doing something wrong. I even created a new test site and installed just those modules from scratch, but I still get the same behaviour.
Have you had this? If so, I'd be really grateful to learn how you fixed it. I want to make a gallery of image nodes in Drupal and I thought this would be the perfect way to do it.

You need to first select "file" under the Type of data to store and then from the subsequent dropdown (a little to the right) you will be able to select "image" under Form element to edit the data.

ImageField uses a different API for Drupal 6, it is now based on FileField module (previously was Image API). So ImageField is now widget of FileField, which makes more sense.

Related

Drupal how to add a search filter to admin content page

I've never used Drupal before (development or managing content). I was asked to extend the admin content page to have a filter and simply don't know enough to get moving quickly.
Can anyone tell me if adding a search by text filter in the admin content area requires code or is there a CMS feature like adding a node for this task.
If code is required, is there something like a hook for this area? Not sure where to start. I will be investigating on my own but pointers to get me oriented to Drupal would help.
By default Drupal provides search mechanism ready to use. But there are also additional module which can improve search experience. You don't need any coding to use that search. You already have search form block ready to use.
Go to Structure -> Blocks and find block called "Search form". Now all you have to do is to put that block in some region and it will appear on front-end. Of course if it's not already styled by your theme it may be needed to put some extra CSS to make it look nice. There are also some template files which you can override and put some your HTML if you need.
There's also template file for search results page (which of course will work out of box also).
You may also need to create new block region if you want to place your form at some specific place, not covered by any existing region defined by your theme (easy thing to do!).
See https://drupal.stackexchange.com/q/30633/101329, the "Admin Views" module lets you configure the search form as you like.

Orchard Fundamentals

I am beginner to Orchard. My purpose of starting this discussion is, to make beginners aware about Orchard Fundamentals.
I am currently Developing on web site using Orchard. But most of the times I am facing difficulty in rendering contents and how to place content on front end. As well, use of content items, content types and modules. Usually, I get confuse in using all these things. For example : I have created new content type for displaying latest post on my site, with date and user's profile picture. So for that my question is, "Is it right that I have created content type for it? or should I have to make module? and if yes than can I use my content type as a widget on my homepage? "
FYI: I went through the documentation and plural sight's video. But I was not able to clear above fundamentals.
Sorry for any inconvenience or any stupid questions, but at this time it seems bit complex for me. Can anybody please help me to clear my fundamentals of orchard?
Thank you,
Sohil Shah
I am currently Developing on web site using Orchard. But most of the times I am facing difficulty in rendering contents and how to place content on front end. As well, use of content items, content types and modules. Usually, I get confuse in using all these things. For example : I have created new content type for displaying latest post on my site, with date and user's profile picture. So for that my question is, "Is it right that I have created content type for it? or should I have to make module? and if yes than can I use my content type as a widget on my homepage? "
Is it right that I have created content type for it? or should I have to make module?
Sure, a ContentType just means that you can create instances of that specific type through the CMS.
or should I have to make module?
Do you want to re-use your contenttype across different projects? If so, then you should create code that creates the contenttype for you (in a migration script) and put that in a module.
can I use my content type as a widget on my homepage?
Yes, you need to enable your contenttype to be a widget. You can do this also with a migration script like so (add the WidgetPart and settting Widget stereotype:
ContentDefinitionManager.AlterTypeDefinition(
"MyWidget",
x => x.WithPart("WidgetPart")
.WithSetting("Stereotype", "Widget")
);

Orchard Module Override a Field Driver

Hello fellow Orcharders!
I'm not sure if what I want to do is possible, but I want to override the Driver for a single Field in the Module I'm writing.
The Field I want more control over is the Content Picker field. Basically I want the Content Picker to load the shapes for their respective content items. I've looked at Sipke's Content Picker Widget for an example on how to load shapes, however I'm unsure of the best/recommended approach to implement something similar in my module.
I have the Content Picker Field attached to my Content Part, and the default Content Picker comma list of Content Item titles appears as expected. I have tried to define an Alternate in Placement.info, but I can't load the Content Item shapes from within the Alternate view.
Presumably, as per Sipke's example, these shapes need to be built in the Driver and passed along. If this is correct thing to do, how could I do this in the most Orchard-y way with minimal "hacks". Looking into the debugger, I could "hack" my way to the Field I need in my part's Driver; but the module I'm building will be reused in the future by people unfamiliar with it, and if they start adding/deleting Fields from the Content Part, I'd like everything to behave accordingly!
Of course, if I must take the "hacky" option, I'm willing to do so, but only after I've exhausted all other options. This is my first module, and I've learnt an incredible amount along the way, and I'm really trying to learn the "right" way to build an Orchard Module as best I can.
Thanks in advance!

Change the way a node is displayed in drupal

I am using drupal 6. I created a content type called 'Mobile' using CCK and added content for it. I want to change the way the content is displayed to the user. How do i do this.
Currently looks like this. I want to play around with the fields in this only for this content type. How do i do it and can i do some work around with the form of the mobile content type.
Questions like "teach me how to walk"
You need to learn Drupal theming system. you can get general idea http://drupal.org/node/17565 and by looking at node.tpl.php from your theme - that's for the beginning.
P.S: as far as I see from your other questions, you didn't tried to search in the web for this.

Customizing the "Upload Document" Form in SharePoint 2010 based on Content type

When you click on the name of a library, go to the documents tab, click on "upload document".
An upload form appears that is created using the dialog framework. The 1st choice on the form is content type.
I need to instead launch a custom infopath form that will allow me to dynamically populate a 2nd dropdown box on the page after the content type (still 1st) dropdown is populated.
I feel like I'm really grasping at straws here. At this point I could use a reference to a relevant section of a book, a link to a relevant post or even just the correct terms to put into a google search. What is the correct name for that form?
I found this which seems to teach you how to insert a customized aspx form: http://microsoftsharepointandbeyond.blogspot.com/2009/10/customizing-ootb-sharepoint-forms.html
But I'd really like one that uses Infopath instead.
Any advice or direction you can provide would be greatly appreciated.
I'm pretty sure doing this with infopath is not possible, the forms are bound to a (codebehind) class in the SharePoint object model, which handles the actual upload (add to list, set field values etc. etc.).
A custom aspx page would be possible though, exactly as the post you mentioned descibes. I agree with the post's author that an HttpModule would be best, because:
editing the OOTB upload.aspx in the 14 hive would make your environment unsupported (i.e. if anything brakes, MS will have you revert your farm to a supported state before they come and help you.
The next time you install an update for sharepoint, your changes could be overwritten.

Resources