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 09-20-2011 12:30 PM

Looks like the css file is missing, did you upload the files correctly?

BlueCheri 09-20-2011 12:43 PM

Yes

Quote:

Originally Posted by Gemma (Post 2248194)
Looks like the css file is missing, did you upload the files correctly?


Gemma 09-20-2011 12:44 PM

Can you send me a link to your site?

wally07 09-23-2011 03:23 AM

Hi Gemma,

the countdown works perfect!

Is there any way to make it timezone specific?

Gemma 09-23-2011 04:46 PM

Quote:

Originally Posted by wally07 (Post 2249146)
Hi Gemma,

the countdown works perfect!

Is there any way to make it timezone specific?

Sorry, I haven't been able to make it timezone specific but this might be helpful, instead of using the targetDate command use targetOffset. So using the example code below, the countdown would be set to expire for everyone in 5 days, 4 minutes and 15 seconds (from when going live) - not sure if that would be helpful?

Code:

<script type="text/javascript">
// Set the Countdown
jQuery(document).ready(function() {
$('#countdown').countDown({
targetOffset: {
'day': 5,
'month': 0,
'year': 0,
'hour': 0,
'min': 4,
'sec': 15
}
});
});
</script>

If you want to use that method of countdown just replace this part of the code

Code:

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

And set the countdown to suit your needs.

Savage Circuits 09-23-2011 10:28 PM

Sadly I can't get the widget to even show up in the CMS. I have several custom widgets though most aren't used all the time. When I add this one no frame even shows up. That in itself kind of concerns me. Any ideas why it wouldn't even show up? Running 4.1.5

Savage Circuits 09-23-2011 10:36 PM

I found that if I just use the default name for the widget the frame shows up, but not the icon and I see, "{vb:raw widget_title}" above the counters which all read 00. But that proves there's something wrong in the other widget which prevents it from even being used. I have all three .js files the CHMOD of 775 and the css files all where they're supposed to go.

FYI, if you just download the zip in post#19 you do not get all the files needed it seems.

Gemma 09-23-2011 10:58 PM

Quote:

Originally Posted by Savage Circuits (Post 2249430)
FYI, if you just download the zip in post#19 you do not get all the files needed it seems.

Yes, I'm aware of that but since this isn't a CMS widget I never added them to the OP zip. I linked to them in case anyone wanted to adapt it to be a CMS widget and because someone a few posts above #19 requested it.

As for your widget not showing up, have you created the vbcms_widget_countdown template? You also need to add the widget to your grid layout and you may need to clear the CMS cache.

Savage Circuits 09-23-2011 11:39 PM

Apologies...I did not create the template. I pasted the code into the widget. =( Okay, we'll try again.

Savage Circuits 09-24-2011 12:17 AM

Okay, I got it working! Thanks for all your help!

wally07 10-01-2011 12:26 AM

Quote:

Originally Posted by Gemma (Post 2249336)
Sorry, I haven't been able to make it timezone specific but this might be helpful, instead of using the targetDate command use targetOffset. So using the example code below, the countdown would be set to expire for everyone in 5 days, 4 minutes and 15 seconds (from when going live) - not sure if that would be helpful?

Thanks Gemma but that didn't work either. Every time you would load the page, the countdown would start back at 5 days, 4 minutes and 15 seconds.

Your countdown is just damn sexy not to use! :o :D The countdown timezone timers I found on Google are fugly. lol

Gemma 10-01-2011 01:54 PM

I'll have a look when I get some free time during the week :)

aberg 10-01-2011 06:38 PM

Sorry but I'am stuck on the widget:

Configure the new widget
Enter Static HTML - <div></div>
Template Name - vbcms_widget_countdown
Save

Please do you have a example what I needed to do here?
Thank you!

Gemma 10-04-2011 07:23 PM

Quote:

Originally Posted by aberg (Post 2252055)
Sorry but I'am stuck on the widget:

Configure the new widget
Enter Static HTML - <div></div>
Template Name - vbcms_widget_countdown
Save

Please do you have a example what I needed to do here?
Thank you!

AdminCP > vBulletin CMS > Widgets > Create New Widget (then fill in the details)

Widget Type - Static HTML
Title - Countdown CMS Widget
Description - blah blah

Save. Next click the configure option in your newly created Countdown CMS Widget.

In the Enter Static HTML code box put the following - <div></div>
In Template Name put - vbcms_widget_countdown

Save. Then click Clear the CMS Cache in the sidebar menu.

Gemma 10-04-2011 08:55 PM

Quote:

Originally Posted by wally07 (Post 2251784)
Thanks Gemma but that didn't work either. Every time you would load the page, the countdown would start back at 5 days, 4 minutes and 15 seconds.

Your countdown is just damn sexy not to use! :o :D The countdown timezone timers I found on Google are fugly. lol

The only other thing I was able to come up with was setting the standard time as Universal Coordinated Time (UTC) which isn't much use either :(

Code:

<script type="text/javascript">
jQuery(document).ready(function() {
    $('#countdown').countDown({
        targetDate: {
            'day':      31,
            'month':    12,
            'year':    2011,
            'hour':    23,
            'min':      59,
            'sec':    59,
            'utc':    true
            }
    });
});
</script>


GamersChallenge 10-07-2011 06:03 AM

how do I make a cms widget without the tittle?

Gemma 10-07-2011 07:12 AM

Quote:

Originally Posted by GamersChallenge (Post 2254251)
how do I make a cms widget without the tittle?

Remove this part from the vbcms_widget_countdown template

Code:

<h3><img src="{vb:raw vboptions.bburl}/countdown/style/countdown.png" alt="" /> {vb:raw widget_title}</h3>
Or, if you want the clock image but not the title just remove {vb:raw widget_title}

Gemma 10-12-2011 12:17 PM

1 Attachment(s)
No real update, all I've done is added additional instructions on how to create a widget for the CMS and how to add more than one countdown to the OP.

Another thing that can be done using the code is creating more than one countdown on your forum index page (forumhome).

By creating a table, using the basic countdown code and calling countdownX, countdownY and countdownZ I've been able to create 3 separate countdowns. (see attached)

Live demo - http://www.forumbanter.com/forum/

Trevor Matthews 10-12-2011 09:57 PM

Hi

I just installed the mod and I thought it worked perfectly but then I realised all the widgets on the right side of the Home page had been moved to the left side of the screen.

Did I do something wrong or is this an issue with 4.1.7

Gemma 10-12-2011 10:06 PM

Can you send me a link to your site please, also what did you install - the forumblock or CMS block?

Trevor Matthews 10-12-2011 11:00 PM

Sorry, I installed the cms part and created a widget to go on the forum home page. I added it to the left of my three home page columns. All of the widgets that should be in the right side column are all displayed on the left :D

I deleted the widget but I could add it back in for a little while tomorrow if you wanted to see the problem.

Trevor Matthews 10-12-2011 11:04 PM

The site is www.television-magazine-forum.co.uk

Gemma 10-13-2011 07:27 AM

Quote:

Originally Posted by Trevor Matthews (Post 2256524)
Sorry, I installed the cms part and created a widget to go on the forum home page. I added it to the left of my three home page columns. All of the widgets that should be in the right side column are all displayed on the left :D

I deleted the widget but I could add it back in for a little while tomorrow if you wanted to see the problem.

Quote:

Originally Posted by Trevor Matthews (Post 2256525)

If you PM me when you've set the widget up again I'll have a look and have a better understanding. Or take a screenshot if that is easier.

Did you upload the contents of the sidebar_countdown1.0.2.zip too? (those files are required)

Trevor Matthews 10-13-2011 08:34 AM

I actually did upload those but wasn't sure if I needed to.
All the files are in a folder called countdown.

I will try a screenshot for you.
Thanks.

wilburshere 10-13-2011 10:31 AM

i like it installed both forum sidebar and cms widget very nice would like the widget smaller 240px but i can live with it

Gemma 10-13-2011 11:44 AM

Quote:

Originally Posted by wilburshere (Post 2256724)
i like it installed both forum sidebar and cms widget very nice would like the widget smaller 240px but i can live with it

For the CMS widget? Replace the countdown_cms.css contents with this, should fit nicely into a 240px block. (though the font is a little small for my own liking)

You can play about with the css file (possibly change the font-family and some of the padding to suit)

Code:

#countdown {
        height: 42px;
        padding: 2px 0 2px 0;
}

.dash {
        width: 19px;
        height:38px;
        float: left;
        margin-left: 12px;
        padding-left: 12px;
        border-left: 1px solid;
        position: relative;
}
   
.first {
        margin-left: 18px;
        padding-left: 0;
        border-left: 0;
}

.dash .digit {
        font-size: 1.3em;
        font-weight: bold;
        float: left;
        font-family: Arial, sans-serif;
        color: #5C7099;
        position: relative;
}

.dash_title {
        position: absolute;
        display: block;
        bottom: 0px;
        right: 0px;
        font-family: Arial, sans-serif;
        font-size: 8px;
        color: #5C7099;
        text-transform: uppercase;
        letter-spacing: 0px;
}


GreyGhost 10-14-2011 06:47 AM

Hi Gemma,
First up... Excellent mod, Works great!

I did search and read most posts and didn't see this mentioned, so I appologize if it's already been asked and answered.

Is there a way of dropping the "WEEKS" altogether and changing the display to
DAYS | HRS | MINS | SECS

i.e. instead of 4 weeks, 6 days, 3 Hrs, 45 Mins, 10 Secs
it would display as... 34 Days, 3 Hrs, 45 Mins, 10 Secs

Doing it this way would allow for a narrower column without losing any real detail.

8-)

.

Gemma 10-14-2011 08:11 AM

Try this,

In the template replace the <script> part with something like this (ie add the omitWeeks part)

Code:

<script type="text/javascript">
jQuery(document).ready(function() {
    $('#countdown').countDown({
        targetDate: {
            'day':      00,
            'month':  00,
            'year':    2011,
            'hour':    00,
            'min':      00,
            'sec':      00
},
        omitWeeks: true
                });
});
</script>

Then replace this part of the template:
Code:

<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>

With:
Code:

<div class="dash first days_dash">
                <span class="dash_title">Days</span>
                <div class="digit">0</div>
                <div class="digit">0</div>
            </div>

And save.

You might need to then play about with the css file to fix .first as it probably won't be aligned properly, this will differ depending on the block width you are using but try changing the margin-left value.

Code:

.first {
    border-left: 0 none;
    margin-left: 17px;
    padding-left: 0;

Hope that makes sense :confused::erm:

GreyGhost 10-14-2011 09:21 AM

1 Attachment(s)
Thanks Gemma,

That works perfectly! :D

Attachment 133883

That's with a 230 sideblock, which will work on my CMS as well and I can still get it smaller with some minor font & dash changes. :up:

8-)

Gemma 10-14-2011 10:00 AM

Looks good. The only thing I don't like about your screenshot is the fact that Battlefield 3 is released in Australia before the UK :p

GreyGhost 10-14-2011 10:39 AM

Quote:

Originally Posted by Gemma (Post 2257101)
Looks good. The only thing I don't like about your screenshot is the fact that Battlefield 3 is released in Australia before the UK :p

Haha, the funny thing is... I've ordered it from OzGameShop (half the price of Origin) but they're based in the UK... so I won't have it til a week after release. :(

8-)

GreyGhost 10-15-2011 08:43 AM

Quote:

Originally Posted by Gemma (Post 2256266)
No real update, all I've done is added additional instructions on how to create a widget for the CMS and how to add more than one countdown to the OP.

Another thing that can be done using the code is creating more than one countdown on your forum index page (forumhome).

By creating a table, using the basic countdown code and calling countdownX, countdownY and countdownZ I've been able to create 3 separate countdowns. (see attached)

Live demo - http://www.forumbanter.com/forum/

Hi Gemma,

When you say "By creating a table," am I correct that you create a single template that includes the code for all 3 countdowns wrapped within a table?

Then make the appropriate block or widget that uses that template?

8-)

pantani 10-15-2011 05:19 PM

Works fine thank you, only thing is when countdown is active, the other articles are way down?? What could i do to make this normal again??

https://vborg.vbsupport.ru/external/2011/10/32.jpg

Gemma 10-15-2011 05:27 PM

Quote:

Originally Posted by pantani (Post 2257529)
Works fine thank you, only thing is when countdown is active, the other articles are way down?? What could i do to make this normal again??

https://vborg.vbsupport.ru/external/2011/10/32.jpg

Looks like I've missed a couple of closing </div> tags, add </div></div> to the bottom of the vbcms_widget_countdown template and see if that helps.

pantani 10-15-2011 05:38 PM

Nope, did not help :(

GreyGhost 10-16-2011 02:39 AM

Quote:

Originally Posted by Gemma (Post 2257535)
Looks like I've missed a couple of closing </div> tags, add </div></div> to the bottom of the vbcms_widget_countdown template and see if that helps.

Don't think it's </div> tags, I get the same thing whenever I try to add anything containing javascript to the cms home page.
I've tried adding it as a widget, Article, Static HTML, Direct php AND by adding the javascript to the footer (as per the forum/wgo instructions).

If I remove the javascript then it displays correctly.. but obviously doesn't function.

ATM I'm trying a different approach... I created a php page containing 3 countdown timers laid out within a table etc. (including the javascript). When I call this page directly the 3 countdown timers appear as they should and functioning correctly.
The plan is to create a PHP Direct Eval and call this page using a php "include" ... but I'm struggling to get this to work in a PHP Direct Eval page, actually, I'm struggling to get anything to work with the CMS's PHP Direct function.

8-/

Gemma 10-16-2011 04:54 PM

I've removed support for the CMS widget just now, can't figure out why it has suddenly stopped working.

1320Nation 10-16-2011 10:56 PM

Is there ANYWAY to get this mod to work with the sidebar in vBadvance?

GreyGhost 10-16-2011 10:59 PM

1 Attachment(s)
Quote:

Originally Posted by Gemma (Post 2257824)
I've removed support for the CMS widget just now, can't figure out why it has suddenly stopped working.

I got mine working fine..
was just a matter of creating a Grid that was suitable for my layout.

8-)

Attachment 133882

Gemma 10-17-2011 08:48 PM

Quote:

Originally Posted by psychobike (Post 2257945)
Is there ANYWAY to get this mod to work with the sidebar in vBadvance?

I'll install vBAdvanced and have a look


All times are GMT. The time now is 12:44 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.02137 seconds
  • Memory Usage 1,850KB
  • 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
  • (9)bbcode_code_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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