Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
condition and vb navbar
#1
in inc/functions.php

Find
Code:
//
// Outputs the contents of a page rendering variables
//
add under

Code:
// ###################### Start iif #######################
function iif($expression, $returntrue, $returnfalse = '')
{
    return ($expression ? $returntrue : $returnfalse);
}
// #############################################

in inc/class_templates.php

find
Code:
$template = str_replace("\\'", "'", addslashes($template));

add under
Code:
$template=str_replace("<if condition=","\".iif(",$template);
$template=str_replace("<then>",",\"",$template);
$template=str_replace("<else />","\",\"",$template);
$template=str_replace("</if>","\").\"",$template);

TEMPLATES

Header
Code:
<script language="Javascript" type="text/javascript">
         var cookieDomain = "$settings[cookiedomain]";
         var cookiePath = "$settings[cookiepath]";
         var quickdelete_confirm = "$lang->quickdelete_confirm";
         var newpm_prompt = "$lang->newpm_prompt";
         var deleteevent_confirm = "$lang->deleteevent_confirm";
         var removeattach_confirm = "$lang->removeattach_confirm";
    </script>
    <a name="top"></a>
<div class="logo" style="background:#fff url('$theme[imgdir]/logobg.gif');"><center><a href="$settings[bburl]/index.php"><img src="$theme[logo]" alt="$settings[bbname]" border="0" /></a></center></div>

<div id="container">
        <div id="header">

<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$theme[tablespace]" cellspacing="$theme[borderwidth]" border="0" width="100%" align="center">
<tr>
    <td class="trow1" width="100%">

            <table cellpadding="0" cellspacing="0" border="0">
            <tr valign="bottom">
                
                <td>&nbsp;</td>
                <td width="100%"><navigation></td>
            </tr>
            </table>

    </td>

    <if condition=$mybbuser[uid]> 0 <then>

        <td class="trow2" valign="top" nowrap="nowrap">
        <div class="smalltext">
        $lang->welcome_back<br />
             <a href="private.php">$lang->welcome_pms</a> $lang->welcome_pms_usage
        </div>
        </td>

    <else />

        <td class="trow2" nowrap="nowrap" style="padding:0px">

        <!-- login form -->
        <form action="member.php" method="post">
                <input type="hidden" name="action" value="do_login" />
        <table cellpadding="0" cellspacing="3" border="0">
        <tr>
            <td class="smalltext">$lang->username:</td>
            <td><input type="text" name="username" title="$lang->username" value="$lang->username" onfocus="this.value=''" /></td>
            <td class="smalltext" colspan="2" nowrap="nowrap"></td>
        </tr>
        <tr>
            <td class="smalltext">$lang->password:</td>
            <td><input type="password" name="password" title="$lang->password" value="$lang->password" onfocus="this.value=''" /></td>
            <td><input type="submit" value="Go!" /></td>
        </tr>
        </table>
        </form>
        <!-- / login form -->

        </td>

    </if>

</tr>
</table>
<!-- / breadcrumb, login, pm info -->

<table cellpadding="5" cellspacing="0" width="100%">
<tr>
    <td class="tcat" align="center"><a href="$settings[bburl]/index.php"> <b> Home</b></a></td>

<td class="tcat" align="center">
<if condition=$mybbgroup['canusercp']== yes <then>
<a href="usercp.php" id="usercp" onclick="return openMenu(this)" class="popup_button">User CP<img src="images/popup_down.gif" border="0" /></a><else /></if>
<if condition=$mybbgroup['canusercp']== no <then>
<a href="$settings[bburl]/member.php?action=register"><b>Register</b></a><else /></if></td>

<td class="tcat" align="center">
<a href="search.php" id="search" onclick="return openMenu(this)" class="popup_button">Search<img src="images/popup_down.gif" border="0" /></a></td>

    <td class="tcat" align="center"><a href="$settings[bburl]/memberlist.php"><b>Members</b></a></td>
    <td class="tcat" align="center"><a href="$settings[bburl]/calendar.php"><b>$lang->toplinks_calendar</b></a></td>
    <td class="tcat" align="center"> <a href="$settings[bburl]/misc.php?action=help"><b>$lang->toplinks_help</b></a></td>

<if condition=$mybbuser[uid]> 0 <then>
<td class="tcat" align="center"> <a href="$settings[bburl]/member.php?action=logout&amp;uid=$mybbuser[uid]"" onclick="return log_out()"><b>$lang->welcome_logout</b></a></td><else /></if>
</tr></table>


            <hr class="hidden" />
                    </div>
        <hr class="hidden" />
        <div id="content">
            $bannedwarning
            $bbclosedwarning
            $unreadreports


<!-- header quick search form -->
    <div class="menupop" id="search-popup" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
            <td class="tcat">search</td>
        </tr>
        <tr>
            <td class="row">
            <form action="search.php" method="post">
                 <input type="hidden" name="action" value="do_search" />
                                  <input type="hidden" name="forums" value="" />
                                <input type="hidden" name="postthread" value="1" />
                <input type="text" class="bginput" name="query" size="20" /><input type="submit" value="Go!" /><br />
                        </td>
        </tr>
        <tr>
            <td class="menu_row"><a href="search.php">search forums</a></td>
        </tr>
        </table>
    </div></form>

<!-- / header quick search form -->

<!-- user cp tools menu -->
    <div class="menupop" id="usercp-popup" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">

        <tr><td class="tcat">quick links</td></tr>
        <tr><td class="menu_row"><a href="search.php?action=getnew">newthread</a></td></tr>
        <tr><td class="menu_row"><a href="misc.php?action=markread">markread</a></td></tr>
        <tr><td class="menu_row"><a

href="misc.php?action=buddypopup">Open Buddy List</a></td></tr>

        <tr><td class="tcat"><a href="usercp.php">User CP</a></td></tr>
        <tr><td class="menu_row"><a href="usercp.php?action=editsig">edit signature</a></td></tr>
        <tr><td class="menu_row"><a href="usercp.php?action=avatar">change avatar</a></td></tr>
         <tr><td class="menu_row"><a href="usercp.php?action=profile">edit profile</a></td></tr>
        <tr><td class="menu_row"><a href="usercp.php?action=options">edit options</a></td></tr>

         <tr><td class="tcat">miscellaneous</td></tr>
        <tr><td class="menu_row"> <a href="private.php">Private Messages</a></td></tr>
        <tr><td class="menu_row"><a href="usercp.php?action=subscriptions">subscribed threads</a></td></tr>
        <tr><td class="menu_row"><a href="member.php?action=profile&amp;uid=$mybbuser[uid]">view profile</a></td></tr>
            
        </table>
    </div>
        
    <!-- / user cp tools menu -->

headerinclude
Code:
<meta http-equiv="Content-Type" content="text/html; charset=$charset" />
<script type="text/javascript" src="jscripts/general.js"></script>
<script type="text/javascript" src="jscripts/menu.js"></script>
<script type="text/javascript" src="jscripts/mybb.js"></script>
<link rel="stylesheet" type="text/css" href="css.php?theme=$theme[tid]" />
$newpmmsg
THEMES

Add in to Additional CSS
Code:
/* Popup Menus */

.popup_button {
color: #FFFFFF;
text-align: right;
font-weight: bold;
padding: 3px;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 3px;
}

a.popup_button:link,
a.popup_button:visited,
a.popup_button:active,
a.popup_button:hover {
text-decoration: none;
color: #FFFFFF;
}

.popup_menu {
position: absolute;
border: 1px solid #000;
background: #ccc;
}

.popup_menu ul
{
margin:0px;
padding:0px;
list-style-type:none;
}

.popup_menu li
{
background: #fff;
margin: 1px;
padding: 0;

}

.popup_menu ul li a
{
display: block;
padding: 3px;
color: #000;
text-decoration: none;
}

* html .popup_menu ul li a {
display: visible;
width: 100%;
}

.popup_menu a:hover {
background: #C7DBEE;
text-decoration: none;
color: #000;
}

.menupop {
    background: #FFFFFF;
    color: #000000;
    border: 1px solid #0B198C;
}
more template stuff will be add later

** Note: Please remember to use [code][/code] tags to make the code easier to read. Dale Hay. **


Attached Files
.zip   file for vb navbar.zip (Size: 3.68 KB / Downloads: 704)
Reply
#2
And your post with codes refer to what activity?

EB
EuroDanceHits.com Serving a worldwide dance community for a decade!
Reply
#3
Thanks for thatBig Grin It's very helpfulToungue
Reply
#4
ok add vb navbar
Reply
#5
Can you check my site. http://www.amatorbalikci.net

Gif's don't show === nav_end / nav_start

And the dropdown menus are transparent
Reply
#6
did you download zip file

and add the drop down theme stuff to your theme/style
Reply
#7
Yes I did but there is no nav_end / nav_start in your above codes

for quick search and User CP borders are "0" I made them "1" now they have borders but backgrounds are solid.

I put <br /> to 'welcome_back' after {1}</strong> in global.lan.php

http://www.amatorbalikci.net
Reply
#8
How can I Admin CP

I added "View New Posts" but I don't know how hide from un-registered users
Reply
#9
get the nav link stuff for you in a sec downloading right now

Code:
<td class="tcat" align="center">
<if condition=$mybbgroup['canusercp']== yes <then>

LOGIN STUFF HERE

Code:
<else /></if>
<if condition=$mybbgroup['canusercp']== no <then>

NOT LOGIN STUFF HERE

Code:
<else /></if></td>

go to admin cp just add /admin to the link but if you want it as link on your forum i tell you how todo it when i get the edit nav
Reply
#10
TEMPLATES

nav

Code:
<div class="navigation">
<img style="vertical-align:bottom;" src="$theme[imgdir]/nav_start.gif"/>$nav$activesep$activebit
</div>

nav_sep

Code:
>

nav_sep_active

Code:
<br><img style="vertical-align:bottom;" src="$theme[imgdir]/nav_end.gif"/>

ADD ADMIN LINK TO NAVBAR

find

Code:
<td class="tcat" align="center"> <a href="$settings[bburl]/misc.php?action=help"><b>$lang->toplinks_help</b></a></td>

add under

Code:
$admincplink

header_welcomeblock_member_admin

Code:
<td class="tcat" align="center"><b><a href="$settings[bburl]/$config[admindir]/index.php">$lang->welcome_admin</a></b></td>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)