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
PC off/on at night
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-05-13 12:20:14
A lot off user where complaining that they get a warning during the night, whene they shut down the pc.
so i make a little notice for the mods, so they can see. maby you like it maby you dont  :blink:
It,s yes or No in profile en show in userdetails above the frame if its on or not at night

thx to "sarges" for this litle hack

sql

ALTER TABLE `users` ADD `pcoff` ENUM( 'yes', 'no' ) DEFAULT 'yes' NOT NULL;

finde in account.php

$teams .= "<option value=$sasha[id]" . ($CURUSER["team"] == $sasha['id'] ? " selected" : "") . ">$sasha[name]</option>n";

after add

print ("<TR><TD align=right class=table_col2><B>PC ON:</B> </td><td class=table_col2><input type=radio name=pcoff" . ($CURUSER["pcoff"] == "yes" ? " checked" : "") . " value=yes><B>PC on at night</B><input type=radio name=pcoff" . ($CURUSER["pcoff"] == "no" ? " checked" : "") . " value=no><B>PC off at night.</B></td></tr>");

finde

$updateset[] = "age = '$age'";

after add


$pcoff = $_POST["pcoff"];
$updateset[] = "pcoff = " . sqlesc($pcoff)

save and close

open account-details.php and above

begin_frame("User Details for " . $user["username"] . "");

add

 
// PC on-off night
if ($CURUSER["pcoff"] == 'yes')
{
print ("<br /><b> PC on the night </b><font color="green" ><b> Yes </b></ font>");
}
else
{
print ("<br /><b> PC on the night </b><font color="red" ><b> NO </b></ font>");
}
// PC on-of night END

save and close

DONE.....  ;)
Unknown User
2010-05-15 12:09:30
Very nice , thanks.

BUT, $updateset[] = "pcoff = " . sqlesc($pcoff) ... should be $updateset[] = "pcoff = " . sqlesc($pcoff);

just the ; missing from end
Unknown User
2010-05-15 12:30:16
oh sorry, I worked on some more modifications and I forgot to check  again thx mate :blink:
Unknown User
2010-05-22 15:41:16
Hmmmm I've added this mod successfully , but for some reason , i tried adding it to log in block , but no matter what status i set , it shows as PC at night off, although still working in account details ......... any ideas please ?

Its OK , i sorted it

AFTER

$connectable = get_row_count("peers", "WHERE connectable='yes' AND userid=$CURUSER[id]");

$unconnectable = get_row_count("peers", "WHERE connectable='no' AND userid=$CURUSER[id]");

if ($unconnectable)

print "<br><b>Connectable: <font color='#FF0000'>NO</font></b>";

elseif ($connectable)

print "<br><b>Connectable: <font color='#00FF00'>YES</font></b>";

else

print "<br><b>Connectable: <font color='#FF9900'>N/A</font></b>";
ADD
if ($CURUSER["pcoff"] == 'yes')

{

print("<br><b>PC at night:<font size=\"\" color=\"green\"></b><B> ON</B></font>"); }

else

{

print("<br><b>PC at night:<font size=\"\" color=\"red\"></b><B> OFF</B></font>");

}



2011-01-11 03:09:49
Big thanks blastro, SJC2TK  :rolleyes:
Unknown User
2011-01-12 05:23:35
hi guys,

i did much better than this , lolmm peace of cake,

uploaders can select the hours range the'r seeding their  torrents,

and of course its shown on torrents-details page

email me is u want it  :rolleyes:    hq6900@gmail.com
Unknown User
2011-01-14 18:54:09
Thank you work fine
Unknown User
2011-08-23 11:41:23
"Mush, post: 63518":
Hmmmm I've added this mod successfully , but for some reason , i tried adding it to log in block , but no matter what status i set , it shows as PC at night off, although still working in account details ......... any ideas please ?
Its OK , i sorted it

AFTER

$connectable = get_row_count("peers", "WHERE connectable='yes' AND userid=$CURUSER[id]");

$unconnectable = get_row_count("peers", "WHERE connectable='no' AND userid=$CURUSER[id]");

if ($unconnectable)

print "<br><b>Connectable: <font color='#FF0000'>NO</font></b>";

elseif ($connectable)

print "<br><b>Connectable: <font color='#00FF00'>YES</font></b>";

else

print "<br><b>Connectable: <font color='#FF9900'>N/A</font></b>";
ADD
if ($CURUSER["pcoff"] == 'yes')

{

print("<br><b>PC at night:<font size=\"\" color=\"green\"></b><B> ON</B></font>"); }

else

{

print("<br><b>PC at night:<font size=\"\" color=\"red\"></b><B> OFF</B></font>");

}






tHANKS YOU.
Unknown User
2011-09-21 10:40:21
dans torrent detail avant

//end download box

metre  ceci

if ($CURUSER["pcoff"] == 'yes')

{

print("<br><b>PC allum

Sans_titre.png
Sans_titre.png
Unknown User
2013-08-09 13:57:39
This is a working code,  the author has a few bugs


// PC on-off night
if ($cURus ['pcoff '] ==' yes')
{
print ("<br> <b> PC on the night <font size="" color="green"> </ b> <B> Yes </ B> </ font>");
}
else
{
print ("<br> <b> PC on the night <font size="" color="red"> </ b> <B> NO </ B> </ font>");
}
// PC on-of night END
2013-08-09 16:53:53
"PyhaJumal, post: 91702":


This is a working code,  the author has a few bugs

// PC on-off night
if ($cURus ['pcoff '] ==' yes')
{
print ("<br> <b> PC on the night <font size="" color="green"> </ b> <B> Yes </ B> </ font>");
}
else
{
print ("<br> <b> PC on the night <font size="" color="red"> </ b> <B> NO </ B> </ font>");
}
// PC on-of night END

alter:

if ($cURus ['pcoff '] ==' yes')


displace:

if ($CURUSER["pcoff"] == 'yes')


PS: never put your balis (ballistic) majuscul

perfection would be ..

// PC on-off night
if ($CURUSER["pcoff"] == 'yes')
{
print ("<br /><b> PC on the night </b><font color="green" ><b> Yes </b></ font>");
}
else
{
print ("<br /><b> PC on the night </b><font color="red" ><b> NO </b></ font>");
}
// PC on-of night END



@+  :)
Unknown User
2013-08-16 05:46:43
Thanks Tiloup, but anyway not working, but it still does not work. Can not change the choices under your account, if I choose YES and store settings remains to NO???

SQL created

ALTER TABLE `users` ADD `pcoff` ENUM( 'yes', 'no' ) DEFAULT 'yes' NOT NULL;

account.php

$updateset[] = "pcoff = " . sqlesc($pcoff);


// PC on-off night
print ("<TR><TD align=right class=table_col2><B>PC ON:</B> </td><td class=table_col2><input type=radio name=pcoff" . ($CURUSER["pcoff"] == "yes" ? " checked" : "") . " value=yes><B>PC on at night</B><input type=radio name=pcoff" . ($CURUSER["pcoff"] == "no" ? " checked" : "") . " value=no><B>PC off at night.</B></td></tr>");
// PC on-off night END

admin-modtask.php

$pcoff = $_POST["pcoff"];

torrents-details.php


// PC on-off night
if ($CURUSER["pcoff"] == 'yes')
{
print ("<br /><b> PC on the night </b><font color='green'><b> Yes </b></ font>");
}
else
{
print ("<br /><b> PC on the night </b><font color='red'><b> NO </b></ font>");
}
// PC on-of night END
Unknown User
2013-08-16 11:51:16
change
$updateset[] = "pcoff = " . sqlesc($pcoff);

to

$pcoff = $_POST["pcoff"];
$updateset[] = "pcoff = " . sqlesc($pcoff);
Unknown User
2013-08-16 16:01:52
Thank you very much for help  :)

but it shows my choice at all torrents on site
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: 5
  • Members: 0
  • Guests online: 5
  • Comments: 3
  • Messages: 1,728