Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
  #1  
Old 03-23-2017, 05:54 AM
keharris53 keharris53 is offline
 
Join Date: Jun 2007
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Logout Popup Box

Hello,
Can anyone tell me where I can find the code that will allow me to redesign the logout popup box? Thank you!
Reply With Quote
  #2  
Old 03-23-2017, 06:43 PM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The logout popup is created with default browser based dialog box with the help of javascript to trigger it.

Both FORUMHOME and navbar templates have this link:
Code:
<a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]"  onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a>
The part highlighted in red is the trigger and as you see theres nothing to redesign, however you can make your own...


This is only basic to get you going

Create 2 functions 1 to show and 1 to hide a custom dialog/modal box created with html and CSS:

Add to headinclude template:
Code:
<script type="text/javascript">
// onclick show box
function CustomLogOut() {
 document.getElementById("custom_logout_box").style.display = "block";
};
// onclick hide box ie to cancel
function CustomLogOut_Cancel() {
 document.getElementById("custom_logout_box").style.display = "none";
};
</script>


Now change both instances of links to (FORUMHOME and navbar templates):
Code:
<a href="#" onclick="CustomLogOut(); return false;"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a>


This is the CSS that designs the logout box this needs to be added to Additional CSS in style manager:

Code:
#custom_logout_box {
background:rgba(0,0,0,.5);
position:absolute;
top:0;
left:0;
width:100%;
height:100vh;
display:none;
z-index:999;
}

#custom_logout_box_inner {
background:#fff;
position:absolute;
top:50%;
left:50%;
width:300px;
height:100px;
margin:-90px 0 0 -190px;
padding:20px;
text-align:center;
z-index:9999;
line-height:100px;
}
This can obviously be tweaked to your own taste.


and this is the new logout box it includes 2 links, 1 to log out and the other to cancel just like the original, add to top of header template:
Code:
<div id="custom_logout_box">
 <div id="custom_logout_box_inner">
<a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]">Logout</a> | <a href="#"  onclick="CustomLogOut_Cancel(); return false;">Cancel</a>
 </div>
</div>
again content and design can obviously be tweaked to your own taste.
Attached Images
File Type: jpg custom_logout.jpg (53.0 KB, 0 views)
Reply With Quote
2 благодарности(ей) от:
blind-eddie, MarkFL
  #3  
Old 03-23-2017, 10:07 PM
keharris53 keharris53 is offline
 
Join Date: Jun 2007
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you PinkMilk! I'm going to start working on this. I've been messing around tweaking the forum and this piece is just out of place. I appreciate your quick response!
Ken
Reply With Quote
Благодарность от:
MarkFL
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07107 seconds
  • Memory Usage 2,199KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete