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)

Taurus1 07-13-2011 09:06 AM

OH cool! Thank you Gemma. Is there a way for me to use a longer title? When the title is too long it overlaps the box, it is not broken into 2 sentences or so.
And did you release this as widget somewhere?

Gemma 07-13-2011 09:21 AM

Quote:

Originally Posted by Taurus1 (Post 2219945)
OH cool! Thank you Gemma. Is there a way for me to use a longer title? When the title is too long it overlaps the box, it is not broken into 2 sentences or so.
And did you release this as widget somewhere?

I'll look at the title part and see what's up.

You should be able to use the same code to make a cms widget but you would need to be using a sidebar of 270px or more for it to display properly

Gemma 07-13-2011 09:41 AM

Quote:

Originally Posted by Gemma (Post 2219949)
I'll look at the title part and see what's up.

You should be able to use the same code to make a cms widget but you would need to be using a sidebar of 270px or more for it to display properly

Actually, I take that back :o

You'd need to use something like this for a CMS Widget

Code:

<div class="cms_widget">
        <div class="block">
                <div class="cms_widget_header">
                </div>
                <div class="cms_widget_content_restore_widget_content">
<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">
jQuery(document).ready(function() {
    $('#countdown').countDown({
        targetDate: {
            'day':      19,
            'month':    7,
            'year':    2011,
            'hour':    23,
            'min':      59,
            'sec':    59,
                        'utc':                true
        }
    });
});
</script>
<center>
<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></center>
</div>
        </div>
</div>


Kulham 07-13-2011 09:46 AM

FIXED:

1.- Add before..
Code:

<script language="Javascript" type="text/javascript" src="countdown/js/jquery-1.4.1.js"></script>
2.- Check folder permission #0775

3.- Clear Cache sideblock.

Gemma 07-13-2011 09:52 AM

Thanks. I removed the jquery-1.4.1.js lines from the code because it wasn't needed for all the installs I'd made (but I left the script in the zip file). Any time you make a new widget/sideblock it is always recommended to clear or purge the cache.

Taurus1 07-13-2011 09:59 AM

That unfortunately don't work for me Gemma. The widget just remains on 00. I was also trying to center in with <center></center> tags wrapped around it, but it wont center. Sorry for the trouble. And thank you so much for your help and effort!

TheChief 07-13-2011 11:44 AM

Added and working fine - Exactly what i was after

Thanks

un? in? 07-13-2011 11:55 AM

Quote:

Originally Posted by Gemma (Post 2219912)
I don't know, it works fine on every site I've installed it on and I've used the same code on them all.

Code:

<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">
jQuery(document).ready(function() {
    $('#countdown').countDown({
        targetDate: {
            'day':      2,
            'month':    9,
            'year':    2011,
            'hour':    17,
            'min':      0,
            'sec':      0,
                        'utc':                true
        }
    });
});
</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>
</div>

Replace the target date data with your own.

If no-one can confirm it working then I'll get one of the mods to delete this. Sorry :(

edit: Confirmed as working

Quote:

Originally Posted by Kulham (Post 2219956)
FIXED:

1.- Add before..
Code:

<script language="Javascript" type="text/javascript" src="countdown/js/jquery-1.4.1.js"></script>
2.- Check folder permission #0775

3.- Clear Cache sideblock.

I don't know.
My site don't work.
I did 2 you in on
Please: help me

Gemma 07-13-2011 11:55 AM

1 Attachment(s)
Quote:

Originally Posted by Taurus1 (Post 2219962)
That unfortunately don't work for me Gemma. The widget just remains on 00. I was also trying to center in with <center></center> tags wrapped around it, but it wont center. Sorry for the trouble. And thank you so much for your help and effort!

vBulletin's CMS is a pile of poo! It really needs an overhaul. Try this (based on a sidebar of 300px)

Upload the contents of the attached zip, CHMOD the coutdown/js folder to 775

Create a new template called vbcms_widget_countdown and copy this code

Code:

<div class="cms_widget">
        <div class="block">
                <div class="cms_widget_header">
<h3><img src="{vb:raw vboptions.bburl}/countdown/style/countdown.png" alt="" /> {vb:raw widget_title}</h3>
                </div>
                <div class="cms_widget_content_restore_widget_content">
<br/>
<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>
<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/countdown_cms.css"></link>
<script type="text/javascript">
jQuery(document).ready(function() {
    $('#countdown').countDown({
        targetDate: {
            'day':      19,
            'month':    7,
            'year':    2011,
            'hour':    23,
            'min':      59,
            'sec':    59,
                        'utc':                true
        }
    });
});
</script>
</div></div>

Change the targetDate info and save the template.

Go to vBulletin CMS > Widgets > Create New Widget

Widget Type - Static HTML
Title - whatever
Save.

Configure the new widget

Enter Static HTML - <div></div>
Template Name - vbcms_widget_countdown
Save

Then go to Layout Manager and place the widget in the sidebar you want it to appear.

Clear the CMS Cache and Flush Cache on vBOptimise (if applicable)

Gemma 07-13-2011 11:57 AM

Quote:

Originally Posted by un? in? (Post 2219990)
I don't know.
My site don't work.
I did 2 you in on
Please: help me

Can you PM me a link to your site and I'll have a look :)


All times are GMT. The time now is 06:00 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.01325 seconds
  • Memory Usage 1,786KB
  • 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
  • (5)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)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