Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56997035
lesoir.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
lesoir.php
View Options
<?php
//Page analysis for www.lesoir.be
class
LeSoirPage
extends
Page
{
function
analyse
()
{
parent
::
analyse
();
//Hardcoded known info
$this
->
site
=
"Le Soir"
;
$this
->
skipYMD
=
true
;
//Gets date
//meta tag 'archi_id' has t-YYYYMMDD-HHMMhh as format (where hh = AM/PM)
// e.g. t-20120722-0211PM
$yyyy
=
substr
(
$this
->
meta_tags
[
'archi_id'
],
2
,
4
);
$mm
=
substr
(
$this
->
meta_tags
[
'archi_id'
],
6
,
2
);
$dd
=
substr
(
$this
->
meta_tags
[
'archi_id'
],
8
,
2
);
$this
->
unixtime
=
mktime
(
0
,
0
,
0
,
$mm
,
$dd
,
$yyyy
);
$this
->
date
=
strftime
(
LONG_DATE_FORMAT
,
$this
->
unixtime
);
//Gets author
$authors
=
self
::
between
(
'st_signature">'
,
'</p>'
);
if
(
$authors
==
"Rédaction en ligne"
)
{
$this
->
skipAuthor
=
true
;
}
else
{
require_once
(
'helpers/namecase.php'
);
//Some Le Soir articles use firstname name, others name,firstname.
//When there are several authors, ' ;' is the separator.
//Authors are in uppercase, so we need to clean case.
$authors
=
explode
(
'; '
,
$authors
);
$start
=
true
;
foreach
(
$authors
as
$author
)
{
if
(
strpos
(
$author
,
','
)
!==
false
)
{
$name
=
explode
(
','
,
$author
,
2
);
$author
=
$name
[
1
]
.
' '
.
$name
[
0
];
}
$author
=
name_case
(
$author
);
if
(
$start
)
{
$this
->
author
=
name_case
(
$author
);
$start
=
false
;
}
else
{
$this
->
coauthors
[]
=
name_case
(
$author
);
}
}
}
}
function
get_title
()
{
if
(!
$title
=
$this
->
meta_tags
[
'og:title'
])
{
$title
=
parent
::
get_title
();
}
return
$title
;
}
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 14, 18:36 (23 h, 22 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4258146
Default Alt Text
lesoir.php (1 KB)
Attached To
Mode
rSTG Source templates generator
Attached
Detach File
Event Timeline
Log In to Comment