mach
Newbie   Posts: 3 Registered: 5/9/2006 Status: Offline
|
posted on 5/9/2006 at 04:07 PM |
First problem, there is no </head> tag added when I let AutoTheme
generate the header.
Second problem is that I am adding custom code to the head() function in
header.php from PHP-Nuke. However AutoTheme does not appear to be
processing this information and instead prints it's own <head>
information. I need to know where AutoTheme gets it's header information
from and why header.php does not get parsed. |
| |
| |
Shawn
Administrator   Posts: 4570 Registered: 10/7/2002 Status: Online
|
posted on 5/9/2006 at 05:25 PM |
1. You probably don't have a </head> tag in your theme.html.
2. AutoTheme uses templates for almost everything so that it is easily
customizable. You can customize the head by editing the correct template
for your doctype. These are found in
'modules/AutoTheme/templates/php-nuke/' and the default is
'HTML401_Transitional.html' or you can select another one for each page in
the AutoTheme admin if you wish.
-Shawn |
| |
mach
Newbie   Posts: 3 Registered: 5/9/2006 Status: Offline
|
posted on 5/9/2006 at 05:35 PM |
The problem I'm encountering is that most PHP-Nuke modules begin by running
'include("header.php");' which works fine if AutoTheme is enabled but
changes made to header.php are ignored.
The problem occurs when tying to use the Gallery2 integration package.
Instead of simply running 'include("header.php");' this script reads
header.php line by line, stores the contents to a $header variable,
modifiers the $header variable to include it's required css, js, etc, and
then runs eval($header). However since we've already determined that the
actual header content of header.php gets replaced by AutoTheme this does
not function.
So I guess my options are:
a) Add php code to 'HTML401_Transitional.html' (or one of the others) to
conditionally add the css/js/etc to the header but will this code get
evaluated?
b) Create a seperate static doctype file and configure it for use only with
the gallery2 module |
| |
Shawn
Administrator   Posts: 4570 Registered: 10/7/2002 Status: Online
|
posted on 5/9/2006 at 05:57 PM |
Both options will work, or if Gallery uses a stylesheet copy it to your
theme style/ directory (if it doesn't, paste the styles into a new
stylesheet and save it in your theme style/ directory).
Then all you need to do is go to AutoTheme admin, select your theme, create
a Custom Page for Gallery and select the additional stylesheet in the
dropdown.
Aside from that, the other two options will work, all you need to do is add
the PHP code like normal surrounded by the PHP tags. To conditionally do
it for Just Gallery you can use the AutoTheme API if you like:
if (atGetModName() == "Gallery") {
do stuff........
}
FYI... If you use PHP, the AutoTheme API provides a fairly simple and
consistant interface and it works across all AutoTheme platforms. Some of
the more popular functions are:
atGetHomeMod()
atIsHomePage()
atIsAdminUser()
atIsLoggedIn()
atGetUserName()
atGetModName()
atGetLang()
-Shawn |
| |
mach
Newbie   Posts: 3 Registered: 5/9/2006 Status: Offline
|
posted on 5/9/2006 at 06:17 PM |
Back to the missing </head> tag. I checked my theme.html and the
first line was in fact </head> but was not showing up in my page
source. I added a comment above this line and the comment did not appear
BUT the </head> tag did. I switched the order of the comment and
</head> tag and the comment, now the 2nd line, showed up but
</head> did not.
Is it programmed behavior for AutoTheme to ignore the first line in
theme.html or is there some sort of error here?
For reference you can view the source from http://oldschoolsfinest.com/ and compare it to http://oldschoolsfinest.com/themes/411/theme.html In
theme.html you'll see my <--! Cory --> comment but not in the page
source. |
| |
Shawn
Administrator   Posts: 4570 Registered: 10/7/2002 Status: Online
|
posted on 5/9/2006 at 07:29 PM |
AutoTheme expects a valid HTML document, so at a minimum you need the
following in this order:
<html><head></head><body></body></html>
-Shawn |
| |