I looked into the DP 6 search API and did not see a hook that would let me alter the search keys before they are passed into the search module to execute the search.
I want to do keyword expansion on the string that the user entered. For instance, if the user entered 'foo', I want to execute a search for 'foo' and 'bar'. There should ul...
I'm developing a module which alter display of add/edit node forms. I'm a beginner in module development.
I have written following code, it is not working properly. Please tell me what's wrong with this?
function hook_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'node_form') {
drupal_set_message(t('some message...
I have yet to see a comprehensive overview about how Drupal really works. Most of the tutorials are about lame things, like adding a module or configuring a site. Where is a flowchart about how the page gets generated? Most of the documentation is clumsy too. What's the best resource for learning how Drupal really works?
...
I am configuring a rental website to manage real estate property using Drupal and Ubercart.
This site will need to accept rental payments, and IN ADDITION, will need to allow the admin to add extra billing to certain people, for fees, and certain other kinds of things. If they for example, put a huge hole in a wall, and have to pay, or ...
My Goal is if user is submitting this form with "Product Name" value as "YYY". On submit page should reload but this time "Product Name" should show previous valye as default as in this case "YYY".
Here is my code...
function addnewproduct_page () {
return drupal_get_form('addnewproduct_form',&$form_state);
}
function addnewproduct_...
Hey, I received an learning project from my brother that includes:
Create a Drupal site that employs Aggregator, CCK, and Views modules in the following way:
Aggregator will fetch an RSS feed from an arbitrary source
Views will allow you to create excerpts from the Aggregator materials, as well as links to orignal articles
Determine i...
I have a Drupal 6 site with a view that has a page and a feed display. Both the page and the feed work great. The view just shows content type Story in reverse chronological order- basic blog listing page.
While the RSS look good, the page display doesn't include the tag in the header for auto-discovery. I've outputting $head in my pag...
I'm wanting to get the filepath ie "/sites/default/files/myfile.pdf" for my file uploads.
I'm using the below
$row['node_data_field_factsheet_field_factsheet_data']
this returns "a:1:{s:11:"description";s:0:"";}"
How do i get the actual path?
here is my sql statement.
SELECT node.nid AS nid,
node_data_field_factsheet.field_factshee...
In our application, we would like to make a link to an online help site built using Drupal.
The problem is that this site is password protected. We would like to put the username and password in the url, so that the login is automatically made when the user clicks on the link in our application.
Is it possible and how ?
...
I'm trying to add some sanity to the chaos that is Drupal by separating files in a fo-MVC structure. Within a Drupal view you can add Header or Footer code in textarea boxes with the option to add "PHP Code". Here is my code within the Header textarea box:
Fatal error: require_once() [function.require]:
Failed opening required '<pat...
Drupal employs a custom session handler that changes the familiar...:
$_SESSION['foo'] = 'bar';
echo $_SESSION['foo'];
...behavior. The above session variable of "foo" would not persist from page to page.
Many comments and forum entries at Drupal.com raise the issue that Drupal uses a custom session handler for performance reasons an...
I'm beginning work on a project that will access a Drupal site to create nodes on the site. This includes file uploading, as the project is to allow people to upload pictures en mass to a Drupal site with minimal ado. Note that my application is written in .Net.
What I would like to know is the best approach to achieve the same? Based ...
I'm TEN pages from finishing Using Drupal and I'm stuck. I turned on the Theme Info module to aid in theme customization. However, I can no longer access the admin>>modules page to turn on/off modules (including the Theme Info module). It brings up this white error page that says it tried to access about twice as much memory as is allowe...
Hiya,
I currently have a datasource from a client in the form of XML, this XML has content for all the pages that the website we're making will contain. Now after parsing and preparing all this content, does anyone know how we can then (using) PHP automate the creation of a drupal node (including all related fields for that node i.e. C...
Hiya,
I'm trying to rewrite a url of this:
http://www.foo.com/bar/baz
to
index.php?q=$1&d=baz
Where bar is not a fixed value, but baz is.
RewriteRule ^(.*)\/baz$ index.php?q=$1&d=baz [L,QSA]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
What i have above kinda works but unfortunately breaks all the includes in the site (css/javas...
So I have this website that I'm building and they are wanting to be able to change content and pictures on any page throughout the website. I'm not too familiar with content management systems and don't know if I need a full fledged content management system( joomla/drupal ) or I should just create something. Any suggestions? Also, what ...
I'm trying to straighten out the front page of my drupal-based website. I want to display a static bit of content at the top (no link the way a sticky node would be) and then a list of the most recent posts underneath.
Doing a view of all content with the 'static' node stick is pretty close, although I don't want it to summarize the ...
Does Drupal parse (and/or run) hooks that are unrelated to the content being loaded by the current user?
For example, say I had a module foo installed and active with the following hooks:
<?php
// .. stuff ...
function foo_menu() {
$items = array();
$items['foo/show'] = array(
'title' => t('Foo!'),
'pa...
In PHP switch statements, does placing more common cases near the top improve performance?
For example, say the following function is called 1,000 times:
<?php
function foo_user ($op) {
switch ($op) {
case 'after_update':
//Some Stuff
case 'login':
//Some other Stuff
}
}
If in 990 of the 1,000 of the tim...
I have written a custom view template called "views-view-unformatted--FAQ.tpl.php. How can I access the nodes? The $rows array only holds the rendered content from the node.tpl.php template.
Bottom line is this - I want to organize the FAQ's into sections by taxonomy.
...