Jump to content
TNG Community
John Paul

inserting php code in theme.php

Recommended Posts

John Paul

Hey e107 guys and all you tng guys and gals!. Hope ya'll are having a good new year.

I'm creating a new theme for my new site using template 8 as the template. So far so good but it's slow going as I always end up having to change things, you know what i mean.

any way I want to be able to include this part of template 8's topmenu.php in my e107 theme.php:


<?php
echo tng_icons(1);
global $currentuser, $currentuserdesc, $flags;
$flags[noicons] = 1;

if( $currentuser) {
    echo "<span class=\"logintext\">$text[welcome], $currentuser  -  ";
    echo "<a class=\"logintext\" href=\"$cms[tngpath]logout.php\">$text[mnulogout]</span></a>";
}
else {
    echo "<span class=\"logintext\">$text[anon]  -  ";
    echo "<a class=\"logintext\" href=\"$cms[tngpath]login.php\">$text[mnulogon]</span></a>";
}
?>

I know in e107 I need to use the

 and 

tags, but right now it only shows the actual code in the place it need to be. I'm no php programmer but i know with a little help from the tng users I'll be able to figure this out. I searched hi and lo on the e107 forums, but I'd rather post here for an answer.

Thanks

Share this post


Link to post
Share on other sites
Woody

Hi John,

it's nice to hear from you. Do you use also the tngIL 1.5b4. bridge? Or how did you do that? And the TNG version 7.13?

Share this post


Link to post
Share on other sites
John Paul

Hi John,

it's nice to hear from you. Do you use also the tngIL 1.5b4. bridge? Or how did you do that? And the TNG version 7.13?

Hi Woody, yes I'm using tng 7.1.3 and tngIL 1.54b. all that seems to be working ok now, I'm just working out all the kinks in the template and then start adding the content....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×