Forum Moderators: coopster
i am currently creating a theme for PostNuke [postnuke.com] which has a flash animation as the header... the flash contains dynamic text which is loaded from variables in an external file which i created using php so it can show the current user, the time, and hopefully the site name and slogan if i can get this right.
the data.php file looks like this
&site=<?php code?> //dont know the code
&slogan=<?php code?> //that i have to put
&usr=Welcome <?php code?>! // on these lines
&date=<?php print date("\T\o\d\a\y \i\s l, F j, Y")?> //this one works fine
walter
alright let's see if we can'ty find you a solution then
&site=<?php code?> //dont know the code
&slogan=<?php code?> //that i have to put
&usr=Welcome <?php code?>! // on these lines
&date=<?php print date("\T\o\d\a\y \i\s l, F j, Y")?> //this one works fine
first thing, why the ampersand?
is it creating a dynamic url that it will then use to call the flash file?
where will site, slogan and usr come from? db?
to my knowledge, the site name, slogan, and user names all come from the database. reading up on some documentation of postnuke, to call the sitename and slogan you type
$slogan = pnConfigGetVar('slogan'); //for slogan
$sitename = pnConfigGetVar('sitename'); //for site name and then you put the $slogan and $sitename where you want theme to be displayed. i tried to do that but i get an error
Fatal error: Call to undefined function: pnconfiggetvar() in /homepages/44/d88176274/htdocs/html/~fcfcyouth/data.php on line 1
Can you look at the includes in a file that uses pnConfigGetVar and see what libraries it includes? Then look in those libraries to find which one contains that function. Then add a line at the top of your file
include "/path/to/library.php";
that should fix that fatal error
function themeheader() { $slogan = pnConfigGetVar('slogan');
$sitename = pnConfigGetVar('sitename');
$banners = pnConfigGetVar('banners');
...html code here defining how to display the webpage...
)
btw... thanks for helping and sorry if what i am saying is not really helping you help me... complely new to php and i will not cover php in school until around my 3rd year (only a freshmen)
is there a config file where those vars live?
is that file included by another file?
do you have the option of using grep to find occurences of that function?
or a "find in file" option in one of your text editors?
unless you can find out where those vars live or where that function is I am at a loss.
but don't worry about it n e more... i found out what the command is,
<?php pnUserGetVar('pn_name')?> where "pn_name" is the column title in the mysql database that contains the Real name of the user, which i can easily replace with "pn_uname" to display the logged in user name.... but thanks for your help because if you didn't have me go on a hunt for those includes/files, i wouldn't have found the solution
walter mazza
(btw, sorry about the URL in the last post... must of have skiped that part of the TOS/Posting Rules but at least i didn't post the ENTIRE code! ;P )