Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

not really sure what you mean "cant see".. if the person dont have any points of course they not listed.... Amagine an list on a big site LOL if everyone listed... 4000000 people.... ROFL!!!!!
[ADDON] Teams — 2012-12-25 23:06:53 in v2 Only Mods Complete
blah alot of work LOL.. no offense to the orginal maker.. but dang some bad querys and what not inside each other...

but getting close i think, an demo of what so far.



[MOD] Thanks — 2012-12-25 20:24:19 in v2 Only Mods Complete
I gone threw every page on this topic.. that dont seem to be in this!! cant help if dont know the code!
[ADDON] Teams — 2012-12-25 08:31:27 in v2 Only Mods Complete
So what do you want this to do LOL??? I might take an stab at it if bored.. and knew what direction people wanted it go!!!
[ADDON] Teams — 2012-12-24 15:24:30 in v2 Only Mods Complete
this current code prob will not work in 2.08.... it looks like old code with multi querys inside each other..  The 2.08 teams is very basic and it dont do alot LOL.. People have extended it do other things i guess but none posts there code!!!

The admincp part is mostly for creating teams and what not, people can request to join an team i think so you really adding to it is useless via admincp....
ajax shoutbox might be causing it, it might be refreshing.. Dont know!!! I just know they kind of work in the stock shoutbox and the shoutbox with multi rooms in it, witch my dev site has.
looks cool, 1 thing thought should include an zip or something with the flags.. Or atleast an location to get them from LOL.. You know newbies here.. they cant do anything themselves.
DELETE WHAT EVER YOU HAD FROM THE OLD ADDON FOR MEMBER OF THE MONTH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DONT COME CRYING IF DONT WORK CAUSE YOU USING PARTS OF BOTH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i take no credit for this mod, its from http://www.torrentt...er-of-the-month
and i just modified it to be useable in 2.08 and fixed alot of querys within querys.

1st database

DROP TABLE IF EXISTS `motm`;
CREATE TABLE IF NOT EXISTS `motm` (
`id` varchar(10) NOT NULL,
`points` decimal(10,1) NOT NULL DEFAULT '0.0',
`month` tinyint(2) NOT NULL,
`year` tinyint(4) NOT NULL,
`last_winner` varchar(10) NOT NULL,
`last_winner_points` varchar(10) NOT NULL,
`win_month` tinyint(2) NOT NULL,
`credit` enum('yes','no') NOT NULL DEFAULT 'no',
UNIQUE KEY `id_month_year` (`id`,`month`,`year`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
if you have my old motd db info from before 02/01/2013
then

ALTER TABLE `motm` ADD `credit` enum('yes','no') NOT NULL default 'no';
in config file add

//====motm
$site_config["maxmotm"] = 4; //max class for motm current set to uploader

New Cleanup Code 02/01/2013
in cleanup add before

//OPTIMIZE TABLES


//== Start member of the month
$debug = 0;
$motmdateget = SQL_Query_exec("SELECT win_month,year,credit from motm WHERE last_winner ='1'");
$motmdategot = mysql_fetch_array($motmdateget);
$motmdate = (int) $motmdategot[0];
$motmyear = $motmdategot[1];
$mdate = date("m");
$myear = date("y");
if ($motmdate == 12 && $mdate > 1)
$motmdate = 1;
if ($motmdate == 0 || $motmdate == '')
$motmdate = (date("m") - 1);

$mdate1 = (date("m") - 1);
if ($motmdate < $mdate) {
$motmdateget1 = SQL_Query_exec("SELECT win_month,year,credit from motm WHERE win_month = '$mdate'");
$motmdategot1 = mysql_fetch_array($motmdateget1);
$motcredit = $motmdategot1[2];
$sql32 = "SELECT id, points FROM motm WHERE points > '0' && year =" . $myear . " && month =" . $motmdate . " ORDER BY points DESC LIMIT 1";
$mysql_result_motm = SQL_Query_exec($sql32);
while ($row_motm = mysql_fetch_array($mysql_result_motm)) {
$nextmonth = (date(m) + 1);
$id_motm = $row_motm['id'];
$pos = $row_motm["points"];
$motmdateget3 = SQL_Query_exec("SELECT win_month from motm WHERE last_winner ='1'");
$motmdategot3 = mysql_fetch_array($motmdateget3);
$motmdate3 = $motmdategot3[0];
if ($motmdate3 == 12 && $mdate > 1)
$motmdate3 = 1;
if ($motmdate3 == 0 || $motmdate3 == '')
$motmdate3 = (date("m") - 1);
if ($motcredit != 'yes') {
SQL_Query_exec("UPDATE motm SET last_winner = '0' WHERE last_winner = '1'");
SQL_Query_exec("UPDATE motm SET win_month = '$mdate', last_winner_points = '$pos', last_winner = '1', credit='yes' WHERE id = '$id_motm' && month = $motmdate && year = " . $myear . "");
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus+300 WHERE id = '$id_motm'");
// SQL_Query_exec("UPDATE motm SET points = '0' where month!='$mdate'");
SQL_Query_exec("UPDATE motm SET last_winner_points = '0' WHERE last_winner != '1'");
} //$motcredit != 'yes'
} //$row_motm = mysql_fetch_array($mysql_result_motm)
} //$motmdate < $mdate
//== End member of the month

[size=18px]UPDATED:::[/size]

to make it easier to extend to other things I have made the adding part for the motm an function
in backend/functions.php before the very last

?>
add

function motmadd($id,$v,$class,$maxmotm) {
if ($class <= $maxmotm) {
SQL_Query_exec("INSERT INTO motm (id, points, month, year) VALUES (" . sqlesc($id) . ", " . sqlesc($v) . ", " . sqlesc(date("m")) . ", " . sqlesc(date("y")) . ") ON DUPLICATE key UPDATE points = points+" . $v);
} //$class <= $maxmotm
}
in index where u want it to show

// Display Code
begin_frame("Member of the Month");
echo '<table border="0" cellspacing="0" cellpadding="0" class="forumline" align="left" width=400><tr><td>';
echo "<div align='left'><b><font color=red>Last Months Winner Was</font></b> <br /></div>";
$lastmotmget = SQL_Query_exec("SELECT motm.id, motm.last_winner_points, users.username, users.class FROM motm LEFT JOIN users ON motm.id = users.id WHERE last_winner ='1' && year = " . date("y"));
if (mysql_num_rows($lastmotmget) > 0) {
$lastmotmgot = mysql_fetch_array($lastmotmget);
$lastmotm = $lastmotmgot[0];
$usrwp = $lastmotmgot['last_winner_points'];
// $username_motm = class_user($lastmotmgot['username']); // <-- Use this if you have class_user function
// $username_motm = "<font color='" . get_class_color($lastmotmgot['class']) . "'>" . $lastmotmgot[username] . "</font>"; // Use this if have get_class_color function
$username_motm = $lastmotmgot['username']; // use this if totally stock:(
echo "<div align='left'><a href=account-details.php?id=" . $lastmotmgot[id] . ">" . $username_motm . "</a> with <font color=yellow>" . $usrwp . "</font> points.<br />and won 300 Seed points.<br /> <br /></div>"; // edit this line to reflect your bonus
} //mysql_num_rows($res) > 0
else {
echo "<div align='left'><b><font color='DarkGoldenRod'>There was no Last Months Winner</font></b> <br /></div>";
}
//////////////////////////////////

///// Member of the Month Hack by Biglad //////
/////// Show Current Top 5 ///////
echo "<b><font color=red>Top 5 for ";
echo date(F);
echo "<br /></b></font>";
$sql32 = "SELECT motm.id, motm.points, users.username, users.class FROM motm LEFT JOIN users ON motm.id = users.id WHERE points > '0' && month = " . date("m") . " && year = " . date("y") . " ORDER BY points DESC LIMIT 5";
$mysql_result_motm = SQL_Query_exec($sql32);
if (mysql_num_rows($mysql_result_motm) > 0) {
echo '<table class="ftable" border="0" cellspacing="0" cellpadding="0">';
while ($row_motm = mysql_fetch_array($mysql_result_motm)) {
$id_motm = $row_motm['id'];
$pos = $row_motm["points"];
$usrname = $row_motm['username'];
// $username_motm = class_user($usrname); // <-- Use this if you have class_user function
// $username_motm = "<font color='" . get_class_color($row_motm['class']) . "'>" . $lastmotmgot[username] . "</font>"; // Use this if have get_class_color function
$username_motm = $usrname; // use this if totally stock:(
echo "<div align='left'><tr>";
echo "<td><a href=account-details.php?id=$id_motm>" . $username_motm . "</a></td><td width='70'> - Points <font color='DarkMagenta'>" . $pos . "</font></td>";
echo "</tr></div>";
//echo "<strong><div align='left'><a href=account-details.php?id=$id_motm>".$usrname."</a> - POINTS ".$pos."</strong><br />";
} //$row_motm = mysql_fetch_array($mysql_result_motm)
echo "</table>";
} //mysql_num_rows($mysql_result_motm) > 0
echo '</td></tr></table>';
end_frame();
in torrents-details

find

//take comment add
if ($_GET["takecomment"] == 'yes'){
loggedinonly();
$commentbody = $_POST['body'];

if (!$commentbody)
show_error_msg("Error","You did not enter anything!",1);

mysql_query("UPDATE torrents SET comments = comments + 1 WHERE id = $id") or die(mysql_error());

add after

$motm_value = 3;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
still in torrent details

find

//take rating
if ($_GET["takerating"] == 'yes'){
$rating = (int)$_POST['rating'];

if ($rating <= 0 || $rating > 5)
show_error_msg("Rating Error", "Invalid rating",1);

add after

$motm_value = 1;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
open shoutbox.php

find

$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, '".$CURUSER['username']."', ".$_POST['message'].", '".get_date_time()."', '".$CURUSER['id']."')";
SQL_Query_exec($query);
after add

$motm_value = 1;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
comments.php

find

SQL_Query_exec("INSERT INTO comments (user, ".$type.", added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")");
after add

$motm_value = 1;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);stock 2.08 forums.php

find

SQL_Query_exec("INSERT INTO forum_topics (userid, forumid, subject) VALUES($userid, $forumid, $subject)");
$topicid = mysql_insert_id() or showerror(T_("FORUM_ERROR"),"No topic ID returned");
after add

$motm_value = 2;
motmadd($userid,$motm_value,$CURUSER['class'],$site_config['maxmotm']);
then find

SQL_Query_exec("INSERT INTO forum_posts (topicid, userid, added, body) VALUES($topicid, $userid, $added, $body)");
$postid = mysql_insert_id() or showerror(T_("FORUM_ERROR"),"Post id n/a");
after add

$motm_value = 1;
motmadd($userid,$motm_value,$CURUSER['class'],$site_config['maxmotm']);
your members get member of the month points for talking in the shoutbox , rating a torrent , commenting on a torrent, making a new forum topic (if you have stock forums), making a new forum post (again if you have stock forums)

im sure it can be implemented into other things aswell

have fun

I guess tech you could take the display part and make it into an block.. But I dont like blocks with too many querys in them.. slows down loading the whole site:(
ps: I cant find the orginal thanks.php my guess its no longer in 2.08 or was an addon, its not too hard to extend this to other pages, just post what page and I will try and help you if it have it aka its in 2.08 stock LOL..
ps: I dont know if the monthly thing works LOL!! I did not figure you wanted me waiting around to find out LOL!! before releasing it.

Edit 12/25/2012: I have added an block if people wants it, it uses an cache and should help on load issues with the querys.
FIXED: [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6422"]motm_block.php[/url]

If you want to use the block i have attached motm_block.php just upload it to blocks then add and activate it in normal admincp.php part.

ajax-shout.. in thory this might work.. dont really know ... rofl or care about versions lower then 2.08.. this is an 2.08 addon!!!!
in sendshout.php

replace

# adds new data to the database
function addData($name,$text,$uid) {
require_once("backend/functions.php"); # getting table prefix
$now = get_date_time();
$sql = "INSERT INTO ajshoutbox (date,name,text,uid) VALUES ('".$now."','".$name."','".$text."','".$uid."')";
$conn = getDBConnection();
$results = mysql_query($sql, $conn);
if (!$results || empty($results)) {
# echo 'There was an error creating the entry';
end;
}
}
with

# adds new data to the database
function addData($name,$text,$uid) {
require_once("backend/functions.php"); # getting table prefix
global $CURUSER,$site_config;
$now = get_date_time();
$sql = "INSERT INTO ajshoutbox (date,name,text,uid) VALUES ('".$now."','".$name."','".$text."','".$uid."')";
$conn = getDBConnection();
$results = mysql_query($sql, $conn);
if (!$results || empty($results)) {
# echo 'There was an error creating the entry';
end;
}
$motm_value = 1;
motmadd$uid,$motm_value,$CURUSER['class'],$site_config['maxmotm']);
}




This part is only if your servers os or something dont support the DUPLICATE key part.. Its kind of lame LOL 3 querys to do the same thing as 1 DUPLICATE key......
This part is for the people that dont have DUPLICATE key option in there os... Its highly untested cause well I have an real os and not winblows or something.....
but in backend/functions.php before the very last

?>
replace

function motmadd($id,$v,$class,$maxmotm) {
if ($class <= $maxmotm) {
SQL_Query_exec("INSERT INTO motm (id, points, month, year) VALUES (" . sqlesc($id) . ", " . sqlesc($v) . ", " . sqlesc(date("m")) . ", " . sqlesc(date("y")) . ") ON DUPLICATE key UPDATE points = points+" . $v);
} //$class <= $maxmotm
}
with


function motmadd($id,$v,$class,$maxmotm) {
if ($class < $maxmotm)
{
$query = mysql_fetch_row(SQL_Query_exec("SELECT COUNT(*) FROM `motm` WHERE `id` = '{$id}' AND month = ".sqlesc(date("m"))." AND year = ".sqlesc(date("y"))));
if ($query[0] == 0)
{
SQL_Query_exec("INSERT INTO `motm` (`id`, `month`, `year`, `points') VALUES ('" . $id . "', ".sqlesc(date("m")).", ".sqlesc(date("y")).", ".sqlesc($v).")");
} else {
SQL_Query_exec("UPDATE `motm` SET `points` = `points` + 1 WHERE `id` = '" . $CURUSER["id"] . "'' AND month = ".sqlesc(date("m"))." AND year = ".sqlesc(date("m")));
}
}
}
i used the exact same video link on my dev site and it work.. video suxed though it was an fail.. I used the code from the 1st post well with changing scripts/ to js/ scripts dir is blocked on my server:)
not sure what you mean about "blink", with this addon it auto resizes images based on size you put if over that size, if under it dont do anything with them

Now blink tag is only supported in some browsers for what i tested.. on ones it not supported it dont do an thing..
either way "should" work for what I noticed, but to be true specs it should be the 1st one, you only missing an ;
ya me too lol
means its echoing an comment:( attach your header.php file and I will try an fix it..

or just remove //Start Resize images and // End Resize Images  they are just comments LOL..
.. side note i see some issues in this addon anyway to be truly 2.08..

its using stuff like

show_error_msg("Acces Denied","I smelled a rat here!");
to error out but if dont have ,1 after it it will not really error out:(.. like
show_error_msg("Acces Denied","I smelled a rat here!",1);


and @mail should be @sendmail to use smtp..

and it still uses the old mysql_query thing..
you have to check your hosts email logs to see if sent out!!!.. Another reason I like using the gmail smtp thing is gmail records all emails send, in the sent folder:)
[MOD] Thanks — 2012-12-12 06:26:21 in v2 Only Mods Complete
you have to do it in what ever you use to edit your db, personally i use myphpadmin, you might have an way to do it in your hosts control panel like cpanel or something.. Its an pretty standard thing to do if adding mods or addons LOL..

http://www.phpmyadmin.net/home_page/downloads.php
.. no errors lol i tried your code on my dev site without changing an thing  and it gave invalid pics...... so that is an error... .jpg LOL..... I love it when people have like 2 posts and they "think" they know more the an moderator of an place..............  anyway np  tiloup nice to see someone saying thanks for all the stuff I do:)

And default things are used every time you add a new field or drop an existing field to re-add it................. and also when 1st creating an record aka when someone signup or gets an account created...
"flameche, post: 87329":
http://devscorner.xyz/uploads/post-38138-0-18445700-1355145413.pnghi, here an alternative way of coding this, for both BROWSER & OS, just use array, its more clean  ;)   :

run this sql :


ALTER TABLE `users` ADD `browser` varchar(20) NOT NULL;

ALTER TABLE `users` ADD `os` varchar(30) NOT NULL;


If using this should really put an default... LOL

this code will alter your existing if using his





ALTER TABLE `users` CHANGE `os` `os` VARCHAR( 30 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Unknown OS Platform',

CHANGE `browser` `browser` VARCHAR( 20 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Unknown Browser';

If not done the sql yet and want to use it use




ALTER TABLE `users` ADD `browser` varchar(20) NOT NULL  DEFAULT 'Unknown Browser';

ALTER TABLE `users` ADD `os` varchar(30) NOT NULL DEFAULT 'Unknown OS Platform';



and dont try and use the version the person 1st said with the new changes... 1 bug I dont like about all these changes people seem to use the same database users key "browser"... You try and use the version that needs an number and its text it will error out.. you try and use the last version that needs text and when you view other people that have not visited after you change it the browser info will be wrong or prob errored out...
"Tiloup, post: 87318":
yes exact...

Database Error in account-details.php on line 58: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1. Query was: SELECT name,browserpic FROM browsers WHERE id= LIMIT 1.
wrong file attached LOL.. line 58 of that one is something to do with stylesheets...

Anyway if using that picture browser thing try this:)





//$browsers

$browser_id = (int) $user[browser];

if ($browser_id > 0) {

   $res = SQL_Query_exec("SELECT name,browserpic FROM browsers WHERE id=$browser_id LIMIT 1");

   if (mysql_num_rows($res) == 1) {

       $arr = mysql_fetch_assoc($res);

       $browser = "$arr[name] <img src=images/browser/$arr[browserpic] height=30 width=30 border=0>";

   } else {

       $browser = "<img src=images/browser/unknown.png height=30 width=30 border=0>";

   }

}


It should not even make an query unless its an # of an id:)

in theory could use the above persons one also if not wanting an pic LOL, but people like pics hehehe
[size=12px]If posting about "database error" or something along that lines,[/size]

[size=12px]does no good if you dont also add the info from your_siteurl/admincp.php?action=sqlerr[/size]
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728