6 Commits

Author SHA1 Message Date
b722d620e4 - Remove tweeter widget,
- Fix security,
- Cleanup code.
2025-12-15 17:34:03 +01:00
a4ae21b60f - Update RSS code. 2023-07-19 14:11:06 +02:00
6c119a448f - Update Twiter code. 2022-06-21 11:48:00 +02:00
6516ba3a7a - Update Google Analytics code. 2021-12-01 14:55:10 +01:00
8ebd42e83e - Now use 400px cover size instead of 256px. 2021-06-07 11:53:44 +02:00
bec60e3bf0 - Remove FaceBook +1 button. 2020-12-28 12:42:44 +01:00

View File

@@ -1,13 +1,7 @@
<?
// $RCSfile: lmbrowse.php,v $
// $Revision: 1.17 $
// $Name: lmbrowse-1_7_0-1 $
// $Date: 2016/03/21 16:07:30 $
// $Author: agibert $
/*
* LMBrowse - Langueur Monotone Browser
* Copyright (C) 2012-2020 Arnaud G. GIBERT
* Copyright (C) 2012-2025 Arnaud G. GIBERT
* mailto:arnaud@rx3.net
* http://www.rx3.org/dvp/lmbrowse
*
@@ -26,6 +20,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
@@ -41,7 +37,7 @@ $time_start = microtime_float();
include "lmbrowse_config.inc";
$lmb_myname="LMBrowse";
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_7_0-1 $");
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_8_0-1 $");
$lmb_tag_tab=explode( "-", $lmb_tag_tab[1]);
$lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
@@ -309,6 +305,7 @@ function lmb_size_convert( $size)
function lmb_html_text_format( $input_text)
{
$search_tab = array(
"#",
"&",
"\n",
"< >",
@@ -323,10 +320,13 @@ function lmb_html_text_format( $input_text)
"<LM>",
"</LM>",
"<F+1/>",
"<MSF/>"
"<TW/>",
"<BC/>",
"<YT/>"
);
$replace_tab = array(
"",
"&amp;",
"<br/>\n ",
"&nbsp;",
@@ -340,27 +340,10 @@ function lmb_html_text_format( $input_text)
"</span>",
"<span style=\"font-family:CustomFont; font-weight:normal;\">",
"</span>",
"
<div class=\"fb-like\" style=\"font-size: 0px;\" data-href=\"http://www.facebook.com/langueur.monotone\" data-send=\"false\" data-layout=\"button_count\" data-width=\"90\" data-show-faces=\"true\" data-colorscheme=\"dark\"></div>
<div id=\"fb-root\"></div>
<script type=\"text/javascript\">
(function(d, s, id)
{
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = \"//connect.facebook.net/fr_FR/all.js#xfbml=1\";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>",
"
<form method=\"post\" action=\"http://www.myspace.com/my/friends/addtofriends/langueur-monotone\">
<input type=\"submit\" value=\"myspace Friend\">
<style type=\"text/css\">input {background-color: 000000; border-width:1px; border-style:groove; border-color: 444444; color: FFFFFF; font-family:;}
</style>
</form>
"
"<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"http://www.facebook.com/langueur.monotone\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on FaceBook\"><i class=\"sprite-icon-facebook-16x16\" style=\"display:block;\"></i></a></div>",
"<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"http://www.twitter.com/langueurmon\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on X\"><i class=\"sprite-icon-twitter-16x16\" style=\"display:block;\"></i></a></div>",
"<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"https://langueur-monotone.bandcamp.com/\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on BandCamp\"><i class=\"sprite-icon-bandcamp-16x16\" style=\"display:block;\"></i></a></div>",
"<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"https://www.youtube.com/c/langueur-monotone\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on YouTube\"><i class=\"sprite-icon-youtube-16x16\" style=\"display:block;\"></i></a></div>",
);
return( str_replace( $search_tab, $replace_tab, $input_text));
@@ -391,7 +374,10 @@ function lmb_xml_text_format( $input_text)
"<LM>",
"</LM>",
"<F+1/>",
"<MSF/>"
"<MSF/>",
"<TW/>",
"<BC/>",
"<YT/>"
);
$replace_tab = array(
@@ -410,6 +396,8 @@ function lmb_xml_text_format( $input_text)
"",
"",
"",
"",
"",
""
);
@@ -670,19 +658,16 @@ function lmb_header( $page_id, $page_name, $page_title, $description, $keywords,
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
<meta name=\"Description\" content=\"$description\"/>
<meta name=\"keywords\" content=\"$keywords\"/>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"{$skin_path}/images/favicon.ico\"/>
<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skin_path}/default.css\"/>
<link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/skin/pink.flag/css/jplayer.pink.flag.css\"/>
<title>$page_name</title>
</head>
";
echo " <body style=\"background-image:url(''); background-repeat:repeat;\">
";
if( $lmb_ga_enable == true)
{
/*
echo "<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -694,8 +679,27 @@ function lmb_header( $page_id, $page_name, $page_title, $description, $keywords,
</script>
";
*/
echo " <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-37642754-1\"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-37642754-1');
</script>
";
}
echo " </head>
";
echo " <body style=\"background-image:url(''); background-repeat:repeat;\">
";
echo " <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"{$mw_tag}\">
<tbody>
<tr>
@@ -832,6 +836,8 @@ function lmb_footer( $skin_path)
<td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"/www-stats/\" title=\"Rx3 Statistics\"><div class=\"sprite-button-stats-on\"></div></a></td>
<td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"/www-ssl-stats/\" title=\"Rx3 SSL Statistics\"><div class=\"sprite-button-stats-on\"></div></a></td>
<td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"https://www.google.com/analytics/web/?hl=en&amp;pli=1#dashboard//a37642754w66067134p67926512\" title=\"Google Analytics\"><div class=\"sprite-button-stats-on\"></div></a></td>
<td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"https://www.google.com/webmasters/tools/dashboard?hl=fr&amp;siteUrl=http%3A%2F%2F{$lmb_url_pre}%2F\" title=\"Google Webmaster Tools\"><div class=\"sprite-button-stats-on\"></div></a></td>
@@ -919,7 +925,6 @@ function lmb_welcome_tab( $skin_path)
ob_end_clean();
lmb_make_tab( "welcome", "welcome", "l", "{$skin_path}/images/lm-logo1-border-220.png", $data, $skin_path);
// lmb_make_tab( "welcome", "welcome", "l", "sprite-lm-logo1-border-220", $data, $skin_path);
}
@@ -957,7 +962,7 @@ function lmb_news_tab_get( )
$news_tab[$i]["name"] = "{$play_name}";
$news_tab[$i]["rlink"] = "{$lmb_url_post}?page=play&amp;type={$play_type}&amp;id={$play_id}&amp;priority={$play_priority}";
$news_tab[$i]["alink"] = "http://{$lmb_url_pre}{$news_tab[$i]["rlink"]}";
$news_tab[$i]["rimg"] = lmb_play_path_get( $play_type, $play_id, $play_priority) . "/covers/{$play_id}-cover-1-icon.png";
$news_tab[$i]["rimg"] = "{$lmb_url_post}" . lmb_play_path_get( $play_type, $play_id, $play_priority) . "/covers/{$play_id}-cover-1-icon.png";
$news_tab[$i]["aimg"] = "http://{$lmb_url_pre}{$news_tab[$i]["rimg"]}";
}
else
@@ -1090,56 +1095,6 @@ function lmb_news_tab( $skin_path)
/*--------------------------------------------------------------------------------------------------------------------*/
/* Twitter Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_twitter_tab( $skin_path)
{
global $lmb_url_post;
ob_start();
echo " <tr class=\"twitter1\">
<td class=\"twitter01\"></td>
<td class=\"twitter0\"></td>
<td class=\"twitter01\"></td>
</tr>
<tr class=\"twitter1\">
<td class=\"twitter01\">&nbsp;</td>
<td class=\"twitter0\">
<div class=\"button-item\" style=\"display: inline-block; border-radius: 5px;\"><a class=\"twitter-timeline\" href=\"https://twitter.com/langueurmon\" data-widget-id=\"544258336741670912\">Tweets by @langueurmon</a></div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>
</td>
<td class=\"twitter01\">&nbsp;</td>
</tr>
<tr class=\"twitter1\">
<td class=\"twitter01\"></td>
<td class=\"twitter0\"></td>
<td class=\"twitter01\"></td>
</tr>
";
/*
echo " <tr class=\"twitter1\">
<td class=\"twitter01\"></td>
<td class=\"twitter1\">AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</td>
<td class=\"twitter01\"></td>
</tr>
";
*/
$data = ob_get_contents();
ob_end_clean();
// lmb_make_tab( "twitter", "twitter", "l", "{$skin_path}/images/lm_logo1-border-220.png", $data, $skin_path);
lmb_make_tab( "twitter", "twitter", "l", "sprite-lm-logo1-border-220", $data, $skin_path);
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Main Body */
/*--------------------------------------------------------------------------------------------------------------------*/
@@ -1151,10 +1106,6 @@ function lmb_main_body( $skin_path)
lmb_spacer(4);
lmb_news_tab( $skin_path);
lmb_spacer(4);
lmb_twitter_tab( $skin_path);
}
@@ -1395,20 +1346,17 @@ function lmb_rss_page()
header( 'Content-Type: application/rss+xml');
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<rss version=\"2.0\"
xmlns:atom=\"http://www.w3.org/2005/Atom\"
xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
>
<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
<channel>
<title>Langueur Monotone News Page</title>
<link>http://{$lmb_url_pre}/?page=rss</link>
<link>http://{$lmb_url_pre}/</link>
<atom:link href=\"http://{$lmb_url_pre}/?page=rss\" rel=\"self\" type=\"application/rss+xml\" />
<description>Langueur Monotone project news RSS feed</description>
<image>
<url>http://{$lmb_url_pre}/images/lm_logo2-border-220.png</url>
<url>http://{$lmb_url_pre}/skin/images/lm-logo2-border-rss.png</url>
<title>Langueur Monotone News Page</title>
<link>http://{$lmb_url_pre}/?page=rss</link>
<link>http://{$lmb_url_pre}/</link>
</image>
";
@@ -1440,17 +1388,21 @@ xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
if( "{$news_tab[$i]["name"]}" != "")
{
echo " <enclosure url=\"{$news_tab[$i]["aimg"]}\" length=\"".filesize("{$news_tab[$i]["rimg"]}")."\" type=\"picture/png\" />
<link>{$news_tab[$i]["alink"]}</link>
<description>{$news_tab[$i]["alink"]}</description>
";
echo " <enclosure url=\"{$news_tab[$i]["aimg"]}\" length=\"".filesize(".{$news_tab[$i]["rimg"]}")."\" type=\"picture/png\" />
<link>{$news_tab[$i]["alink"]}</link>";
$data = "<table stryle=\"width: 100%;\"><tr><td>{$news_tab[$i]["date"]}: </td><td>{$news_tab[$i]["title"]}</td><td><a href=\"{$news_tab[$i]["alink"]}\">{$news_tab[$i]["name"]}</td><td><a href=\"{$news_tab[$i]["alink"]}\"><img src=\"{$news_tab[$i]["rimg"]}\"/></a></td></tr></table>";
}
else
{
echo " <description>{$news}</description>
";
$data = "<table stryle=\"width: 100%;\"><tr><td>{$news}</td></tr></table>";
}
echo '
<description><![CDATA[<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><style>table { border-collapse: collapse; width: 100%; border: 0px solid #ddd; color: white; background-color: #333333; font-family: verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif; font-size: 14px;} th, td { text-align: left; padding: 16px;} a:link { font-weight: bold; color: #6644FF;} a:visited { font-weight: bold; color: #FF00FF;}</style></head><body></br></br></br>';
echo "{$data}";
echo '</br></br></br></body></html>]]></description>
';
echo " </item>
";
}
@@ -1776,7 +1728,7 @@ function lmb_play_intro( $play_type, $play_id, $play_priority, $skin_path)
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody>
<tr>
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-1-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-1-256.png\" alt=\"\"/></a></td>
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-1-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-1-400.png\" alt=\"\"/></a></td>
</tr>
</tbody>
</table>
@@ -1820,7 +1772,7 @@ function lmb_play_intro( $play_type, $play_id, $play_priority, $skin_path)
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody>
<tr>
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-2-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-2-256.png\" alt=\"\"/></a></td>
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-2-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-2-400.png\" alt=\"\"/></a></td>
</tr>
</tbody>
</table>
@@ -2690,7 +2642,7 @@ ${title_tag} <td class=\"extras4\">&nbs
$css_row = $i % 2 + 1;
$entry_tag = " <tr class=\"extras{$css_row}\" style=\"height: {$height}px\">
<td class=\"extras1\"><a href=\"{$file_tab[1]["url"]}\"><img class=\"button-item\" src=\"{$extra_prefix}-icon.png\" alt=\"\"/></a></td>
<td class=\"extras1\"><a href=\"{$file_tab[2]["url"]}\"><img class=\"button-item\" src=\"{$extra_prefix}-icon.png\" alt=\"\"/></a></td>
<td class=\"extras2\">&nbsp;{$extra_type}&nbsp;</td>
<td class=\"extras3\">&nbsp;{$extra_subid}&nbsp;</td>
<td class=\"extras4\">&nbsp;{$extra_format}&nbsp;</td>