Has Post By Comments Order Been Fixed?

Drupal forums. Has the post by latest post by date to oldest been fixed? Drupal 6 had the option, what happened with Drupal 7? Does Drupal 8 have this?

newbie: field_create_instance() trouble formating

Hi

I am trying to create a custom type, and set up the type so that when a user creates/edits my type, the edit form display the content nicely with default values, descriptions, label inline, ... for the life of me I can not figure out how to get this to work? I read the doc for

http://api.drupal.org/api/drupal/modules--field--field.crud.inc/function...
http://api.drupal.org/api/drupal/modules--field--field.crud.inc/function...

They basically say read
http://api.drupal.org/api/drupal/modules--field--field.module/group/field/7
this page is very abstract. I can not figure out what keys are support for which widget types

I found
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....
how ever I do not understand the syntax to use in my install hook?

Any idea how I can identify array keys that are incorrect?

Any comments or suggestions would be greatly appreciated.

Andy

<?php
function bdc_graph_install() {
node_types_rebuild();
$types = node_type_get_types();

// I do not have a body

foreach (_bdc_graph_installed_define_data_members() as $field) {
field_create_field($field);
}

// create all the instances for our fields
foreach (_bdc_graph_installed_instances() as $instance) {
$instance['entity_type'] = 'node';

How to change or set the path of an Image to a File

I have created a content type that allows users to upload a PDF File (Brochure) and an Image (Brochure Cover). So I have two fields (field_brochure and field_brochure_cover).

I'm trying to find the best method to set a link to the file from the image.

My only attempts have been modifying the template.php file. I first attempted to update the description of field_brochure to include an 'img' tag, i.e.:

  if (field_get_items('node', $vars['node'], 'field_brochure_cover')){
    $cover = field_get_items('node', $vars['node'], 'field_brochure_cover');
    $cover_path = $base_path.conf_path().'/files/'.file_uri_target($cover[0]['uri']);
    if(isset($vars["page"]["content"]["system_main"]["nodes"]) && count($vars["page"]["content"]["system_main"]["nodes"]) == 2){
      $keys = array_keys($vars["page"]["content"]["system_main"]["nodes"]);
      $field_brochure = $vars['page']['content']['system_main']['nodes'][$keys[0]]['field_brochure'][0]['#file'];
      $field_brochure->description = "<img src=\"".$cover_path."\" />";
    }
  }

But, this placed the HTML in the output, converting the characters to html entities.

I also set the Image (in Manage Display) to "Link image to: File", and then attempted to change the path of that link:
<?php

Rendering entire field as raw html inside syntax highlighter

I'm looking for a way to output a text field's html content using a syntax highlighter, after that field has been run through it's text filters.

The point of this is that my users can use a WYSIWYG editor to create content. The text filter will then strip out all the ugly html and css they may have included. Using the syntax highlighter they can then see their cleaned up html. Then they can copy and use that cleaned html on other websites or in email blast.

Aggregator of D7.2 not allows CSS formating

Hi,
I wanted to add to my site news from anther site, so i made a new element in aggregator module but news form another site contains a same formating in CSS. I want to use this formating but i cannot find how disable filtering CSS. Only what i find is a list of html tags but this is not enough.

For example: in news is a picture and file with this picture is big but css formating making it small. So if css formating is disallowed the picture destroys layout of my site.

How disable filtering of css formating in Agregator?

Full width image slider

Hi there,

how do I create this kind of slider. http://www.operaliege.be/

I tried embedding the code (divs and the background images) to the page.tpl.php and I have also added jquery.cycle link and the function to the top of the page, but the slider doesn't work.

i have drupal 7

any help is much appreciated. thank you.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x