PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Wed Jul 14, 2004 8:55 pm Reply with quote Back to top

Baloo, I figured you'd waited long enough Wink

In mainfile.php, find
Code:
function adminblock() {
Then find
Code:
while ($row = $db->sql_fetchrow($result)) {
    $content = "<font class=\"content\">$row[content]</font>";
    themesidebox($row[title], $row[content]);
}
Add this line
Code:
return;

so that it now reads
Code:
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 block
Code:
<?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>&middot;</big></strong>&nbsp;<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>&middot;</big></strong>&nbsp;<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>&middot;</big></strong>&nbsp;<a href=\"admin.php?op=Links\">"._WLINKS."</a>: $num<br>";
$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"admin.php?op=LinksListModRequests\">"._MODREQLINKS."</a>: $modreql<br>";
$content .= "<strong><big>&middot;</big></strong>&nbsp;<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>&middot;</big></strong>&nbsp;<a href=\"admin.php?op=downloads\">"._UDOWNLOADS."</a>: $num<br>";
$content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"admin.php?op=DownloadsListModRequests\">"._MODREQDOWN."</a>: $modreqd<br>";
$content .= "<strong><big>&middot;</big></strong>&nbsp;<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!! Groovy
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
baloo
Hangin' Around


Joined: Sep 10, 2002
Posts: 30

PostPosted: Wed Jul 14, 2004 11:04 pm Reply with quote Back to top

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 ! Laughing

Thanks again Raven !
View user's profile Send private message
baloo
Hangin' Around


Joined: Sep 10, 2002
Posts: 30

PostPosted: Tue Jul 20, 2004 8:10 am Reply with quote Back to top

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 Smile
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6299
Location: Vsetin, Czech Republic

PostPosted: Sun Oct 10, 2004 9:18 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Sun Oct 10, 2004 9:32 pm Reply with quote Back to top

Since Admins would be using it, the overhead would be minimal. And, btw, I plan on incorporating this type of methodology into PHP-Portal.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6299
Location: Vsetin, Czech Republic

PostPosted: Sun Oct 10, 2004 9:40 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Sun Oct 10, 2004 9:54 pm Reply with quote Back to top

This week I will be releasing some fundamental and foundation documentation on my 'Dream'.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Bluezzz
Involved
Involved


Joined: Feb 08, 2005
Posts: 290
Location: USA

PostPosted: Mon Aug 28, 2006 5:53 pm Reply with quote Back to top

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}
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6299
Location: Vsetin, Czech Republic

PostPosted: Mon Aug 28, 2006 9:42 pm Reply with quote Back to top

See Ravens post here dated July 15th 2004
The code he posted should prevent the waiting content from the admin block being displayed.
View user's profile Send private message Send e-mail Visit poster's website
Bluezzz
Involved
Involved


Joined: Feb 08, 2005
Posts: 290
Location: USA

PostPosted: Thu Aug 31, 2006 3:14 pm Reply with quote Back to top

Seems my code was abit different, I copied and pasted this code
Only registered users can see links on this board!
Get registered or login to the forums!


And now it works fine. Thanks : o}
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum