1 (edited by mirage 2005-04-09 17:18)

Topic: Integrate navigationlinks

how I can Integration the navigationlinks of PunBB into my own webSide?
i have in to my own index.php,

<?
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'include/template/main.tpl';
$tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');
?>

and then

<?php
   echo ($tpl_main;)
?>

but is not work sad
can someone help me please , i finde no doks. or good tutorials about Intergration
/common.php "$pun_user['username']" a
Index of all Strings i can use and more

2 (edited by mirage 2005-04-09 19:33)

Re: Integrate navigationlinks

I have finde the String "$lang_profile['Profile menu']"

but how I can integrate into my own HTML or PHP side.

<?php echo pun_htmlspecialchars($lang_profile['Profile menu']); ?>   

don't work sad

3 (edited by shinko_metsuo 2005-04-09 19:48)

Re: Integrate navigationlinks

look for something like <pun_navlinks> in header.php and that might help

4 (edited by mirage 2005-04-09 20:04)

Re: Integrate navigationlinks

i believes you means:
$tpl_main = str_replace('<pun_navlinks>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_navlinks()."\n\t\t".'</div>', $tpl_main);

but how i can use this in my own WebPage????,
i have testing "echo ($tpl_main;)"
does not go
;(
i'm not the code guru sorry

Re: Integrate navigationlinks

your going about this the wrong way, do you want to add the whole punbb header to your page or just the navigation links? it would be much much easier if we could see your current site and what you want to add

6 (edited by mirage 2005-04-10 06:01)

Re: Integrate navigationlinks

http://home.arcor.de/kidcut/miragex.jpg

1 Is me own CodetPHP index site
2 Is the PunBB Forum, in a IFrame Intergratet in me Site
3 are NavigationLinks in me own CodetPHP index site
4 Is the PunBB NavigationLinks

now will take the PunBB NavigationLinks(4.) and Integrate to me own index Site
in (3).

Re: Integrate navigationlinks

ok if you open main.tpl and remove <pun_navlinks>

then in your php file that generates the header add this to the top

<?php

define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';

you'll need to change PUN_ROOT if punbb is in a different folder

then in the place you want the navigation added do

<?php generate_navlinks(); ?>


ack i just read your post again and your using an iframe, its better to include the rest of your site around punbb using main.tpl otherwise i'm not sure the solution i posted above will work

8 (edited by mirage 2005-04-11 08:51)

Re: Integrate navigationlinks

hi now its work: thx

    <?php echo generate_navlinks(); ?>   smile

and i have Edit the functions.php to open the Links in a <IFrame> and is work to: big_smile

function generate_navlinks()
    // Index and Userlist should always be displayed
    $links[] = '<li id="navindex"><a href="forum/index.php" target="indexframe">'.$lang_common['Index'].'</a>';


but the Navlinks are Vertikal among each other now:
    * Index
    * Mitgliederliste
    * Suche
    * Profil
    * Verwaltung
    * Abmelden

but i like this way Horizontal:
    *  Index    * Mitgliederliste    * Suche    * Profil    * Verwaltung    * Abmelden
waht i must do for this :?

greets

9 (edited by Connorhd 2005-04-11 10:28)

Re: Integrate navigationlinks

its a style thing you need something like .li { display: inline } or something, i'm at college atm so i can't help more

10 (edited by mirage 2005-04-11 20:44)

Re: Integrate navigationlinks

i have change me CSS file to aragnge the Links Horizontal : and works fine with Firefox
but not realy iExpl.
:
li{display: inline;    text-align: center;    letter-spacing: 0px;    word-spacing:80px;}

now i have a problem with the Redirecter InLogin, i have finde in login.php:
redirect($_POST['redirect_url'], $lang_login['Login redirect']);

is redirect_url the URL goes after the Login or ?????

11 (edited by Parker 2005-05-20 00:25)

Re: Integrate navigationlinks

mirage wrote:

i have change me CSS file to aragnge the Links Horizontal : and works fine with Firefox
but not realy iExpl.

Hi,

I have found that in IE, you need to put all your <ul> code in one line without hard or soft breaks.

For instance, this: Home  FH Tiles

Has to be coded or output like this:

<ul><li id="on_page"><a href="/" title="Home">Home</a></li><li><a href="/titles/" title="FH Titles">FH Titles</a></li></ul>


and not like this:

<ul>
<li id="on_page">
<a href="/" title="Home">Home</a>
</li>
<li>
<a href="/titles/" title="FH Titles">FH Titles</a>
</li>
</ul>

and to do that... try this code in your function.php code:

return '<ul>'."".implode($lang_common['Link separator'].'</li>'."", $links).'</li>'."".'</ul>';

instead of this:
return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';