Issue with navbar
up vote
1
down vote
favorite
I have been trying to solve this for the past couple of days and I just can't figure out why this is happening. So, I have a navbar which I have added my discord channel and a link to an external website with icons. I have placed it in the middle of the existing code. If I try to move it to the end of the navbar the entire website turns into a link to one of the links. Here is my code.
This is my function I created so that my discord and external link shows up.
function showCustomHeader ($nameOfHeader,$url)
if($nameOfHeader == "Discord")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/discord2.png' width='28' height='28'>";
if($nameOfHeader == "Equihash Pool")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle; margin:
-5px;' src='/images/equihashpool.png' width='25' height='25'>";
echo '<div class="nav-wrapper">';
echo '<div class="tabmenu-out">';
echo '<div class="tabmenu-inner">';
echo '<a href="/">';
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/header.png' width='28' height='28'>";
echo ' '.YAAMP_SITE_NAME.'';
echo '</a>';
$action = controller()->action->id;
$wallet = user()->getState('yaamp-wallet');
$ad = isset($_GET['address']);
Then this is the rest of the code. If I move my custom headers further down near the bottom the entire on the website turns into a link and I cannot seem to figure out why...
showItemHeader(controller()->id=='site' && $action=='index' && !$ad, '/',
'Home');
showItemHeader($action=='mining', '/site/mining', 'Pool');
showItemHeader(controller()->id=='site'&&($action=='index' ||
$action=='wallet') && $ad, "/?address=$wallet", 'Wallet');
showItemHeader(controller()->id=='stats', '/stats', 'Graphs');
showItemHeader($action=='miners', '/site/miners', 'Miners');
// Custom Header for Discord + Equihash pool
showCustomHeader('Discord','https://discord.gg/7cB9amA');
showCustomHeader('Equihash Pool','https://equihash.thedirtydozenpool.com');
if (YIIMP_PUBLIC_EXPLORER)
showItemHeader(controller()->id=='explorer', '/explorer', 'Explorers');
if (YIIMP_PUBLIC_BENCHMARK)
showItemHeader(controller()->id=='bench', '/bench', 'Benchs');
if (YAAMP_RENTAL)
showItemHeader(controller()->id=='renting', '/renting', 'Rental');
I apologise in advance if this is not formatted correctly or if I have put too much information out but I am truely stumped. Thank you for any assistance you can give me it is much appreciated./
javascript php html
add a comment |
up vote
1
down vote
favorite
I have been trying to solve this for the past couple of days and I just can't figure out why this is happening. So, I have a navbar which I have added my discord channel and a link to an external website with icons. I have placed it in the middle of the existing code. If I try to move it to the end of the navbar the entire website turns into a link to one of the links. Here is my code.
This is my function I created so that my discord and external link shows up.
function showCustomHeader ($nameOfHeader,$url)
if($nameOfHeader == "Discord")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/discord2.png' width='28' height='28'>";
if($nameOfHeader == "Equihash Pool")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle; margin:
-5px;' src='/images/equihashpool.png' width='25' height='25'>";
echo '<div class="nav-wrapper">';
echo '<div class="tabmenu-out">';
echo '<div class="tabmenu-inner">';
echo '<a href="/">';
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/header.png' width='28' height='28'>";
echo ' '.YAAMP_SITE_NAME.'';
echo '</a>';
$action = controller()->action->id;
$wallet = user()->getState('yaamp-wallet');
$ad = isset($_GET['address']);
Then this is the rest of the code. If I move my custom headers further down near the bottom the entire on the website turns into a link and I cannot seem to figure out why...
showItemHeader(controller()->id=='site' && $action=='index' && !$ad, '/',
'Home');
showItemHeader($action=='mining', '/site/mining', 'Pool');
showItemHeader(controller()->id=='site'&&($action=='index' ||
$action=='wallet') && $ad, "/?address=$wallet", 'Wallet');
showItemHeader(controller()->id=='stats', '/stats', 'Graphs');
showItemHeader($action=='miners', '/site/miners', 'Miners');
// Custom Header for Discord + Equihash pool
showCustomHeader('Discord','https://discord.gg/7cB9amA');
showCustomHeader('Equihash Pool','https://equihash.thedirtydozenpool.com');
if (YIIMP_PUBLIC_EXPLORER)
showItemHeader(controller()->id=='explorer', '/explorer', 'Explorers');
if (YIIMP_PUBLIC_BENCHMARK)
showItemHeader(controller()->id=='bench', '/bench', 'Benchs');
if (YAAMP_RENTAL)
showItemHeader(controller()->id=='renting', '/renting', 'Rental');
I apologise in advance if this is not formatted correctly or if I have put too much information out but I am truely stumped. Thank you for any assistance you can give me it is much appreciated./
javascript php html
I'm guessing you should end the anchor tags inside your if-statements?
– Heiruspecs
Nov 10 at 23:12
Wow, jeeze I feel like an idiot now. Thank you very much!
– Eketubol
Nov 10 at 23:23
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have been trying to solve this for the past couple of days and I just can't figure out why this is happening. So, I have a navbar which I have added my discord channel and a link to an external website with icons. I have placed it in the middle of the existing code. If I try to move it to the end of the navbar the entire website turns into a link to one of the links. Here is my code.
This is my function I created so that my discord and external link shows up.
function showCustomHeader ($nameOfHeader,$url)
if($nameOfHeader == "Discord")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/discord2.png' width='28' height='28'>";
if($nameOfHeader == "Equihash Pool")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle; margin:
-5px;' src='/images/equihashpool.png' width='25' height='25'>";
echo '<div class="nav-wrapper">';
echo '<div class="tabmenu-out">';
echo '<div class="tabmenu-inner">';
echo '<a href="/">';
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/header.png' width='28' height='28'>";
echo ' '.YAAMP_SITE_NAME.'';
echo '</a>';
$action = controller()->action->id;
$wallet = user()->getState('yaamp-wallet');
$ad = isset($_GET['address']);
Then this is the rest of the code. If I move my custom headers further down near the bottom the entire on the website turns into a link and I cannot seem to figure out why...
showItemHeader(controller()->id=='site' && $action=='index' && !$ad, '/',
'Home');
showItemHeader($action=='mining', '/site/mining', 'Pool');
showItemHeader(controller()->id=='site'&&($action=='index' ||
$action=='wallet') && $ad, "/?address=$wallet", 'Wallet');
showItemHeader(controller()->id=='stats', '/stats', 'Graphs');
showItemHeader($action=='miners', '/site/miners', 'Miners');
// Custom Header for Discord + Equihash pool
showCustomHeader('Discord','https://discord.gg/7cB9amA');
showCustomHeader('Equihash Pool','https://equihash.thedirtydozenpool.com');
if (YIIMP_PUBLIC_EXPLORER)
showItemHeader(controller()->id=='explorer', '/explorer', 'Explorers');
if (YIIMP_PUBLIC_BENCHMARK)
showItemHeader(controller()->id=='bench', '/bench', 'Benchs');
if (YAAMP_RENTAL)
showItemHeader(controller()->id=='renting', '/renting', 'Rental');
I apologise in advance if this is not formatted correctly or if I have put too much information out but I am truely stumped. Thank you for any assistance you can give me it is much appreciated./
javascript php html
I have been trying to solve this for the past couple of days and I just can't figure out why this is happening. So, I have a navbar which I have added my discord channel and a link to an external website with icons. I have placed it in the middle of the existing code. If I try to move it to the end of the navbar the entire website turns into a link to one of the links. Here is my code.
This is my function I created so that my discord and external link shows up.
function showCustomHeader ($nameOfHeader,$url)
if($nameOfHeader == "Discord")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/discord2.png' width='28' height='28'>";
if($nameOfHeader == "Equihash Pool")
echo "<a href='$url' target='_blank' title='$nameOfHeader'>";
echo "<img style='display: inline-block; vertical-align:middle; margin:
-5px;' src='/images/equihashpool.png' width='25' height='25'>";
echo '<div class="nav-wrapper">';
echo '<div class="tabmenu-out">';
echo '<div class="tabmenu-inner">';
echo '<a href="/">';
echo "<img style='display: inline-block; vertical-align:middle'
src='/images/header.png' width='28' height='28'>";
echo ' '.YAAMP_SITE_NAME.'';
echo '</a>';
$action = controller()->action->id;
$wallet = user()->getState('yaamp-wallet');
$ad = isset($_GET['address']);
Then this is the rest of the code. If I move my custom headers further down near the bottom the entire on the website turns into a link and I cannot seem to figure out why...
showItemHeader(controller()->id=='site' && $action=='index' && !$ad, '/',
'Home');
showItemHeader($action=='mining', '/site/mining', 'Pool');
showItemHeader(controller()->id=='site'&&($action=='index' ||
$action=='wallet') && $ad, "/?address=$wallet", 'Wallet');
showItemHeader(controller()->id=='stats', '/stats', 'Graphs');
showItemHeader($action=='miners', '/site/miners', 'Miners');
// Custom Header for Discord + Equihash pool
showCustomHeader('Discord','https://discord.gg/7cB9amA');
showCustomHeader('Equihash Pool','https://equihash.thedirtydozenpool.com');
if (YIIMP_PUBLIC_EXPLORER)
showItemHeader(controller()->id=='explorer', '/explorer', 'Explorers');
if (YIIMP_PUBLIC_BENCHMARK)
showItemHeader(controller()->id=='bench', '/bench', 'Benchs');
if (YAAMP_RENTAL)
showItemHeader(controller()->id=='renting', '/renting', 'Rental');
I apologise in advance if this is not formatted correctly or if I have put too much information out but I am truely stumped. Thank you for any assistance you can give me it is much appreciated./
javascript php html
javascript php html
asked Nov 10 at 23:03
Eketubol
62
62
I'm guessing you should end the anchor tags inside your if-statements?
– Heiruspecs
Nov 10 at 23:12
Wow, jeeze I feel like an idiot now. Thank you very much!
– Eketubol
Nov 10 at 23:23
add a comment |
I'm guessing you should end the anchor tags inside your if-statements?
– Heiruspecs
Nov 10 at 23:12
Wow, jeeze I feel like an idiot now. Thank you very much!
– Eketubol
Nov 10 at 23:23
I'm guessing you should end the anchor tags inside your if-statements?
– Heiruspecs
Nov 10 at 23:12
I'm guessing you should end the anchor tags inside your if-statements?
– Heiruspecs
Nov 10 at 23:12
Wow, jeeze I feel like an idiot now. Thank you very much!
– Eketubol
Nov 10 at 23:23
Wow, jeeze I feel like an idiot now. Thank you very much!
– Eketubol
Nov 10 at 23:23
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244282%2fissue-with-navbar%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244282%2fissue-with-navbar%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I'm guessing you should end the anchor tags inside your if-statements?
– Heiruspecs
Nov 10 at 23:12
Wow, jeeze I feel like an idiot now. Thank you very much!
– Eketubol
Nov 10 at 23:23