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
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 414
Location: France,Translator

PostPosted: Tue May 26, 2009 7:17 am Reply with quote Back to top

Just a a quick idea , But I'm looking forward to change the theme for the administration part.
The idea behind that is to have a different theme when you access admin.php , I know blocks can be removed via the themes/Your_Theme/theme.php , but the overall function is in mainfile.php

this is what I added in get_theme() ,
Code:
if ('ADMIN_FILE') $theme = 'Ravenice';


I tested this it works , but now I want to push it further , to control from the admin pannel rather than hardcoded.
in SQL added Admin_Theme in nuke_config
in mainfile.php
Code:
if ('ADMIN_FILE') $theme = '$Admin_Theme';


basicly I added a new language friendly field in settings , how can I recall this field in mainfile.php?
View user's profile Send private message Visit poster's website MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue May 26, 2009 9:07 am Reply with quote Back to top

In mainfile.php at/around lines 172,173, you will see this code which reads all the field/column names/values from the `config` table (settings) into the $nuke_config array.
Code:
$result = $db->sql_query("SELECT * FROM `".$prefix."_config` LIMIT 0,1");
$nuke_config = $db->sql_fetchrow($result);


In mainfile.php at/around lines 234-237 you will see examples of how to read the array values:
Code:
$sitename = $nuke_config['sitename'];
$nukeurl = $nuke_config['nukeurl'];
$site_logo = $nuke_config['site_logo'];
$slogan = $nuke_config['slogan'];
// etc.


So you would then access your new field value like this (note the change from what you had). This also assumes you have properly escaped the value and verified that the person is an admin. I leave that up to you Wink
if (is_admin($admin)) $theme = $nuke_config['Admin_Theme'];
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
bluerace
Regular
Regular


Joined: Apr 04, 2009
Posts: 85
Location: Behind you

PostPosted: Tue May 26, 2009 9:26 am Reply with quote Back to top

Basically, bbtonuke should switch admin CP in the same theme-name templates automatically.

But there is no call ThemeSelect to bring up admin templates in phpnuke themes/forums/templates/YOUR-THEME-NAME.

very long time ago, we did in order to keep the template consistency. However, it was discarded.

IF you want, tell me to post the codes. I will find it from my backup.
However, it will ask you to add corresponding templates under modules/forums/templates folder.

As you see if you browse phpBB2 styles, some phpBB2 styles have their own admin templates, others not.

For instance, if your theme is fisubice, look at the phpBB2 template of fisubice (not modification by Daz for phpnuke) then you will find admin templates (I don't remember exactly).

Then, the change a couple of lines in default config file in bbtonuke (forums module) will bring up admin cp in corresponding templates.
View user's profile Send private message Visit poster's website
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 414
Location: France,Translator

PostPosted: Tue May 26, 2009 11:26 am Reply with quote Back to top

Ok , thanks raven. I was looking somewhere else Very Happy
But what I was suggesting is that it only occurs in admin.php not when you are browsing as admin the rest of the CMS.
View user's profile Send private message Visit poster's website MSN Messenger
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