Author |
Message |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Jul 14, 2004 8:55 pm |
|
Baloo, I figured you'd waited long enough
In mainfile.php, findCode:function adminblock() {
| Then findCode:while ($row = $db->sql_fetchrow($result)) {
$content = "<font class=\"content\">$row[content]</font>";
themesidebox($row[title], $row[content]);
}
| Add this line
so that it now readsCode:while ($row = $db->sql_fetchrow($result)) {
$content = "<font class=\"content\">$row[content]</font>";
themesidebox($row[title], $row[content]);
}
return;
| That will keep the hard coded Waiting Contents block from displaying. Now, create a blockCode:<?php
if (eregi("block-RWH_WaitingContent.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
global $admin, $prefix, $db;
$title = ""._WAITINGCONT."";
$num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_queue"));
$content = "<font class=\"content\">";
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=submissions\">"._SUBMISSIONS."</a>: $num<br>";
$num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_reviews_add"));
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=reviews\">"._WREVIEWS."</a>: $num<br>";
$num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_newlink"));
$brokenl = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_modrequest WHERE brokenlink='1'"));
$modreql = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_modrequest WHERE brokenlink='0'"));
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=Links\">"._WLINKS."</a>: $num<br>";
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=LinksListModRequests\">"._MODREQLINKS."</a>: $modreql<br>";
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=LinksListBrokenLinks\">"._BROKENLINKS."</a>: $brokenl<br>";
$num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_downloads_newdownload"));
$brokend = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_downloads_modrequest WHERE brokendownload='1'"));
$modreqd = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_downloads_modrequest WHERE brokendownload='0'"));
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=downloads\">"._UDOWNLOADS."</a>: $num<br>";
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=DownloadsListModRequests\">"._MODREQDOWN."</a>: $modreqd<br>";
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=DownloadsListBrokenDownloads\">"._BROKENDOWN."</a>: $brokend<br></font>";
?>
| and save/ftp it to your blocks folder. Activate it through your Administration panel and set permissions to Administrators Only.
YOU'RE WELCOME!!  |
|
|
|
 |
baloo
Hangin' Around

Joined: Sep 10, 2002
Posts: 30
|
Posted:
Wed Jul 14, 2004 11:04 pm |
|
You truly are my saviour !!!
Now all I need to do is add some little bits and pieces, give it a sexy name and slap a (c)Baloo's Perfect PHP Scripts and I'll be famous !
Thanks again Raven ! |
|
|
|
 |
baloo

|
Posted:
Tue Jul 20, 2004 8:10 am |
|
That works nicely.
Can anyone help me to add a "Waiting Users" in the waiting Content block ? I'm using the latest YA. I gave it a shot myself and managed to completey screw everything up  |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun Oct 10, 2004 9:18 pm |
|
Personally, I think phpnuke should have a stand alone Waiting Content block, that way module developers could take advantage of the opportunity to add their own code into the block file leading to a swathe of invaluable 'at a glance' information for Admins.
e.g.
Waiting events
.. Workboard projects
.. Admin PM's to be answered
.. Members in Chat rooms
.. ePetitions
etc etc
On the down side, I suppose this would lead to a shed load of sql calls and hammer site performance. |
|
|
|
 |
Raven

|
Posted:
Sun Oct 10, 2004 9:32 pm |
|
Since Admins would be using it, the overhead would be minimal. And, btw, I plan on incorporating this type of methodology into PHP-Portal. |
|
|
|
 |
Guardian2003

|
Posted:
Sun Oct 10, 2004 9:40 pm |
|
Thanks for the feedback Raven.
Yes, it would be nice if this (or something very similar) was incorporated into PHP-Portal.
When I think about it, I'm suprised that the numerous module developers have not already thought about this as IMO it would prove to be very useful. |
|
|
|
 |
Raven

|
Posted:
Sun Oct 10, 2004 9:54 pm |
|
This week I will be releasing some fundamental and foundation documentation on my 'Dream'. |
|
|
|
 |
Bluezzz
Involved


Joined: Feb 08, 2005
Posts: 290
Location: USA
|
Posted:
Mon Aug 28, 2006 5:53 pm |
|
I did as said above and it works great *except* one minor problem being that the old Waiting Content for Admin block is still showing. Considering the last post here was back in Oct 2004 ... I would think a fix should have been discovered and posted here? Can someone help me get rid of the old Waiting Content section of Admin please? Thanks : o} |
_________________ Bluezzz
~ Stop & smell the roses, while you can! ~ |
|
|
 |
Guardian2003

|
Posted:
Mon Aug 28, 2006 9:42 pm |
|
See Ravens post here dated July 15th 2004
The code he posted should prevent the waiting content from the admin block being displayed. |
|
|
|
 |
Bluezzz

|
Posted:
Thu Aug 31, 2006 3:14 pm |
|
|
|
 |
|