vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - User Links in Navbar for vB 4 (https://vborg.vbsupport.ru/showthread.php?t=260260)

Boofo 03-11-2011 10:00 PM

User Links in Navbar for vB 4
 
1 Attachment(s)
User Links in Navbar for vB 4
Version 1.0.1
(By Boofo)

What does this product do?
This product will add a drop-down menu with user links in the forum navbar. You can add up to 5 additional links, as well as link names and mouseover text, via the settings. It will check to see if you have Reputation enabled. If you do not, it will not show the reputation in the menu. It will also check to see if you have the "Threads Started by User in Postbit and Profile for vB 4" product installed on your site. If you do not, the thread count will not show in the menu.

Version Information:
Version 1.0.0 --Initial release for vB 4
Version 1.0.1 --Fixed issue with Friends link not working with vBSEO installed.

Installation Overview:
---------------------------
1 Product XML (2 Plugins, 58 Phrases, 1 Template, 17 Settings and 1 Style Variable)

Installation Instructions:
---------------------------
1. Add the following code to the additional.css template:

Code:

li.menuname {
        padding: 0.2em 0.5em;
        text-decoration: none;
        text-align: {vb:stylevar left};
        color: {vb:stylevar blockhead_link_color};
}


2. Go to your Admin CP
Scroll down to 'Plugin System'
Click 'Manage Products'
Click 'Add/Import Product'
Click the 'Browse' button, and locate the product-boofo_user_links.xml file on your computer

3. Go to your Admin CP -> vBulletin Options -> 'User Links in Navbar' and set the following options:
User Links Forum Menu Display Order: Choose the location you want the User Links menu to show up in the Forum Tab. (Default is 3, Navbar after Private Messages)
User Links Blogs Menu Display Order: Choose the location you want the User Links menu to show up in the Blogs Tab. (Default is 2, Blogs after My Blog)
Additional Link (1-5) URL: Enter the URL of the link you want set as Additional Link (1-5).
Additional Link (1-5) Name: Enter the name of the Additional Link (1-5) that you want to show up in the menu.
Additional Link (1-5) Title Text: Enter the title text of Additional Link (1-5) you want to show on mouseover.

4. Go to your Admin CP -> Styles & Templates -> Style Manager -> StyleVars (In the All Style Options drop-down) -> Boofo -> boofo_userlinks_color
Enter the color code of the font color that you want the User Links menu title to show up in.

NOTE: You will need to do this for all styles.
------------------------------------------------------

Done!
Enjoy!

NOTE: There is also an Advanced Version (paid) available that allows each user to add up to 5 links of their choosing (instead of the Admin having to do it for everyone), as well as a Search menu that allows you to add settings for how many days you want to search for (2 days, 7, days, 12 days, 180 days, etc.) that is only available through my site. If anyone is interested, contact me via PM for details.

Code:

if ($mark_as_installed != 'clicked')
{
        $you_get = 'squat';
}
else
{
        $you_get = 'support';
}


Hippy 03-12-2011 05:37 PM

I'll be the first to test it out
thanks boofo

need to fix this as well no ?;)

Code:

if ($mark_as_installed != 'clicked')
{
        $you_get = 'support';
}
else
{
        $you_get = squat'';
}


Boofo 03-12-2011 05:39 PM

Thanks! Let me know if you find any problems. It was pretty well tested out already, but you never know what can slip by.

Boofo 03-12-2011 05:42 PM

Quote:

Originally Posted by Hippy (Post 2172624)
I'll be the first to test it out
thanks boofo

need to fix this as well no ?;)

Code:

if ($mark_as_installed != 'clicked')
{
        $you_get = 'support';
}
else
{
        $you_get = squat'';
}


I had to take a double-look at my code. It seems you switched them. Nice try. ;)

McAtze 03-12-2011 05:54 PM

Thx for this great Mod ..

.. but one little bug:

I use vBSEO and now the "Friends"-Link doesnt work .. what can i do ??

Boofo 03-12-2011 06:11 PM

I have no idea as I don't use vBSEO. If you find a fix, let me know and I will update the mod, if the fix doesn't mess up anything for those that don't have vBSEO installed.

Gemma 03-12-2011 06:29 PM

The code in the product for the friends link should be

Change this:
Code:

<li><a href="{vb:raw vboptions.bburl}/member.php?{vb:raw session.sessionurl}{vb:raw bbuserinfo.userid}-{vb:raw bbuserinfo.username}&amp;tab=friends">{vb:rawphrase boofo_friends}: {vb:raw bbuserinfo.friendcount}</a></li>
To this:
Code:

<li><a href="{vb:raw vboptions.bburl}/member.php?u={vb:raw bbuserinfo.userid}&amp;tab=friends">{vb:rawphrase boofo_friends}: {vb:raw bbuserinfo.friendcount}</a></li>

Boofo 03-12-2011 06:33 PM

Do you have vBSEO installed Gemma? The reason I am asking is because I took that link off of the Friends Tab itself in the profile, so I know it is correct.

Mr_Running 03-12-2011 06:40 PM

