Topic: i need to call out functions.php in header.php

like i want to get the variable in functions.php:

// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
    global $pun_config, $lang_common, $pun_user;

    // Index and Userlist should always be displayed
    $links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
    $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';

    if ($pun_config['o_rules'] == '1')
        $links[] = '<li id="navrules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';

    if ($pun_user['is_guest'])
    {
        if ($pun_user['g_search'] == '1')
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

        $links[] = '<li id="navregister"><a href="register.php">'.$lang_common['Register'].'</a>';
        $links[] = '<li id="navlogin"><a href="login.php">'.$lang_common['Login'].'</a>';

        $info = $lang_common['Not logged in'];
    }
    else

i want to call out


$links[] = '<li id="navregister"><a href="register.php">'.$lang_common['Register'].'</a>';

in my header.php template

smile Thanks! <3

Re: i need to call out functions.php in header.php

Uh, call out? What does that mean?

Re: i need to call out functions.php in header.php

So if i do the php code tag's around it it shows smile

loL

Re: i need to call out functions.php in header.php

...OK, I'm still not sure what you're actually trying to do. tongue

Re: i need to call out functions.php in header.php

hmmm im trying to use a function from function.php with my php tags so i can use the functions indivudally in my header.php

lol

Re: i need to call out functions.php in header.php

I think you need to learn more PHP/programming terms tongue
So you want to put a link to register.php somewhere? Is that it?

Re: i need to call out functions.php in header.php

ok look at functions.php lol

$links[] = '<a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';

i want to PUT that whole function OR ANY FUNCTION so it shows up in header.php

so yea if it's a register 1 then ya smile

Thanks smartys smile atleast im getting support <3

Re: i need to call out functions.php in header.php

OK, that's not a function. It's a line of code. And I'm still not sure what you want to do with it, since it by itself does nothing. I think you're trying to use terminology that you don't actually understand. tongue
Now, are you trying to add a link somewhere? If so, where (not "header.php" but "under the navlinks" or "right under the title", some place specific)?

Re: i need to call out functions.php in header.php

OMG HHHAAAHA OMG LOL

bro i just need to use that LINE OF Code INVIDUALLY IN MY HEADER.PHP INSTEAD OF USING IT IN FUNCTIONS!!

make kinda since? if not u got aim or msn? LOL

Re: i need to call out functions.php in header.php

That line of code adds a string to an array. Is that what you're trying to do, or are you trying to output a link?

Re: i need to call out functions.php in header.php

just trying to make it show, lol

man im so so srry im learning php but u guys are the best @ helping me bcz ur proffesional..

ya i just need to use that line to show up in header.php big_smile

12

Re: i need to call out functions.php in header.php

If you stop using all of the PHP terminology and just say what you are actually wanting to achieve, precisely, you may get further with your question. Your question makes pretty much bugger all sense at the moment.

13

Re: i need to call out functions.php in header.php

i thought he was just trying to show the register link on its own? not with the other menu items? though i dont see where he would get with doing this...lol

Sorry. Unactive due to personal life.

Re: i need to call out functions.php in header.php

matt1298 wrote:

i thought he was just trying to show the register link on its own? not with the other menu items? though i dont see where he would get with doing this...lol

exactly what i need to do..

also how can i do that with other links as well?

15

Re: i need to call out functions.php in header.php

well why are you trying to show them???

then i can tell you the best way.

Sorry. Unactive due to personal life.

Re: i need to call out functions.php in header.php

so i can customize my header a lil bit more

24-7Gt.com

xd

17

Re: i need to call out functions.php in header.php

erm!! you an edit the function in the page to suit your needs! if you want to edit the bit where is says register, go to your lanauge pack! lang/english/general??

you need help on msn?

Sorry. Unactive due to personal life.

18 (edited by NiCk Newman 2012-10-18 00:25)

Re: i need to call out functions.php in header.php

ya giv me email i'lla d u