Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.
4
votes
Accepted
How can my module add xml sitemap entries?
The base function you call is xmlsitemap_link_save().
I am unaware of any documentation on how to use this, but nodes get added to the sitemap via xmlsitemap_node_nodeapi() which in turn calls xmlsite …
2
votes
Accepted
Are there cases where a third-party module would need to use its own file similar to xmlrp.p...
If you examine these files you will see that they share the bootstrap process, but the rest is different.
index.php calls menu_execute_active_handler, which is a fairly heavyweight function. It essen …
1
vote
Create Custom Date Formatter for Date Posted Field
In Drupal 7, the created and updated "fields" on nodes (and other entities) are properties and not proper fields. …
5
votes
Display the full URL of the home page?
In Drupal 7, The front page is normally set via system_site_information_settings(). It is an unaliased URL, so it is best to use the API. …
2
votes
How can I promote content by number of hits (reads)?
The near defacto solution for this is the Radioactivity module:
This module provides a field type which can be used as a hotness
metric or a regular view counter for entities and for much much m …
1
vote
How do I add Google Scholar meta tags to a custom content type?
The Metatag module doesn't provide a UI for custom tags, but it does have an API for defining new tags. If you want to go down this route, look at the included Darwin Core sub-module for how it imple …
5
votes
Accepted
How can I set up Drupal so people can collaborate on content development prior to making it ...
The near defacto-standard for this in Drupal 7 is the Workbench Moderation module, which is part of the broader Workbench suite. …
1
vote
How can I import non-unicode text file by Feeds module?
I can only provide high-level guidance here, but you need to use the Feeds Tamper module, which allows you to alter data between when it is read from the source, and then passed to Feeds.
However, I …
0
votes
How to tell if content has been migrated
It has been a while since I have done a proper D2D migration (I do more imports from non-Drupal sources using custom scripts), but you should be able to examine the migration map table(s) for nodes. …
4
votes
Clear data stored with drupal_static() and cache_set()
The Drupal way is to have a $reset parameter to your function. It would look something like:
function _mymodule_call($reset = FALSE) {
if ($reset) {
// do stuff
}
// ...
}
node_load() is …
2
votes
3
answers
1k
views
Assigning revision owner when moderating backwards with Workbench
I have a site that has a complex set of permissions and roles to support a workflow we have defined with Workbench Moderation. This particular workflow has the "normal" three states:
Draft
Needs Re …
3
votes
Accepted
Execute system cron manually
There isn't an individual function in Drupal 7 that just handles the file cleanup.
Also keep in mind that when you run drush like this, you are running as the user who you logged in as. …
13
votes
How to decide between module_exists and function_exists?
You should always program to the API and not the implementation. If Drupal provides a mechanism to do something, use it.
module_exists() should almost always be used for soft dependencies on somethi …
2
votes
Accepted
How do I customize the date-submit part in comment section?
You can use format_interval() to do this.
function MYTHEME_preprocess_comment(&$variables) {
$comment = $variables['elements']['#comment'];
$variables['created'] = t('@created ago', array(
'@ …
3
votes
Anyway to clear cache on Drupal 7 without any extra modules or even going to the performance...
drush cc all is the safest bet.
Visiting www.example.com/update.php will also clear the caches, but you need to be logged in. Otherwise, this is a DOS vector.