1 Attachment(s)
Thanks Boofo

I notice a difference from the screen shot and what I have.
Some of the User Links go above the navbar

Boofo 03-12-2011 06:45 PM

What is your screen size? Remember, the longer menu has to adapt to the page size and where you are scrolled at. Plus you need to add the code to the additional.css.

Gemma 03-12-2011 06:49 PM

Quote:

Originally Posted by Boofo (Post 2172641)
Do you have vBSEO installed Gemma? The reason I am asking is because I took that link off of the Friends Tab itself in the profile, so I know it is correct.

Yes I do but I used the default link with vBSEO disabled.

Boofo 03-12-2011 06:56 PM

Can you give me the product name of the vBSEO mod? I will do a conditional that will change the link if vBSEO is installed and enabled. Even disabled, aren't there some link changes in the htaccess file?

McAtze 03-12-2011 07:02 PM

@Boofo: u have pm .. ;)

i use vbseo with this rewrite ..

domain.de/members/username.html

--------------

€dit: Stop your searching Boofo .. the link from Gemma works .. ;)

HTML Code:

<li><a href="{vb:raw vboptions.bburl}/member.php?u={vb:raw bbuserinfo.userid}&amp;tab=friends">{vb:rawphrase boofo_friends}: {vb:raw bbuserinfo.friendcount}</a></li>

Mr_Running 03-12-2011 07:11 PM

Quote:

Originally Posted by Boofo (Post 2172647)
What is your screen size? Remember, the longer menu has to adapt to the page size and where you are scrolled at. Plus you need to add the code to the additional.css.

Screen size is 14 inch and additional.css is added :)

I guess I need a screen for the longer meau :up: I will let the wife know :D

Boofo 03-12-2011 07:26 PM

Quote:

Originally Posted by Mr_Running (Post 2172658)
Screen size is 14 inch and additional.css is added :)

I guess I need a screen for the longer meau :up: I will let the wife know :D

There should be some spacing on the left of the the menu subtitles if the code is installed in the additional.css..

Boofo 03-12-2011 07:27 PM

Quote:

Originally Posted by McAtze (Post 2172653)
@Boofo: u have pm .. ;)

i use vbseo with this rewrite ..

domain.de/members/username.html

--------------

?dit: Stop your searching Boofo .. the link from Gemma works .. ;)

HTML Code:

<li><a href="{vb:raw vboptions.bburl}/member.php?u={vb:raw bbuserinfo.userid}&amp;tab=friends">{vb:rawphrase boofo_friends}: {vb:raw bbuserinfo.friendcount}</a></li>

We know it works for those with vBSEO installed. That wasn't the problem. But it is fixed now so you can download the update.

McAtze 03-12-2011 07:32 PM

thx for the fast help ...

Hippy 03-12-2011 07:42 PM

1 Attachment(s)
Quote:

Originally Posted by Mr_Running (Post 2172643)
Thanks Boofo

I notice a difference from the screen shot and what I have.
Some of the User Links go above the navbar

Just tested this and your correct.. but the defaul style is good .
it's a custom style i see this one..

downloaded here @ vb.org called blackend
using vb4.1.2 and the style is also for vb4.1.2

other wise Seems this will be a mch used mod

Boofo 03-12-2011 07:47 PM

Just edit the additonal.css code you added and change the color: {vb:stylevar blockhead_link_color}, if you want something other than white. As far as it being above the navbar, the custom skin must be causing that. Since I only use the default skin, that is what I coded it in. It looks like they use a lot of padding in that skin, which would account for it, I suppose.

Mikevet1984 03-12-2011 08:39 PM

Boofo's Miracle one more time....

hahahah

Thanks bro!

sulasno 03-12-2011 11:36 PM

tagged and thanks

does this mod allow users to select their own links ?

gamerzhut 03-13-2011 02:09 AM

Thanks, works like a charm.

Mark as installed & rated *****

Mr_Running 03-13-2011 11:56 AM

Quote:

Originally Posted by Hippy (Post 2172666)
Just tested this and your correct.. but the defaul style is good .
it's a custom style i see this one..

downloaded here @ vb.org called blackend
using vb4.1.2 and the style is also for vb4.1.2

other wise Seems this will be a mch used mod

Quote:

It looks like they use a lot of padding in that skin, which would account for it, I suppose.
Yes it may be the padding on mine as I did increase the size of the navbar and sub navbar slightly.

When I remove the additional links it does stay below. :)

Sulasno
Quote:

does this mod allow users to select their own links ?
No not as of 1.0.1 but...Additional links can be set.
vB --> Settings --> Options --> User Links in Navbar

Thanks again Boofo rated 5 stars

Cheers,
Mr_Running

Boofo 03-13-2011 12:05 PM

Allowing users to add their own links would requite setting up profile fields. That could be done fairly easily, I suppose. If I get enough calls for it, then maybe I will look into it. It would have to be worth the time to mess with it.

Mr_Running 03-13-2011 12:41 PM

Quote:

Originally Posted by Boofo (Post 2172661)
There should be some spacing on the left of the the menu subtitles if the code is installed in the additional.css..

Menu subtitles (Statistics, Post, etc) do seem a little close on mine as seen in post #9
The additional.css is added ???


Cheers,
Mr_Running

Boofo 03-13-2011 12:49 PM

Check and make SURE you added the code to the additional.css exactly as it is supposed to be. Are you using a custom skin of any kind? What browser were you in when you took that pic?

Mr_Running 03-13-2011 01:10 PM

Checked additional.css --> seems good.
The only custom skin I am using is a change in some vB default colors. :)

The Browser was FireFox for the pic and I have now checked EI and Google. = Same
I have cleared the cache and cookies too.
Did not change.

Cheers,
Mr_Running

Boofo 03-13-2011 01:24 PM

Quote:

Originally Posted by Mr_Running (Post 2172822)
Yes it may be the padding on mine as I did increase the size of the navbar and sub navbar slightly.

Sulasno

You messed with the padding on the navbar. That is why it looks like it does now. If you check it with a default skin that has not been tampered with, it will show correctly. There is no way to account for all changes someone can make. I suggest either setting the padding and whatever else you did back to the default, or you will need to go into the additional.css and adjust the settings in the code you added there.

UncoderMom 03-13-2011 01:32 PM

Was waiting for you to release this! Its about time! LOL

Boofo 03-13-2011 01:52 PM

All you had to do was ask. You knew I was working on it. ;)

UncoderMom 03-13-2011 03:06 PM

Oooh did I tell you already to add subscribed threads to it?

PLEASE add subscribed threads!

UncoderMom 03-13-2011 03:08 PM

Under the posts section would be nice.

Mikevet1984 03-13-2011 03:15 PM

Boofo I need help to change the font color and backround color of the categories of (statistics,miscellaneous,posts) so as to suit better the colors of each of my installed skins. I would also like to make these three phrases bold so as to make the difference from the link where the font is normal. How could I do that? Is it possible?

Am I also wondering if (in future updates of course) you could add the possibility to admins after widing a little the space of each link, to add html script of a tiny image ie 10 px to make the mod look more impressive to users eyes.

Boofo 03-13-2011 10:53 PM

Quote:

Originally Posted by UncoderMom (Post 2172877)
Oooh did I tell you already to add subscribed threads to it?

PLEASE add subscribed threads!

I had that added at one time but decided to take it out since Subscribed Threads is already there under the Quick Links menu.

Boofo 03-13-2011 11:05 PM

Quote:

Originally Posted by Mikevet1984 (Post 2172881)
Boofo I need help to change the font color and backround color of the categories of (statistics,miscellaneous,posts) so as to suit better the colors of each of my installed skins. I would also like to make these three phrases bold so as to make the difference from the link where the font is normal. How could I do that? Is it possible?

Am I also wondering if (in future updates of course) you could add the possibility to admins after widing a little the space of each link, to add html script of a tiny image ie 10 px to make the mod look more impressive to users eyes.

The code you added to the additonal.css is what you need to edit for what you want. That handles the sub-head lines.

As far as adding an image, I had thought about that, but as you can see from a few users in this thread, they are already having issues with spacing in the menu due to screen size on their end. I will look into it further and see what I can figure out with, though.

Boofo 03-13-2011 11:46 PM

1 Attachment(s)
Mike, is the pic below something like what you were looking to do?

Mikevet1984 03-14-2011 12:39 AM

Yup, plus the images before the text of the url. In the admin defined url it's easy as the only thing you have to do is paste html script of the image before the title. But in the other links of your mod needs template edit but I am not such an expert to do it.

The answer in your question in yes...

Boofo 03-14-2011 12:45 AM

As far as the images go, that is a slippery slope. How do you know what image to have for what link? Also, all you would need is one admin trying to like to an over-sized image to blow it all apart.

As for as the background color of the sub-head line, try replacing the additional.css code with this:

Code:

li.menuname {
        font-size: {vb:stylevar small_fontSize};
        font-weight: bold;
        padding: 2px 0px 2px {vb:math {vb:stylevar padding}/2};
        border: 0;
        background: {vb:stylevar navbar_background};
        text-decoration: none;
        text-align: {vb:stylevar left};
        color: {vb:stylevar boofo_userlinks_color};
}


Boofo 03-14-2011 12:55 AM

Actually, Mike, now that I have looked into it, it wouldn't be that hard to make another setting for the icon images. BUT... unless they used icons for ALL of the additional links, it would look really out of place with links staggered. Do you have an idea for a standard image that could be added before all of the additional links?

Mikevet1984 03-14-2011 01:20 AM

Quote:

As far as the images go, that is a slippery slope. How do you know what image to have for what link? Also, all you would need is one admin trying to like to an over-sized image to blow it all apart.
You do not know....you choose. Icons are millions found through websearching.

An image of avout 15-px worked perfect to me. It suits the mod, taking into account the current dimensions of the links backround.


All times are GMT. The time now is 05:12 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01348 seconds
  • Memory Usage 1,841KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete