Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
af015f3d
Commit
af015f3d
authored
15 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
Attach feed configurations to content types.
parent
0ccaed76
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
feeds.module
+19
-0
19 additions, 0 deletions
feeds.module
feeds_ui/feeds_ui.admin.inc
+2
-0
2 additions, 0 deletions
feeds_ui/feeds_ui.admin.inc
with
21 additions
and
0 deletions
feeds.module
+
19
−
0
View file @
af015f3d
...
@@ -20,6 +20,25 @@ function feeds_perm() {
...
@@ -20,6 +20,25 @@ function feeds_perm() {
return
array
(
'use feeds'
,
'administer feeds'
);
return
array
(
'use feeds'
,
'administer feeds'
);
}
}
/**
* Implementation of hook_form_alter().
*/
function
feeds_form_alter
(
&
$form
,
$form_state
,
$form_id
)
{
if
(
$form
[
'#id'
]
==
'node-form'
)
{
$feeds
=
feeds_load_all
();
foreach
(
$feeds
as
$feed
)
{
$config
=
$feed
->
getConfig
();
if
(
$config
[
'content_type'
]
==
$form
[
'type'
][
'#value'
])
{
$form
[
'feeds'
]
=
array
(
'#type'
=>
'fieldset'
,
'#title'
=>
t
(
'Feed'
),
);
$form
[
'feeds'
]
+=
$feed
->
fetcher
->
sourceForm
(
$form_state
);
}
}
}
}
/**
/**
* Implementation of hook_ctools_plugin_api().
* Implementation of hook_ctools_plugin_api().
*
*
...
...
This diff is collapsed.
Click to expand it.
feeds_ui/feeds_ui.admin.inc
+
2
−
0
View file @
af015f3d
...
@@ -82,6 +82,8 @@ function feeds_ui_build_create_form(&$form_state) {
...
@@ -82,6 +82,8 @@ function feeds_ui_build_create_form(&$form_state) {
/**
/**
* Validation handler for feeds_build_create_form().
* Validation handler for feeds_build_create_form().
*
* @todo: don't allow attaching more than one configuration to one content type.
*/
*/
function
feeds_ui_build_create_form_validate
(
$form
,
&
$form_state
)
{
function
feeds_ui_build_create_form_validate
(
$form
,
&
$form_state
)
{
ctools_include
(
'export'
);
ctools_include
(
'export'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment