PDA

View Full Version : End-User Options - Countdown Timer in signature


Hellcat
09 Jun 2006, 13:23
This is a port of my vB3.5.x "User Countdown Timer" (http://www.vbulletin.org/forum/showthread.php?t=107596).
I had to change some parts of the install code to make it work with vB3.6, and here we go:

This little AddOn gives your users the option to show a custom countdown timer at the bottom of their signature.

Features: Fully configurable via UserCP (see screenshot)
BB-Code can be used for eventname and overmessage :)
fully phrased/templated, nothing hardcoded and so fully customizable
leading days or hours with a value of "0" are not shown
(so it shows "42minutes" rather then "0days 0hours 42minutes")

Installation:
Painless: Upload "plugins_usercountd.php" to ".../forum/includes"
Import the product .XML

DONE :)
That's it.
No template edits, no nothing :D


Usage:
Go into your UserCP -> Edit Options
On the very bottom you will find the options for the Countdown Timer.
Set it to whatever you like, if "Enable" is set to "Yes" the timer will automatically be shown on the bottom of your sig, set to "No" will hide/disable the time display :)



Have fun :)

Ricky6039
09 Jun 2006, 15:38
Thanks Hellcat

Snake
10 Jun 2006, 15:32
Thanks a lot man! :D

Neal-UK
10 Jun 2006, 18:19
I installed this and noticed that the text for turning this on was missing and only the selection buttons were showing.

This text then appeared after a delay but now i've noticed that my search function text is missing.

SuperFly
10 Jun 2006, 18:25
Im getting no text for the selection in the admincp or in the usercp, just blank spots.

Neal-UK
10 Jun 2006, 18:32
Like i was above then, but they appeared suddenly for some weird reason. My Search functions text is missing now though, and i've re-uploaded the language.xml file to no avail and tried the tools.php file.

SuperFly
10 Jun 2006, 18:50
well, found out mine was just a conflicting hack, dont use v3pad with it.

Neal-UK
10 Jun 2006, 18:52
Never heard of that mod....

Problem only started since adding this, only got 4 hacks on the site as no point yet until it goes final.

Good hack though, users love it thanks very much.

KimmiKat
11 Jun 2006, 17:16
I installed it and I don't even see it in the options...

SuperFly
11 Jun 2006, 18:37
go to usergroup options youll see it there.

Neal-UK
12 Jun 2006, 18:55
This mod is not working, turned off and back on and all users get is this below.

SuperFly
12 Jun 2006, 19:49
did you edit usergroup permissions?

Try un-installing and re-installing

KimmiKat
12 Jun 2006, 20:51
Ah, didn't look there. Thanks! It works too. Some of my pregnent members will use it for the days until the birth of their young' uns!

I installed it and I don't even see it in the options...

Alan @ CIT
16 Jun 2006, 20:02
Text isn't showing for me in the AdminCP -> Usergroup manager for me either

Edit 1: Or the UserCP

Edit 2: Also, you should change line 188 of plugins_usercountd.php to use $vbulletin->db->fetch_array() instead of mysql_fetch_array() as people like me who use MySQLi get:

Fatal error: Call to undefined function mysql_fetch_array() in C:\Program Files\Apache Group\Apache2\htdocs\vb_3.5.4\includes\plugins_usercountd.php on line 188

:)

Thanks,
Alan.

Hellcat
16 Jun 2006, 21:33
Somehow 3.6 doesn't rebuild the languages propperly here.... :confused:

A manual rebuild or simple resaving of any phrase will fix that (it does for me....)

Lottis
20 Jun 2006, 07:02
Installed and working good. Thanx Hellcat.

Lottis
30 Jun 2006, 20:04
This works, fore every users, unless one.
Do you have a clue why?

Ophelia
15 Jul 2006, 20:29
I had an older version installed.. now I get this error:

Database error in vBulletin 3.5.4:

Invalid SQL:
INSERT INTO vb_phrase ( languageid, varname, fieldname, text, product, username, dateline, version ) VALUES ( 0, 'field8_title', 'cprofilefield', 'User Countdown', 'vbulletin', 'Hellcat', '1152991682', '3.5.4' );

MySQL Error : Unknown column 'fieldname' in 'field list'
Error Number : 1054
Date : Saturday, July 15th 2006 @ 03:28:02 PM
Script : http://www.mysite.net/forum/boss/plugin.php
Referrer : http://www.mysite.net/forum/boss/plugin.php?do=productadd
IP Address : mynumber
Username : myname
Classname : vb_database

There are now to blank spaces under USERCP > OPtions, and if you try to save anything on this page, you get this:

Database error in vBulletin 3.5.4:

Invalid SQL:
UPDATE vb_userfield SET
field7 = '',
field8 = ''
WHERE userid = 2564;

MySQL Error : Unknown column 'field7' in 'field list'
Error Number : 1054
Date : Saturday, July 15th 2006 @ 03:30:23 PM
Script : http://www.mysite.net/forum/profile.php
Referrer : http://www.mysite.net/forum/profile.php?do=editoptions
IP Address : mine
Username : me
Classname : vb_database

It no longer shows up in my plugins, so I can't remove it there. Any ideas how to get this removed? No one can update options now.

Ophelia
15 Jul 2006, 21:26
Okay.. got almost all of it figured out. I need to know how to remove the fields it created.

https://www.vbulletin.org/forum/

Until I get this figured out, we can't update Options.

Ophelia
16 Jul 2006, 16:37
Anyone know what I can do? Folks are trying to update their Options and I'm getting database errors up the whazoo.

Ophelia
17 Jul 2006, 02:46
This is also causing issues with our admin area. We can no longer edit a user's account without getting the database error. Someone PLEASE help!

Database error in vBulletin 3.5.4:

Invalid SQL:
UPDATE vb_userfield SET
field5 = '',
field1 = 'SAHM and wife',
field2 = 'Las Vegas',
field3 = 'reading, scrapping, chatting, spending time with family',
field4 = 'SAHM',
field7 = '',
field8 = '',
field10 = ''
WHERE userid = 6747;

MySQL Error : Unknown column 'field7' in 'field list'
Error Number : 1054
Date : Sunday, July 16th 2006 @ 09:42:18 PM
Script : http://www.mysite.net/forum/boss/user.php
Referrer : http://www.mysite.net/forum/boss/user.php?do=edit&u=6747
IP Address : myip
Username : me
Classname : vb_database

Cedric2
19 Jul 2006, 01:32
Installed then uninstalled until a fix for the text is found.

dknelson
28 Jul 2006, 12:21
Same here...I installed it but there is no text in the Usergroups in the admin panel or in the UserCP. Fields are there but no text or other explanation. Would like to use this when it is ready.

MrSDavidson
29 Jul 2006, 20:06
This is also causing issues with our admin area. We can no longer edit a user's account without getting the database error. Someone PLEASE help!

Database error in vBulletin 3.5.4:

Invalid SQL:
UPDATE vb_userfield SET
field5 = '',
field1 = 'SAHM and wife',
field2 = 'Las Vegas',
field3 = 'reading, scrapping, chatting, spending time with family',
field4 = 'SAHM',
field7 = '',
field8 = '',
field10 = ''
WHERE userid = 6747;

MySQL Error : Unknown column 'field7' in 'field list'
Error Number : 1054
Date : Sunday, July 16th 2006 @ 09:42:18 PM
Script : http://www.mysite.net/forum/boss/user.php
Referrer : http://www.mysite.net/forum/boss/user.php?do=edit&u=6747
IP Address : myip
Username : me
Classname : vb_database

are you using vB3.6, because it doesnt look like it and this is a 3.6 mod

dknelson
29 Jul 2006, 22:39
I'm using 3.6 RC 2. No text.

rex_b
08 Aug 2006, 17:21
Any updates on this for 3.6.0

TomasDR
09 Aug 2006, 06:58
I am using 3.6.0 Gold now and it isn't working. I see the permission setting, the settings in UserCP, I have some text in my normal signature, but no timer.

I have the proper settings and used this in 3.5.4 without problems.

Also for the record I uninstalled every hack before upgrading my board and then reinstalled the hacks I had.

dknelson
09 Aug 2006, 12:25
I too am running 3.6 gold. I still have it installed but disabled because I never did get any text to show up in RC3.

Don

Spookysalem
09 Aug 2006, 13:04
When i enable the plugin in manage products it does not show when i disable it it only shows on my edit opitions screen

User Countdown
Option to show a public countdown to a certain event and thats all.

dknelson
09 Aug 2006, 13:13
Yea...I'll probably remove it completely soon. I was hoping for some help but I'm not sure that this one is being supported any longer. There have been no responses for a while.

Hicksatpd
14 Aug 2006, 02:35
Damn; I installed before reading the replies. I'm having the "it's there but there's no text" error. I'll have to uninstall. :(

Roxie
14 Aug 2006, 03:27
There is text. You need to save any phrase and it will rebuild. This is working fine on 3.6 Gold. :)

Takkero
19 Aug 2006, 13:50
i want this mod....any updates? :O

Maagic
22 Aug 2006, 15:10
I installed the 3.5 version then upgraded to 3.6 and it's still working fine.

Antyrael
23 Aug 2006, 08:53
There is text. You need to save any phrase and it will rebuild. This is working fine on 3.6 Gold. :)

I can confirm this, after I saved a phrase, all the text appeared in both the Admin CP and the Edit Options page.

midirtrider
31 Aug 2006, 07:23
after install.. and when i try opening my usercp/ edit options I get this error..

Warning: require(./includes/plugins_usercountd.php) [function.require]: failed to open stream: No such file or directory in /includes/functions_user.php(362) : eval()'d code on line 3

Fatal error: require() [function.require]: Failed opening required './includes/plugins_usercountd.php' (include_path='.:/usr/local/lib/php') in /home/midirtri/public_html/vbulletin/forum/includes/functions_user.php(362) : eval()'d code on line 3

when I uninstall this mod, everthing works as normal???

rex_b
03 Sep 2006, 18:10
what template do I need to edit to move where the countdown is shown at?

rex_b
03 Sep 2006, 18:52
Also is there a way to create 2 or more countdowns?

tyranny
04 Sep 2006, 03:29
I got the countdown timer working perfectly, but if I try to move the countdown form the user fills in to any other part of the profile it stops saving the changes. The "Display Page" must be set to "Options: Other" or it does not save.

Is there anyway to fix it so you can select which area the options are shown in?
I can't even move it to "Edit Profile".

Thanks!

Goatpod
07 Sep 2006, 12:22
Working no probs, although I had to subtract 6 hours from the actual time of the event to get it accurate :)

Updating any phrase will get your missing text to show.

davelacey
08 Sep 2006, 01:25
Installed and running sweetly.
Thankyou :)

Hicksatpd
08 Sep 2006, 02:28
I can confirm this, after I saved a phrase, all the text appeared in both the Admin CP and the Edit Options page.

Help the idiot out: What do you mean by "saved a phrase"? Thanks. :)

Spookysalem
11 Sep 2006, 21:37
I have finally got this to work thankyou....

TomasDR
13 Sep 2006, 06:21
If anyone can assist I would appreciate it greatly. I still cannot get the countdown to appear in the signature. I am not having the phrase issue.

I have tried everything to get the countdown to appear in the signature without luck on 3.6.

Everything else works, I can set the countdown, it shows in the database, but just not in the signature.

This worked fine in 3.5.4 but for the life of me I have no idea what's wrong with 3.6.

Note: This might be the most used hack on my board since I run a travel related board. (ie. Countdowns to the next trip)

TomasDR
13 Sep 2006, 22:26
I did a little research last night and for some reason the lines...

$query = $vbulletin->db->query_read( "SELECT $cdfield FROM " . TABLE_PREFIX . "userfield WHERE userid='" . $post["userid"] . "';" );
$result = mysql_fetch_array( $query );
$cddata = unserialize( str_replace( """, '"', $result[$cdfield] ) );


Don't work and the statement.

if ( $cddata["enabled"] == "Yes" )

Fails. Actually all of the $cddata variables don't work.

This is what the raw data looks like in my SQL table.

a:8:{s:7:"enabled";s:3:"Yes";s:3:"day";s:1:"1";s:5:"month";s:1:"1";s:4:"year";s: 4:"2007";s:4:"hour";s:1:"0";s:6:"minute";s:1:"0";s:5:"event";s:14:"Happy New Year";s:7:"overmsg";s:15:"Make Resolution";}

If anyone could set thier countdown for Jan 1st, 2007 "Happy New Year" and compare/post it I would appreciate it.

Thanks.

Antyrael
15 Sep 2006, 13:48
Help the idiot out: What do you mean by "saved a phrase"? Thanks. :)

In your admincp, goto Languages & Phrases -> Search in phrases, type 'countdown' in the findbox and click Find.
Click on Edit next to any of te phrases, in the next screen, just click Save.

That's all ;)

Gripemaster
26 Sep 2006, 15:16
Installed fine, but nothing is showing up at all, anywhere. No options or settings, nada. :(

juan71287
26 Sep 2006, 15:28
Its not working with 3.6 so dont bother.. It would have been nice though :(

Invalid ID
21 Oct 2006, 00:35
Installed, but NOT working :(

unixboard
26 Oct 2006, 14:23
The Hack is working fine on 3.6.2....
But the Signature is only shown on new posts...older posts are still without the countdown..

Any tips?

Luke Brown256
26 Oct 2006, 15:33
Yeah i am using 3.6.2 and it is not working at all.

lazyseller
27 Oct 2006, 05:19
would love to see this fixed for 3.62 as well

Feckie (Roger)
27 Oct 2006, 10:48
Yep I Miss This As Well in 3.62

Elsie
30 Oct 2006, 20:18
installed and working... AFTER i went and saved all the countdown phrases.

LaCN
31 Oct 2006, 08:38
I tested it on a testforum, and it works !!

make sure u make it usuable for the membergroups, and then set the mojo in ur user-cp ;)

Elsie
01 Nov 2006, 07:47
i couldn't do that until i'd saved the phrases, cos the option in usergroup permissions was just an empty box, apart from the yes/no option itself. once i'd saved the phrases that box then had the text in it, so you could see what it was!

wilburshere
01 Nov 2006, 10:02
works fine installed

thank you

LaCN
01 Nov 2006, 22:15
i couldn't do that until i'd saved the phrases, cos the option in usergroup permissions was just an empty box, apart from the yes/no option itself. once i'd saved the phrases that box then had the text in it, so you could see what it was!
Yeah, just install a 2nd time, overwriting the current one, and u're done

thepub
05 Nov 2006, 22:22
I installed it and got nothing.

lazyseller
08 Nov 2006, 07:34
reupload the product so the phrases save... than u need to go into admin usergroup and turn it on... after that go to your usercp and than turn it on and set the settings..

thepub
08 Nov 2006, 16:06
no idea what you are talking about, tried to reinstall it and it still didn't work. Uninstalling it.

Rian
12 Nov 2006, 10:13
UNINSTALLED

Hack not working - period.

daredevildan
13 Nov 2006, 10:15
INSTALLED!

Didn't have the admin cp or user cp options at first but just re-uploaded.

NOTE: Since this hack appears in the signature you must HAVE a signature to see it. If it's not working for you try creating a test signature and hopefully you'll see the countdown.

Senn
15 Nov 2006, 19:05
Ive installed it but it looks like the language doesnt work properly. It only shows blank spaces.

Uninstalling...

Calliope
18 Nov 2006, 04:46
Sorry... had to uninstall too - i tried saving all the phrases and still nothing. then i reuploaded and saved phrases again - nothing. maybe i'll try again when someone figures out how to fix it...

EdQ
21 Nov 2006, 17:52
Seems to work fine on 3.6.3

EdQ
21 Nov 2006, 18:01
I would like to put in a space between the numbers and text.

DrewzR/T
29 Nov 2006, 04:18
This hack works perfect for 3.6.2 and I have numerous hacks installed.

For those who cant see the text. Do what everybody has said to do so far and go into your phrases and save any phrase in there and walla.

chrisbr
03 Dec 2006, 15:31
Got this working and marked as installed


What would be nice though is for it to be visable even if someone don;t have a signiture..

Any ideas how i could move the settings into its own settings page though? say for example, to move it to a "my countdown" page under Edit Options menu?

zincpony
09 Dec 2006, 10:09
import the xml and enable it in usergroup permissions, then import it again and select to override the last one, did this and it works perfectly well on 3.6.4

fusiongoddess
09 Dec 2006, 16:53
import the xml and enable it in usergroup permissions, then import it again and select to override the last one, did this and it works perfectly well on 3.6.4

This worked for me and I am also running 3.6.4 and had blank spaces the first try. Thanks for the tip!!

zincpony
09 Dec 2006, 17:17
This worked for me and I am also running 3.6.4 and had blank spaces the first try. Thanks for the tip!!


you are welcome

TTG
09 Dec 2006, 18:37
Clicked install .. works well on 3.6.4
Thanks for the conversion Hellcat

chrisbr
09 Dec 2006, 23:33
Got this working and marked as installed


What would be nice though is for it to be visable even if someone don;t have a signiture..

Any ideas how i could move the settings into its own settings page though? say for example, to move it to a "my countdown" page under Edit Options menu?

bump :)

TrikkeTalk
18 Dec 2006, 01:35
Hi,

I had the same "no phrases showing" problem to. I just rebuilt the phrases and that did the job for me on vb.3.6.4. Works like a charm now. Very nice hack:up: .

Frimon86
14 Jan 2007, 02:37
Which xml file do I upload because you've got F'in two.

Frimon86
14 Jan 2007, 02:44
I get errors:

Warning: require(./includes/plugins_usercountd.php) [function.require]: failed to open stream: No such file or directory in /includes/functions_user.php(362) : eval()'d code on line 3

Warning: require(./includes/plugins_usercountd.php) [function.require]: failed to open stream: No such file or directory in /includes/functions_user.php(362) : eval()'d code on line 3

Fatal error: require() [function.require]: Failed opening required './includes/plugins_usercountd.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/i9host/public_html/forums/includes/functions_user.php(362) : eval()'d code on line 3

Every feature but the options and profile in the user section doesnt work. When I move this weird mod, I dont get the error any more.

osso12
18 Jan 2007, 03:20
I have uploaded this mod twice...
Went to user CP; "edit options"
nothing there at all..
Now if i go into the ACP under usergroup options, I have a field with not text as someone mentioned earlier... a tic for yes or no... not sure what it is though...
Ive looked up and down in the user cp.
What gives on this one?
I cant ever seem to get a mod to work right the first time anymore..
:eek:

*UPDATE*
for those that do not get this to work, go back and read all the articles first!
You have to reset the phrases, turn the countdown in the usergroups that you want to use the counter on, plus go into your user CP under edit options and turn it on there.

akulion
29 Jan 2007, 23:05
hi

i dont know why but not all the registered users can get their signature countdowns to work

for some it works A-ok and for others it just shows an empty countdown box
while for other nothing at all

i dont know what to do - ive looked at all the permissions and everyting and its all correct, unless i missed something

could u suggest something that i may be doing wrong?

MPDesignZ
05 Feb 2007, 04:38
Sorry but this hack was a waste of time. Tried all the suggestions above and nothing UNINSTALLED.

MP

PinkDaisy
12 Feb 2007, 02:23
Installed and seems to be okay!! I had to save a phrase to, in order to get all the text to show up!!

Jennifer Marx
12 Feb 2007, 04:44
This module works very well for me on 3.6.4. I did need to rebuild the phrases in order for it to display properly. It's also important to enable the countdown timer for each usergroup, as appropriate.

For the benefit of others trying to get this to work, be careful not to use the ampersand symbol (&) or quotes in the event name or end message, as this will cause the countdown timer to not display. And, of course, user's must have signatures for the countdown timer to display, too.

Additionally, you can get spaces in between the numbers and phrases (i.e., 15 hours instead of 15hours) by editing the necessary phrases.

Fitone
12 Feb 2007, 21:23
Anyone know what this error means?

Removing (remains of) pevious install.... DONE

Performing database alteration for new install....
Fatal error: Could not open public_html/includes/xml/bitfield_vbulletin.xml in /includes/class_bitfield_builder.php on line 126

I'm getting it when trying uploading the .xml file via VB.

Fitone
13 Feb 2007, 03:40
Ok I got it up and running however has anyone tried to hack in the seconds as well?

Can it be done?

Mum
13 Feb 2007, 23:46
Somehow 3.6 doesn't rebuild the languages propperly here.... :confused:

A manual rebuild or simple resaving of any phrase will fix that (it does for me....)Once i did this it worked perfectly :)

Mum
16 Feb 2007, 03:47
I installed this and thought it worked fine. However who's time frame does it use for the countdown? I set a countdown to something at 7pm tonight (which was 5 hours away), and it said 1 day 1 hour to the event. That's obviously wrong...

Deadly Assassin
18 Feb 2007, 07:32
Nah, this dont work for me, i have installed it a few times and various different bits are missing, either text or options.

Mum
18 Feb 2007, 07:41
I have now uninstalled.

akulion
23 Mar 2007, 08:47
ive tried it all
no workie :(

WAHMama
26 Mar 2007, 17:08
Thank you, had to do the phrase fix and now it's working great! Thanks for those who figured out how to fix that and for those who explained how to do that!

alfaowner
10 Apr 2007, 01:01
Thank you, had to do the phrase fix and now it's working great! Thanks for those who figured out how to fix that and for those who explained how to do that!

Hi all,

Worled first time for me on 3.6.4 will quite a lot of changes. BUT... I need to know what it is looking for in the template as it shows twice for me in the profile as I have a save button up the top of my profile and a svae button at the bottom and its puttng one box after each one!

Love to have this, please advise.

AO

idca
10 Apr 2007, 02:24
it didnt work. nothing shown in the usercp edit options.

xLYNZx
28 Apr 2007, 08:11
ive installed it with no probs, but no text is showing..imsure ill be able to figure it out but some members may not be able to


edit: the text doesnt show anywhere,not even on the countdown itself, only shows what i put in the boxes

alfaowner
28 Apr 2007, 10:45
This says it is supported, but I have asked that I am wanting to know what it is looking for in my template as I get two show up as I have two save buttons, any help lads?

bazzup
28 Apr 2007, 11:48
ive installed it with no probs, but no text is showing..imsure ill be able to figure it out but some members may not be able to


edit: the text doesnt show anywhere,not even on the countdown itself, only shows what i put in the boxes



what i done to get text to show up is goto admincp/language phrases/phrase manager/ add phrase

type = global
product = user countdown
varname = usercountdown
text = usercountdown
add phrase

works for me

though it only works if you have a sig otherwise don't seem to show up

bazzup
28 Apr 2007, 11:52
it didnt work. nothing shown in the usercp edit options.

you got to allow it in usergroup permissions


*edit just noticed times are in CMT i had to adjust the time by putting it forward 1 hour to suit my event.

can we not get this in gmt?

wengi
29 Apr 2007, 13:37
Hack is workin fine and showing in usergroups

Regards
Wengi

xLYNZx
29 Apr 2007, 13:40
what i done to get text to show up is goto admincp/language phrases/phrase manager/ add phrase

type = global
product = user countdown
varname = usercountdown
text = usercountdown
add phrase

works for me

though it only works if you have a sig otherwise don't seem to show up

thanks, i took it off but will try again!

EDIT: did that and works perfectly, thanks!

bazzup
29 Apr 2007, 13:48
thanks, i took it off but will try again!

EDIT: did that and works perfectly, thanks!

no worries ;)

Fireproof
04 May 2007, 03:27
Painless:
Upload "plugins_usercountd.php" to ".../forum/includes"
Import the product .XML

Not really painless. It's definitely not as simple as those two steps, and I couldn't get it to work. Gave up.

Razin
05 May 2007, 13:42
Work it on 3.6.5??

zompus
20 May 2007, 02:09
I got it to work, check it out: http://www.doubleyellowcard.com/other-leagues/3599-bayern-munich-missed-out.html#post24992

V8Owner
20 May 2007, 07:08
Installed this & it works perfectly :)

Is there any way to bold & add some spaces to the date output?

"83days 17hours 6minutes"

leeman
20 May 2007, 07:57
Works like a charm on 3.6.7

giovannicosta
20 May 2007, 12:11
thanks:)

giovannicosta
20 May 2007, 12:17
nice mod but did not install...:(

teach1st
27 May 2007, 15:56
Installed this & it works perfectly :)

Is there any way to bold & add some spaces to the date output?

"83days 17hours 6minutes"

In Admin CP > Languages & Phrases > Search in Phrases

Make sure the product dropdown says "User Countdown" and do the three searches: "hours," "minutes," and "days."

Replace, for example, the word "day" with the word " day" ("day" with a space in front of it).

Works for me in 3.6.7:

http://www.pb5th.com/Polar_Bear_Fat/vb/showthread.php?p=35714#post35714

Aimee1969
28 May 2007, 02:01
thanks installed ;)

mtalks
28 May 2007, 02:06
In Admin CP > Languages & Phrases > Search in Phrases

Make sure the product dropdown says "User Countdown" and do the three searches: "hours," "minutes," and "days."

Replace, for example, the word "day" with the word " day" ("day" with a space in front of it).

Works for me in 3.6.7:

http://www.pb5th.com/Polar_Bear_Fat/vb/showthread.php?p=35714#post35714


Yur stuff worked great. Where do you fix the box so you can put a ZERO for a year month or even day and also have the dropdown field be wider so you can see the day

teach1st
28 May 2007, 03:01
have the dropdown field be wider so you can see the day

I've been mucking around, but can't find it.

mtalks
28 May 2007, 03:13
Ok after facing some of the same problems most users experienced we took everyones suggestions an added something to get it to look and work a little better.

I made a couple of changes to the plugins_usercountd.php

INSTALLED AND TESTED ON VB 3.67PL1 Corrected php file is attached at the bottom

The fields are the width of the phrase and you cant see the day, month or year unless you change the text to something other than day, year or month.


Find:
$profilefield["title"] = $vbphrase["day"];

Replace with:
$profilefield["title"] = $vbphrase["Select a Day"];

Find:
$profilefield["title"] = $vbphrase["month"];

Replace with:
$profilefield["title"] = $vbphrase["Select a Month"];

Find:
$profilefield["title"] = $vbphrase["year"];

Replace with:
$profilefield["title"] = $vbphrase["Select a Year"];

Find:
for ( $i = 2006; $i <= 2010; $i++ )

Replace with:
for ( $i = 2007; $i <= 2010; $i++ )

Save the file and upload the files as in the original instructions and then import the modified plugins_usercountd.php file. If you already have this installed then select to overwrite.

Goto admincp/language phrases/phrase manager/ add phrase

type = global
product = user countdown
varname = usercountdown
text = usercountdown
add phrase


In order for this mod to show you MUST go to the Manage User Groups and edit each group you wish to have access to this feature. It is located at the very bottom of the User Group Permissions. And each user must go to their UserCP and enable the countdown timer and have a signature enabled (it can be simple text but I suggest you add a couple <BR><BR> to give a few spaces between you signature and the countdown timer)

Enclosed are 3 screenshots of what it should look like in the UserCP, Group Permissions and the forum signature. I also included the fixed php file. <-- did not know if it was ok to do that and if not admin will remove I am sure.

Aimee1969
28 May 2007, 03:22
thanks mtalks1 ;)

cheekymonkey2
29 May 2007, 12:44
Great, thanks. Is there a way to give a user a signature by default?

That way, when they set the countdown up it appears immediately.

Fireproof
02 Jun 2007, 17:00
mtalks1 - I followed your directions, i think, but still have the problem with setting the dates. Can't see anything in the dropdowns besides the slider bar. see pic.

Would also like an automatic space added before the "My Countdown" signature starts. I don't have html enabled in sigs, so users can't put <br> spaces in their sig.

SLY LS1
05 Jun 2007, 13:02
edit

SLY LS1
05 Jun 2007, 13:20
mtalks1 - I followed your directions, i think, but still have the problem with setting the dates. Can't see anything in the dropdowns besides the slider bar. see pic.

Would also like an automatic space added before the "My Countdown" signature starts. I don't have html enabled in sigs, so users can't put <br> spaces in their sig.

Yes im getting the same thing..

the post did quite make sense to me, it asked to edit the plugins_usercountd.php file and upload it then down load another plugins_usercountd.php file and upload that ?

shouldnt your attached file be the product-hc_usercountdown_vb36b1.xml ?

Fireproof
05 Jun 2007, 13:59
I believe he applied the edits to the php file for us (even though he laid them out in his post) and attached that so we wouldn't have to do that. however, there appears to be a disconnect between it and the XML now or something. Something like the phrases aren't right anymore or something. I dunno - I'm a complete php noob.

But i would like to get this to work. :( It would be so useful for my forums, counting down to the end of a dieting cycle or something.

SLY LS1
05 Jun 2007, 14:00
Ok I couldnt work out mtalks1 edit so I changed the edits back and went to the AdminCP - Languages & Phrases - Language Manager - Edit / Translate English (US) Phrases

and found the ones to change

day - change to - Select a day

month - change to - Select a month

year - change to - Select a year


that basicly did the same thing and fixed it perfect

cheers

SLY LS1
05 Jun 2007, 14:13
To put the gap between the signature and the countdown go to

Admin CP - Styles & Templates - Search in Templates

Search for - usercountdown_display

Change from;

<fieldset class="fieldset">
<legend>$vbphrase[countdown_title]</legend>

<strong>$vbphrase[countdown_counting_down_to]:</strong> $event <br />
<em>$counter</em>

</fieldset>

To;

<br><br>
<fieldset class="fieldset">
<legend>$vbphrase[countdown_title]</legend>

<strong>$vbphrase[countdown_counting_down_to]:</strong> $event <br />
<em>$counter</em>

</fieldset>

then click save

Fireproof
05 Jun 2007, 16:21
Awesome - you can ignore my PM. I sent it before seeing your post here. Let me try this tonight and see if that fixes it for me. I bet it does.

SH0CK
09 Jun 2007, 20:49
Find:
for ( $i = 2006; $i <= 2010; $i++ ) Just a suggestion, but try this so you don't have to keep changing the year every year:for ( $i = date("Y"); $i <= 2020; $i++

Mum
09 Jun 2007, 22:30
I installed this and thought it worked fine. However who's time frame does it use for the countdown? I set a countdown to something at 7pm tonight (which was 5 hours away), and it said 1 day 1 hour to the event. That's obviously wrong...I'm still waiting for an answer from Feb :(

PinkLiquorice
10 Jun 2007, 14:54
I have tried all the things here but am still getting the same as Fireproof;1259800 with the little drop down bits. Any ideas?! I have changed everything apart from

Find:

Code:
for ( $i = 2006; $i <= 2010; $i++ )Replace with:

Code:
for ( $i = 2007; $i <= 2010; $i++ )

I cant find it

PinkLiquorice
14 Jun 2007, 19:02
Anyone?! x

Mum
20 Jun 2007, 03:59
Still waiting :(

HaCaoChien
25 Jun 2007, 17:41
Installed but did not see User Countdown in Edit Options neither in vBulletin Options ?_?

ShawneyJ
26 Jul 2007, 09:43
works great took a few days till things appeared but mate its a day out for everyone lol.


Hellcat

Last Activity: 04. Jul 2006 11:21


why bring a mod out and never come back online, leave members in the lurch?

why is this mod still available for download?

RTFA
29 Jul 2007, 04:03
Nice Hack once I saw the phrase's thing. Clicked install.

Transverse Styles
12 Aug 2007, 22:40
make sure you upload all the files correctly! that is the problem. it's a tricky mod. and yes, try to install and then reinstall, and it'll work.

yaoren
13 Aug 2007, 02:08
installed, uninstalled and once more for luck... STILL couldn't get it to work on a 3.6.7 board.
Ah well, it was worth a try :)

ringleader
14 Aug 2007, 12:20
The following is a template and file change to show signature only, counter only, or both signature and counter depending on which are turned on in the UserCP by the member.

In the postbit template (not tested in postbit_legacy)

FIND
f condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>


REPLACE WITH

<!-- sig and countdown mod -->
<if condition="$post['signature'] AND $counterhtml">
<div>
__________________<br />
$post[signature]
<br /><br />
$counterhtml
</div>
<else />
<if condition="$post['signature'] OR $counterhtml">
<div>
__________________<br />
$post[signature]
$counterhtml
</div>
</if>
</if>
<!-- /sig and countdown mod -->


In the file included with this mod plugins_usercountd.php

FIND AND DELETE

if ( strlen($post["signature"]) > 0 )
{


FIND

eval('$counterhtml = "' . fetch_template('usercountdown_display') . '";');

$sig = $post['signature'] . $counterhtml;
$post['signature'] = $sig;
}
}
}


REPLACE WITH

eval('$counterhtml = "' . fetch_template('usercountdown_display') . '";');
}
}


Hope this helps someone else.
Took me the good part of an hour to figure out how to do that :)
I just installed with no problems on 3.6.8

ravyn
16 Aug 2007, 20:27
ok, I uploaded the corrected php file, reinstalled the xml file, saved the phrases, but I do not see anything in the usergroup permissions that will allow/disallow the countdown timer and it does not show up anywhere in the usercp. I am running on vb 3.6.4. any suggestions?

paidtoshop
30 Aug 2007, 12:20
Does anybody know how i can get the drop down options to expand more so i can see the selections, I have installed ok on 3.6.7. but the drop down options are not easy to see

Thanks in advance

Ophelia
02 Dec 2007, 14:20
Installed twice and both times, code was missing from the usergroup area (no text showing what you were to change, but said YES/NO) and no text in the descriptions in USERCP. Uninstalling.

Catziggy
02 Dec 2007, 21:20
Tried it didnt work nice idea but unsupported and released with too many bugs

FCS-Webmaster
10 Jan 2008, 06:04
I had some trouble first too.
So I uninstalled and reinstalled it.
Refresged a lot and and used patience around 30 minutes.
I have to search the phrases - you find it under Phrases -> Global Settings - and rebuild it.

Works like a charm
Thnx for the great mod

Mum
12 Jan 2008, 07:56
Has anyone fixed the problem i reported? People are in different time zones, and this seems to work off the system timezone, which of course isn't correct. Has this been sorted out?

DieselMinded
15 Jan 2008, 06:54
Any Word on this?

plastourgos
15 Jan 2008, 09:19
didn't work on 3.6.8

TCE Killa
15 Jan 2008, 12:54
I had some trouble first too.
So I uninstalled and reinstalled it.
Refresged a lot and and used patience around 30 minutes.
I have to search the phrases - you find it under Phrases -> Global Settings - and rebuild it.

Works like a charm
Thnx for the great mod

Doesn't work for me, no text shows so what do you put into the phrases for it to all work? Thanks.

I use 3.6.8

kimmie-99
16 Jan 2008, 14:00
I don't see anything. I've installed this and there isn't anything showing up in the users Options!

FCS-Webmaster
18 Jan 2008, 00:00
Doesn't work for me, no text shows so what do you put into the phrases for it to all work? Thanks.

I use 3.6.8
Go into your ACP -> Search for phrases

Search for Countdown then you will find several empty phrases.
Another way to find all containing phrases in this mod is to open the xml file in a editor like dreamweaver, note ++.
Then search in ACP for it and fill it yourself. As I reconized you need some patience for this mod :D

Mum
26 Jan 2008, 07:42
Has anyone fixed the problem i reported? People are in different time zones, and this seems to work off the system timezone, which of course isn't correct. Has this been sorted out?Just making sure this doesn't get lost :)

BucShot
27 Jan 2008, 19:18
lol, yeah I guess you could say this mod has a learning curve but it does work. (I have it running fine on 3.6.8) Probably not the best mod for a newbie to start out with but if you get Mtalks1's edited file attachment and follow his instructions from page 8 of this thread, you should be able to get it working.

Also...
If you don't mind a little editing (what the heck at this point right?) you can make it look a little better in the UCP by adding text and spaces to userfield_countdown in your User Profile Fields Templates. See attached...

FCS-Webmaster
29 Jan 2008, 04:08
Anyone who does have clue how to let this work in the profile?

Droptop
29 Jan 2008, 18:06
Not working for me either on 3.6.8 PL2, *uninstalled* :(

gbox master
30 Jan 2008, 22:40
Not working for me either on 3.6.8 PL2, *uninstalled* :(

works for me m8 on the vB 3.6.8.PL2
installed and very nice
1 thing missing in the install txt
you must enable it in the usergroups :up:

sometimes the coders miss the point by miles
and they make the finest mods
so please coders put in the topic a very good how to do
we are all noobs don't forget :p

ChaosBurnt
09 Feb 2008, 10:42
What a great Mod', will prove invaluable for remembering those special days like anniversaries and birthdays, brilliant, thanks for this.

*installed*

rainyleaves
28 Feb 2008, 06:47
Please porting for VB3.7.0!!!

gbox master
24 Mar 2008, 15:16
some how the mod dont work anymore
i think its not compatible with other mods maybe

could i say this meens unstable ?
anyway i like the hack when it did work so i would like to get it to work again
if any wizzz here can help me out that would be apriciated

Chachacha
12 Apr 2008, 20:52
Wow, I wish I would have read this thread before wasting my time installing this on my site. Doesn't work. Uninstalling.

Aquestor
18 Apr 2008, 00:06
please make it usable for 3.7 :D

René Kunze
19 Apr 2008, 18:13
Das wäre klasse ich habe es unter 3.6.9 installiert und es funktionierte super.
Leider aber nicht unter 3.7.

Wäre super wenn man es auch für 3.7 machen könnte ich vermisse es dort.

Bounce
29 Apr 2008, 19:23
please make it usable for 3.7 :D

vb's went gold , is this hack gonna be :D

Aquestor
06 May 2008, 11:53
Please porting for VB3.7.0!!!

Has someone done something like that? Is it possibel to use this Hack with 3.7?

Bounce
13 May 2008, 22:12
Please porting for VB3.7.0!!!

Has someone done something like that? Is it possibel to use this Hack with 3.7?

not yet no :(

Fireproof
17 May 2008, 20:06
Someone please fix this for vb3.7.0. My members are begging. :)

Andreas
23 May 2008, 12:33
plugins_usercountd.php

eval('$tempcustom = "' . fetch_template('userfield_countdown') . '";');
$tempcustom = str_replace( "userfield", "cdsettings", $tempcustom );
$tempcustom .= '<input type="hidden" name="countdownuserfield" value="' . $profilefieldname . '" />';



$wrapper_template = 'userfield_countdown';
$fields = array('radio_enable', 'text_event', 'text_overmsg', 'dayselect', 'monthselect', 'yearselect', 'hourselect', 'minuteselect');

foreach ($fields AS $field)
{
$$field = str_replace('userfield', 'cdsettings', $$field);
}


userfield_countdown

<input type="hidden" name="countdownuserfield" value="$profilefieldname" />

Fireproof
23 May 2008, 15:29
plugins_usercountd.php

eval('$tempcustom = "' . fetch_template('userfield_countdown') . '";');
$tempcustom = str_replace( "userfield", "cdsettings", $tempcustom );
$tempcustom .= '<input type="hidden" name="countdownuserfield" value="' . $profilefieldname . '" />';



$wrapper_template = 'userfield_countdown';
$fields = array('radio_enable', 'text_event', 'text_overmsg', 'dayselect', 'monthselect', 'yearselect', 'hourselect', 'minuteselect');

foreach ($fields AS $field)
{
$$field = str_replace('userfield', 'cdsettings', $$field);
}


userfield_countdown

<input type="hidden" name="countdownuserfield" value="$profilefieldname" />


Is that the fix for VB3.7.0? Are we supposed to add the code somewhere? Replace some existing code with yours? Or what?

I have no idea what I'm doing, so if you can help me get this working by explaining a little more, that would be awesome.

thanks!

Bounce
23 May 2008, 23:07
Is that the fix for VB3.7.0? Are we supposed to add the code somewhere? Replace some existing code with yours? Or what?

I have no idea what I'm doing, so if you can help me get this working by explaining a little more, that would be awesome.

thanks!

agreed, i've tried adding the code to plugins_usercountd.php and editing the userfield_countdown template to no avail :(

Bounce
03 Jun 2008, 16:25
anyone have this working on 3.7.1 :rolleyes:

bwdis
10 Jun 2008, 11:19
I can see the text fine, rebuilding the phrases sorts that out.

I have this mod turned on in the usergroups but this is what I get in my edit options page within the usercp.

https://www.vbulletin.org/forum/external/2008/06/50.jpg

anyone got a solution?

thanks
bw

Andreas
10 Jun 2008, 13:18
http://www.vbulletin.org/forum/showpost.php?p=1528816&postcount=158

Bounce
10 Jun 2008, 21:16
http://www.vbulletin.org/forum/showpost.php?p=1528816&postcount=158

I'm not sure of where to put those edits :(

Andreas
11 Jun 2008, 06:05
I don't have the time to write down all the instructions crap.
So in short terms:
Find the first PHP code block, replace it by the second, add the third line to the template - done.

clr_75
11 Jun 2008, 19:24
I don't have the time to write down all the instructions crap.
So in short terms:
Find the first PHP code block, replace it by the second, add the third line to the template - done.

Changes work! Thanks!!!

Fireproof
12 Jun 2008, 02:25
Well, I tried to make those edits and still have a problem.

This is what I'm seeing in my UserCP >> Edit Options...

Any help / advice?

Fireproof
12 Jun 2008, 02:31
Nevermind - I fixed it.

Thanks - it works!!

Howell
14 Jun 2008, 18:39
I've Updated this modification for 3.7.x

All templates and phrases are now fixed.

http://www.vbulletin.org/forum/showthread.php?t=182480

:D

raagaswaram
18 Jun 2008, 05:09
is it possible to addimages instead of text

amirlol
14 Nov 2008, 15:40
wow ! very very nice plugin

thanks a lot

Peejay
29 Jun 2009, 21:41
Uninstalled from 3.6.8 after trying absolutely everything in this thread, rebuilding phrases, uninstalling, reinstalling, setting usergroup permissions, etc....

PinkLiquorice
21 Aug 2009, 08:06
Hi does anyone know how I can add years onto the countdown it only goes up to 2010 atm thank you!

ariellio
21 Sep 2009, 19:17
Hi does anyone know how I can add years onto the countdown it only goes up to 2010 atm thank you!

I was wondering the same thing. I figured it out. You have to manually edit the php file (plugins_usercountd.php) that is uploaded to your includes folder. When you open that php file in Notepad or Wordpad, do a search for 2010. You can change the 2006 to 2009 and change the 2010 to whatever year you want. I changed mine to 2009-2019.

Don't forget to upload the php file again after you save it. :D

mgurain
07 May 2012, 15:02
This is useful,
can this be supported and upgraded to 4.1.12 ?
Looking for something similar.

Thanks,,

edytwinky
06 Jan 2013, 18:47
This is useful,
can this be supported and upgraded to 4.1.12 ?
Looking for something similar.

Thanks,,

Second. Would love to have this for vb 4.2