I want to get a social networking site.

I want to get a social networking site.

Please give me quotes for same.

AJAX tips and tricks in Drupal 7

Hi there,

I've been very inspired by Earl Miles' advanced code examples:
http://www.angrydonuts.com/drupal-7-advanced-ajax-tips-and-tricks
Very good stuff !

What I would like to achieve:
When a user clicks on the ajax link, I don't want the ajax stuff to be triggered right away.

I want to process several tasks before:
- remove some html tags
- remove drupal throbber
- create my own throbber and place it in a very specific div...
- then trigger the ajax stuff

I tried to write some js based on Earl's example where he creates a custom event and triggers it later in the code.

My code works correctly except for the ajax stuff. :)
Nothing is triggered (no POST in the firebug console)

I can't figure out what is wrong in my code:

// Click on CTA button
Drupal.behaviors.CTAclickbutton = {
attach: function (context, settings) {

/**
* Use a class to bind custom behavior to a link. As it happens, the behavior
* if this link is nearly exactly the same as with "use-ajax". But instead
* we are ensuring that the throbber is active.
*/

$('.ctabutton-use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () {
var element_settings = {};

// Remove drupal throbber.
element_settings.progress = {};

displaying top five recent articles on front page

Hey guys,

I have a question and was wondering whether or not it would be possible. I would like to be able to display the five most recent articles on the home page. As of now I just have them all in the main page content block, but the only issue there is that all of them will display there rather than just the top five. is something like this possible?

Also, I was wondering if there was a way to aggregate all the articles on a single page other than the home page.

Thanks for all your help.

A few questions from a novice (but experienced) user.

Firstly, hello.

I installed drupal and it is running. I did the upgrade and somehow the site was protected (no deleted files) and manually updated.

I'd like to know if I will need to do this again, eg upload files or is there a web interface ie "browse" to a .zip file instead.

Administrative menus were disabled and I had to use update.php to get back and now half the text is times roman and half arial.

Is this to be expected or was the fault at your end?

Cheers

Problem Testing php scripts on a Drupal7-localhost environment

Hi

I'm learning Drupal 7 and PHP.
I installed Drupal on my Ubuntu pc (/opt/lampp/htdocs/drupal) and it's working OK, including the main test site, and another 2 independent sites located on "drupal/sites" folder.

As I'm also learning PHP, I want to run PHP scripts, but when I try to do that (example: typing localhost/mytest/mytest1.php), the browser is unable to solve it, and always takes me to my Drupal main test site.

So, why I'm unable to just run the php script without loading Drupal?

Thanks for helping,

Nelson C.

custom form validation function not called

Hi,

Trying to create a custom guest-login page for my site. But for some reason, the validate function was never called. (I placed a drupal_set_message statement to verify at the beginning of function). When submit button clicked, no message displayed even I did not enter anything for the input name value.

I don't care if the submit actually works or not, at this point, the validate function just not gets called.

Please help.

<?php
require_once DRUPAL_ROOT . '/' . variable_get('common_inc', 'includes/common.inc');
/**
* @file
* Custom sign in form
*/

/**
* Implements hook_menu() to set up the URLs (menu entries) for the
* forms.
*/
function ad_guestlogin_menu() {
$items = array();

$items['guest-login'] = array(
'title' => 'Sign In',
'page callback' => 'drupal_get_form',
'page arguments' => array('ad_guestlogin_form'),
'access callback' => TRUE,
'description' => 'Sign In',
'type' => MENU_NORMAL_ITEM,
);

return $items;
}

//////////////// Sign In Form //////////////////////
/**
* This form is used to replace the user login form
*
* @file
* function ad_guestlogin_form($node, &$form_state)
* This function is called the "form constructor function". It builds the form.
* It takes a two arguments, $form and $form_state, but if drupal_get_form()

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x