Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
selectric
Regular
Regular



Joined: Aug 06, 2008
Posts: 65

PostPosted: Fri Sep 19, 2008 8:58 pm Reply with quote

Hello and thanks very much for any help in this..

I am working on a custom theme.

I need to know how to show something only under the terms that it's within the admin.php section.

I know how to do these:

if (is_admin($admin)) {

echo 'Show This Only If logged in as Admin.';

}

if ($module_name=='Special') {

echo 'Show This Only If it's the Special Module';

}


What I really need is:

Something....

echo 'Show this only if in the admin.php section';

Since it's not a module, I can't use the $module_name function, and since it's not only logged in as admin, but rather accessing within the admin.php sections, I cant use the is_$admin.

I have tried:

if ($admin_file) {
echo 'admin.php section content';
}

But that doesnt seem to seperate content only for the admin.php section...

Thanks!
 
View user's profile Send private message
selectric







PostPosted: Fri Sep 19, 2008 9:03 pm Reply with quote

I figured it out almost right after I posted this request.


if (defined('ADMIN_FILE')) {
echo 'Show if in the admin.php sections only.';
}
 
montego
Site Admin



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

PostPosted: Sat Sep 20, 2008 7:35 am Reply with quote

Yup. That is exactly what I was going to recommend as I was reading through the thread. Good job!

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

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 ©