PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  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
j4rdin
Worker
Worker


Joined: May 26, 2006
Posts: 147
Location: West Sussex - UK

PostPosted: Sun Apr 27, 2008 2:50 pm Reply with quote Back to top

I have just added the Approved Membership Lite module to Raven Nuke 2.20.02 and all seems to work Ok.

Is it possible to add and "membership accounts waiting for approval" to the admin waiting content module. At present if you don't check your emails on a regular basis, you could miss a new members application.

John
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Apr 27, 2008 5:57 pm Reply with quote Back to top

Hi John,

I'm sure the duplicate post wasn't intentional, so I removed one.

The waiting content block is actually in the mainfile.php in the function adminblock(). Try this, open mainfile.php and find function adminblock() {. Then,
FIND:
Code:
        $content .= '</span>';
        themesidebox($title, $content);

INSERT BEFORE:
Code:
        # Approve Membership
        global $user_prefix;
           $result = $db->sql_query('SELECT COUNT(*) FROM '.$user_prefix.'_pendingusers');
        $row = $db->sql_fetchrow($result);
        $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=approvemembers">'._USERS.'</a>: '.$row[0].'<br />';
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Apr 27, 2008 7:33 pm Reply with quote Back to top

You will also need to add this line to your /language/lang-english.php file (or the appropriate language file):
Code:
define('_USERS','Users');
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Mon Apr 28, 2008 5:57 am Reply with quote Back to top

j4rdin, I see that you were already well taken care of over here. Thanks kguske!
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Mon Apr 28, 2008 2:16 pm Reply with quote Back to top

Haven't add it to RN SVN yet, but I added logic to detect if either Approve Membership or CNBYA have been added, and the count is displayed accordingly.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Tue Apr 29, 2008 5:09 am Reply with quote Back to top

kguske, sounds good sir.
View user's profile Send private message Visit poster's website
j4rdin
Worker
Worker


Joined: May 26, 2006
Posts: 147
Location: West Sussex - UK

PostPosted: Tue Apr 29, 2008 12:52 pm Reply with quote Back to top

kguske wrote:
Haven't add it to RN SVN yet, but I added logic to detect if either Approve Membership or CNBYA have been added, and the count is displayed accordingly.


Thanks for the quick reply and sorry about the duplicate post, for some reason FF didn't show that the post had been sent properly (for either post) not sure why, hence my trip over to your site Montego.

I came across a post somewhere which asked about added functionality for the Waiting Content block, it seemed to suggest if everything was added it would soon get to big and as someone pointed out most of the time it doesn't show anything on a lot of sites.

Is it possible to add an admin control module for the block, maybe to allow the admin to switch of those functions not required and to switch the display between on and only when content waiting.

Thanks for the help.

John
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Apr 29, 2008 7:09 pm Reply with quote Back to top

I wouldn't worry about it getting too big by just adding the number of users waiting to be approved. But I definitely appreciate the concern - why display anything if there is nothing pending?

How about replacing function adminblock() in mainfile.php with this:
Code:
function adminblock() {
    global $admin, $prefix, $db, $admin_file, $user_prefix;
    if (is_admin($admin)) {
        $sql = 'SELECT title, content FROM '.$prefix.'_blocks WHERE bkey=\'admin\'';
        $result = $db->sql_query($sql);
        while (list($title, $content) = $db->sql_fetchrow($result)) {
            $content = preg_replace('/\badmin.php/', $admin_file.'.php', $content); //RN6444
            $content = '<span class="content">'.$content.'</span>';
            themesidebox($title, $content);
        }
        $title = _WAITINGCONT;
        $content = '<span class="content">';
        $num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_queue'));
        if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=submissions">'._SUBMISSIONS.'</a>: '.$num.'<br />';
        $num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_reviews_add'));
        if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=reviews">'._WREVIEWS.'</a>: '.$num.'<br />';
        $num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_newlink'));
        if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=Links">'._WLINKS.'</a>: '.$num.'<br />';
        $modreql = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_modrequest WHERE brokenlink=0'));
        if ($modreql > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=LinksListModRequests">'._MODREQLINKS.'</a>: '.$modreql.'<br />';
        $brokenl = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_modrequest WHERE brokenlink=1'));
        if ($brokenl > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=LinksListBrokenLinks">'._BROKENLINKS.'</a>: '.$brokenl.'<br />';
        $num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_newdownload'));
        if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=downloads">'._UDOWNLOADS.'</a>: '.$num.'<br />';
        $modreqd = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_modrequest WHERE brokendownload=0'));
        if ($modreqd > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=DownloadsListModRequests">'._MODREQDOWN.'</a>: '.$modreqd.'<br />';
        $brokend = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_modrequest WHERE brokendownload=1'));
        if ($brokend > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=DownloadsListBrokenDownloads">'._BROKENDOWN.'</a>: '.$brokend.'<br />';
        $result = $db->sql_query('SELECT COUNT(*) FROM '.$prefix.'_gcal_event WHERE approved = 0');
        $row = $db->sql_fetchrow($result);
        $num = $row[0];
        if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=gcalendar">'._GCALENDAR_EVENTS.'</a>: '.$row[0].'<br />';
        # Approve Membership
        if (file_exists('modules/Approve_Membership/index.php'))
        {
            $result = $db->sql_query('SELECT COUNT(*) FROM '.$user_prefix.'_pendingusers');
          $row = $db->sql_fetchrow($result);
          $num = $row[0];
          if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="'.$admin_file.'.php?op=approvemembers">'._USERS.'</a>: '.$row[0].'<br />';
        }
        # CNBYA
        if (file_exists('modules/Your_Account/credits.html'))
        {
            $result = $db->sql_query('SELECT COUNT(*) FROM '.$user_prefix.'_users_temp');
          $row = $db->sql_fetchrow($result);
          $num = $row[0];
          if ($num > 0) $content .= '<strong><big>&middot;</big></strong>&nbsp;<a href="modules.php?name=Your_Account&amp;file=admin&amp;op=listpending">'._USERS.'</a>: '.$row[0].'<br />';
        }
        $content .= '&nbsp;</span>';
        themesidebox($title, $content);
    }
}

Montego, I think this would be a nice addition to RN - would you agree?
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Wed Apr 30, 2008 5:31 am Reply with quote Back to top

I supposed that I could get used to it, but having worked with buggy software for so long, I always get nervous when I don't see something that I expect to be there. I.e., I like seeing that I have NO pending content. BUT, I'm a pretty "quirky" guy, so never mind me... Laughing

However, that still does raise a support point that many people who are familiar with nuke will be asking "where is my waiting content content?". But, it would tighten up that space a bit.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Wed Apr 30, 2008 5:38 am Reply with quote Back to top

Oops...added it to SVN with the nukeWYSIWYG changes. The waiting content block will still be displayed - it just won't show anything that doesn't have anything waiting.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Wed Apr 30, 2008 6:25 am Reply with quote Back to top

Lets see if the others notice... Wink Smile
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Wed Apr 30, 2008 6:39 am Reply with quote Back to top

Last night I was playing around with a DHTML popup that would display waiting content. Not too hard to implement, just need to add cookie code to the JS so it would display it only once per browser session, rather than on every page, which would be pretty annoying to the admin...
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