Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
79a193a2
Commit
79a193a2
authored
Dec 29, 2005
by
Steven Wittens
Browse files
-
#42234
: Use standardized feed icon for RSS
parent
51108986
Changes
12
Hide whitespace changes
Inline
Side-by-side
includes/theme.inc
View file @
79a193a2
...
...
@@ -867,6 +867,15 @@ function theme_xml_icon($url) {
}
}
/**
* Return code that emits an feed icon.
*/
function
theme_feed_icon
(
$url
)
{
if
(
$image
=
theme
(
'image'
,
'misc/feed.png'
,
t
(
'Syndicate content'
),
t
(
'Syndicate content'
)))
{
return
'<span class="feed-icon"><a href="'
.
check_url
(
$url
)
.
'">'
.
$image
.
'</a></span>'
;
}
}
/**
* Execute hook_footer() which is run at the end of the page right before the
* close of the body tag.
...
...
misc/feed.png
0 → 100644
View file @
79a193a2
764 Bytes
modules/aggregator.module
View file @
79a193a2
...
...
@@ -967,12 +967,12 @@ function _aggregator_page_list($sql, $op, $header = '') {
// arg(1) is undefined if we are at the top aggregator URL
// is there a better way to do this?
if
(
!
arg
(
1
))
{
$form
[
'
xml
_icon'
]
=
array
(
'#value'
=>
theme
(
'
xml
_icon'
,
url
(
'aggregator/rss'
)));
$form
[
'
feed
_icon'
]
=
array
(
'#value'
=>
theme
(
'
feed
_icon'
,
url
(
'aggregator/rss'
)));
}
elseif
(
arg
(
1
)
==
'categories'
&&
arg
(
2
)
&&
!
arg
(
3
))
{
$form
[
'
xml
_icon'
]
=
array
(
'#value'
=>
theme
(
'
xml
_icon'
,
url
(
'aggregator/rss/'
.
arg
(
2
))));
$form
[
'
feed
_icon'
]
=
array
(
'#value'
=>
theme
(
'
feed
_icon'
,
url
(
'aggregator/rss/'
.
arg
(
2
))));
}
$output
.
=
$form
[
'
xml
_icon'
][
'#value'
];
$output
.
=
$form
[
'
feed
_icon'
][
'#value'
];
return
(
$categorize
)
?
drupal_get_form
(
'aggregator_page_list'
,
$form
)
:
$output
;
}
...
...
modules/aggregator/aggregator.module
View file @
79a193a2
...
...
@@ -967,12 +967,12 @@ function _aggregator_page_list($sql, $op, $header = '') {
// arg(1) is undefined if we are at the top aggregator URL
// is there a better way to do this?
if
(
!
arg
(
1
))
{
$form
[
'
xml
_icon'
]
=
array
(
'#value'
=>
theme
(
'
xml
_icon'
,
url
(
'aggregator/rss'
)));
$form
[
'
feed
_icon'
]
=
array
(
'#value'
=>
theme
(
'
feed
_icon'
,
url
(
'aggregator/rss'
)));
}
elseif
(
arg
(
1
)
==
'categories'
&&
arg
(
2
)
&&
!
arg
(
3
))
{
$form
[
'
xml
_icon'
]
=
array
(
'#value'
=>
theme
(
'
xml
_icon'
,
url
(
'aggregator/rss/'
.
arg
(
2
))));
$form
[
'
feed
_icon'
]
=
array
(
'#value'
=>
theme
(
'
feed
_icon'
,
url
(
'aggregator/rss/'
.
arg
(
2
))));
}
$output
.
=
$form
[
'
xml
_icon'
][
'#value'
];
$output
.
=
$form
[
'
feed
_icon'
][
'#value'
];
return
(
$categorize
)
?
drupal_get_form
(
'aggregator_page_list'
,
$form
)
:
$output
;
}
...
...
modules/blog.module
View file @
79a193a2
...
...
@@ -159,7 +159,7 @@ function blog_page_user($uid) {
$output
.
=
node_view
(
node_load
(
$node
->
nid
),
1
);
}
$output
.
=
theme
(
'pager'
,
NULL
,
variable_get
(
'default_nodes_main'
,
10
));
$output
.
=
theme
(
'
xml
_icon'
,
url
(
"blog/
$account->uid
/feed"
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
"blog/
$account->uid
/feed"
));
drupal_add_link
(
array
(
'rel'
=>
'alternate'
,
'type'
=>
'application/rss+xml'
,
...
...
@@ -186,7 +186,7 @@ function blog_page_last() {
$output
.
=
node_view
(
node_load
(
$node
->
nid
),
1
);
}
$output
.
=
theme
(
'pager'
,
NULL
,
variable_get
(
'default_nodes_main'
,
10
));
$output
.
=
theme
(
'
xml
_icon'
,
url
(
'blog/feed'
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
'blog/feed'
));
drupal_add_link
(
array
(
'rel'
=>
'alternate'
,
'type'
=>
'application/rss+xml'
,
...
...
modules/blog/blog.module
View file @
79a193a2
...
...
@@ -159,7 +159,7 @@ function blog_page_user($uid) {
$output
.
=
node_view
(
node_load
(
$node
->
nid
),
1
);
}
$output
.
=
theme
(
'pager'
,
NULL
,
variable_get
(
'default_nodes_main'
,
10
));
$output
.
=
theme
(
'
xml
_icon'
,
url
(
"blog/
$account->uid
/feed"
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
"blog/
$account->uid
/feed"
));
drupal_add_link
(
array
(
'rel'
=>
'alternate'
,
'type'
=>
'application/rss+xml'
,
...
...
@@ -186,7 +186,7 @@ function blog_page_last() {
$output
.
=
node_view
(
node_load
(
$node
->
nid
),
1
);
}
$output
.
=
theme
(
'pager'
,
NULL
,
variable_get
(
'default_nodes_main'
,
10
));
$output
.
=
theme
(
'
xml
_icon'
,
url
(
'blog/feed'
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
'blog/feed'
));
drupal_add_link
(
array
(
'rel'
=>
'alternate'
,
'type'
=>
'application/rss+xml'
,
...
...
modules/forum.module
View file @
79a193a2
...
...
@@ -882,7 +882,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p
'href'
=>
url
(
'taxonomy/term/'
.
$tid
.
'/0/feed'
)));
$output
.
=
theme
(
'forum_topic_list'
,
$tid
,
$topics
,
$sortby
,
$forum_per_page
);
$output
.
=
theme
(
'
xml
_icon'
,
url
(
"taxonomy/term/
$tid
/0/feed"
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
"taxonomy/term/
$tid
/0/feed"
));
}
$output
.
=
'</div>'
;
}
...
...
modules/forum/forum.module
View file @
79a193a2
...
...
@@ -882,7 +882,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p
'href'
=>
url
(
'taxonomy/term/'
.
$tid
.
'/0/feed'
)));
$output
.
=
theme
(
'forum_topic_list'
,
$tid
,
$topics
,
$sortby
,
$forum_per_page
);
$output
.
=
theme
(
'
xml
_icon'
,
url
(
"taxonomy/term/
$tid
/0/feed"
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
"taxonomy/term/
$tid
/0/feed"
));
}
$output
.
=
'</div>'
;
}
...
...
modules/node.module
View file @
79a193a2
...
...
@@ -1396,7 +1396,7 @@ function node_block($op = 'list', $delta = 0) {
}
else
if
(
$op
==
'view'
)
{
$block
[
'subject'
]
=
t
(
'Syndicate'
);
$block
[
'content'
]
=
theme
(
'
xml
_icon'
,
url
(
'rss.xml'
));
$block
[
'content'
]
=
theme
(
'
feed
_icon'
,
url
(
'rss.xml'
));
return
$block
;
}
...
...
modules/node/node.module
View file @
79a193a2
...
...
@@ -1396,7 +1396,7 @@ function node_block($op = 'list', $delta = 0) {
}
else
if
(
$op
==
'view'
)
{
$block
[
'subject'
]
=
t
(
'Syndicate'
);
$block
[
'content'
]
=
theme
(
'
xml
_icon'
,
url
(
'rss.xml'
));
$block
[
'content'
]
=
theme
(
'
feed
_icon'
,
url
(
'rss.xml'
));
return
$block
;
}
...
...
modules/taxonomy.module
View file @
79a193a2
...
...
@@ -1074,7 +1074,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
'href'
=>
url
(
'taxonomy/term/'
.
$str_tids
.
'/'
.
$depth
.
'/feed'
)));
$output
=
taxonomy_render_nodes
(
taxonomy_select_nodes
(
$tids
,
$operator
,
$depth
,
TRUE
));
$output
.
=
theme
(
'
xml
_icon'
,
url
(
'taxonomy/term/'
.
$str_tids
.
'/'
.
$depth
.
'/feed'
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
'taxonomy/term/'
.
$str_tids
.
'/'
.
$depth
.
'/feed'
));
return
$output
;
break
;
...
...
modules/taxonomy/taxonomy.module
View file @
79a193a2
...
...
@@ -1074,7 +1074,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
'href'
=>
url
(
'taxonomy/term/'
.
$str_tids
.
'/'
.
$depth
.
'/feed'
)));
$output
=
taxonomy_render_nodes
(
taxonomy_select_nodes
(
$tids
,
$operator
,
$depth
,
TRUE
));
$output
.
=
theme
(
'
xml
_icon'
,
url
(
'taxonomy/term/'
.
$str_tids
.
'/'
.
$depth
.
'/feed'
));
$output
.
=
theme
(
'
feed
_icon'
,
url
(
'taxonomy/term/'
.
$str_tids
.
'/'
.
$depth
.
'/feed'
));
return
$output
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment