Go to... functions.php and look for this...
//
// Display the profile navigation menu
//
Make sure the code is ok... in other words...check if any words added. i.e. the arch directory
You are not logged in. Please login or register.
PunBB Forums → Posts by StevenBullen
Go to... functions.php and look for this...
//
// Display the profile navigation menu
//
Make sure the code is ok... in other words...check if any words added. i.e. the arch directory
because its aiming at wrong directory... where have you put in arch?
You have a problem with your profile menu. All the links are simliar to this...
but should be like this
So you have manually (I guess) edited a file and put in the directory 'arch/' scan back over your latest changes and you should find fix.
Oh 'favorite' icon... my mistake.
Ok... Silly question.
Icon for what? and displayed where?
@chuyskywalker
Any chance of the modified karma mod you use?
Thanks.
Also... whats the new features coming to BF2S? I cant see where you can go next, so very curious about this one... unless its stat orientated again.
It works... but something that works does not mean its great. By all means check out my code, but its not great.... The javascript is just a dhtml menu from google.... then converted... Sorry cant credit producer as cant remember name and deleted his details.
Doh!
Oi thats my site...
I am afraid that I can chop it up and pass it over.. but it was way over a year ago that I produced that now. So by all means ask any questions if any problems.... but I cant gurantee a right answer or that this will even work. Sorry!
Here you go...
My functions.php
//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
global $pun_config, $lang_common, $pun_user;
$links.=<<<EOD
<ul id="menuList">
<li class="menubar">
<a href="index.php" class="starter" accesskey="n" title="">HOME</a>
<ul id="home" class="menu">
EOD;
if (!$pun_user['is_guest']) {
$links.='<li><a class="starter" accesskey="" title="" href="profile.php?id='.$pun_user['id'].'"> PROFILE</a></li>';
$links.='<li><a class="starter" accesskey="" title="" href="message_list.php"> MESSAGES</a></li>';
}
if ($pun_user['g_id'] == '1') {
$links.='<li><a class="starter" accesskey="" title="" href="admin_index.php"> ADMIN</a></li>';
$links.='<li><a class="starter" accesskey="" title="" href="userlist.php"> USERLIST</a></li>';
}
if ($pun_user['g_id'] == '2' || $pun_user['g_id'] == '1') {
$links.='<li><a class="starter" accesskey="" title="" href="/phpcountersmart/index.php"> WEB STATS</a></li>';
}
if (!$pun_user['is_guest']) {
$links.='<li><a class="starter" accesskey="" title="" href="login.php?action=out&id='.$pun_user['id'].'"> LOG OUT</a></li>';
} else {
$links.='<li><a class="starter" accesskey="" title="" href="login.php"> LOGIN</a></li>';
$links.='<li><a class="starter" accesskey="" title="" href="register.php"> REGISTER</a></li>';
}
$links.=<<<EOD
</ul></li>
<li class="menubar">
<a href="forum.php" class="starter" accesskey="f" title="">FORUM</a>
<ul id="forum" class="menu">
EOD;
if (!$pun_user['is_guest']) {
$links.='<li><a class="starter" accesskey="" title="" href="search.php"> SEARCH</a></li>';
}
$links.=<<<EOD
<li><a class="starter" accesskey="" title="" href="gallery.php"> GALLERY</a></li>
<li><a class="starter" accesskey="" title="" href="downloads.php"> DOWNLOADS</a></li>
</ul></li>
<li class="menubar">
<a href="mhclan.php" class="starter" accesskey="d" title="">MH CLAN</a>
<ul id="mhclan" class="menu">
EOD;
if ($pun_user['g_id'] == '4') {
$links.='<li><a class="starter" accesskey="" title="" href="recruitment.php"> JOIN MH TEAM</a></li>';
}
$links.='<li><a class="starter" accesskey="" title="" href="soldier.php"> SOLDIERS</a></li>';
if (!$pun_user['is_guest']) {
$links.=<<<EOD
<li><a class="starter" accesskey="" title="" href="calendar.php"> CALENDAR</a></li>
<li><a class="starter" accesskey="" title="" href="leaderboard.php"> LEADERBOARD</a></li>
EOD;
}
$links.=<<<EOD
</ul></li>
</ul>
EOD;
$links.='';
return $links;
}
attach this 'cssmenu.css'
#menuList {
position:relative;
font-size:1em;
z-index:100;
margin: 0px;
padding: 0px;
}
#mainMenu {
position:relative;
margin-left: 2px;
}
#menuList ul {
z-index:100;
margin: 0px;
padding: 0px;
}
#menuList li {
z-index:100;
display:inline;
list-style: none;
margin: 0px;
padding: 0px;
}
a.starter {
z-index:100;
margin: 0px;
padding: 3px;
font-family: Courier, mono;
font-size: 14px;
color: #FFF;
padding-left:25px;
padding-right:25px;
background-color: #415364;
text-decoration: none;
border: 1px solid #e0b122;
}
a.starter:hover, a.starter:active, a.starter:focus {
background-color: #415364;
color: #e0b122;
}
#bfover, #home, #compare, #mhclan, #forum, #test {
width: 130px;
}
.menu {
text-align: left;
position: absolute;
visibility: hidden;
z-index: 100;
}
.menu li {
width:100%;
}
.menu li a {
background: #415364;
z-index:100;
color: #fff;
display: block;
width:100%;
font-family: Courier, mono;
font-size: 12px;
padding:4px;
margin: 0px;
padding-left: 5px;
padding-right: 5px;
text-decoration: none;
margin-top:1px;
border-left: 2px solid #e0b122;
border-right: 2px solid #e0b122;
border-bottom: 1px solid #e0b122;
border-top: 1px solid #e0b122;
}
.menu li a:hover, .menu li a:active, .menu li a:focus {
background-color: #263E54;
color: #e0b122;
}
img {
border: none;
}
.imgwid {
vertical-align: middle;
}
and finally attach the javascript 'cssmenu.js'
// Load up the stylesheet for the menus. This code is here rather than in the html
// document to allow for non-javascript browsers to render a seperately styled non-
// interactive list rather than the DHTML menu
document.write("<link rel='stylesheet' href='/style/cssmenu.css' type='text/css' />");
var currentMenu = null;
var lastMenuStarter = null;
var mytimer = null;
var timerOn = false;
var opera = window.opera ? true : false;
if (!document.getElementById)
document.getElementById = function() { return null; }
function initialiseDummy(dummy, root) {
dummy.onmouseover = function() {
containingMenu = this.parentNode.parentNode;
for (var x=0;x<containingMenu.childNodes.length;x++) {
if (containingMenu.childNodes[x].nodeName.toUpperCase()=="LI") {
if (containingMenu.childNodes[x].getElementsByTagName("ul").length>0) {
containingMenu.childNodes[x].getElementsByTagName("UL").item(0).style.visibility = 'hidden';
}
}
}
}
dummy.onfocus = function() {
dummy.onmouseover();
}
}
function initialiseMenu(menu, starter, root) {
var leftstarter = false;
if (menu == null || starter == null) return;
currentMenu = menu;
starter.onmouseover = function() {
if (currentMenu) {
if (this.parentNode.parentNode!=currentMenu) {
currentMenu.style.visibility = "hidden";
hideAllMenus(currentMenu, root);
}
if (this.parentNode.parentNode==root) {
while (currentMenu.parentNode.parentNode!=root) {
currentMenu.parentNode.parentNode.style.visibility = "hidden";
currentMenu = currentMenu.parentNode.parentNode;
}
}
currentMenu = null;
this.showMenu();
}
}
menu.onmouseover = function() {
if (currentMenu) {
currentMenu = null;
this.showMenu();
}
}
starter.showMenu = function() {
if (!opera) {
if (this.parentNode.parentNode==root) {
menu.style.left = this.offsetLeft + "px";
menu.style.top = this.offsetTop + this.offsetHeight + "px";
if (menu.offsetWidth < this.offsetWidth) menu.style.width = this.offsetWidth;
}
else {
menu.style.left = this.offsetLeft + this.offsetWidth + "px";
menu.style.top = this.offsetTop + "px";
}
}
else {
var rootOffset = root.offsetLeft;
if (this.parentNode.parentNode==root) {
menu.style.left = this.offsetLeft - rootOffset + "px";
menu.style.width = this.offsetWidth;
menu.style.top = this.offsetHeight + "px";
}
else {
menu.style.left = this.offsetWidth - rootOffset + "px";
menu.style.top = this.offsetTop + "px"; //menu.style.top - menu.style.offsetHeight + "px";
}
}
menu.style.visibility = "visible";
currentMenu = menu;
}
starter.onfocus = function() {
starter.onmouseover();
}
menu.onfocus = function() {
// currentMenu.style.visibility="hidden";
}
menu.showMenu = function() {
menu.style.visibility = "visible";
currentMenu = menu;
stopTime();
}
menu.hideMenu = function() {
if (!timerOn) {
mytimer = setInterval("killMenu('" + this.id + "', '" + root.id + "');", 2000);
timerOn = true;
for (var x=0;x<menu.childNodes.length;x++) {
if (menu.childNodes[x].nodeName=="LI") {
if (menu.childNodes[x].getElementsByTagName("UL").length>0) {
menuItem = menu.childNodes[x].getElementsByTagName("UL").item(0);
menuItem.style.visibility = "hidden";
}
}
}
}
}
menu.onmouseout = function(event) {
this.hideMenu();
}
menu.onblur = function() {
this.hideMenu();
}
starter.onmouseout = function() {
for (var x=0;x<menu.childNodes.length;x++) {
if (menu.childNodes[x].nodeName=="LI") {
if (menu.childNodes[x].getElementsByTagName("UL").length>0) {
menuItem = menu.childNodes[x].getElementsByTagName("UL").item(0);
menuItem.style.visibility = "hidden";
}
}
}
menu.style.visibility = "hidden";
}
}
function killMenu(menu, root) {
var menu = document.getElementById(menu);
var root = document.getElementById(root);
menu.style.visibility = "hidden";
for (var x=0;x<menu.childNodes.length;x++) {
if (menu.childNodes[x].nodeName=="LI") {
if (menu.childNodes[x].getElementsByTagName("UL").length>0) {
menuItem = menu.childNodes[x].getElementsByTagName("UL").item(0);
menuItem.style.visibility = "hidden";
}
}
}
while (menu.parentNode.parentNode!=root) {
menu.parentNode.parentNode.style.visibility = "hidden";
menu = menu.parentNode.parentNode;
}
stopTime();
}
function stopTime() {
if (mytimer) {
clearInterval(mytimer);
mytimer = null;
timerOn = false;
}
}
window.onload = function() {
var root = document.getElementById("menuList");
var rootOffset = root.offsetLeft;
getMenus(root, root);
}
function getMenus(elementItem, root) {
var selectedItem;
var menuStarter;
var menuItem;
for (var x=0;x<elementItem.childNodes.length;x++) {
if (elementItem.childNodes[x].nodeName.toUpperCase()=="LI") {
if (elementItem.childNodes[x].getElementsByTagName("ul").length>0) {
menuStarter = elementItem.childNodes[x].getElementsByTagName("A").item(0);
menuItem = elementItem.childNodes[x].getElementsByTagName("UL").item(0);
getMenus(menuItem, root);
initialiseMenu(menuItem, menuStarter, root);
}
else {
initialiseDummy(elementItem.childNodes[x].getElementsByTagName("A").item(0), root);
}
}
}
}
function hideAllMenus(elementItem, root) {
for (var x=0;x<elementItem.childNodes.length;x++) {
if (elementItem.childNodes[x].nodeName.toUpperCase()=="LI") {
if (elementItem.childNodes[x].getElementsByTagName("ul").length>0) {
elementItem.childNodes[x].getElementsByTagName("UL").item(0).style.visibility = 'hidden';
hideAllMenus(elementItem.childNodes[x].getElementsByTagName("UL").item(0), root);
}
}
}
}
Is this a bug that will happen in 1.3?
No problem.
Be warned that it might knock a few other things slightly out... So any problems come back to me...
Erm... ok..
Look for this
DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 3px}
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 4px}
and change to this.
DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px}
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px}
@pogenwurst why you double posting?
OK ignore that and mail I sent you... the posts have been removed/deleted.
New shoutbox I have nearly finished, will release when I update the demo below.
Can you post link? then might be able to help.
Look for this
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 4px}
and change to this
#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px}
Let me know how you get on.
So how will it work when 1.3 arrives.
Will support be around for both still? also will the forums change so that you can tell between 1.2.12 support and 1.3 support? because for sure people will still be running 1.2.12 for a while.
Nothing essential just curious.
Yep
steve, you mention changing this:
echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.$smiley_text[$i].'" /></a>'."\n";
what has to be altered?
to this
echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" alt="'.$smiley_text[$i].'" /></a>'."\n";
removing
width="15" height="15"
Read this: http://www.punres.org/viewtopic.php?id=1633
Ok try the post above... be warned it changes the look slightly... but for the better. You can, if bothered remove the footer link now because the delete is in the menu at the top.
I have had no problems with this on both the sites I run.
Do u remember how you fixed it?
How about this?
Replace this
<div class="blockmenu" style="padding: 0px 10px 0px 0px; margin-top: 10px;">
<h2><span><?php echo $lang_pms['Private Messages'] ?></span></h2>
<div class="box">
<div class="inbox">
<ul>
<li <?php if ($box == 0) echo 'class="isactive"' ?>><a href="message_list.php?box=0"><?php echo $lang_pms['Inbox'] ?></a></li>
<li <?php if ($box == 1) echo 'class="isactive"' ?>><a href="message_list.php?box=1"><?php echo $lang_pms['Outbox'] ?></a></li>
</ul>
</div>
</div>
</div>
<div class="linkst">
<div class="inbox">
<p class="pagelink conl"><?php echo $lang_common['Pages'].': '.paginate($num_pages, $p, 'message_list.php?box='.$box) ?></p>
<p class="postlink conr"><a href="message_send.php"><?php echo $lang_pms['New message']; ?></a></p>
<ul><li><a href="index.php"><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?></a> </li><li>» <?php echo $lang_pms['Private Messages'] ?> </li><li>» <?php echo $page_name ?></li></ul>
</div>
</div>
to this
<div class="linkst">
<div class="inbox">
<p class="postlink conr"><a href="message_send.php"><?php echo $lang_pms['New message']; ?></a></p>
<ul style="margin-left: 0pt;"><li><a href="message_list.php?box=0"><?php echo $lang_pms['Inbox'] ?></a> | <a href="message_list.php?box=1"><?php echo $lang_pms['Outbox'] ?></a> | <a href="message_list.php?action=multidelete&box=<?php echo $box ?>">Delete</a></li><li> - <?php echo $page_name ?></li></ul>
</div>
</div>
then remove this
style="padding-left: 153px;"
and this
style="margin-left: 152px;"
I fixed it a while back...
I had the same problem but fixed it when I modified the look of my PMS. Will try to look for fix.
Yeah that's cool.. Will you do a diff file for it tho? Because hopefully not to many bugs.
Working ok on my test site at present.
One more thing... any chance of adding the AJAX delete feature that CodeXP had? cheers. Its much easier...
Result... Cheers. Will update shoutbox around this.
Ok... what difference between this and the CodeXP AJAX Chatbox... Cheers.
Dont suppose this refreshs the messages automatically? in other words you dont have to ever hit refresh button?
Side note:
If this is a good change then will re-code my PunShout to work on this mod instead of the orignal chatbox with CodeXP's ajax hack.
PunBB Forums → Posts by StevenBullen
Powered by PunBB, supported by Informer Technologies, Inc.