How To Login from bootstrap modal?
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #21
RE: How To Login from bootstrap modal?
still like a way to use bootstrap modal to send data to the login page though....since i wasted all that time Tongue

How do i remove mybb's modal?
09-23-2015 11:41 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #22
RE: How To Login from bootstrap modal?
What you can try - is to load the bootstrap js (the standard js, not custom) in the footer. See link below.

<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

Then you will have to edit the templates. Try using the template edit I gave you:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<div class="modal fade" id="quick_login" style="display: none;"  role="dialog" aria-hidden="true">
<form method="post" action="{$mybb->settings['bburl']}/member.php">
						<input name="action" type="hidden" value="do_login" />
						<input name="url" type="hidden" value="" />
						<input name="quick_login" type="hidden" value="1" />					
 	<div class="modal-dialog">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<span class="modal-title tl" id="loginModal">Log in</span>

			</div> <!-- /.modal-header -->

			<div class="modal-body">
					<div class="form-group">
						<div class="input-group">
							<input type="text" class="form-control" name="quick_username" id="quick_login_username" placeholder="Login"/>
							<label for="quick_login_username"></label>
						</div>
					</div>

					<div class="form-group">
						<div class="input-group">
							<input type="password" class="form-control" placeholder="Password" name="quick_password" id="quick_login_password" value=""  >
							<label for="quick_login_password"></label>
						</div>
					</div>
<div class="checkbox">
						<label>
							<input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" /> {$lang->remember_me}
						</label>
					</div>

			</div><!--modal-body -->

			<div class="modal-footer clearfix">

<a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password pull-left">{$lang->lost_password}</a>

				<input name="submit" type="submit" value="{$lang->login}" class="btn btn-action"/>

				
			</div> <!--modal-footer -->
			
		</div><!--modal-content -->
	</div><!--modal-dialog -->
</form></div>
       

				<script type="text/javascript">
					$("#quick_login input[name='url']").val($(location).attr('href'));
				</script>


You will have to do this for every mybb modal - reports, reputation, modcp - everywhere.



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-23-2015 11:48 PM by leefish.)
09-23-2015 11:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #23
RE: How To Login from bootstrap modal?
first thing i have to do is get the AJAX to send data to to the login page, without that no use removing anywhere else Tongue

I DID remove the myBB modal script call and it still didnt work....if i could get Bootstrap to send data from modal to login page, then everything else falls in place...SO yes i have generated the bootstrap MODAL

hence the initial issue Tongue

YOUR solution is still half and half, which wont work without some sort of no conflict....funny but the site you sent me to looks fully bootstrap?
(This post was last modified: 09-24-2015 12:02 AM by ollie2015.)
09-23-2015 11:54 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #24
RE: How To Login from bootstrap modal?
um, that template - is the one from damnfineshave.com. It works right out of the box; you don't need to remove anything. It uses bootstrap for the modal, but I still have the mybb general.js loading. So it works. Make sure you have the correct js and css files for bootstrap - the version numbers need to match and make sure that you are loading the bootstrap.js last by putting it in the footer not the head; remove the MyBB modal css from the global.css or wherever it is.

IMPORTANT:  these changes will affect EVERY modal on the frontend; ie the templates using a modal will need to be redone. All of them.

What version of bootstrap are you using?


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-24-2015 12:01 AM by leefish.)
09-23-2015 11:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #25
RE: How To Login from bootstrap modal?

Code:
<script type="text/javascript">
					$("#quick_login input[name='url']").val($(location).attr('href'));
				</script>


what script call did you use? the above is mybb modal

09-24-2015 12:05 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #26
RE: How To Login from bootstrap modal?
have you tried implementing everything I said? I cannot explain it any different.

You dont change any mybb js files; you put the bootstrap js in the footer, you remove mybb modal css and you use the template.

Yes, that site is one I made; its very bootstrap Smile


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-24-2015 12:09 AM by leefish.)
09-24-2015 12:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #27
RE: How To Login from bootstrap modal?
which script call did you use for bootstrap modal LOL no script runs without the call Tongue

what i havent done is remove the mybb modal css, which would take too long to chase down Tongue hence the image is my guess
(This post was last modified: 09-24-2015 12:10 AM by ollie2015.)
09-24-2015 12:09 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #28
RE: How To Login from bootstrap modal?
What image? I am sorry, I cant help you further if you dont do the things I say. Tracking down modal is a case of using ctrl+f in the global.css... that is hardly a long time.

Please do all the things I say to do then come back and lol....


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-24-2015 12:15 AM by leefish.)
09-24-2015 12:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #29
RE: How To Login from bootstrap modal?
what call did you use to activate the bootstrap modal? is that not clear enough?
09-24-2015 12:19 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #30
RE: How To Login from bootstrap modal?
The MyBB script in the bottom of the template - have you tried all the things I said? or was that not clear enough?

As I am getting a bit exasperated, I should point out that I have this working - you dont - so maybe you are NOT being clear, despite your belief to the contrary. It did take you 6 posts to TRY a custom build of the js and that worked right away. Smile


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-24-2015 12:29 AM by leefish.)
09-24-2015 12:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: