Jump to content
TNG Community

inserting php code in theme.php


John Paul

Recommended Posts

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

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...