php query to grab the first 3 blog posts?

php query to grab the first 3 blog posts?

I want to know in drupal 7 how to grab the first 3 blog posts and snippet of it, I do not want to use block or views since this will be embedded with other content along side it.

Problem while using the user_reference field in my bundle

Hi, I am creating an entity for my D7 Module and trying to include a user_reference auto-complete field in it. I am using the References module for this purpose. The autocomplete-field shows up correctly with the add-more option since I have set cardinality to unlimited.

However, nothing shows up in auto-complete suggestions and it doesn't accept any of the user-instances.

Even more annoying is that when I go and check the field settings in
Home » Administration » Structure » Content types » » Manage fields
and click on Save without making any changes, the suggestions start appearing correctly as they should.

I have written down the following settings for the field and the instance.

field :

'vocabulary_authors' => array(
      'field_name' => 'vocabulary_authors',
      'type'        => 'user_reference',
      'settings' => array(
        'referenceable_roles' => array('2','3'),  // for authenticated user + administrator
        'referenceable_status' => array('1'),    // for active
      ),
      'default_widget' => 'user_reference_autocomplete',
      'default_formatter' => 'user_reference_default',
      'cardinality' => FIELD_CARDINALITY_UNLIMITED,
    ),

instance :

'vocabulary_authors' => array(
'field_name' => 'vocabulary_authors',
'label' => $t(' Authors'),
'bundle' => 'vocabulary',

in the drupal module views how do I see the php code?

in the drupal module views how do I see the php code?

I have created a view but I really want to see the php code behind it how do I do that?

Image gallery, based on files, not nodes

I already searched for this, but didn't really find a good solution.

I have from some events a lot of pictures, which I want to show (in a grid).
I want it to show all pictures (thumbnails) that are in a specific folder, so not based on nodes.
Is there a way to do this?

If nodes is the only way to go, what is the best option. (I don't feel like registrating each image separately, because its about 200 images).

thank you!

Remove "Content Feed" from home page

Hello,

When I installed Drupal, my home page was set as an editable page. In the site configuration section, I removed "Node" from the URL. My front page then turned into one feed block. My sidebars and other blocks will no longer display.

I tried adding "node" back into the box, but it will not save. When I click "Save," the page refreshes, but the box is still blank. Just trying to figure out how to get my home page back to normal! Thanks!

Display login and form errors only

building my own theme with panels and precision and i dont know how to make it so the boxs not only turn red but it also says what the problem is.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x