vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - User Countdowns & Countups (https://vborg.vbsupport.ru/showthread.php?t=205841)

trueoak 07-05-2010 01:32 AM

Anyone know how to show a preview of the countdown timer on the creation page? That way someone can see the actual time of their current timer? You can't use the same script as it's post specific, but I've been unable to figure out how to show it on the create page.

AndrewRich 07-24-2010 12:25 AM

1 Attachment(s)
I've installed this [S]but am having some difficulty (things which have been reported up-thread). I tried to remove the unnecessary line-breaks, but when I made those changes (only removing some <br /> tags) the live countdown stops and the numbers only change on a page reload. What is the code looking for as far as the live update?[/S]

vB 3.8.6 PL1.

I uninstalled the product completely (including dropping the "sktimer" table, see next post) and reinstalled from scratch. I checked in between each step to see if the countdown was still working.

Plugin Manager -> Edit "Handle timer in postbit"
Before:
PHP Code:

if ($puser['skformat'] == 'dh') { $puser['skformat'] = '%%D%% Days, %%H%% Hours'; } else { $puser['skformat'] = '%%D%% Days, %%H%% Hours <br /> %%M%% Minutes, %%S%% Seconds.'; } 

After:
PHP Code:

if ($puser['skformat'] == 'dh') { $puser['skformat'] = '%%D%% Days, %%H%% Hours'; } else { $puser['skformat'] = '%%D%% Days, %%H%% Hours %%M%% Minutes, %%S%% Seconds.'; } 

Change:
Remove " <br />"

Reload page with countdown: Countdown works.

Style Manager -> Edit "sk-timer_countdownbit"
Before:
PHP Code:

<if condition="$puser[skunixdate] > TIMENOW">$puser[sktitle]<else />$puser[skdescription]</if> <br /> 

After:
PHP Code:

<if condition="$puser[skunixdate] > TIMENOW">$puser[sktitle]<else />$puser[skdescription]</if> 

Change:
Remove "<br />"

Reload page with countdown: Countdown works.

Style Manager -> Edit "sk-timer_countdownbit"
Remove first line consisting of "<br />".

Reload page with countdown: Countdown works.

vBulletin Options -> SK - Countdown/Countup Settings -> Event Location
Switched back and forth between Signature and User Info, reloading page with countdown each time: Countdown works.

I can only guess that I must have typoed something the first time through and later, on being more careful while doing things step-by-step, didn't mess it up.

Result: Countdown works, no line breaks.

AndrewRich 07-26-2010 12:58 AM

The "uninstallcode" section of the product XML is blank. That means that when uninstalling, the product's SQL changes are left behind. This is rather poor practice. Can it be updated? Seems like all you'd need is to drop the "sktimer" table.


Code:

                        <installcode><![CDATA[$vbulletin->db->query("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX . "sktimer (
  skuserid int(11) NOT NULL default '0',
  sktitle text,
  skdescription text,
  skdateline int(11) default NULL,
  skactive tinyint(4) default NULL,
  skformat enum('dhms','dh') default 'dhms',
  PRIMARY KEY  (skuserid)
)");]]></installcode>
                        <uninstallcode />

Edit: The updated product XML in my post above includes uninstall code which drops the "sktimer" table.

ascender 07-31-2010 12:25 PM

Just wondering if anyone is able to update this to be compatible with VB4? Its a brilliant mod and one that our users are missing now we've upgraded.

Thanks.

boomcar68 08-01-2010 12:37 PM

Installed on Version 3.7.3
1 issue that there is no text displayed after the countdown.
I have write something in the Message to display after specified time,but there is just no text in ucer info nor under sig.
How can i change this,or what's wrong?

kolibrii 08-10-2010 08:21 AM

Hello, i am alreddy using vB 3.6.8. Installation works, administration too. But no chance to set countup in Profile (no option seen). Can anyone help me to run this mod under 3.6.8?!

AndrewRich 08-23-2010 09:15 PM

1 Attachment(s)
I've identified a bug in this script; when a user includes an apostrophe or single quote in their "countdown finished" message, the countdown will not actively decrement. It looks like the single quote should be escaped. I'm looking at the script code now and will update when I have a fix.

Update:

In sktimer.js, I added the following as the first two lines in the CountBack function:

HTML Code:

FinishMessage = FinishMessage.replace ( "'", "& #39;" );
FinishMessage = FinishMessage.replace ( '"', '& #34;' );

(There are extra spaces in the above code between the "&" and the "#" because vB kept helpfully rendering the entities in the post. It should be "ampersand pound 39 semicolon" for single quote and "ampersand pound 34 semicolon" for colon, with no spaces.)

This just replaces single and double quotes with their HTML entity representations. I've attached the updated sktimer.js.

*** This solves the reported problem of only some user countdowns actively counting! ***


All times are GMT. The time now is 06:46 PM.

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.01220 seconds
  • Memory Usage 1,746KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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