• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Error when trying to get current day and month using Variable Syntax

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Error when trying to get current day and month using Variable Syntax

    • Issue Tools
      • View Changes
    1. issueid=6298 April 2, 2022 9:20 AM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Error when trying to get current day and month using Variable Syntax

      Hi there,

      I'm trying to work with the Variable Syntax for dates but I don't know what I'm doing wrong.

      With all these variables, I always get the same result: "Apr 2, 2022 A moment ago"

      It doesn't matter if I use it to get the current month or day, I get that result with all these variables (I've checked one by one):

      CURRENT
      CURRENTDAY
      CURRENTDAY2
      CURRENTDAYNAME
      CURRENTDOW
      CURRENTHOUR
      CURRENTMONTH
      CURRENTMONTHABBREV
      CURRENTMONTHNAME
      CURRENTMONTHNAMEGEN
      CURRENTTIME
      CURRENTTIMESTAMP
      CURRENTWEEK
      CURRENTYEAR

      This is the code I'm using:

      Code:
      [VAR]CURRENTDAY[/VAR]
    Issue Details
    Issue Number 6298
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.4
    Fixed Version 4.1.5
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. April 2, 2022 3:01 PM
      pegasus pegasus is offline
      VaultWiki Team
      Thank you for reporting this issue.

      To fix this bug, you can make the following file edits. These changes will be included in the next version.

      In src/addons/vw/vw/_core/model/parser/var/vw.php, find:
      Code:
      	public function handle_current($datetype, $text)
      	{
      		$text = $this->cleanup_params($text);
      Replace with:
      Code:
      	public function handle_current($datetype, $text)
      	{
      		$text = $this->cleanup_params($datetype);
      In src/addons/vw/vw/_core/model/parser/handle/base/vw.php, find:
      Code:
      				$tag = '';
      				$current = explode('current', $tag, 2);
      Replace with:
      Code:
      				$current = explode('current', $tag, 2);
      				$tag = '';
      These edits have fixed the issue on my XF2 test board.
      Reply Reply  
    2. April 2, 2022 4:04 PM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Quote Originally Posted by pegasus
      Thank you for reporting this issue.

      To fix this bug, you can make the following file edits. These changes will be included in the next version.

      In src/addons/vw/vw/_core/model/parser/var/vw.php, find:
      Code:
      	public function handle_current($datetype, $text)
      	{
      		$text = $this->cleanup_params($text);
      Replace with:
      Code:
      	public function handle_current($datetype, $text)
      	{
      		$text = $this->cleanup_params($datetype);
      In src/addons/vw/vw/_core/model/parser/handle/base/vw.php, find:
      Code:
      				$tag = '';
      				$current = explode('current', $tag, 2);
      Replace with:
      Code:
      				$current = explode('current', $tag, 2);
      				$tag = '';
      These edits have fixed the issue on my XF2 test board.
      Thanks @pegasus That did solve the dates issue
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:33 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.