Archive for vBulletin 4 Quick Tips and Customizations
Nov
23
Differentiate between internal and external links.
Posted by: | CommentsHow-to differentiate between internal and external links. (Without plugins or editing files!)
Prerequisites: (AdminCP >> Options >> BB Code Settings)
Add the following to your additional.css template (for each style you have):
Upload the attached image to your misc folder (or substitute it for your own): external-link.png
End result:
Screenshot-14.png
Prerequisites: (AdminCP >> Options >> BB Code Settings)
- "Add nofollow attribute to URL BB Code" must be set to Yes
- "URL nofollow domain Whitelist" must have your domain name(s)
Add the following to your additional.css template (for each style you have):
Code:
.postcontent a[rel="nofollow"][target="_blank"] {
padding-right: 13px;
color: #36B;
background: url({vb:stylevar imgdir_misc}/external-link.png) no-repeat 100% 50%;
}End result:
Screenshot-14.png
Oct
29
How to: Make a Tooltip or Abbreviation BBCode
Posted by: | CommentsAdminCP -> Custom BBCodes -> Add New BBCode
Tag Name: abbr
Replacement:
Code:
<abbr title="{option}">{param}</abbr>Code:
[abbr="vBulletin Solutions Inc."]VBSI[/abbr]Use Option: YES
Settings Screenshot:
Capture.PNG
Preview:
29-Oct-11 14-55-51.png
Oct
29
How to: Make a Tooltip or Abbreviation BBCode
Posted by: | CommentsAdminCP -> Custom BBCodes -> Add New BBCode
Tag Name: abbr
Replacement:
Code:
<abbr title="{option}">{param}</abbr>Code:
[abbr="vBulletin Solutions Inc."]VBSI[/abbr]Use Option: YES
Settings Screenshot:
Capture.PNG
Preview:
29-Oct-11 14-55-51.png
Sep
07
How-To: Add User Avatar to CMS Articles
Posted by: | CommentsMaybe a mod will move this to the Tips and Tricks forum...
The vBCMS provides a user with the functionality to customize their site to meet their needs. I understand most users would prefer to have out of the box solutions to their needs but sometimes this is not always available. Luckily for us, we have the tools necessary to do the additions we want. As I go through customizing my site, I thought I would share some of the items I have done.
Add the authors avatar to the article page
1. Create a plugin:
Product - vBulletin CMS
Hook Location - vbcms_article_populate_end (vBulletin CMS)
Title - Whatever you like
Execution Order - 1
Plugin Code:
2. In the style you want to add the avatar to, edit template vbcms_content_article_page and add where you want the avatar to show:
Important: Use my code at your own risk. I take no responsibility for any problems or data loss this may cause.
The vBCMS provides a user with the functionality to customize their site to meet their needs. I understand most users would prefer to have out of the box solutions to their needs but sometimes this is not always available. Luckily for us, we have the tools necessary to do the additions we want. As I go through customizing my site, I thought I would share some of the items I have done.
Add the authors avatar to the article page
1. Create a plugin:
Product - vBulletin CMS
Hook Location - vbcms_article_populate_end (vBulletin CMS)
Title - Whatever you like
Execution Order - 1
Plugin Code:
PHP Code:
require_once(DIR . '/includes/functions_user.php');
if($nodeid != '') {
$avatarurl = fetch_avatar_url($view->authorid, true);
if ($avatarurl[0]) {
$avatarurl = $avatarurl[0];
}
/* render template and register variables */vB_Template::preRegister('vbcms_content_article_page',array('avatarurl' => $avatarurl));
}
Code:
<img src="{vb:raw avatarurl}" alt="Author Avatar" />Sep
07
How-To: Add User Avatar to CMS Articles
Posted by: | CommentsMaybe a mod will move this to the Tips and Tricks forum...
The vBCMS provides a user with the functionality to customize their site to meet their needs. I understand most users would prefer to have out of the box solutions to their needs but sometimes this is not always available. Luckily for us, we have the tools necessary to do the additions we want. As I go through customizing my site, I thought I would share some of the items I have done.
Add the authors avatar to the article page
1. Create a plugin:
Product - vBulletin CMS
Hook Location - vbcms_article_populate_end (vBulletin CMS)
Title - Whatever you like
Execution Order - 1
Plugin Code:
2. In the style you want to add the avatar to, edit template vbcms_content_article_page and add where you want the avatar to show:
Important: Use my code at your own risk. I take no responsibility for any problems or data loss this may cause.
The vBCMS provides a user with the functionality to customize their site to meet their needs. I understand most users would prefer to have out of the box solutions to their needs but sometimes this is not always available. Luckily for us, we have the tools necessary to do the additions we want. As I go through customizing my site, I thought I would share some of the items I have done.
Add the authors avatar to the article page
1. Create a plugin:
Product - vBulletin CMS
Hook Location - vbcms_article_populate_end (vBulletin CMS)
Title - Whatever you like
Execution Order - 1
Plugin Code:
PHP Code:
require_once(DIR . '/includes/functions_user.php');
if($nodeid != '') {
$avatarurl = fetch_avatar_url($view->authorid, true);
if ($avatarurl[0]) {
$avatarurl = $avatarurl[0];
}
/* render template and register variables */vB_Template::preRegister('vbcms_content_article_page',array('avatarurl' => $avatarurl));
}
Code:
<img src="{vb:raw avatarurl}" alt="Author Avatar" />Aug
07
Stop automatic quoting in PM replies
Posted by: | CommentsThis will prevent PMs from being quoted in replies however, as there is no 'Reply with quote' option in PMs this will remove the option to quote completely unless a user copies and pastes the original text into the reply.
Change 'newpost_quote' to read as follows:
Change 'newpost_quote' to read as follows:
Code:
<vb:if condition="THIS_SCRIPT != 'private'">[ QUOTE=$originalposter]{$pagetext}[/QUOTE]</vb:if>Aug
07
Stop automatic quoting in PM replies
Posted by: | CommentsThis will prevent PMs from being quoted in replies however, as there is no 'Reply with quote' option in PMs this will remove the option to quote completely unless a user copies and pastes the original text into the reply.
Change 'newpost_quote' to read as follows:
Change 'newpost_quote' to read as follows:
Code:
<vb:if condition="THIS_SCRIPT != 'private'">[ QUOTE=$originalposter]{$pagetext}[/QUOTE]</vb:if>Aug
05
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Posted by: | CommentsAdd this code to your additional.css template to match the colors of the editor to the style you are using:
/* Background Color for CKEditor */
.cke_skin_kama .cke_wrapper {
background:{vb:stylevar postbithead_background} !important;
}
/* Background Color for CKEditor Buttons (Note, this may be too dark for some styles. If so you can delete this one.) */
.cke_skin_kama .cke_toolgroup {
background: {vb:stylevar postbit_foot_background} !important;
}
/* Background Color for CKEditor Hover Link*/
.cke_skin_kama a:hover {
background: {vb:stylevar control_content_hover_background} !important;
}
The additional.css template can be found here:
Admin CP -> Style Manager -> Edit Templates -> CSS Templates -> additional.css
Note: If you want to change these to your own custom colors, then use this code instead:
/* Background Color for CKEditor */
.cke_skin_kama .cke_wrapper {
background-color: #xxxxxx !important;
}
/* Background Color for CKEditor Buttons */
.cke_skin_kama .cke_toolgroup {
background-color: #xxxxxx !important;
}
/* Background Color for CKEditor Hover Link*/
.cke_skin_kama a:hover {
background-color: #xxxxxx !important;
}
...with xxxxxx being the hexcode of the color you wish to use.
/* Background Color for CKEditor Hover Link*/
.cke_skin_kama a:hover {
background: {vb:stylevar control_content_hover_background} !important;
// background: {vb:stylevar doc_background} !important;
}
Note: Fixed typo, thanks to RS_Jelle.
/* Background Color for CKEditor */
.cke_skin_kama .cke_wrapper {
background:{vb:stylevar postbithead_background} !important;
}
/* Background Color for CKEditor Buttons (Note, this may be too dark for some styles. If so you can delete this one.) */
.cke_skin_kama .cke_toolgroup {
background: {vb:stylevar postbit_foot_background} !important;
}
/* Background Color for CKEditor Hover Link*/
.cke_skin_kama a:hover {
background: {vb:stylevar control_content_hover_background} !important;
}
The additional.css template can be found here:
Admin CP -> Style Manager -> Edit Templates -> CSS Templates -> additional.css
Note: If you want to change these to your own custom colors, then use this code instead:
/* Background Color for CKEditor */
.cke_skin_kama .cke_wrapper {
background-color: #xxxxxx !important;
}
/* Background Color for CKEditor Buttons */
.cke_skin_kama .cke_toolgroup {
background-color: #xxxxxx !important;
}
/* Background Color for CKEditor Hover Link*/
.cke_skin_kama a:hover {
background-color: #xxxxxx !important;
}
...with xxxxxx being the hexcode of the color you wish to use.
/* Background Color for CKEditor Hover Link*/
.cke_skin_kama a:hover {
background: {vb:stylevar control_content_hover_background} !important;
// background: {vb:stylevar doc_background} !important;
}
Note: Fixed typo, thanks to RS_Jelle.
