View Single Post
  #126  
Old 10-19-2011, 03:24 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ofir24 View Post
i didn't try it yet, what happen if someone post that counting message and the time collapse to zero, it's says realsed "XX time" ago? or it's just vanished?
Currently there isn't any indicator once the countdown is complete but you can do this.

In whichever template you are using (block_countdown, adv_portal_countdown etc) look for the code similar to this

Code:
<script type="text/javascript">
var jq=$.noConflict();
jq(document).ready(function() {
jq('#countdown').countDown({
        targetDate: {
            'day':      19,
            'month':    7,
            'year':     2011,
            'hour':     23,
            'min':      59,
            'sec':     59,
            }
    });
});
</script>
Replace it with

Code:
<script type="text/javascript">
var jq=$.noConflict();
jq(document).ready(function() {
jq('#countdown').countDown({
        targetDate: {
             'day':      00,
            'month':    00,
            'year':     0000,
            'hour':     00,
            'min':      00,
            'sec':     00
           },
// onComplete function
        onComplete: function() { 
jq('#complete_info_message').slideDown(); 
}
    });
});
</script>
Amend the targetDate settings

Still in your template find:

Code:
<div class="dash seconds_dash">
                <span class="dash_title">Secs</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>
Below that add:

Code:
<div class="info_message" id="complete_info_message" style="display: none;">
                Countdown complete
            </div>
You can change Countdown complete to whatever message you want.

Save the template.

Open the css file and add the following

Code:
.info_message {
    color: #f40c1d;
    text-align: center;
    margin: auto;
    font-weight: bold;
}
Again you can change the colour to whatever you wish (this one is red)

Save the css file and re-upload.

Now once the countdown has expired your message will slide down below the timer. (see attached image)
Attached Images
File Type: jpg complete.jpg (48.6 KB, 0 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01231 seconds
  • Memory Usage 1,801KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete