View Full Version : Users Can create their own drop down list in navbar
Michael Morris
12-15-2004, 10:00 PM
This hack is part of Lesson #6 of my Using the PHPINCLUDE_START template" tutorial thread. It is presented here individually. While techinically a user feature, it is put here with mini-mods since it requires no code edits. Instead you have 2 template edits: navbar and phpinclude_start. You must also add a user profile field.
For a more complete explaination of the code please visit the tutorial thread.
AND NOW THE HACK...
To begin create a user profile field that is multiple text lines and has a character limit of at least 2000. Note the user profile field # the system assigns to the new field - you'll need it below.
Once you do that crack into your navbar and look for this code:
<!-- nav buttons bar -->
<div align="center">
<table class="thead" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr align="center">
<if condition="$show['popups']">
Immediately after add.
<if condition="!empty($mylinks)">
<td id="mylinks" class="vbmenu_control"><a href="#mylinks">My Links</a> <script type="text/javascript"> vbmenu_register("mylinks"); </script></td>
</if>
Next look for this code in the navbar
<!-- / NAVBAR POPUP MENUS -->
Immediately above it insert the following code
<if condition="!empty($mylinks)">
<!-- My Links Menu -->
<div class="vbmenu_popup" id="mylinks_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
$mylinks
</table>
</div>
<!-- /My Links -->
</if>
Now insert the following into PHPINCLUDE_START at either the very start or the very end.
if (!empty($bbuserinfo['fieldX']))
{
require_once('./includes/functions_bbcodeparse.php');
$mylinks = parse_bbcode2($bbuserinfo['fieldX'], 0, 0, 0, 1);
$mylinks = str_replace('<br />', '', $mylinks);
$mylinks = str_replace('</a>', '</a></td></tr>', $mylinks);
$mylinks = str_replace('<a', '<tr><td class="vbmenu_option"><a', $mylinks);
}
You will need to plug the correct user profile field # into the spot occupied by "fieldX" above. So if your new profile field created above was field #9 you'd refer to $bbuserinfo['field9']
And with that you're done. Enjoy.
Compatibility Note
If you are running a version of vbulletin prior to version 3.0.3 you'll need to run a database query in order to have field lengths longer than 250 characters. This query is:
ALTER TABLE userfield MODIFY COLUMN fieldX TEXT
You'll need to change fieldX to the field# appropriate to your forums.
jluerken
12-16-2004, 09:55 PM
Sounds cool. A screenshot would be nice.
Thank you Michael Morris, I may use this ;)
Michael Morris
12-16-2004, 10:30 PM
Sounds cool. A screenshot would be nice.
Two added.
Note, minor glitch found for RC4 - you can't have user input fields beyond 500 characters or so (odd). I presume this is fixed in later versions.
Koutaru
12-16-2004, 10:31 PM
Could this be domain specific (ie it can only be your domain they link to?
Michael Morris
12-16-2004, 11:09 PM
Not without major recoding. This simply takes advantage of an existing vbulletin mechanic (the url tag) and uses it to create the links for a new feature.
ericgtr
12-16-2004, 11:10 PM
Could this be domain specific (ie it can only be your domain they link to?
Very cool, clicks install for near future use, thanks!
???`S?LV?R???`
12-17-2004, 12:20 AM
nice hack
docvader
12-17-2004, 12:22 AM
works nicely. Only thing I've found is that if you don't put bb codes in that box correctly, it can make your browser hang up. Otherwise, nice addition.
OrangeFlea
12-17-2004, 12:54 AM
Nice Hack!!!!!!!!
(cool, you're from Enworld? We have our banner on your webring. That's awesome.)
SVTOA
12-17-2004, 01:39 PM
I have it working in 3.0.0
I'm having trouble getting this to display on the navbar in my Vbadvanced CMPS index page though. Displays fine in the forum. Any ideas?
jluerken
12-17-2004, 02:38 PM
I'm having trouble getting this to display on the navbar in my Vbadvanced CMPS index page though. Displays fine in the forum. Any ideas?
Yes, thats right. Its also not displaying for me in the CMPS Portal.
Would be nice if this can be fixed :D
Michael Morris
12-17-2004, 02:53 PM
I'm not having this problem - but my dropdown system was moved to the header template.
I guess check to make sure your cmps page isn't using a different navbar from you're forums - and that both are executing the PHPINCLUDE_START template.
Speaking of which - I intend to write a module that displays this information in vba cmps - eventually.
Lottis
12-17-2004, 03:01 PM
Sorry, but i need some help.
To begin create a user profile field that is multiple text lines and has a character limit of at least 2000. Note the user profile field # the system assigns to the new field - you'll need it below.
Im not quite shure what this means. :blush:
Michael Morris
12-17-2004, 03:54 PM
Sorry, but i need some help.
To begin create a user profile field that is multiple text lines and has a character limit of at least 2000. Note the user profile field # the system assigns to the new field - you'll need it below.
Im not quite shure what this means. :blush:
You can read up on creating user profile fields here. (http://www.vbulletin.com/docs/html/profile)
In brief, log in to your admincp and scroll down the left menu till you see "User Profile Fields" Expand that box, then click "Create New"
In the first dialog select "Multiple line text box"
On the next screen choose "2000" as the maximum length of user input, then set the last option to display on "Edit Options - Other"
Leave everything else on their defaults. When you exit this screen you'll see a list of all the availabe user profile fields. Look at you're newly create one. You'll see an id#. Note that number and plug it into the phpinclude_start script above.
Guy G
12-17-2004, 03:55 PM
looks fantastic.
no queries aye?
Michael Morris
12-17-2004, 03:57 PM
No queries required. The data is stored in a custom user profile field.
SVTOA
12-17-2004, 06:22 PM
Michael, thanks for the reply.. I use the same navbar for CMPS as I do for the forum, other links I have added work fine in both sections. I'll look a little closer and see if I can get it to work..
Sooner95
12-18-2004, 04:03 AM
i did this, but nothing changed lol I will keep looking but.. havnt had this happen before..
SVTOA
12-18-2004, 02:20 PM
Ugh, I am pulling my hair out trying to get this to work with with CMPS. I still have my old VbAdvanced index page and when I call that page in a browser the "my links" displays fine! if I call up the vBa CMPS it's no dice. There must be a way to get this to work and I am overlooking it.. :(
SVTOA
12-18-2004, 02:44 PM
I have been comparing the code between vBAdvanced homepage and VBA CMPS, and began to play with the index.php files for both. I took this bit of code from vbAdvanced homepage:
if ($vboptions['home_navbar'])
{
eval('$navbar = "' . fetch_template('navbar') . '";');
$navbar = str_replace(
array(
'"memberlist.php',
'"usercp.php',
'"register.php',
'"faq.php',
'"calendar.php',
'"search.php',
'"login.php',
'"forumdisplay.php',
'"profile.php',
'"private.php',
'"subscription.php',
'"member.php',
'"online.php',
'"clientscript',
'\'misc.php',
"$vboptions[bbtitle]</strong>"
),
array(
"\"$vboptions[bburl]/memberlist.php",
"\"$vboptions[bburl]/usercp.php",
"\"$vboptions[bburl]/register.php",
"\"$vboptions[bburl]/faq.php",
"\"$vboptions[bburl]/calendar.php",
"\"$vboptions[bburl]/search.php",
"\"$vboptions[bburl]/login.php",
"\"$vboptions[bburl]/forumdisplay.php",
"\"$vboptions[bburl]/profile.php",
"\"$vboptions[bburl]/private.php",
"\"$vboptions[bburl]/subscription.php",
"\"$vboptions[bburl]/member.php",
"\"$vboptions[bburl]/online.php",
"\"$vboptions[bburl]/clientscript",
"'$vboptions[bburl]/misc.php",
"$vboptions[hometitle]</strong>"
), $navbar);
}
and went to the CMPS index.php and inserted it directly below this:
require_once('./global.php');
Renamed the page as test.php and called it up in my browser. This "my links" hack started working on that page.
The ratio of php-to-mysql and page load time changed very little, if any.
I get no errors either. Is this an acceptable fix or have I introduced bad code into the CMPS page?
SVTOA
12-18-2004, 03:10 PM
Two added.
Note, minor glitch found for RC4 - you can't have user input fields beyond 500 characters or so (odd). I presume this is fixed in later versions.
Ugh, I think I have to give up on this one. In 3.0.0:
"Maximum Input (Input, Textarea only)
This setting is how many characters a user is allowed to enter into this field. This can be any number between 1 and 250."
Nice idea but it's not working out like I had hoped. :(
Michael Morris
12-18-2004, 07:37 PM
Ugh, I think I have to give up on this one. In 3.0.0:
"Maximum Input (Input, Textarea only)
This setting is how many characters a user is allowed to enter into this field. This can be any number between 1 and 250."
Nice idea but it's not working out like I had hoped. :(
I'm pretty sure you can run a query to override this - run the query after the table is created.
SVTOA
12-18-2004, 07:41 PM
And that query would be?
Michael Morris
12-18-2004, 07:46 PM
Testing it now - Such things can royally mess up a board if done incorrectly :)
BTW, 3.0.3 allows you to set any length.
Michael Morris
12-18-2004, 08:12 PM
The correct query is..
ALTER TABLE userfield MODIFY COLUMN fieldX TEXT
You need to change fieldX to the actual field # you're going to use.
PS you can use this script to up the lengths of the other profile fields, such as biography, if you want.
SVTOA
12-18-2004, 08:24 PM
Thank you for the followup, if this works then the hack becomes extremely useful to me and my members. Will check back in a bit.
Nice Michael. :)
Along the same lines as the msg I sent you, just got to figure out how to get the actual links to work in the profile view if other members look at it.
I know I could keep it a private field, but whats the fun in that. :p
SVTOA
12-18-2004, 08:35 PM
BRAVO!!!! Worked perfectly!!! Much appreciated!!!!
SVTOA clicks *INSTALL*
wirewolf
12-27-2004, 08:12 PM
Michael, very nice hack. Installed it today and it went smoothly. However, I have the "Links Directory v1.0.0 RC3" by vBadvanced installed on my forum. All of the "links" directory scripts call for their links_config.php file, which in turn calls for the vbulletins' global.php file, where the PHPINCLUDE_START is called. The "links" templates also call for the vbulletin $navbar. But the "My Links" drop down does not show when you go to the Links Directory Pages. I suspect it has to do with the PHPINCLUDE_START not being called apon correctly in the "links" files, but I'm not sure. I'm not getting any errors. The "Links Directory" files are in a separate directory within my main forum directory.
/home/vbforum/links
See the two attachments. Any clue where to start looking?
Thanks, John
MikaK
12-28-2004, 12:56 PM
*click*:)
wirewolf
12-28-2004, 01:59 PM
................................... Any clue where to start looking?
Thanks, John
After looking again at the code again (after getting a nights sleep) I think I found the answer. In the code for includes/functions_links.php around line 398:
// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox; I added $mylinks to the one line:
// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $mylinks; The "My Links" now shows in the navbar when going to my "Links Directory" Pages. The only thing I'm not sure of is in the rest of the code in the Construct Navbar section:
if (!empty($navbits))
{
$navbits = construct_navbits($navbits);
}
eval('$navbar = "' . fetch_template('navbar') . '";');
$navbar = str_replace(
array(
'"memberlist.php',
'"usercp.php',
'"register.php',
'"faq.php',
'"calendar.php',
'"search.php',
'"login.php',
'"forumdisplay.php',
'"profile.php',
'"private.php',
'"subscription.php',
'"member.php',
'"online.php',
'"clientscript',
'\'misc.php',
$vboptions['bbtitle'],
'"' . $vboptions['forumhome'] . '.php'
),
array(
'"' . $vboptions['bburl'] . '/memberlist.php',
'"' . $vboptions['bburl'] . '/usercp.php',
'"' . $vboptions['bburl'] . '/register.php',
'"' . $vboptions['bburl'] . '/faq.php',
'"' . $vboptions['bburl'] . '/calendar.php',
'"' . $vboptions['bburl'] . '/search.php',
'"' . $vboptions['bburl'] . '/login.php',
'"' . $vboptions['bburl'] . '/forumdisplay.php',
'"' . $vboptions['bburl'] . '/profile.php',
'"' . $vboptions['bburl'] . '/private.php',
'"' . $vboptions['bburl'] . '/subscription.php',
'"' . $vboptions['bburl'] . '/member.php',
'"' . $vboptions['bburl'] . '/online.php',
'"' . $vboptions['bburl'] . '/clientscript',
'\'' . $vboptions['bburl'] . '/misc.php',
iif($vba_options['links_navbarhomelink'], $vboptions['hometitle'], $vba_options['links_title']),
'"' . iif($vba_options['links_navbarhomelink'], $vboptions['homeurl'], $vba_options['links_homeurl'])
), $navbar);
return $navbar;
}
}Would any changes have to be made in this section too? I know this coding comes from vbadvanced, but I'm just asking as a general coding question.
John
Michael Morris
12-28-2004, 04:40 PM
I don't think so - but I'm soon to find out. I have to install vbadvanced links directory to ENWorld next month :) I'll let you know if I hit any snags.
wirewolf
12-28-2004, 06:01 PM
Got an answer from Brian over at vbadvanced. Everything in your coding is fine. The includes/functions_links.php constructs the navbar. The links scripts read the PHPINCLUDE_START template but you have to include $mylinks in the global line and then the "My Links" shows in the navbar on the links directory pages. The only changes in the array section would be if a user did not write in a full url path in the My Links text box. Such would be the case as in [ post=475]Post #475[/post]. The url would show in the "Directory" navbar with the "links directory folder in front of showthread.php - /links/showthread.php etc.. of course being wrong. One fix is to include showthread.php in the array:
Try replacing that function in includes/functions_links.php with this:
// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $mylinks;
if (!empty($navbits))
{
$navbits = construct_navbits($navbits);
}
eval('$navbar = "' . fetch_template('navbar') . '";');
$navbar = str_replace(
array(
'"memberlist.php',
'"usercp.php',
'"register.php',
'"faq.php',
'"calendar.php',
'"search.php',
'"login.php',
'"forumdisplay.php',
'"profile.php',
'"private.php',
'"subscription.php',
'"member.php',
'"online.php',
'"clientscript',
'\'misc.php',
'"showthread.php',
$vboptions['bbtitle'],
'"' . $vboptions['forumhome'] . '.php'
),
array(
'"' . $vboptions['bburl'] . '/memberlist.php',
'"' . $vboptions['bburl'] . '/usercp.php',
'"' . $vboptions['bburl'] . '/register.php',
'"' . $vboptions['bburl'] . '/faq.php',
'"' . $vboptions['bburl'] . '/calendar.php',
'"' . $vboptions['bburl'] . '/search.php',
'"' . $vboptions['bburl'] . '/login.php',
'"' . $vboptions['bburl'] . '/forumdisplay.php',
'"' . $vboptions['bburl'] . '/profile.php',
'"' . $vboptions['bburl'] . '/private.php',
'"' . $vboptions['bburl'] . '/subscription.php',
'"' . $vboptions['bburl'] . '/member.php',
'"' . $vboptions['bburl'] . '/online.php',
'"' . $vboptions['bburl'] . '/clientscript',
'\'' . $vboptions['bburl'] . '/misc.php',
'"' . $vboptions['bburl'] . '/showthread.php',
iif($vba_options['links_navbarhomelink'], $vboptions['hometitle'], $vba_options['links_title']),
'"' . iif($vba_options['links_navbarhomelink'], $vboptions['homeurl'], $vba_options['links_homeurl'])
), $navbar);
return $navbar;
}
}
I tried the changes above and they work. But it might be just as easy to have users enter the full url path. Most of mine aren't too good with bbcodes anyway. So I just left in the global line - $mylinks, instructed my users to put in the full url path and everything is working fine.
BTW Michael - you may find other scripting problems in the vbadvanced links program where the links directory folder is placed in front of a typical forum file path - /forum/links/member.php? for example. Look in any array section in the links php files (like browslinks.php, showlink.php, misc.php, etc) that deal with a forum function(member.php is one). Had that problem when I first installed "Links Directory". Brian has cleaned up a lot of the code, but you may hit a snag.
Thanks and have a Happy New Year!!
John
nautiqeman
01-21-2005, 06:45 PM
I'm having a simliar problem in the vba Gallery -- I put in the steps above (but of course reflected for the gallery portion), but for some reason, it's not showing up. Any ideas??
jamesyfx
02-02-2005, 11:24 AM
Hello,
I'm wondering, would it be possible for an option to click an "Add to Links" button in threads, so it would add a link to the thread to your menu?
A member of my team suggested it, I think it could be useful.. but I don't know how to do it myself.
OrangeFlea
02-11-2005, 11:14 PM
I can't get it to show on my navbar. I'm not running Vbadvanced. What's the deal?
mikexxx
02-12-2005, 10:06 AM
If i use this link:
7 Dagen (http://www.vbulletin.com/search.php?do=getdaily&days=7)
This is the link when i use it:
http://www.vbulletin.com/search.php?do=getdaily&days=7
The & (replaced by: &) is not in the link. Is there a solution for this?
OrangeFlea
02-13-2005, 03:33 PM
I use vB 3.0.3 without the vbadvanced hack. I entered the information exactly as outlined in the instructions and read every single post in this thread even remotely related to my dilemma, but the link is just not appearing on my navbar.
Can someone -- anyone -- help?
Michael Morris
02-14-2005, 03:38 AM
Check to make sure there isn't a parse error in your PHPINCLUDE_START template. To do this, put this in your footer.
$phpinclude_output
Then, if there's a parse error, it will appear in your footer.
Michael Morris
02-14-2005, 03:40 AM
If i use this link:
7 Dagen (http://www.vbulletin.com/search.php?do=getdaily&days=7)
This is the link when i use it:
http://www.vbulletin.com/search.php?do=getdaily&days=7
The & (replaced by: &) is not in the link. Is there a solution for this?
I've never ran into this problem from the parser. You might try replacing the & with & in the original link.
neocorteqz
02-14-2005, 04:48 AM
very nice hack. Not sure if i'm going to install it yet or not. But very nice work. :)
OrangeFlea
02-14-2005, 02:21 PM
Check to make sure there isn't a parse error in your PHPINCLUDE_START template. To do this, put this in your footer.
$phpinclude_output
Then, if there's a parse error, it will appear in your footer.
Just did that. There's no parse error. Is there anything specific that I can paste here that will provide you some information?
Michael Morris
02-14-2005, 04:59 PM
Go ahead and cut & paste your copy of the code and I'll see if I can spot an error.
OrangeFlea
02-14-2005, 05:51 PM
phpinclude_start
if (!empty($bbuserinfo['field6']))
{
require_once('./includes/functions_bbcodeparse.php');
$mylinks = parse_bbcode2($bbuserinfo['field6'], 0, 0, 0, 1);
$mylinks = str_replace('<br />', '', $mylinks);
$mylinks = str_replace('</a>', '</a></td></tr>', $mylinks);
$mylinks = str_replace('<a', '<tr><td class="vbmenu_option"><a', $mylinks);
}
ob_start();
@require("http://www.realmofinfamy.com/chat/info.php");
$chatwho = ob_get_contents();
ob_end_clean();
ob_start();
echo file_get_contents("http://www.realmofinfamy.com/chat/people.php");
$cnum = ob_get_contents();
ob_end_clean();
Navbar
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>
<br />
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1)"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
<if condition="$bbuserinfo['userid']">
<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<!--<span style="float:$stylevar[right]">[<a href="login.php?$session[sessionurl]do=logout&u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a>]</span>-->
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
</div>
</td>
<else />
<td class="alt2" nowrap="nowrap" style="padding:0px">
<!-- login form -->
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password,vb_ login_md5password_utf)">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont">$vbphrase[username]</td>
<td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont">$vbphrase[password]</td>
<td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="forceredirect" value="1" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->
</td>
</if>
</tr>
</table>
<!-- / breadcrumb, login, pm info -->
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<!--<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php?$session[sessionurl]">$vbphrase[register]</a></td>
</if>
<td class="vbmenu_control"><a href="arcade.php?$session[sessionurl]">Arcade</a></td>
<td class="vbmenu_control"><a href="http://www.realmofinfamy.com/chat/flashchat.php" target=_roichat>RoI Chat ($cnum online)</a></td>
<td id="journalnavbar" class="vbmenu_control"><a href="#journalnavbar">RoI Blog</a> <script type="text/javascript"> vbmenu_register("journalnavbar"); </script></td>
<td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>
<if condition="$show['popups']">
<if condition="!empty($mylinks)">
<td id="mylinks" class="vbmenu_control"><a href="#mylinks">My Links</a> <script type="text/javascript"> vbmenu_register("mylinks"); </script></td>
</if>
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
<td id="amazon_navbar_search" class="vbmenu_control"><a href="#"><FONT COLOR="#ffff00">Shop with RoI</font></a> <script type="text/javascript"> vbmenu_register("amazon_navbar_search"); </script></td>
<if condition="$bbuserinfo['userid']">
<td id="usercptools" class="vbmenu_control"><a href="#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td>
<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
</if>
<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>
</div>
<!-- / nav buttons bar -->
<br />
<br />
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="text" class="bginput" name="query" size="20" />$gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>
<div class="vbmenu_popup" id="amazon_navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<!-- Amazon.com Search Start -->
<tr>
<td class="thead">Amazon Search</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="http://www.amazon.com/exec/obidos/external-search">
<input type="text" class="bginput" name="keyword" size="20" />$gobutton<br />
<input type="hidden" name="mode" value="blended" />
<input type="hidden" name="tag" value="realmofinfamy-20" />
</form>
</td>
</tr>
<tr>
<td style="background-color:#000;" height="40" align="center"><a href="http://www.amazon.com/exec/obidos/redirect-home/realmofinfamy-20"><img src="http://g-images.amazon.com/images/G/01/associates/build-links/ap-search-logo-126x32.gif" height="36" border="0" width="126" /></a></td>
</tr>
<!-- Amazon.com Search End -->
</table>
</div>
<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew">$vbphrase[new_posts_nav]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
<tr><td class="thead"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php?$session[sessionurl]">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php?$session[sessionurl]">$vbphrase[whos_online]</a></td></tr></if>
</table>
</div>
<!-- / user cp tools menu -->
</if>
<if condition="!empty($mylinks)">
<!-- My Links Menu -->
<div class="vbmenu_popup" id="mylinks_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
$mylinks
</table>
</div>
<!-- /My Links -->
</if>
<!-- / NAVBAR POPUP MENUS -->
<div class="vbmenu_popup" id="journalnavbar_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" align="center">Blog Links</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="journal.php">Blogs Index</a></td>
</tr>
<if condition="$bbuserinfo!=0">
<tr>
<td class="vbmenu_option"><a href="journal.php?do=gotomyjournal">My Blogs</a></td>
</tr>
</if>
</table>
</div>
</if>
mikexxx
02-17-2005, 08:07 PM
I've never ran into this problem from the parser. You might try replacing the & with & in the original link.
Nope, then I get this:
search.php?do=getdaily&amp;days=7
Michael Morris
02-17-2005, 09:21 PM
Weird. I'm not sure how to dodge that problem.
havefun
03-15-2005, 04:39 PM
thanks, works find :)
Dennis Olson
03-16-2005, 05:14 PM
I have the same problem with "&". vB3.0.3.
The link syntax is normal in the UserCP, but when being parsed in the drop-down, the replacement occurs.
Dennis Olson
03-16-2005, 08:38 PM
Replace this code:
$mylinks = parse_bbcode2($bbuserinfo['fieldX'], 0, 0, 0, 1);
with this:
$mylinks = parse_bbcode2($bbuserinfo['fieldX'], 1, 0, 0, 1);
Problem solved.
any way i could add to this so i could have bandname and bandname forwards to www.mysite.com/bandname any ideas ?
mfarmerhi
06-05-2005, 08:28 AM
Hm... I can't seem to get this working...
I'm running vB 3.0.7, w/VbAdvanced CMPS. My nav bar was moved to my header.
I can get the MyLinks link displaying correctly, but when clicked on, no pop up.
An ideas what may be going on?
mfarmerhi
06-06-2005, 06:06 AM
Alright... my bad. Musta been tired last night at 4:30 am when I was trying to install this...
Works fine upon re-install.
Great hack. Thanks.
Gutspiller
08-19-2005, 10:05 PM
If the users don't insert any text into the field, does the menu still show up or is it completely hidden? This doesn't add a query to ever page that has the navbar does it?
beano33
10-03-2005, 05:43 PM
Can anyone advise on how to add this for 3.5? Thanks
michaelbenson
10-07-2005, 10:14 PM
Can anyone advise on how to add this for 3.5? Thanks
Ditto
RZ500
10-08-2005, 12:05 AM
Ditto
Same here. :nervous:
Same here. :nervous:
i 12th that
havefun
10-10-2005, 02:17 PM
would be fine :) THX
suryoyena
12-12-2005, 02:55 AM
Hey bro's,
whats the current step with this mod?
I need this stuff for my community :)
Greets: Chris
DrewM
01-25-2006, 07:39 PM
Morris does this work with 3.5?
It does not work with 3.5. Primarily because there is no longer a PHP_Include template
Code syntax for parsing bbcode has also changed in 3.5
https://vborg.vbsupport.ru/showthread.php?t=82693 <--- thread on how to parse bbcode in 3.5
I tried for awhile to get this to work, but was unsuccessful. I'd love it if someone would port this to 3.5. If they could fix the problem with parsing dynamic url's as well, then that would be even more swell.
Michael Morris
04-16-2006, 05:22 PM
I'm sorry for the lateness in my reply, I've been tied up as of late. I'm currently working on a boards conversion for a major client but as soon as that is done I'll start doing some hack ports, probably starting with this one.
sybakaos
07-26-2006, 07:53 PM
I like this hack, thumbs up!
The problem:
When inserting links with the & character (post link for example) and then visit that page from within the quick links menu it brings you there. If you visit that link again, that particular post shows your "my links" links in the post area instead of the original post content (edit, save post fixes this until you visit the my links link again). I think it could be omitted by parsing the & character differently perhaps?
The request:
Could you add a javascript to each post (thread) so users can click it to add that link to their my links menu?
sybakaos
07-28-2006, 07:15 AM
Let me rephrase the problem,
The content of a post is replaced by the mylinks url's if that post appears in your mylinks due to the bbcodeparse.
beano33
07-30-2006, 05:23 PM
Let me rephrase the problem,
The content of a post is replaced by the mylinks url's if that post appears in your mylinks due to the bbcodeparse.
I ran into that problem too when we updated from 3.0.3 to 3.0.11 and had to remove mylinks. I'd reinstall it if it were ported it to 3.6.
sybakaos
09-11-2006, 05:52 PM
Let me rephrase the problem,
The content of a post is replaced by the mylinks url's if that post appears in your mylinks due to the bbcodeparse. It's due the & character which get's parsed weirdly?
Please, any help?
I partially prevented that from happening by replacing & with %26 (ascii), but that's not the best solution......
Did anyone ever get this working on 3.6.x ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.