DrupalBin
Submit Code
About
Recent Posts
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
Проверка
Code
$item['title'] = $item['title'];
Loading specific field
expire give non-aliased paths
Fix for Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
search
Custom module for Apache Solr Drupal 7 version
November 9, 2011 - 12:57pm — Anonymous
<?php
/**
* Implements hook_apachesolr_query_prepare().
* Used to modify our sorts
**/
function
dug_solr_apachesolr_query_prepare
(
SolrBaseQuery
$query
)
{
// Remove sorts from the list
apachesolr
search
Read more
resulting sql query
July 9, 2011 - 1:23pm — Anonymous
results in this query:
SELECT node.nid
AS
nid, SUM
(
search_index
.score
*
search_total.
count
)
AS
score,
'node'
AS
field_data_field_roll_type_node_entity_type,
'node'
AS
field_data_field_regnal_year_n
search
views
Read more
results after search patch
July 9, 2011 - 1:21pm — Anonymous
Following patch from: http:
//drupalbin.com/19147
AFTER:
$search_condition
-
>
conditions
(
)
:
Array
(
[
#conjunction] => AND
[
0
]
=
>
Array
(
[
field
]
=
>
DatabaseCondition
search
views
Read more
Fix for search filter weirdness - using array_merge instead of +
July 9, 2011 - 1:00pm — Anonymous
B4:
$condition_conditions
:
Array
(
[
#conjunction] => AND
[
0
]
=
>
Array
(
[
field
]
=
>
search_dataset.data
[
value
]
=
>
%
james
%
[
operator
]
=
>
LIK
search
views
Read more
search filter weirdness
July 9, 2011 - 12:54pm — Anonymous
B4:
$condition_conditions
:
Array
(
[
#conjunction] => AND
[
0
]
=
>
Array
(
[
field
]
=
>
search_dataset.data
[
value
]
=
>
%
james
%
[
operator
]
=
>
LIK
search
views
Read more
Ejemplo de tabla con formulario con filtros
June 8, 2011 - 10:59am — Anonymous
/*
* Implementation of hook_menu().
*/
function
admin_menu
(
)
{
$menu
[
'search'
]
=
array
(
'title'
=
>
t
(
'Search Database'
)
,
'description'
=
>
t
(
'Search in the report database.'
)
,
'a
form
search
table
Read more
db_rewrite_sql for filtering on CCK type
June 3, 2009 - 9:02am — Anonymous
/**
* Rewrite search query to search only show results where
* the "status" CCK field is "approved"
*/
5.x
6.x
CCK
drupal
search
sql
Read more
search block default value
May 19, 2009 - 4:50am — Anonymous
function
YOUR_MODULE_form_alter
(
&
$form
,
&
$form_state
,
$form_id
)
{
if
(
$form_id
==
'search_block_form'
)
{
$item
=
menu_get_item
(
)
;
if
(
$item
[
'map'
]
[
0
]
==
'search'
)
{
block
form
menu
search
Read more
Overrise search results page in theme... needs help.
January 11, 2009 - 8:52pm — Anonymous
/*override the default search page */
function
THEMENAME_search_item
(
$item
,
$type
)
{
results
search
theme
Read more
Adding to search index
February 27, 2008 - 1:40pm —
JuliaKM
<?php
function
custom_helper_nodeapi
(
$node
,
$op
,
$arg
= 0
)
{
switch
(
$op
)
{
case
'update index'
:
if
(
$node
-
>
uid
)
{
$user
=
user_load
(
$node
-
>
uid
)
;
search
update index
Read more
1
2
next ›
last »