Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Moderator option
chas Offline
Junior Member
**
Posts: 5
Joined: Oct 2015
Post: #1
Moderator option

Code:
Modify Custom Thread Field(s)
You can use this option to modify XThreads' custom thread fields when this tool is executed. The current value (before setting) of the field can be denoted by {VALUE}. Variables/conditionals supported. NOTE: values here are NOT validated, and permissions are NOT checked! Example:
myfield=something
anotherfield={VALUE},something else


just exactly how do you use it, for instance how

myField=({VALUE}+1)

doesnt seem to work, but i might have to change the the type of field

10-05-2015 10:22 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Moderator option
You can try using this code:

Code:
myfield=<?=xthreads_phptpl_eval_expr({VALUE}.'+1')?>


10-06-2015 03:06 AM
Find all posts by this user Quote this message in a reply
chas Offline
Junior Member
**
Posts: 5
Joined: Oct 2015
Post: #3
RE: Moderator option
nope, not working either, I just need to increment it by one

and its on an integer field
10-06-2015 06:36 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Moderator option
Edit the moderation tools. Can you see it inside the Modify Custom Thread Field(s) textarea?

10-06-2015 06:53 AM
Find all posts by this user Quote this message in a reply
chas Offline
Junior Member
**
Posts: 5
Joined: Oct 2015
Post: #5
RE: Moderator option
No it seems to come and go, i put it in and it shows but after i save it its gone
10-06-2015 01:01 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Moderator option
Delete it or create a new tools, then try using the code given above.

10-07-2015 12:57 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: