[TABLE]
[TR]
[TD]Pays:[/TD]
[TD] Erreur!: SQLSTATE[28000] [1045] Access denied for user 'username'@'localhost' (using password: YES)[/TD]
[/TR]
[/TABLE]
"STorrents2020, post: 68324, member: 20382":
Easy to do, including user details and options (friend, add, message, etc) - with my favorite friend: jQuery. Give me 10 mins tonight I'll squeeze it in.
"niki, post: 68320, member: 20338":
voici mon code et sa ne fonctionne pas quand on click sur l'image ?? Merci pour votre aide.
here's my code and it doesn't work when you click on the image ?? Thanks for your help.
<?php
require_once("backend/functions.php");
dbconn();
stdhead(T_("SPOTLIGHT"));
begin_frame(T_("THE_GALLERY"));
?>
<h1 itemprop="name">
<i class="material-icons">star</i> Spotlight
</h1>
<script type="text/javascript">
$(document).ready(function() {
$("#cd-name").keyup(function() {
var a = $(this).val().trim();
if ("" != a) {
$("#uname_response").show();
$.ajax({
url: "https://WEBSITE.com/ajax_gallery.php",
type: "post",
data: {
username: a
},
success: function(a) {
$("#uname_response").html(a);
$(".comments").hide();
}
});
} else $("#uname_response").hide();
$(".comments").show();
});
});
</script>
<div style="padding-left:40px">
<form class="cd-form floating-labels">
<fieldset>
<div class="icon">
<label class="cd-label" for="cd-name">History (beta)</label>
<input class="user" type="text" name="username" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" id="cd-name" placeholder="Search Spotlight History">
</div>
</fieldset>
</form>
</div>
<!-- AJAX Search/Response -->
<center>
<div id="uname_response"></div>
</center>
<br />
<br />
<!-- Spotlight Section -->
<div class="card-action ng-scope" ng-if="item.comment_count">
<!-- interactionCount -->
<span itemprop="interactionCount" class="comments">
<h1 itemprop="name" style="text-align:center;padding-bottom:23px">
Last 50
</h1>
<center>
<?
$total_covers = 50;
$query = "SELECT id, name, image1, image2 FROM torrents ORDER BY id DESC LIMIT $total_covers";
$res = SQL_Query_exec($query);
while ($arr = @mysqli_fetch_assoc($res)) {
if (!$arr['image1'])
echo "<a title=\"" . $arr['name'] . "\" href=\"torrents-details.php?id=" . $arr['id'] . "/\"><img itemprop=\"image\" class=\"responsive-img\" src=\"" . $site_config['SITEURL'] . "/images/switch_cover_none.png\" alt=\"" . $arr['name'] . "\" style=\"width: 107px; height: 176px; margin-right: 10px\" border=\"0\" /></a>";
else
echo "<a title=\"" . $arr['name'] . "\" href=\"" . $site_config['SITEURL'] . "/details/" . $arr['id'] . "/\"><img itemprop=\"image\" class=\"responsive-img\" src=\"" . $site_config['SITEURL'] . "/uploads/images/" . htmlspecialchars($arr["image1"]) . "\" alt=\"" . $arr['name'] . "\" style=\"width: 107px; height: 176px; margin-right: 10px\" border=\"0\" /></a>";
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=" . gmtime() . " WHERE id=$CURUSER[id]");
?>
</center>
</span>
</div>
cover1
image1margin-right: 10pxmargin-right: 10px;margin-top: 10px;@mysql_fetch_assoc@mysqli_fetch_assoc<?<?phpstdhead(T_("SPOTLIGHT"));begin_frame(T_("THE_GALLERY"));stdfoot(); end_frame();
<a id=\"tips\" title=\"" . $arr['name'] . "\" href=\"" . $site_config['SITEURL'] . "/details/" . $arr['id'] . "/\">
<a title=\"" . $arr['name'] . "\" href=\"torrents-details.php?id=" . $arr['id'] . "/\">"ambrosia, post: 68301, member: 20305":
Je veux le mod TMDB, et non pas imdb
"STorrents2020, post: 68291, member: 20382":
I must of been focusing on functions, in order to hide the cat pics. For the message this should be all that is needed.
//Message sur shout nouveau torrent
if ($CURUSER["xxx_filter"]){
$image = $inames[0];
$membre = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonyme' : $CURUSER['username'];
$insert = sqlesc("
[img]http://".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n".$torrent."\r[img1]".$site_config["SITEURL"]."/images/Torrents/3X.png[/img1]\nPartagé ".($anon == 'no' ? "Par " .$CURUSER['username']. "" : "")."
");
}else{
$insert = sqlesc("
[img]http://".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n".$torrent."\r[img1]".$site_config["SITEURL"]."/uploads/images/".$image."[/img1]\nPartagé ".($anon == 'no' ? "Par " .$CURUSER['username']. "" : "")."
");
SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'Robot Crazy' ,".$insert."".$wherex.")");
}
// Fin
"STorrents2020, post: 68288, member: 20382":
First problem: iframe. You should get rid of this and embed the code properly. iFrames are dying, too many cross-origin exploits sending Chrome and others in a frenzy of updates the past 5 years.
Solution: Okay, so you will want to use a url query and pick up on that, and if seen in Url, then hide message in shout box. I just did this last night for something (introduction mod, see comments).
I don't use Shoutbox anymore, but this should do the trick. ** Please post the 3X Url without the TLD (top level domain) ** so I can better help you.
There are two ways to go:
1 ) Detect url query - isset()
2 ) Pass query params back - parse_url()
If you want to hide anything like.. /torrents.php?cat=1 then we use this to find the ID specifically:
if (array_key_exists("id", $_GET)) && trim($_GET["id"]) == 'YOUR-3X-CAT-ID-GOES-HERE' && $CURUSER["xxx_filter" == 'yes') {
// Hide category
}else{
// Show category
}
Let me know what that does, I haven't tested.
Next for category covers, this bit will need to be updated - functions.php (line 927 stock):
if (!empty($row["cat_name"])) {
print("<a href=\"torrents.php?cat=" . $row["category"] . "\">");
if (!empty($row["cat_pic"]) && $row["cat_pic"] != "")
print("<img border=\"0\"src=\"" . $site_config['SITEURL'] . "/images/categories/" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" />");
else
print($row["cat_parent"].": ".$row["cat_name"]);
print("</a>");
} else
print("-");
print("</td>\n");
I'll update bit in functions today, its best I actually test this.
"STorrents2020, post: 68286, member: 20382":
I would to do this for you on my time today, but having trouble understanding the purpose of this modification. Is this a custom category type in a new field? Is this for the purpose of filtering out against other cat results? Then I see about Shoutbox, and I get a bit lost.
Let me know :)
//Message sur shout nouveau torrent
if( $CURUSER['xxx_filter'] == 'yes'){
$image = $inames[0];
$membre = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonyme' : $CURUSER['username'];
$insert = sqlesc("[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n[url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\r[img1]".$site_config["SITEURL"]."/images/Torrents/3X.png[/img1]\nPartagé ".($anon == 'no' ? "Par [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
}else{
$insert = sqlesc("[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n[url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\r[img1]".$site_config["SITEURL"]."/uploads/images/".$image."[/img1]\nPartagé ".($anon == 'no' ? "Par [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'Robot Crazy' ,".$insert."".$wherex.")");
}
// Fin
//Message sur shout nouveau torrent
if( $CURUSER['xxx_filter'] == 'yes'){
$ressa = SQL_Query_exec("SELECT * FROM xxx_filter");
while($datas = mysqli_fetch_array($ressa)){
$wherex .= "AND categories.id != '".$datas["cat"]."' ";
}
}
$image = $inames[0];
$membre = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonyme' : $CURUSER['username'];
$insert = sqlesc("[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n[url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\r[img1]".$site_config["SITEURL"]."/images/Torrents/3X.png[/img1]\nPartagé ".($anon == 'no' ? "Par [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
}else{
$insert = sqlesc("[img]".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n[url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url]\r[img1]".$site_config["SITEURL"]."/uploads/images/".$image."[/img1]\nPartagé ".($anon == 'no' ? "Par [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."]" .$CURUSER['username']. "[/url]" : "")."");
SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'Robot Crazy' ,".$insert."".$wherex.")");
// Fin
"niki, post: 68276, member: 20338":
it does not work the update remains at 0 when you click on the images would you have an idea to make this module work, thank you in advance
il ne fonctionne pas la mise à jour reste à 0 lorsque vous cliquez sur les images auriez-vous une idée pour faire fonctionner ce module, merci d'avance
when you click on an image like or other there is a message that says that you have already voted for this torrent and the update of the counter remains at 0
lorsque vous cliquez sur une image like ou autres il y a un message qui dit que vous avez déjà voté pour ce torrent et la mise à jour du compteur reste à 0
"niki, post: 68271, member: 20338":
thank you and everything's working fine now :p
"STorrents2020, post: 68268, member: 20382":
This has been updated with tooltips and fixes for if logged in or not, if anyone wants
// Rating
if ($count >= 1){
$rater .= '<span class="stars-rating" style="--rating: ' . $rating_1 . '"></span>Total: ' . $count . ' ' . $tense;
}elseif ($count == 0){
$rater .= '<span class="stars-rating" style="--rating: 0.0"></span>';
}else{
$rater .= '<span class="stars-rating" style="">0.0</span>';
}
//