Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
GeoffM
New Member
New Member


Joined: May 19, 2004
Posts: 21
Location: Bellingham, WA.

PostPosted: Sun Jun 13, 2004 2:48 am Reply with quote

I love the site info block I use it on all my sites, there are 2 features I'd like to see, (I saw it on cpg's nuke) (I'm not a coder so If I post something wrong please forgive me)

"Who is Where" (admin view or selectable to member view)

Code:
$memres = $db->sql_query("SELECT w.uname, w.module, w.url, u.user_allow_viewonline FROM ".$prefix."_session AS w LEFT JOIN ".$prefix."_users AS u ON u.username = w.uname WHERE guest = 0 ORDER BY w.uname");

$anonres = $db->sql_query("SELECT uname, module, url FROM ".$prefix."_session WHERE guest = 1 ORDER BY uname");
$online_num[0] = $db->sql_numrows($memres);
$online_num[1] = $db->sql_numrows($anonres);
$online_num[2] = $online_num[0] + $online_num[1];


"Staff Online" (all View)

Code:
function staff_online() {

    global $prefix, $db, $user_prefix, $pm_active;
    $num = 0;
    $return = "\n<hr />\n<img src=\"images/blocks/group-3.gif\" alt=\"\" height=\"14\" width=\"17\" /> <b><u>"._STAFFONL.':</u></b><br />';
    $sql = "SELECT a.uname, u.user_id FROM ".$prefix."_userinfo_admin AS a LEFT JOIN ".$prefix."_users AS u ON u.username = a.uname";
    $result = $db->sql_query($sql);
    if($db->sql_numrows($result) < 1) {
        $return .= '<br /><i>'._STAFFNONE.'</i>';
    }

&
Code:
$info = staff_online();

$content .= $info;



I look thru the site_info block but the code didn't seem to match (sorry showing my lack here) so I just left it be thinking to ask here

I really do think these would be great additions to your site info block
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Sun Jun 13, 2004 7:17 am Reply with quote

Thanks for your suggestions.

I already offer a who's on line block in my realtime-stats block. Raven's Who-is-Where is soon to be released as a separate block. It is a no frills WIW block.

I have not offered a a staff-online block for the simple reason that I don't consider those who help me as 'staff'.

That cpg code requires modifications to the session table for the WIW block and a new table for the staff-online block. So, there would be no way to implement it to standard nuke without modifications to base tables. I try, with my addons, to not alter base tables. That way they are easily upgradable. On the other hand, if you use a customized version like cpg, you cannot easily upgrade as new releases or other addons are issues unless you stick with cpg.
 
View user's profile Send private message
GeoffM
PostPosted: Sun Jun 13, 2004 11:49 am Reply with quote

Raven, thanks for the "enligthenment" altering tables is something i do understand.

okay time for my rant (this isn't against anyone);

I like PHP-nuke so much I use it on the 5 sites I own and 3 sites I maitain for others, I've tried postnuke sometime ago and went back, I've tried CPGnuke (of the branches this one I think is the best), OSC2nuke but found support and addons lacking. it just seems lately that for a CMS, Nuke is getting blockexcentristic the more we add to our sites the more I wonder what our users actually see. Bang Head

okay rant over
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©