3.8.x Login Slider (jQuery)

h@ck3r

New Member
Allstar said:
Nevermind, it works now :)

Then maybe post the solution, and tell us what skin you're using so that it can help others, or help the coder fix any problems in possible future releases!!
 

cornishman

New Member
Just had a weekend away, so nothing done at my end :(
Got one redesign/re-install to do (couple of days) so should be able to devote my fullest attention to this by Wednesday.
Meny thanks for all the feedback and help from H@ck3r
 

RedMan

New Member
h@ck3r said:
Are you using the full package from post 1, or have you used MY CSS as posted later in this thread?

i used your css and my style is blackstream from digitalvb.com
 

thebarcode

New Member
[OFF TOPIC]What template is this?
Look so nice... please share...

katano said:
vhf5ad.png

[TOPIC]Work's fine for me!
 

h@ck3r

New Member
Cornishman/ Hoxxy- Please can you put here what code the XML file inserts to templates, and what templates they are.

I want to have a play around with this. :)
 

cornishman

New Member
h@ck3r said:
Cornishman/ Hoxxy- Please can you put here what code the XML file inserts to templates, and what templates they are.

I want to have a play around with this. :)
First it creates a template called 'login_slide'
the contents of which is
PHP:
<!-- jQuery - the core -->
<script type="text/javascript" src="$vboptions[bburl]/clientscript/jquery-1.3.2.min.js"></script>
<!-- Sliding effect -->
<script type="text/javascript" src="$vboptions[bburl]/clientscript/slide.js"></script>
<link rel="stylesheet" href="$vboptions[bburl]/css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="$vboptions[bburl]/css/slide.css" type="text/css" media="screen" />
<if condition="$bbuserinfo['userid'] == 0">
<!-- Panel -->
<div id="toppanel">
	<div id="slide2">
		<div class="content">
			<div class="left">
				<h1>Welcome to $vboptions[bbtitle]</h1>
				<h2>If you are not a member please register</h2>
				<p class="grey">You need to <a href="register.php$session[sessionurl_q]" rel="nofollow">REGISTER &raquo;</a> if you would like to post in our forums.</p>
			</div>

			<div class="left">
				<!-- Login Form -->
						<!-- login form -->
		<form class="clearfix" action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
		<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
		<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
		<tr>
			<td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">$vbphrase[username]</label></td>
			<td>
				<input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
			<td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td>
		</tr>
		<tr>
			<td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
			<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
			<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" 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="securitytoken" value="$bbuserinfo[securitytoken]" />
		<input type="hidden" name="do" value="login" />
		<input type="hidden" name="vb_login_md5password" />
		<input type="hidden" name="vb_login_md5password_utf" />
		</form>
		<!-- / login form -->
			</div>
		</div>
	</div> <!-- /login -->	

    <!-- The tab on top -->	
	<div class="tab">
		<ul class="login">
	    	<li class="left">&nbsp;</li>
			<li id="toggle">
				<a id="open" class="open" href="#">Log In</a>
				<a id="close" style="display: none;" class="close" href="#">Close Panel</a>			
			</li>
	    	<li class="right">&nbsp;</li>
		</ul> 
	</div> <!-- / top -->
	
</div> <!--panel -->
</if>
This is then injected to the header from a plugin using str_replace.
Code:
$loginslider = '<!-- logo -->'; 
                $vbulletin->templatecache['header'] = str_replace($loginslider,$loginslider.fetch_template('login_slide'),$vbulletin->templatecache['header']);

I also left the first plugin there, to create a variable ($loginslide) so's people could manually insert it into their header
Code:
$globaltemplates[] = 'login_slide';
		eval('$loginslide = "' . fetch_template('login_slide') . '";');

As you should be able to see the 4 div's at the beginning pick up the layout directly from the .css file. So if it's layout you need to play with, thats where your efforts should lie.
Hope this helps m8
 

h@ck3r

New Member
Many thanks mate.

Actually it's a second slide menu I want to create, below the navbar, for members of particular usergroup(s).

I'm not very clued-up with 'plugins', so will need to sit and study this before I attempt anything. Prepare for more questions lol. :D
 

cornishman

New Member
Below the navbar.
With the plugin you really need to find a fairly static piece of code that you can use that will (should) be in every navbar, even modified ones.
The one I notice immediately is <!-- NAVBAR POPUP MENUS -->
So you could perhaps experiment by changing the second plugin from
PHP:
<plugin active="1" executionorder="5">
            <title>Login slide placement</title>
            <hookname>global_start</hookname>
            <phpcode><![CDATA[$loginslider = '<!-- logo -->'; 
                $vbulletin->templatecache['header'] = str_replace($loginslider,$loginslider.fetch_template('login_slide'),$vbulletin->templatecache['header']);
        ]]></phpcode>
        </plugin>
to
PHP:
	    <plugin active="1" executionorder="5">
            <title>Login slide placement</title>
            <hookname>global_start</hookname>
            <phpcode><![CDATA[$loginslider = '<!-- NAVBAR POPUP MENUS -->'; 
                $vbulletin->templatecache['navbar'] = str_replace($loginslider,$loginslider.fetch_template('login_slide'),$vbulletin->templatecache['navbar']);
        ]]></phpcode>
        </plugin>
Have a play and let me know how it goes m8
 

lilfabbro

New Member
i had a problom when i first installed this, there was a huge blockof grey on my page and it had all the text and the login box but it wasnt a slider, just a huge block the merged everything down, after looking through the files, i finnally fixed it, it was in the slider.xml.

wow sry this site hardly ever loads for me

but heres the fix if anyone needs it
 

MaDDoGCraZ

New Member
That works great fantastic job well done!

One question, how do we get rid of the old log in? because I don't want 2 areas for log ins.

Thank you in advance.
 

h@ck3r

New Member
MaDDoGCraZ said:
One question, how do we get rid of the old log in? because I don't want 2 areas for log ins.

Look in your navbar template..

You should see something like this:

PHP:
<form action="http://www.PATHTOYOURFORUMS/login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<script type="text/javascript" src="http://www.PATHTOYOURFORUMS/clientscript/vbulletin_md5.js"></script>
<table border="0" cellpadding="0" cellspacing="3">

<tbody><tr>
<td ><label for="navbar_username">User Name</label></td>
<td><input class="bginput" style="font-size: 11px;" name="vb_login_username" size="10" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" type="text"></td>
<td colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" type="checkbox">Remember Me?</label></td>
</tr>
<tr>
<td ><label for="navbar_password">Password</label></td>

<td><input style="font-size: 11px;" name="vb_login_password" size="10" accesskey="p" tabindex="102" type="password"></td>
<td><input value="Log in" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" type="submit"></td>
</tr>
</tbody></table>
<input name="s" value="" type="hidden">
<input name="do" value="login" type="hidden">
<input name="vb_login_md5password" type="hidden">
<input name="vb_login_md5password_utf" type="hidden">
</form>

Remove it.

Or post your navbar template code here and I, or someone else will do it for you.
 

Pixel3

New Member
Code:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
Timestamp: Mon, 13 Jul 2009 10:22:52 UTC


Message: Syntax error
Line: 908
Char: 76
Code: 0



Message: Object doesn't support this property or method
Line: 314
Char: 4
Code: 0
/clientscript/awesomebox/awesomebox.js
 
Top