View Full Version : Custom Quick Links
What does this do?
Lets members of your forum add custom links at the bottom of the Quick Links popup in the navbar.
Overview:
Queries: 1 (during install)
Phrases: 8
New Templates: 3
- customquicklinks
- usercp_quicklinks
- usercp_quicklinks_exist
Edit Templates: 2
- USERCP_SHELL
- navbar
Edit Files: 3
- profile.php
- global.php
- includes/functions_user.php
More Info:
Members will be able to add customized links to the quick links popup via the "UserCP -> Edit Quick Links" link. These links will appear under 'Custom Links' at the bottom of the Quick Links popup.
It adds no additional queries during pageloads. (the data is stored in usertextfield which is grabbed on every page by default)
The links are individual to each user, not global for everyone.
The link titles are HTML safe.
The only drawback is that very long link titles also distort the quick links popup and make it very wide, but that is up to each member.
Changelog:
v1.1:
- Added quicklinks to construct_usercp_nav() (Thanks Lionel)
Lionel
03-08-2005, 01:08 PM
There is a template mod at vbulletintemplates that allows you to do that. It's call the favorites and make use of the custom profile fields. Except it does not put them in the navbar.
Lionel
03-08-2005, 01:27 PM
Well, I''l take that back. I went to your site and saw it. Pretty impressive....
Lionel
03-08-2005, 11:49 PM
in functions_user.php I added in the
$cells = array(
after
'profilepic',
'quicklinks',
That makes it consistent with the rest of the left navigation bar.
pimpery
03-08-2005, 11:54 PM
in functions_user.php I added in the
$cells = array(
after
'profilepic',
'quicklinks',
That makes it consistent with the rest of the left navigation bar.
be cautious of this hack: its resource intensive.
Zoints
03-09-2005, 05:24 AM
be cautious of this hack: its resource intensive.
How is it resource intensive? Could you elaborate please?
RMS-Chef
03-09-2005, 06:09 AM
Checked over everything and it is not wokring for me which is rare. I can add links, there is stuff in the created DB table. Just nothing shows up in my menu. If I take the <if> condition out of the navbar edit, I do see the thead row but no links under it. I will look over my steps in the morning though.
Boofo
03-09-2005, 06:59 AM
be cautious of this hack: its resource intensive.
I'd be curious to know myself. How bad is it and how did you come to this conclusion? ;)
lefthome
03-09-2005, 11:02 AM
I like this hack and want to install but I am upgrading from vb3.06 to vb3.07 this weekend. does this hack work in 3.07?
I like this hack and want to install but I am upgrading from vb3.06 to vb3.07 this weekend. does this hack work in 3.07?
I don't see a reason why it wouldn't work in 3.0.7, since it is not really editing any existing functions to change functionality. Though I can't say 100% that it will.
Lionel
03-09-2005, 01:03 PM
I am using 3.07, no problems
RMS-Chef
03-09-2005, 06:00 PM
I checked my install and I can't see anything wrong. Would the fact that my navbar is in my header template have anything to do with this not displaying?
As I said, I can add sites my CP and the created table now has info in it. It's just the Quicklinks drop down does not show any of this hack's display.
Zoints
03-10-2005, 06:19 AM
I PM'd pimpery to ask him why this hack was resource intensive.
Hi, I have a question for you:
https://vborg.vbsupport.ru/showthread.php?p=623106#post623106
Thanks.
on EVERY page(its in the navbar) load. extra queries have to be made for the custom quicklinks. multiply that be all your users, viewing pages constantly.
If you review the code, you will see that he has no idea what he is talking about. People should not disparage other's hacks if they can't code their way out of a wet paper bag that is already torn and has arrows pointing the way.
The quicklinks are stored in the usertextinfo table which is queried automatically on every page.
RMS-Chef
03-11-2005, 01:13 AM
I checked my install and I can't see anything wrong. Would the fact that my navbar is in my header template have anything to do with this not displaying?
As I said, I can add sites my CP and the created table now has info in it. It's just the Quicklinks drop down does not show any of this hack's display.
I installed this on another site that has the navbar moved to header in a style and it again did not work. But it did work on a child style that had the navbar still in the navbar template. Any help?
-=Sniper=-
03-11-2005, 01:41 AM
nice hack dude!
wheres the other hack gone which used custom fields? I can't seem to find it on vbt or here.
I installed this on another site that has the navbar moved to header in a style and it again did not work. But it did work on a child style that had the navbar still in the navbar template. Any help?
You moved the quick navbar into the header template?
In that case, you need to edit global.php and move the section
// Custom Quick Links
if ($bbuserinfo['customquicklinks'])
{
$cqlinks = unserialize($bbuserinfo['customquicklinks']);
$customquicklinks = '';
if ($cqlinks)
{
$show['customquicklinks'] = true;
foreach ($cqlinks AS $cqlink)
{
$cqlink = unserialize($cqlink);
eval('$customquicklinks .= "' . fetch_template('customquicklink') . '";');
}
}
}
a few lines higher, ABOVE this line:
eval('$header = "' . fetch_template('header') . '";');
RMS-Chef
03-11-2005, 12:34 PM
You moved the quick navbar into the header template?
Exactly. For an example attached is a shot of my neXusBlue vB3 conversion. I have several styles with the navbar taken out of the navbar/breadcrumb area and moved to header.
And that fix worked. Thank you for this nice addition.
I ended up taking this out of QuickLinks and making it's own "My Links" drop down. I also added target="_blank" to the code in customquicklink template to have these open in a new window. :)
lefthome
03-12-2005, 03:36 PM
I must have done something very wrong. I couldn't get past the first step. Here is what I got running the query:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'forum.usertextfield' doesn't exist
I'd like to add this to our 3.07 version but can't. Any help?
I must have done something very wrong. I couldn't get past the first step. Here is what I got running the query:
Are you using table prefixes? If so, you need to add the prefix before "usertextfield" in the query. ie, if your prefix is "forum_" you need to change usertextfield to "forum_usertextfield"
Marco van Herwaarden
03-12-2005, 05:53 PM
@lefthome
If you are using a table prefix for your vB tables, you will have to add that in front of the usertextfield tablename.
freakyshiat
03-30-2005, 07:02 AM
how can I use conditionals to let specific usergroups access the quick links? I dont want to do it at the navbar level (people can manually type in the direct link), I would like profile.php to check if the user belongs to usegroupid 3 and 4 (for example) and only let those groups update or add the quick links...thank you for any help.
Gastongr
04-24-2005, 04:20 PM
I installed it on www.webmastershelp.com and it works great! Thanks :).
zetetic
04-30-2005, 03:22 AM
Excellent hack, Soup. :)
zetetic
04-30-2005, 03:33 AM
Incidentally, you should cache the templates.
In profile.php, find:
'removelist' => array(
'modifylist_removeuser',
),
and replace with:
'removelist' => array(
'modifylist_removeuser',
),
'editquicklinks' => array(
'usercp_quicklinks',
'usercp_quicklinks_exist',
),
Samira
05-06-2005, 03:21 AM
Okay, I'm sure I'm missing something simple and I'll feel silly, but I'm begging for some help here (insert *impish grin* smilie here). :cheeky:
I have this working on my forums and my members love it. However, I've just recently installed the Additional Navbar (https://vborg.vbsupport.ru/showthread.php?t=65198) hack and for the life of me, I can NOT get this to work there. The $customquicklinks just will not show. I have the $navbar2 value in the navbar template, so I don't think the modification listed above will be helpful.
Suggestions are very welcome, I've lost some hair over this one. :nervous:
Samira
05-16-2005, 06:04 PM
No one?
commTRU
08-10-2005, 02:03 PM
This is a very nice hack and works fine :)
Just out of interest though, will there be an add-on in the future to allow it to work on the vBAdvanced CMPS page? It doesn't appear on any page that isn't within the /forum directory although it is fine everywhere else.. Maybe there is quick and easy way to adjust this? ^^;;
yoyoyoyo
08-20-2005, 03:45 PM
installed easily in 3.0.8 - thanks for sharing!
yoyoyoyo
11-22-2006, 10:59 PM
any chance for a 3.5.X update to this?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.