You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 41 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - approval bar [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
dant1259
Captain
Captain


Joined: Jan 16, 2004
Posts: 336


PostPosted: Sat Apr 23, 2005 5:11 pm Reply with quoteBack to top

I know that I like to know quickly when some items needs review for approval, the admin block is great but I'm lazy and don't want to scroll down to it. So... I've added this to the themes/yourtheme/header.php I insert this at the bottom of the code just above the . "</table>" I've left it in the code so you can see where it goes. Only administrators will see the bar, users will never know it's there and you know quickly if you have any new content that requires attn. The below bar is for my site but you can easily customize which submissions you want to see.

Code:
."<tr>\n";

      if (is_admin($admin)) {

       
        echo "<td align=\"center\" bgcolor=\"#CACACA\" colspan=\"4\"><br><a href=\"admin.php\">Administration</a>\n";
           $res=sql_query("select * from $prefix"._queue."", $dbi);
           $num = sql_num_rows($res, $dbi);
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=submissions\">News: $num</a>\n";
           $res=sql_query("select * from $prefix"._links_newlink."", $dbi);
           $num = sql_num_rows($res, $dbi);
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=Links\">Links: $num</a>\n";
           $res=sql_query("select * from $prefix"._downloads_newdownload."", $dbi);
           $num = sql_num_rows($res, $dbi);
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=downloads\">Downloads: $num</a>\n";
           $res=sql_query("select approved from $prefix"._cpg_pictures." where approved = 'NO'", $dbi);
           $num = sql_num_rows($res, $dbi);
           echo "&nbsp;|&nbsp;<a href=\"modules.php?name=coppermine&file=editpics&mode=upload_approval\">Gallery: $num</a>\n";
           $res=sql_query("select isapproved from nuke_calendar_events where isapproved  = '0'" , $dbi);
           $num = sql_num_rows($res, $dbi);
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=Calendar\">Calendar: $num</a>\n";
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=messages\">AdminMessage</a>\n";
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=Configure\">Configure</a>\n";
           echo "&nbsp;|&nbsp;<a href=\"admin.php?op=logout\">Logout</a>\n\n";
           echo "</font></td>";
       } else {
       echo "";
    }

   echo "<tr>\n"
  . "<td bgcolor=\"#000000\" colspan=\"4\"><IMG src=\"themes/yourtheme/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>"
  . "</tr>"


  . "</table>"

  . "</body>"
  . "<html>"


?>
Find all posts by dant1259View user's profileSend private messageSend e-mail
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Sat Apr 23, 2005 6:12 pm Reply with quoteBack to top

In my opinion, adding a given block codes to theme.php is ok.
However, consider general purpose of themes and blocks. Just assume the following situations:

1. When you change your theme pack, what will be happened?
2. As you are going to log in as an admin, the same code (admin block) and the codes in the theme works in a duplicated way.

Rather than this cluttered proviso, how about using custom_footers ? it will be much better, won't it? Just my suggestion.

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories

Last edited by Xyberian on Sat Apr 23, 2005 7:57 pm; edited 2 times in total
Find all posts by XyberianView user's profileSend private messageVisit poster's website
dant1259
Captain
Captain


Joined: Jan 16, 2004
Posts: 336


PostPosted: Sat Apr 23, 2005 6:40 pm Reply with quoteBack to top

yes you are correct. I rarely change my theme and since this doesn't effect the users, I've never given it much thought. This would work equally as well in the footer as you stated. (but then I'd have to scroll to the bottom -- what can I say, that's why I created it, to avoid the scroll)

I'm sure there are several ways to put this in. Just thought I'd share the idea.

Now I have a good hacked center forum block. A very nice amber alert and homeland security threat (but these are in the header.php file also). I can't code but I can hack, it's not pretty but it is functional. Laughing
Find all posts by dant1259View user's profileSend private messageSend e-mail
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Sat Apr 23, 2005 7:58 pm Reply with quoteBack to top

That sounds good. Cheer up.

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
dant1259
Captain
Captain


Joined: Jan 16, 2004
Posts: 336


PostPosted: Sat Apr 23, 2005 8:05 pm Reply with quoteBack to top

I'm not down and your idea of the footer is an excellant one I had not even considered. I'm sure a lot of users might even prefer that. I've shown this to others who wanted it so I just threw it out to share.
Find all posts by dant1259View user's profileSend private messageSend e-mail
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Sat Apr 23, 2005 9:04 pm Reply with quoteBack to top

dant1259 wrote:
I'm not down and...
Ha ha.

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.212 Seconds - 189 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::