HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Another Admin Center mod

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#1022 (In Topic #251)
Avatar

Another Admin Center mod

Hoorah! It's done!

Updated: Forgot to add the ability to customise the time :lol: Fixed now ;)

Suffice it to say If I were to list all the changes in this version, you would end up in the middle of next week  :rolleyes:

The basics:
This now works almost completley by variables. Instead of numbers, words or what not, its variables. Come on. Say it. Variables Variables Variables :D

- The Bullet Images are now also variables. What does this mean? You simply have to edit one file one variable to change ALL the bullets! (ofcourse, there's actually 2 variables.. one for the "todo" and one for the "completed").

Code

$bullet_full  = "b_full.gif";
$bullet_empty  = "b_empty.gif";

This says to look for "b_full.gif" in the current theme folder. Which is obviously easy to change now  B)

- If you don't like to monitor gifts, fine. Want to have news items in the admin center but don't want the flagrant text? Fine. Just change the right variable and voilà B)

Code

$show_news  = "1"; // <= Show the news in every section.
$show_iotd   = "1"; // <= Show the IOTD in every section.
$show_poll  = "1"; // <= Show the Poll in every section.
$show_fotw   = "1"; // <= Show the FOTW in every section.
$show_flag   = "1"; // <= Show the Flagrant Text items in every section?

- Want to change the "Schedule" of the updates/todos but don't want to bother with uploading files after files? Well. I'm lazy too :P :D

Code

// "To-Do Variables" configuration
// (aka if above this number, not done)
// ------------------------------------
$todo_iotd  = "25"; // <= Hours >> If above, needs to be done..
$todo_poll     = "14"; // <= Days  >> If above, needs to be done..
$todo_news  = "14"; // <= Days  >> ......
$todo_fotw  = "7";  // <= Days  >> ......
$todo_alldone   = "0"; // <= This actually does squat at this point... :D
$todo_alltodo   = "0"; // <= Again, nothing done by this yet.

// Done automatically. "todo" - 1 hour/day (this shouldn't be touched...)
//---------------------------
$comp_iotd     = $todo_iotd - 1;
$comp_poll     = $todo_poll - 1;
$comp_fotw     = $todo_news - 1;
$comp_news     = $todo_fotw - 1;

Basicly: If IOTD hours is above or equal to $todo_iotd then it needs to be done.
$comp_iotd is for the "completed tasks" section…

As shown here:

Code

if (get_option("is_on_iotd")==1 && $show_iotd == 1)
{
   $date=get_query_value_null_ok("SELECT `Date` FROM `ocp_iotd` WHERE validated='1'");
   if (!isset($date)) $hours="(never)"; else $hours=round((time()-$date)/60/60);
   if ($hours>=$todo_iotd) echo "<IMG SRC='{$base_url}/themes/{$theme}/{$bullet_empty}'> <A HREF='".build_url(array("page"=>"iotd","type"=>"choose"),"admincenter")."'>Update IOTD</A> [$iotd_queue waiting]<br />";
   if ($hours<=$comp_iotd) $done_iotd=1;
}[CODE]


- How to configure it is also very simple. It's just like editing a .txt file such as sidebar.txt or quotes.txt via the admin cp.



You can download the attachement, a zip file containing 3 files.
- acpsettings.php > this is where all the variables are stored.
- acpconfig.php > makes it so that you can use this instead of uploading back and forth...
- start.php > the admincenter's start.php.

Upload all 3 files in /admincenter/custom/
make sure that acpsettings.php has a permission mask of 666 (all read and write, none execute).

Then to start using it, add this line to your admin menu:
[code]ACP Configuration = index.php?page=acpconfig

And now all you gotta do is customize it. By default everything is one. Also, be sure to change the source .txt file for the admin notes found at the bottom of acpconfig (actually acpsettings, like i said.. acpconfig is a text editor which points to the acpsettings.php file ;))


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
Posted
Rating:
#1026
Avatar

ocStaff (admin)

Are you going to tell us what this does?



Become a fan of ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
Posted
Rating:
#1032
Avatar

ocStaff (admin)

Or how to use it? My guess is that this is a "teaser" of how easy it will be to configure your next mod?

Back to the top
 
Posted
Rating:
#1034
Avatar

Yup Yup :)

Was going to put that (and more) in start.php but im tinkering around with the 'require once' thing :)

It's almost done. I just gotta figgure out how to make something like the 'configuration' page in the admin center <_<

:)


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
Posted
Rating:
#1064
Avatar

Tada! :D (check first post)

B) B) B)

Edited: oh. forgot to mention. post bugs in this topic or on my forums at a brand new fancy site > http://forums.jediarchives.ca :)


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
Posted
Rating:
#1108
phT
Avatar

Fan in training

Is this similiar to your first admincenter?
Back to the top
 
Posted
Rating:
#1110
Avatar

It's almost exactly the same thing, except now its even easier to configure your stuff. every section can also be turned on or off :) (thru the variables, acpsettings.php which can be configured thru the admin center via the acpconfig link you need to put…)

Saves alot of time instead of logging into your ftp manager and uploading the file back and forth :lol: ;)


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: