vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Profile Enhancements - Countdown Timer in signature (https://vborg.vbsupport.ru/showthread.php?t=182480)

x YNWA x 12-30-2008 03:03 PM

Hi
I have this intalled, it is enabeld in admincp, enabled in usergroup and also ive gone into usercp and put the time and date on and enabled it but nothing appears in my sig...

x YNWA x 12-30-2008 03:16 PM

Its ok, I put something in my sig and it works. Shame you actually have to do that to get it to work. Ill probably uninstall it and buy one that lets you include pictures, good mod though.

stuartn 01-10-2009 11:09 PM

I would like to have it when the counter reaches the end it then set's the function to "Off".

Any idea's on how to do this ?

Modded the code slightly to add more fields which all work fine, now I would like an auto reset if possible.

Megatr0n 01-12-2009 07:36 PM

Anyone got it working for 3.8?

bw1 01-25-2009 12:24 AM

Quote:

Originally Posted by Megatr0n (Post 1710093)
Anyone got it working for 3.8?

Works :)

inciarco 01-25-2009 03:50 AM

Great Mod, Thank You For Sharing It. :up:

One Idea: It would be really nice also to be able to see the CountDown Information on the Member Profile on the Statistics Tab. ;) And Perhaps to Allow the User to Choose where to Display the Countdown (On Postbit, On Profile, On Both Postbit and Profile). ;)

My Best Regards.

:)

asking 01-25-2009 03:54 AM

whats use of this mod ?

inciarco 01-25-2009 04:49 AM

This Mod Can be Used as a Reminder for an Event of the User.


I'd Like to Share the Inclusion of the CountDown on the User Profile (If Someone knows a Better Way to do This would be Nice to Share it. ;)):


Step 1: Edit File plugins_usercountd.php and after that Upload it on the "includes" Folder, Overwriting the Existing File, (the one you Uploaded when Installed this Mod).

Include at the end of the File, before the Code ?> the Following Code:

Code:

// ********************************************************************** \\

if ( $THIS_HOOK == "member_profileblock_fetch_unwrapped" )
{
    $cdfield = "field" . $vbulletin->options["countdownfield"];
    $query = $vbulletin->db->query_read( "SELECT $cdfield FROM " . TABLE_PREFIX . "userfield WHERE userid='" . $userinfo["userid"] . "';" );
    $result = mysql_fetch_array( $query );
 
    $cddata = unserialize( str_replace( """, '"', $result[$cdfield] ) );
 
    if ( $cddata["enabled"] == "Yes" )
        {

          require_once( "./includes/class_bbcode.php" );
          require_once( "./includes/functions_newpost.php" );
          $vbulletin->cdbbcode_parse =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
         
          $eta = mktime ( intval( $cddata["hour"] ), intval( $cddata["minute"] ), 0, intval( $cddata["month"] ), intval( $cddata["day"] ), intval( $cddata["year"] ) );
          $tremain = $eta - time();
          if ( $tremain > 0 )
          {
            $t = $tremain;
            $remain["days"] = intval ( $t / 86400 );
                $t = $t - ( $remain["days"] * 86400 );
                $remain["hours"] = intval ( $t / 3600 );
                $t = $t - ( $remain["hours"] * 3600 );
                $remain["minutes"] = intval ( $t / 60 );
               
                $counter = $remain["minutes"] . $vbphrase["countdown_minutes"];
               
                if ( ( $remain["hours"] != 0 ) OR ( $remain["days"] != 0 ) )
                {
                  $counter = $remain["hours"] . $vbphrase["countdown_hours"] . " " . $counter;
                }
               
                if ( $remain["days"] != 0 )
                {
                  $counter = $remain["days"] . $vbphrase["countdown_days"] . " " . $counter;
                }
          } else {
            $counter = $vbulletin->cdbbcode_parse->parse(convert_url_to_bbcode($cddata["overmsg"]), 'nonforum');
          }
          $event = $vbulletin->cdbbcode_parse->parse(convert_url_to_bbcode($cddata["event"]), 'nonforum');
         
        }
}


Step 2: Create Plugin.

On Admin Control Panel (ACP) -> Plugins and Products -> Add New Plugin

Product: vBulletin
Hook Location: member_profileblock_fetch_unwrapped
Title: User CountDown - Block Statistics
Execution Order: 5
Plugin is Active: Yes
Plugin PHP Code:

Code:

$THIS_HOOK = "member_profileblock_fetch_unwrapped";

require( "./includes/plugins_usercountd.php" );

Click the "Save" Button to Save New Plugin.


Step 3: Edit Template "memberinfo_block_statistics"

Find at the End of the Template

$template_hook[profile_stats_last]

Before that Add:

Code:

<!-- Start User Countdown memberinfo_block_statistics -->

<if condition="$counter">

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

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

</fieldset>

</if>

<!-- End User Countdown memberinfo_block_statistics -->

Step 4: ENJOY! That's It


My Best Regards.

:)

Daisyboo 01-25-2009 02:32 PM

Worked perfectly adding it to profiles, thanks!

Howell 01-25-2009 05:13 PM

Thanks inciarco, I may update this to include that feature.


All times are GMT. The time now is 06:01 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.01275 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
  • (3)bbcode_code_printable
  • (1)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
  • (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