Please

Simple template edit:

In the navbar template:

Find:

Code:
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr>

Add after:

Code:
<!-- Unanswered Posts -->
<tr><td class="vbmenu_option"><a href="search.php?do=process&replyless=1&replylimit=0&exclude=30">Unanswered Posts</a></td></tr>
<!-- /Unanswered Posts -->

This will show all zero-reply posts within the last 30 days.
 
BBcode "Title"
(frame presentation)


Description: Add a new BBcode for a new look for your title for example ^^

In your AdminCP => Custom BB Codes => Add New BB Code

* Title: Title
* Tag: title

* Replacement:

Code:
Code:
<table class="tborder" align="center" border="0" cellpadding="6" cellspacing="1" width="100%"><thead><tr><td class="tcat" colspan="2"><div align="left"><img src="images/misc/titre.gif">&nbsp;{param}</div>
</td></tr></thead></table>
* Example: [title]Title Tutorial[/title]
* Description: Add a new BBcode for a new look for your title for example
* Use {option}: No
* Button Image (Optional): images/misc/titre.gif

Upload this image on your FTP in misc file:

PS: Don't forget to Click Install if you use this little BBcode ^^

**
**

vB Code

by StGaensler

Description
This Hack provides a vB Code
to add a table to the post
The skin of the table automatically fits the style because the CSS classes of vBulletin are used.

A table is simply made of some lines (will be the rows). The cols are seperated by |. So this will be a table:
Code:
Code:
[table="head"]head col1|head col2|head col3
row1 col1|row1 col2|row1 col3
row2 col1|row2 col2|row2 col3[/table]
A screenshot of a "ready" table is attached

Usage

1. install attached product XML through product manager (overwrite existing)
2. install at least one language pack in AdminCP -> Languages & Phrases -> Download / Upload Languages -> Import Language XML File
Important: Select the language you want to import the phrases into, not "(Create New Language)" - this won't work! If you use another version of vBulletin than I use enable "Ignore Language Version" to import the language pack.


Please note: (installing)
Installing this product will: (reverted during uninstall)

1. rename a existing vB Code "table" to "table_saved"
2. add a new vB Code


If you want to have live sortable columns (JavaScript): Download attached sorttable.js.txt rename it to sorttable.js and place it into the /clientscript/ folder of your vBulletin. Then go to AdminCP -> vBulletin Options -> BB Code
Settings -> Enabled Features Of This BB Code and enable sortable
Note: Including the file on the webpages where it is necessary is done by my product. So if sortable is disabled, it won't be included automatically.
If you want to have a icon for the editor you may use this for free:

Please note: (usage)

* Of course you can use vB Code and smilies inside the table!
* The first line defines how much columns are in the table. If the other lines have more or less colums they are cut off or filled with &nbsp; (space)
* You can find a detailed description of the options (please read it before requesting help)
* Empty rows are (should be ) removed.


New features

* define colspan of cells
* small panel in AdminCP
* define CSS class of table and tablerows
* live sorting of table through clicking the head of a column
* defining maximum width of a table


Maybe planned features

* detailed description of the vB Code in misc.php?do=bbcode depending on the features enabled in AdminCP (planned for next beta version)
* define formatting (bold, italic), align (left, right, center) and width of the cols

Suggested but not planned features

* none


Known problems

* Bugfix of version 0.1.1 doesn't work if vBulletin should write template names into the source code

**
**

Recipe Mod
By: whitemike
Demo: Here
Official Requests: Here
NOTE: Support will be provided here, but I will get to it sooner on my official site. vBulletin Zone

Installation:

1. Templates to add:3
2. Templates to edit:3
3. Plugins Added: 14
4. Phrases Added: 12
5. Quires ran: 9


Instructions:

1. Import the Product .xml
2. Edit templates

Editpost:

Find:
Code:
Code:
<!-- / subject field -->


Add Under:
Code:
Code:
<if condition="$threadinfo[firstpostid] == $postinfo[postid] AND $foruminfo[enable_recipe]">
$editrecipe 
<else />
Find:
Code:
Code:
        $messagearea
        <!-- / message area -->

        $posticons
        
            </td>
        </tr>
        </table>
        
        </div>
    </div>


Add After:
Code:
Code:
</if>


Showthread:

Find:
Code:
Code:
 $Navbar


Add Under:
Code:
Code:
<if condition="$foruminfo[enable_recipe]">
$recipe
</if>


Find:
Code:
Code:
<a name="poststop" id="poststop"></a>


Add Under:
Code:
Code:
<if condition="$no_posts">
<else />


Find:
Code:
Code:
<div id="posts">$postbits<div id="lastpost"></div></div>


Add Above:
Code:
Code:
</if>


Newthread:

Find:
Code:
Code:
<!-- / subject field -->


Add Under:
Code:
Code:
<if condition="$foruminfo[enable_recipe]">
$newrecipe
<else />


Find:
Code:
Code:
        <!-- / message area -->

        $imagereg

        $posticons
        
            </td>
        </tr>
        </table>
        
        </div>
    </div>


Add After:
Code:
Code:
</if>
Find:
Code:
Code:
<input type="submit" class="button" name="preview" value="$vbphrase[preview_post]" accesskey="r" tabindex="1" />
Replace with:
Code:
Code:
<if condition="$foruminfo[enable_recipe]"></else><input type="submit" class="button" name="preview" value="$vbphrase[preview_post]" accesskey="r" tabindex="1" /></if>

Postbit(_legacy):

Add at Top:


Code:
Code:
<if condition="$post[postcount] == 1 && in_array($thread['forumid'], array($vboptions[recipe_forums]))">
<if condition="$show['attachments']">
        <!-- attachments -->
            <div style="padding:$stylevar[cellpadding]px">
            
            <if condition="$show['thumbnailattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_thumbnails]</legend>
                    <div style="padding:$stylevar[formspacer]px">
                    $post[thumbnailattachments]
                    </div>
                </fieldset>
            </if>
        
            <if condition="$show['imageattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_images]</legend>
                    <div style="padding:$stylevar[formspacer]px">
                    $post[imageattachments]
                    </div>
                </fieldset>
            </if>
            
            <if condition="$show['imageattachmentlink']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_images]</legend>
                    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                    $post[imageattachmentlinks]
                    </table>
                    </fieldset>
            </if>
            
            <if condition="$show['otherattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_files]</legend>
                    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                    $post[otherattachments]
                    </table>
                </fieldset>
            </if>
            
            <if condition="$show['moderatedattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attachments_pending_approval]</legend>
                    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                    $post[moderatedattachments]
                    </table>
                </fieldset>        
            </if>
            
            </div>
        <!-- / attachments -->
        </if>
<else />


Add at End:
Code:
Code:
</if>


Find:
Code:
Code:
<div>$vbphrase[posts]: $post[posts]</div>
Add After:
Code:
Code:
<div>$vbphrase[recipe_stats]: $post[recipe_stats]</div>


Fixes:

1.6

1. Added another template edit into the newthread template to remove the preview post option


1.5

1. Added a vboption for the forumid's for the templates to make easier on client side

1.4

1. Added Template Grouping
2. Cached Templates
3. Other small minor changes

1.3

1. Fixed Spelling - Duh

1.2

1. Fixed Major Edit Post Bug - Thanks to Nick for opening my eyes

1.1

1. Fixed Edit Post Bug
2. Fixed Spelling Error


Thats it!

Configure

1. Go to ACP -> Forums & Moderators -> Forum Manager -> Pick a forum and at bottom it has a new yesno setting
2. Go to ACP -> vBulletin Options -> Recipe Mod Database -> Enter the forumid's used for your forum

**
**

Opacity change on mouseover buttons

Instructions:
AdminCP > Style Manager > YourTheme > Go

Then in your Additional CSS Definitions add the following:

Code:
Code:
/* ***** Opacity 'fog' mouseover hack ***** */
.fog { opacity: 0.4; filter: alpha(opacity=40); -moz-opacity: 0.4; }
a:hover .fog { opacity: 1.0; filter: alpha(opacity=100); -moz-opacity: 1.0; }
If you want to use the effect on inline images such as the 'Go to last post' image, you'll also need to add this:
Code:
Code:
/* ***** Opacity 'fog' inline mouseover hack ***** */
.inlineimgfog { vertical-align: middle; opacity: 0.4; filter: alpha(opacity=40); -moz-opacity: 0.4;  }
a:hover .inlineimgfog { opacity: 1.0; filter: alpha(opacity=100); -moz-opacity: 1.0; }
The reason for this is that inline images already have a class assigned and we can't add another, so we combine the class definitions into one - inlineimagefog. For images without an existing class, use fog.

All you have to do is locate the image code in the template that you want to add the effect to, and either add class="fog" or change class="inlineimg" to class="inlineimgfog" where appropriate inside the img tag.

I applied the effect in the demo to last post, first new post, new reply and new thread buttons. The locations for template changes for these are below. You may of course use it on any hyperlinked image you wish.


New thread:
Code:
Code:
FORUMDISPLAY
newthread.gif - Line 52 - fog
newthread.gif - Line 135 - fog
New reply:
Code:
Code:
SHOWTHREAD
reply.gif - Line 25 - fog
reply.gif - fog - Line 109 - fog
Go to first new post:
Code:
Code:
THREADBIT
firstnew.gif - Line 20 - inlineimgfog
firstnew.gif - Line 33 - inlineimgfog
Code:
Code:
SHOWTHREAD
firstnew.gif - Line 40 - inlineimgfog
Go to last post:
Code:
Code:
FORUMDISPLAY_ANNOUNCEMENT
lastpost.gif - Line 5 - inlineimgfog
Code:
Code:
FORUMHOME_LASTPOSTBY
lastpost.gif - Line 12 - inlineimgfog
lastpost.gif - Line 18 - inlineimgfog
Done!

**
**

Add User to Secondary Usergroup Based on the Value of a Custom Profile Field at Reg.

Instructions for installation:
A. Create your custom profile field and make a note of the field number. (Or simply make a note of the field number of an existing field.)

B. Make a note of the value you are checking for. For example, you may be looking to see if your member selected "male" in your custom gender field.

C. Make a note of the usergroup number that you want to set the user to.

D. Here you have two options:
Option 1: Edit the attached XML file before you import it to change the field number, the value that you check for and the usergroupid. In my XML file, I am checking field5 to see if the value is yes and changing the usergroup to 10.

Code:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
	<plugin active="1" product="vbulletin">
		<title>Put User in Secondary Group Based on Custom Profile Field Value</title>
		<hookname>register_activate_process</hookname>
		<phpcode><![CDATA[// Get the value for field 5
        $user = $db->query_first("
			SELECT field5
			FROM " . TABLE_PREFIX . "userfield
			WHERE userid = " . $vbulletin->userinfo['userid'] . "
		");


		if ($user['field5'] == 'yes')
		{
					$membergroupids = $userdata->fetch_field('membergroupids');
		if ($membergroupids)
		{
			$membergroupids = $membergroupids . ", 10";
		}
		else
		{
			$membergroupids = 10;
		}

		$userdata->set('membergroupids', $membergroupids);		}]]></phpcode>
	</plugin>
</plugins>
If you are checking field10 instead of field5, change all references of field5 to field10.

Example: if you are checking your field to see if the value is male, you would change (change field number as needed):

Code:
Code:
if ($user['field5'] == 'yes')
to:

Code:
Code:
if ($user['field5'] == 'male')
And, finally, change the usergroup as appropriate. Instead of 10 in this line:
Code:
Code:
$membergroupids = $membergroupids . ", 10";
substiture your usergroupid of choice.

And in this line as well,
Code:
Code:
$membergroupids = 10;
Option 2: Import the XML file as is, open the plugin manager, and make your edits there.


NOTE: This mod works for forums that require users to verify their email address upon registration. If your forum does not require users to verify their email address, you will need to use a different hook. If I have time, I'll test that variation.
----------------
Example Gender Mod that separates users into secondary groups based on their gender. Don't forget, the values are case sensitive and the field numbers and usergroup numbers need to be changed to suit your site's setup.

Code:
Code:
// Get the value for field 20
    $gender = $vbulletin->db->query_first("SELECT * FROM userfield WHERE userid=".$vbulletin->userinfo['userid']);


		if ($gender['field20'] == 'male')
		{
			$membergroupids = $userdata->fetch_field('membergroupids');
			if ($membergroupids)
			{
				$membergroupids = $membergroupids . ", 42";
			}
			else
			{
				$membergroupids = 42;
			}

			$userdata->set('membergroupids', $membergroupids);		
		}
		else
		{
			$membergroupids = $userdata->fetch_field('membergroupids');
			if ($membergroupids)
			{
				$membergroupids = $membergroupids . ", 41";
			}
			else
			{
				$membergroupids = 41;
			}

			$userdata->set('membergroupids',$membergroupids);
	}
 
Back
Top