vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   vBulletin Forum Sideblocks - Countdown (Forum, Sideblock, vBa CMPS, Multiple Countdowns) (https://vborg.vbsupport.ru/showthread.php?t=266689)

Gemma 10-17-2011 09:21 PM

Quote:

Originally Posted by Gemma (Post 2258352)
I'll install vBAdvanced and have a look

This is based on your CMPS columns being set at 240px (if you change them to a wider or narrower setting you'll need to work out the css changes yourself)

Download the zip archive in the OP and upload the files. (don't change the file or folder structure)

AdminCP > vBa CMPS > Add Module

Add a new Template Module

Give it a name and set it to active.

Template to include: adv_portal_countdown
Template Content:
Code:

<script language="Javascript" type="text/javascript" src="countdown/js/jquery-1.4.1.js"></script>
<script language="Javascript" type="text/javascript" src="countdown/js/jquery.lwtCountdown-1.0.js"></script>
<script language="Javascript" type="text/javascript" src="countdown/js/misc.js"></script>
<link rel="Stylesheet" type="text/css" href="countdown/style/main.css"></link>
<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,
            }
    });
});
</script>
<div>
        <div id="countdown">
            <div class="dash first weeks_dash">
                <span class="dash_title">Weeks</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>
            <div class="dash days_dash">
                <span class="dash_title">Days</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>
            <div class="dash hours_dash">
                <span class="dash_title">Hrs</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>
            <div class="dash minutes_dash">
                <span class="dash_title">Mins</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>
            <div class="dash seconds_dash">
                <span class="dash_title">Secs</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>
        </div>

Set this part to activate the countdown

Code:

targetDate: {
            'day':      00,
            'month':  00,
            'year':    0000,
            'hour':    00,
            'min':      00,
            'sec':      00,
            }

Set usergroup permissions. Save.

AdminCP > vBa CMPS > Edit Pages

Then add it to whatever page you want it to appear.

1320Nation 10-19-2011 03:38 AM

Gemma, your tech support on this mod is off the chain. Thank you so much for the detailed install instructions. They made all the difference. I installed this mod on my 4.1.7. version board and everything worked perfect the 1st time. I looked for some kind of paypal support the developer area above but didn't see it anywhere. I wanted to send you some $ to show my appreciation for your extra effort. Thanks again!

Gemma 10-19-2011 08:24 AM

Quote:

Originally Posted by psychobike (Post 2258842)
Gemma, your tech support on this mod is off the chain. Thank you so much for the detailed install instructions. They made all the difference. I installed this mod on my 4.1.7. version board and everything worked perfect the 1st time. I looked for some kind of paypal support the developer area above but didn't see it anywhere. I wanted to send you some $ to show my appreciation for your extra effort. Thanks again!

You're welcome :)

ofir24 10-19-2011 11:39 AM

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?

Gemma 10-19-2011 03:24 PM

1 Attachment(s)
Quote:

Originally Posted by ofir24 (Post 2258936)
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)

Gemma 10-19-2011 11:46 PM

Updated: 1.0.3 - Now using jquery-1.6.1.min.js and added noConflict to script

Hopefully the inclusion of noConflict will fix the instances of the countdown showing zeros for some people. Also added some links to examples on vB CMS, Forum Index and in another mod that contains a sidebar (in this case v3 Arcade)

To upgrade, replace whichever template(s) you are using with the corresponding one(s) in the OP and set your countdown dates.

1320Nation 10-20-2011 12:58 AM

How do you suggest the update be performed? Should we reload everything, or upload particular files?

Gemma 10-20-2011 01:10 AM

Only the template (whichever one(s) you use) needs replaced if you're upgrading, it is only the script parts that have changed so it should be easy enough to compare and edit if you don't want to replace it all.

1320Nation 10-20-2011 02:17 PM

I use info from thread #122. Where is the temple text I should use?

Gemma 10-20-2011 02:55 PM

Quote:

Originally Posted by psychobike (Post 2259345)
I use info from thread #122. Where is the temple text I should use?

I've updated all the templates which are linked in the OP - just replace your template with the one in post #122 and add your targetDate information.


All times are GMT. The time now is 05:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01432 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete