saadlulu
  • Member for 10 years, 4 months
  • Last seen more than a month ago
  • Jordan
How can you sort taxonomy terms based on number of times used, in a view?
9 votes

Create a new view limit to taxonomies "show taxonomies of term all" Add a relationship "Taxonomy term: Content with term" Use aggregation Add field "Content: Title" Aggregation type "Count" Change ...

View answer
View of users flagged by a user, users flagging a user, and nodes from users flagged by a user
4 votes

Better late than never, To get your followers of fans you can: create a view of type users. create a relationship Flags: User's flaggings. now this is were most people go wrong you should remove "...

View answer
No access stats for user after registration
4 votes

Usually a state "never" means that the user has registered but they have never logged in with their username/password

View answer
db_select() which selects nodes which have a certain term
Accepted answer
3 votes

You have to use the Join statement; what you basically need to do is joining your query with another from another table. Here is an example that you can use. $query = db_select('file_managed', 'fm');...

View answer
How to prevent views from loading the results upfront
3 votes

Edit your view and click on advanced to reveal more options in the Exposed form block click on Exposed form style - basic click on the option "input required" You're done.

View answer
prevent drupal from redirecting to created nodes
Accepted answer
3 votes

You can use rules to achieve this easily, here: Add a new rule and give it a name. Event: After saving new content Conditions: Content is of type - and chose your content type you want this rule ...

View answer
vote for users on drupal7
3 votes

You can try to add fivestars module to your website, but then your users will be voted with stars instead of flags. If you dont mind that you have to: install fivestar module add a field on your ...

View answer
How can I count the number of nodes submitted by the current user?
3 votes

You can use the Views module to do this. Create a new view Remove sort options, fields and other default settings Add a field for "Content: Type" Expand the "advanced" part on the right and set "Use ...

View answer
How do I display tokens in a block using PHP code?
2 votes

I dont recommend using PHP in a block for many reasons. I would recommend you to use proper implementation of hook_block_view and hook_block_info to do you custom PHP codes in there.

View answer
How to deal with someone trying to login as admin?
2 votes

What are you asking for is not logical if you mean removing or preventing access to /user page. If you manage somehow to prevent that page, how are you going to access it? Plus Drupal already ...

View answer
Locked out of my local site after transfer
2 votes

well you can first drush upwd --password="yourNewPassword" UserName to reset your password. then you would need to remove the attempts so you can try to login again, you need to truncate the table ...

View answer
How can I hide the Organic Groups Audience selection?
2 votes

You can set #access to FALSE to hide elements like this: /** * Implements hook_form_alter() **/ function yourModule_form_alter(&$form, &$form_state, $form_id) { switch ($form_id) { case '...

View answer
How to get last X contents
2 votes

You can use views to get that. Make sure you sort items descending and limit the result number to be 20.

View answer
How to remove duplicate terms in a vocabulary
2 votes

You can do this using the Rules, To do this: **Event** After updating existing content I chose after updating a content so you can chose all nodes and select update, which can be unpublish/publish - ...

View answer
How to change default registration form?
2 votes

Theres a module called logintoboggan that can really save you tons of time.

View answer
Permission settings for Edit Node Link to show up?
1 votes

go to: admin/people/permissions and check: Content type name: Edit own content. if you want that this role can edit ANY content of this type, not only their own conent, then check: Content ...

View answer
How to prevent comment posting when it has specific words in it?
1 votes

You can try word filter module For example, you can set the filter to find the word "work" and when found, change it to "play". You may toggle whether the filter applies to node titles as well as ...

View answer
Display fields only once (Views)
1 votes

Add the fields you want "Product name, Dimensions, List price". Click on Settings from your view FORMAT section in settings page. Chose group items from the dropdown list.

View answer
Limit nodes in views per group
1 votes

If you dont want to write custom code you can use the views limit group module This is a basic Views style plugin that allows for a limit on the number of rows displayed within a grouping field.

View answer
Problem trying to create a boolean view filter
1 votes

Add a boolean value to both content types, should be the same boolean you created. no need to create a different boolean field for each content type. create a view: filter for the "Operator - Is ...

View answer
Dynamically assign user roles
1 votes

You can try user_multiple_role_edit, something like this might help. $user_id = $user->uid; // user the role human name $role_name = 'My Awesome Role'; if (user_role_load_by_name($role_name)) ...

View answer
New Content type formatting
1 votes

If you dont mind installing a new module you should check the double field module. Double field is a small module written to provide extensions to Drupal's core Fields. By this module you can ...

View answer
Trouble getting block to display after module enabled
1 votes

your hook_block_view() is implemented in a wrong way, first pass in argument delta as a parameter you should put the contents of your block inside the $block['content'] variable. return $block; ...

View answer
Taking check box option and turn into select list
1 votes

you could do that in your module, try to implement hook_node_view and get the values of the node variable, and then do your changes. Im pretty sure you dont want to save those values from the select ...

View answer
Use drush to download drupal core files directly into directory rather than subdirectory
1 votes

Drush usually creates a sub directory, But you can easily copy all the files from this sub directory "/var/www/drupal-7.12" to its upper folder "/var/www/" with this code mv * .* ..

View answer
facebook login redirect drupal for facebook module
1 votes

Drupal for facebook module has a sub module called "FB Rules Integration" Enable it. Then create a new rule: give it a name, something like "after connecting facebook account". add an action: page ...

View answer
Show virtual node in views
Accepted answer
1 votes

Inside your view under the advance tab Click on "no result behavior" Chose " Entity: Rendered entity " Add a label Entity type "node" Entity id "enter the node id" for the node you want to show ...

View answer
How do I create a taxonomy tag from node title
1 votes

I wouldn't recommend you doing that, you might get crazy node title names like "hello world I love peaches" and you dont want that tag. anyway you can do a Hook_node_insert in your custom module to ...

View answer
Send parameter to another page
1 votes

you can your page with a GET variable appended in the url, something like www.mysite.com/node/1?videoId=123 then inside your template you use a GET variable like this $videoId = $_GET['VideoId']; ...

View answer
Views image not visible?
1 votes

Make sure the public directory for image uploading is writable, dblog will tell you if there is a problem with that.

View answer