DarkLane
22 Oct, 2023
149 Vues
2 Commentaires
Le module who-rated pour DataLife Engine 17.0 est conçu comme un plugin, il garde une trace de la date de changement dans la notation des actualités et des commentaires. Ajoute une fonction qui fait une requête AJAX et renvoie une fenêtre avec les participants qui ont influencé la note, en cliquant sur le nom de l'utilisateur il affichera son historique des notes et leur date. Plugin jаvascript requisCaractéristiques:Statistiques de vote triées par date dans une fenêtre paginée séparée.Statistiques séparées des 100 derniers votes des utilisateurs.Prise en charge de la notation des commentaires.
Installation:- Installez le module via le système de plug-in DLE.- Ajouter au fichier de styles CSS de votre thème
/** Who rated module **/ .who-rated { width: 500px; margin: 0 auto; position: relative; background: #FFF; padding: 25px 10px 10px; border-radius: 3px; border: 1px solid #ccc; } #who-rated ul { list-style-type: none; margin: 0; padding: 0; } #who-rated li.ratingLog-liminus .rated-is { color: #ba3636; } #who-rated li.ratingLog-liplus .rated-is { color: #3caa00; } #who-rated li .rated-is .icon { width: 16px; height: 16px; fill: currentColor; } #who-rated li .rated-is { position: absolute; left: 0px; top: 4px; width: 22px; height: 22px; line-height: 22px; text-align: center; } #who-rated li.ratingLog-listars .rated-is { font-weight:700; top: 5px !important; } #who-rated span.rated-is-plus { color: #3caa00; top: -2px; position: relative; } #who-rated span.rated-is-minus { color: #ba3636; top: -2px; position: relative; } #who-rated li { font: normal 11px/22px Verdana; cursor: pointer; border-radius: 2px; position: relative; } #rated-list li {padding: 4px 0px 4px 53px;} #rate-profile-stats li{padding: 4px 0px 4px 23px;} #who-rated ul li:hover { color: #000; background-color: #f5f5f8; } #who-rated li a { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; width: 75%; } #who-rated li .rated-date { position: absolute; right: 6px; top: 4px; font: normal 10px/22px Tahoma; color: #999; } #who-rated li img { position: absolute; left: 24px; top: 4px; height: 22px; width: 22px; border-radius: 1px; } #rated-list-nav {width: 100px;margin: 0 auto;} #rated-list-nav li {font-size: 20px;font-weight: 700;cursor: pointer;} #rated-list-nav li.disabled {color:#AAA;} #rated-list-nav li:nth-child(1) {float:left} #rated-list-nav li:nth-child(2) {float:right;} #who-rated .ratingLog-userbox-user { height: 60px; padding: 10px 50px 10px 5px; border-bottom: 1px dotted #ddd; font: normal 16px/25px 'Roboto Condensed', sans-serif; position: relative; box-sizing: content-box; } #who-rated .ratingLog-userbox-user div.stars-block { display:inline-block; margin-left: 10px; } #who-rated .ratingLog-userbox-user div.stars-block:first-child { margin-left: 0px; } #who-rated .ratingLog-userbox-user img { height: 60px; width: 60px; margin: 0 10px 0 0; float: left; border-radius: 3px; } #who-rated .ratingLog-userbox-close { position: absolute; right: 12px; top: 50%; margin-top: -10px; width: 19px; height: 19px; opacity: .7; cursor: pointer; } #who-rated .ratingLog-userbox ul { max-height: 300px; overflow: auto; } #who-rated .rate-profile-stats .no_row { padding: 10px; text-align: center; display: inline-block; width: 100%; } /** Who rated END **/
</head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.js"></script>
function profileRateStats(id, rating_type) { //ShowLoading(); $.post( dle_root + "engine/ajax/controller.php?mod=who_rated", {user_id: id, type:'profile', rating_type: rating_type, user_hash: dle_login_hash}, function(data) { //HideLoading(); $('#who-rated .all-list').hide(); $('#who-rated').append(data); //Initialisation des plug-ins ici si nécessaire. /*new LazyLoad({ elements_selector: "#rate-profile-stats img[data-src]", threshold: 0, load_delay: 250 });*/ }); } function who_rated_list(obj, rating_type) { var id = $(obj).data('commid') ? $(obj).data('commid') : $(obj).data('newsid'); //ShowLoading(); $.post( dle_root + 'engine/ajax/controller.php?mod=who_rated', {id: id, rating_type: rating_type, user_hash: dle_login_hash}, function(data){ //HideLoading(); if( data == 'null-1' ) { //Box.InfoNormal('who-rated', 'Information', 'Les nouvelles n'ont pas de votes', 400, 2000); DLEalert('Les articles n\'ont pas de votes', 'Information') ; } else { $.magnificPopup.open({ items: { src: '<div class="who-rated clrfix">'+data+'</div>' }, type: 'inline', mainClass: 'mfp-fade', removalDelay: 0, overflowY: 'hide', closeOnBgClick: true, callbacks: { open: function() { //Initialisation des plug-ins ici si nécessaire. /*new LazyLoad({ elements_selector: "#rated-list img[data-src]", threshold: 0, load_delay: 250 });*/ }, afterClose: function() {}, beforeClose: function() {} } }); } }); return false; }
[rating] <div class="rate"> [rating-type-1]<div class="rate_stars"><span data-commid="{id}" onclick="who_rated_list(this, 1);">[?]</span>{rating}</div>[/rating-type-1] </div> [/rating]
Votre adresse électronique ne sera pas publiée. Les champs obligatoires sont marqués *
Les utilisateurs du Invités ne sont pas autorisés à ajouter des commentaires à cette publication.
02-03-2025 19:16
02-03-2025 20:35
17-01-2023 • Dle 15.0
Qui a noté 0.2.1 : liste des
16-01-2023 • Dle
Who download 0.2.2: qui a
01-03-2024 • Dle 17.1
Who download 0.2.3: qui a
21-05-2024 • Dle 17.0
Newsletter 2.0.1 pour Dle
30-12-2022 • Dle
Formulaire pour ajouter des
08-10-2022 • Dle
Update: LightStat 3.0 :
27-10-2024 • Dle 16.0, 17.2
"LightStat" 3.0 Dle
27-07-2021 • Dle
torrent-viewer v2 dle
17-11-2024 • Dle 16.0, 17.3
Module d'évaluation des
27-02-2022 • Dle
Dle Friend v1.6 dle 12.1-15.1