vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Countdown Timer for your users (https://vborg.vbsupport.ru/showthread.php?t=107596)

slickdawg 06-07-2006 02:37 PM

The new version did the trick! Thanks a bunch hellcat!!!

kidron 06-08-2006 03:37 AM

I uploaded the file and iimported "product-hc_usercountdown112.xml" in the "Manage Products" section, but still nothing changes under "Edit Options" in the UserCP .. am I missing something?

Jeordie015 06-09-2006 09:06 PM

Okay, I admit it, I'm picky. I really like this hack, but there were a few things I wanted to change. First, I wanted to change it in the user CP so that the dropdown menu to select the month came before the day. I guess that's an American thing to prefer that. Anyway, I managed to do that. But the other thing that I wanted to change was the actual display in the posts so that there would be a space between the number and the measure of time and add commas where appropriate.

For example, currently the countdown would appear like this in a signature:
19days 1hours 20minutes

I would want it to appear like this:
19 days, 1 hour(s), 20 minutes

Is that possible?

Hellcat 06-09-2006 10:33 PM

Quote:

Originally Posted by kidron
I uploaded the file and iimported "product-hc_usercountdown112.xml" in the "Manage Products" section, but still nothing changes under "Edit Options" in the UserCP .. am I missing something?

Make sure you set the usergroup permissions to allow using the contdown forall usergroups you want to be able to....


Quote:

Originally Posted by Jeordie015
But the other thing that I wanted to change was the actual display in the posts so that there would be a space between the number and the measure of time and add commas where appropriate.

I would want it to appear like this:
19 days, 1 hour(s), 20 minutes

Is that possible?

That's just another template edit.
It the.... erhm.....
[high]* Hellcat checks
[/high]
Ah, it's the "usercountdown_display" template - that hods the markup for the counter display, just edit this to your needs.

But the actual time display comes from the plugin itself....
[high]* Hellcat checks again
[/high]
Open ".../includes/plugins_usercountd.php", the actual time/counter display is constructed from line 209 to 219, you can change it there and add the commas and/or change positions and such.....

Jeordie015 06-09-2006 11:19 PM

Thanks. I knew it wasn't in the template, and I figured it would be in one of the xml files, but I didn't know which one or where.

Hm...I'm not sure how to add spaces and commas where I want them. Can you help me out here?

Hellcat 06-10-2006 01:07 AM

To add the commas, in plugin_usercountd.php change:

Line 213:
Code:

$counter = $remain["hours"] . $vbphrase["countdown_hours"] . " " . $counter;
to
Code:

$counter = $remain["hours"] . $vbphrase["countdown_hours"] . ", " . $counter;
Line 218:
Code:

$counter = $remain["days"] . $vbphrase["countdown_days"] . " " . $counter;
to
Code:

$counter = $remain["days"] . $vbphrase["countdown_days"] . ", " . $counter;

rareclownfish 06-10-2006 01:55 AM

Nice update

kidron 06-10-2006 04:30 AM

When importing the XML file I get this error "XML Error: unknown at Line 0" :confused:

Hellcat 06-10-2006 04:38 AM

Quote:

Originally Posted by kidron
When importing the XML file I get this error "XML Error: unknown at Line 0" :confused:

You're using Zend?

Jeordie015 06-10-2006 02:27 PM

Quote:

Originally Posted by Hellcat
To add the commas, in plugin_usercountd.php change:

Awesome. I figured out how to add the spaces myself using what you said. As you can probably tell, I'm not a coder, but I'm not dumb.

Anyway, nice hack. I like the idea. I'm just going to edit some things to make it look like I want.

I think another thing that at least I'm going to attempt to do is show the countdown on the main User CP page. Is there a way to display the current countdown on the main User CP page without it being in the signature?

I'm just thinking especially if it'll be possible to make multiple countdowns in the future, it would be cool to show them all on the main User CP page for the user's sake. Okay, I'm done babbling now. Just some ideas.


All times are GMT. The time now is 10: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.01167 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)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
  • (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