Jump to content

How to create theos custom variables?


strejda603

2 posts in this topic

Recommended Posts

Posted

Hey guys,

I would like to create custom variable for theos. In example @@DATECREATED@@ to print current date for my tweak deceptions (I'm soooo bored to edit it manually :D)

Like @@FULLPROJECTNAME@@ prints out tweak name in control and Makefile...

Edit: I did it with adding this to my nic.pl:

use DateTime;

$NIC->variable("DATECREATED") = DateTime->now->strftime('%d/%m/%Y');

Is it possible to do it without editing original nic.pl?

Thanks for suggestions!

Posted

I have found a solution for it!

I had to put this code inside "control.pl" in my theos template:

use DateTime;

NIC->variable("DATECREATED") = DateTime->now->strftime('%d/%m/%Y');

 

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines