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
Classifieds on top of all pages
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-12-24 18:33:51
Because on my tracker are registered an enough number of walleyes   :D   I had to make the announcements very visible.

Currently I use TT v2.08 but it works as well on 2.07

For each theme you have, in header.php, includes after this code:



if ($site_config["MIDDLENAV"]){

   middleblocks();

For private messages:




   // Start Announcement for Private Messages

   if ($unreadmail){

   $res_messages = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')") or print(mysql_error());

   $arr_messages = mysql_fetch_row($res_messages);

   $num_messages = $arr_messages[0];

   if ($num_messages > 0)

   echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

   Hey $CURUSER[username], $num_messages message" . ($num_messages > 1 ? "s" : "") . " is waiting for you to read. Click <a href=mailbox.php?inbox><font size=3 color=#CBCBCB>HERE</font></a> to see!

   </div></td></tr></table></div>\n";

   }

   // End Announcement for Private Messages






For reports:





   // Start Announcement for Reports

   if ($CURUSER["control_panel"]=="yes") {

   $res_reports = mysql_query("SELECT COUNT(*) FROM reports WHERE dealtwith = '0'");

   $arr_reports = mysql_fetch_row($res_reports);

   $num_reports = $arr_reports[0];

   if ($num_reports > 0)

   echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

   Hey $CURUSER[username], $num_reports Report" . ($num_reports > 1 ? "s" : "") . " must be solved. Click <a href=admincp.php?action=reports&do=view><font size=3 color=#CBCBCB>HERE</font></a> to view reports!

   </div></td></tr></table></div>\n";

   }

   // End Announcement for Reports






For staff messages (if you have installed this mod: https://www.torrenttrader.org/topic/9584-mod-contact-staff):





   // Start Announcement for Staff Messages

   if ($CURUSER["control_panel"]=="yes") {

   $res_staffmessages = mysql_query("SELECT COUNT(*) FROM staffmessages WHERE answered = '0'");

   $arr_staffmessages = mysql_fetch_row($res_staffmessages);

   $num_staffmessages = $arr_staffmessages[0];

   if ($num_staffmessages > 0)

   echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

   Hey $CURUSER[username], $num_staffmessages message" . ($num_staffmessages > 1 ? "s" : "") . " for Staff waiting an answer. Click <a href=staffbox.php><font size=3 color=#CBCBCB>HERE</font></a> to see!

   </div></td></tr></table></div>\n";

   }

   // End Announcement for Staff Messages






For announcements (if you have installed this addon: http://www.torrenttrader.org/topic/10965-addon-announcements):





   // Site Anouncements

   if ($CURUSER && $CURUSER["announce_read"] == "no" && $arr = announcement()) {

   ?>

   <script type="text/javascript" src="scripts/announcement.js"></script>

   <script type="text/javascript" src="scripts/preview.js"></script>

   <!-- annoucement start #<?=$arr[id];?> -->

   <div id="dropin" style="position:absolute;visibility:hidden;center;top:100px;width:800;height:100px">

   <table border="0" cellpadding="0" cellspacing="0" width="100%" class="error" align="center">

   <tbody><tr><td class="none" style="padding: 2px 0 0 10px; background: #FFBF00">

   <font color=black><b>Title:</b> <?=$arr["subject"]?> -- <b>Created on"</b> <?=$arr["added"]?></font></td>

   <td align="right" class="none" style="padding: 5px; background: #FFBF00"><a href="#" onclick="dismissbox();return false"><img src="images/close.jpg" border="0"></a></td></tr>

   <tr><td colspan="2" class=none width="100%" style="padding: 0 0 0 10px;" bgcolor="#252525">

   <div style="margin-bottom:5px"><font size=2 color=#CBCBCB><?=format_comment($arr["message"])?></font></div>

   <img id="loading" style=" visibility: hidden" src="images/load.gif">

   <span style="color:#CBCBCB" name="preview" id="previewr" align="left">

   <center>[ <a href="#" onclick="javascript:clearannouncement(this.parentNode,'clear_ann.php')"><font color=#FFBF00><b>Delete Announcement</b></font></a> ]</center>

   </span><br><br></form></td></tr></tbody></table></div>

   <!-- annoucement end #<?=$arr[id];?>-->

   <span id="new_ann" style="visibility: visible"><table border=0 cellspacing=0 cellpadding=10 bgcolor=#AB0000 width=100% align=center><tr><td style='padding: 10px; background: #AB0000' align='center'>

   <div style='font: bold 14px Times New Roman; color:#FFBF00'>There is a New Announcement! Please click <a href="javascript:show_announcement()"><font size=3 color=#CBCBCB>HERE</font></a> to read!</div></td></tr></table></span><br />

   <?php

   }

   // End Site Announcements




[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6398"]images.zip[/url]
classifieds.png
classifieds.png
images.zip
Download
Unknown User
2012-12-25 02:57:19
Nice mod but i would make it a center block to match all theme instead of pushing stuff down..

merry Christmas

regards
Unknown User
2012-12-26 19:43:46
Thx.!
Unknown User
2013-01-03 02:23:25
In my theme in header.php,  doesnt have this code:



if ($site_config["MIDDLENAV"]){

   middleblocks();



Any help..?
Unknown User
2013-01-03 02:47:11
it might be in your footer.php or something close to it.
Unknown User
2013-01-03 11:44:34
"zamunda, post: 87828":
In my theme in header.php,  doesnt have this code:



if ($site_config["MIDDLENAV"]){

middleblocks();

Any help..?





just add them at the end of header.php like this:







I attached mine so you can see...

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6440"]header.php[/url]

<?php

// Start Announcement for Private Messages

if ($unreadmail){

$res_messages = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')") or print(mysql_error());

$arr_messages = mysql_fetch_row($res_messages);

$num_messages = $arr_messages[0];

if ($num_messages > 0)

echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: #204066' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

Hey $CURUSER[username], $num_messages message" . ($num_messages > 1 ? "s" : "") . " is waiting for you to read. Click <a href=mailbox.php?inbox><font size=3 color=#CBCBCB>HERE</font></a> to see!

</div></td></tr></table></div>\n";

}

// End Announcement for Private Messages

?>

<?php

// Start Announcement for Reports

if ($CURUSER["control_panel"]=="yes") {

$res_reports = mysql_query("SELECT COUNT(*) FROM reports WHERE dealtwith = '0'");

$arr_reports = mysql_fetch_row($res_reports);

$num_reports = $arr_reports[0];

if ($num_reports > 0)

echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #204066' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

Hey $CURUSER[username], $num_reports Report" . ($num_reports > 1 ? "s" : "") . " must be solved. Click <a href=admincp.php?action=reports&do=view><font size=3 color=#CBCBCB>HERE</font></a> to view reports!

</div></td></tr></table></div>\n";

}

// End Announcement for Reports

?>
header.php
Download
Unknown User
2013-01-03 12:19:57
If this code: middleblocks();  not in your header.php must be in footer.php. Must be written somewhere, otherwise it would not work the middle blocks...

However, the codes for announcements must be included after this one.
Unknown User
2013-01-04 01:09:09
Tnx Darknova, works great !!
Unknown User
2013-01-04 03:12:45
"Movie-Torrentz, post: 87572":
Nice mod but i would make it a center block to match all theme instead of pushing stuff down..

merry Christmas

regards
Hehe here you go:)

upload the attached block to blocks

then add and activate, and then move over to the middle it in admincp blocks

I guess an tech easy way to do about is use this in what ever you use to edit the db.. LOL

INSERT INTO `blocks` (`named`, `name`, `position`, `description`, `enabled`, `sort`) VALUES('classifieds', 'classifieds', 'middle', 'Important Messages', 1, 1);
the quick add is untested, I already have the block LOL!!! but should work...

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6443"]classifieds_block.php[/url]

if you have the other addons he said, then change in the classifieds_block





$im_staffmessages = true; // <-- Set this to true if have the staff messages addon

$im_announcement = true; // <-- Set this to true if have the announcement addon

classifieds_block.php
Download
Unknown User
2013-01-04 05:42:25
Great job ArcticWolf   :)   with this middle block will work absolutely for all.
Unknown User
2013-01-04 23:51:10
Is possible to make this mod, to show alert when have new posts in forum..?
Unknown User
2013-03-11 11:21:57
It is much better to us the block but how can I adjust for classfield_block.php to appear at the top of the site not to be the first middle block at the bottom of the site?

THANKS!
Unknown User
2013-03-11 15:34:43
"darknova, post: 89391":
It is much better to us the block but how can I adjust for classfield_block.php to appear at the top of the site not to be the first middle block at the bottom of the site?

THANKS!
+1

As said Darknova i test the below code in header and its ok (with staff message)

i change the mysql_query with SQL_Query_exec



<?php

// Start Announcement for Private Messages

if ($unreadmail){

$res_messages = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')") or print(mysql_error());

$arr_messages = mysql_fetch_row($res_messages);

$num_messages = $arr_messages[0];

if ($num_messages > 0)

echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: #204066' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

Hey $CURUSER[username], $num_messages message" . ($num_messages > 1 ? "s" : "") . " is waiting for you to read. Click <a href=mailbox.php?inbox><font size=3 color=#CBCBCB>HERE</font></a> to see!

</div></td></tr></table></div>n";

}

// End Announcement for Private Messages

?>

<?php

// Start Announcement for Reports

if ($CURUSER["control_panel"]=="yes") {

$res_reports = SQL_Query_exec("SELECT COUNT(*) FROM reports WHERE dealtwith = '0'");

$arr_reports = mysql_fetch_row($res_reports);

$num_reports = $arr_reports[0];

if ($num_reports > 0)

echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #204066' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

Hey $CURUSER[username], $num_reports Report" . ($num_reports > 1 ? "s" : "") . " must be solved. Click <a href=admincp.php?action=reports&do=view><font size=3 color=#CBCBCB>HERE</font></a> to view reports!

</div></td></tr></table></div>n";

}

// End Announcement for Reports

?>

<?php

// Start Announcement for Staff Messages

if ($CURUSER["control_panel"] == "yes") {

$res_staffmessages = SQL_Query_exec("SELECT COUNT(*) FROM reports WHERE dealtwith = '0'");

$arr_staffmessages = mysql_fetch_row($res_staffmessages);

$num_staffmessages = $arr_staffmessages[0];

if ($num_staffmessages > 0)

echo "<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

Hey $CURUSER[username], $num_staffmessages message" . ($num_staffmessages > 1 ? "s" : "") . " for Staff waiting an answer. Click <a href=staffbox.php><font size=3 color=#CBCBCB>HERE</font></a> to see!

</div></td></tr></table></div>n";

}

// End Announcement for Staff Messages

?>

Unknown User
2013-03-11 17:58:11
OK and for announcements how to solve that  I add it to header.php but there I have slider and my announce comes underneath the slides

// Site Anouncements

if ($CURUSER && $CURUSER["announce_read"] == "no" && $arr = announcement()) {

?>

<script type="text/javascript" src="scripts/announcement.js"></script>

<script type="text/javascript" src="scripts/preview.js"></script>

<!-- annoucement start #<?=$arr[id];?> -->

<div id="dropin" style="position:absolute;visibility:hidden;center;top:100px;width:800;height:100px">

<table border="0" cellpadding="0" cellspacing="0" width="100%" class="error" align="center">

<tbody><tr><td class="none" style="padding: 2px 0 0 10px; background: #FFBF00">

<font color=black><b>Title:</b> <?=$arr["subject"]?> -- <b>Created on"</b> <?=$arr["added"]?></font></td>

<td align="right" class="none" style="padding: 5px; background: #FFBF00"><a href="#" onclick="dismissbox();return false"><img src="images/close.jpg" border="0"></a></td></tr>

<tr><td colspan="2" class=none width="100%" style="padding: 0 0 0 10px;" bgcolor="#252525">

<div style="margin-bottom:5px"><font size=2 color=#CBCBCB><?=format_comment($arr["message"])?></font></div>

<img id="loading" style=" visibility: hidden" src="images/load.gif">

<span style="color:#CBCBCB" name="preview" id="previewr" align="left">

<center>[ <a href="#" onclick="javascript:clearannouncement(this.parentNode,'clear_ann.php')"><font color=#FFBF00><b>Delete Announcement</b></font></a> ]</center>

</span><br><br></form></td></tr></tbody></table></div>

<!-- annoucement end #<?=$arr[id];?>-->

<span id="new_ann" style="visibility: visible"><table border=0 cellspacing=0 cellpadding=10 bgcolor=#AB0000 width=100% align=center><tr><td style='padding: 10px; background: #AB0000' align='center'>

<div style='font: bold 14px Times New Roman; color:#FFBF00'>There is a New Announcement! Please click <a href="javascript:show_announcement()"><font size=3 color=#CBCBCB>HERE</font></a> to read!</div></td></tr></table></span><br />

<?php

}

// End Site Announcements
Unknown User
2013-03-11 21:53:49
from what i seen my classfield_block.php works fine on the middle block but some themes mess up the middle block so its at the bottom:( H20 is 1 of them NB-TT-3x is another...  kind of silly to have the middle block as an footer oh well..
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