Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Question about Template Conditionals and XThreads
xho Offline
Junior Member
**
Posts: 2
Joined: Jul 2019
Post: #3
RE: Question about Template Conditionals and XThreads
I'm really sorry, RateU. I've been on family summer holidays, but I'm already here.

I've been testing for 4 hours and ... I've finally got it! Yipi Yes

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php 
$day = date("d");
$month = date("m");
$year = date("Y");
$total = strtotime("$year-$month-$day");
$va0 = {VALUE};
$va1 = {VALUE$1};
$va2 = {VALUE$2};
$va3 = {VALUE$3};
$total2 = strtotime("$va3-$va2-$va1");
$result = ($total <= $total2 and $total2 <> $total);

if ( $result == true) {
echo "<span class=\"xdate\">Start the day: {$va0}</span>";

}else {

echo "This offer has already started";

}

?>


I'm really happy, because I do not program php, but this code is exactly what I need. And above all thanks to you, RateU, this would not have been possible without your idea about strtotime ().

And I take the opportunity to say that thanks to the PHP And Template Conditionals & Xthreads plugins, I have managed to set up an incredibly advanced portal that I will release to the public in the coming weeks.

If you're interested in seeing it, RateU, let me know and I'll show you the URL by private message in the next few weeks, since right now I'm working on localhost.

Thank you very much again, my friends RateU and ZiNGA BURgA, I wish you the best in life, for all the years of work and help to MyBB users.

07-11-2019 04:54 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Question about Template Conditionals and XThreads - xho - 07-11-2019 04:54 AM

 Standard Tools
Forum Jump: