Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lqdn_latest_nodes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Site
lqdn_latest_nodes
Commits
66dff0a6
Commit
66dff0a6
authored
May 15, 2015
by
Mindiell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converting to D7
parent
75fb2d26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
17 deletions
+30
-17
lqdn_latest_nodes.info
lqdn_latest_nodes.info
+1
-1
lqdn_latest_nodes.module
lqdn_latest_nodes.module
+29
-16
No files found.
lqdn_latest_nodes.info
View file @
66dff0a6
;
$
Id
$
name
=
"Latest nodes"
description
=
Generate
lists
of
(
the
latest
)
nodes
core
=
6
.
x
core
=
7
.
x
package
=
"La Quadrature"
lqdn_latest_nodes.module
View file @
66dff0a6
...
...
@@ -168,20 +168,21 @@ function lqdn_latest_nodes_list($_type, $_dossier = NULL, $_title = NULL, $_nb =
}
/**
* Implementation of hook_block().
* Implementation of hook_block
i_list_alter
().
*/
function
lqdn_latest_nodes_block
(
$op
=
'list'
,
$delta
=
0
,
$edit
=
array
())
{
global
$language
;
if
(
$op
==
'list'
)
{
function
lqdn_latest_nodes_block_list_alter
(
&
$blocks
)
{
$blocks
[
0
][
'info'
]
=
t
(
'The latest news'
);
$blocks
[
1
][
'info'
]
=
t
(
'Latest news'
);
$blocks
[
2
][
'info'
]
=
t
(
'Latest press articles'
);
$blocks
[
3
][
'info'
]
=
t
(
'Latest publications'
);
$blocks
[
4
][
'info'
]
=
t
(
'Latest publications (news and press articles)'
);
return
$blocks
;
}
else
if
(
$op
==
'configure'
&&
$delta
==
1
)
{
}
/**
* Implementation of hook_block_configure().
*/
function
lqdn_latest_nodes_block_configure
(
$delta
=
''
)
{
if
(
$delta
==
'1'
)
{
$form
[
'ignore_the_latest_news'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'Ignore the last news'
),
...
...
@@ -189,10 +190,23 @@ function lqdn_latest_nodes_block($op = 'list', $delta = 0, $edit = array()) {
);
return
$form
;
}
else
if
(
$op
==
'save'
&&
$delta
==
1
)
{
}
/**
* Implementation of hook_block_save().
*/
function
lqdn_latest_nodes_block_save
(
$delta
=
''
,
edit
=
array
())
{
if
(
$delta
==
'1'
)
{
variable_set
(
'ignore_the_latest_news'
,
$edit
[
'ignore_the_latest_news'
]);
}
else
if
(
$op
==
'view'
)
{
}
/**
* Implementation of hook_block_view().
*/
function
lqdn_latest_nodes_block_view
(
$delta
=
''
)
{
global
$language
;
/**
* @todo gestion multilingue
*/
...
...
@@ -202,29 +216,29 @@ function lqdn_latest_nodes_block($op = 'list', $delta = 0, $edit = array()) {
);
switch
(
$delta
)
{
case
0
:
case
''
:
$block
=
array
(
'subject'
=>
''
,
'content'
=>
_lqdn_latest_nodes_the_latest_news
(),
);
break
;
case
1
:
case
'1'
:
$block
=
array
();
$block
[
'subject'
]
=
t
(
"Quad'news"
);
$block
[
'content'
]
=
_lqdn_latest_nodes_latest_news
();
break
;
case
2
:
case
'2'
:
$block
=
array
();
$block
[
'subject'
]
=
t
(
'Press review'
);
$block
[
'content'
]
=
_lqdn_latest_nodes_latest_press_articles
();
break
;
case
3
:
case
'3'
:
$block
=
array
(
'subject'
=>
t
(
'Latest content'
),
'content'
=>
_lqdn_latest_nodes_latest_nodes
()
.
'<div style="clear:both;"></div>'
,
);
break
;
case
4
:
case
'4'
:
$block
=
array
(
'subject'
=>
''
,
'content'
=>
_lqdn_latest_nodes_latest_news_and_press_articles
(),
...
...
@@ -237,7 +251,6 @@ function lqdn_latest_nodes_block($op = 'list', $delta = 0, $edit = array()) {
}
return
$block
;
}
}
function
_lqdn_latest_nodes_the_latest_news
()
{
...
...
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