Michael Schmidt Posted March 6, 2020 Report Share Posted March 6, 2020 Hi, so far I´ve learned to do it so far: %parameter:$marriagelmhide:true% %desc:Hide Marriage LastModified? <br /><i style="color: blue;">true</i>/false: Defaults to (true)% %target:getperson.php% %location:% $persontext .= showEvent( array( "text"=>$text['lastmodified'], "fact"=>$row['changedate'] ) ); %end:% %replace:% //Person -hide Last Modified ($marriagelmhide == 'true' ? $persontext .= showEvent( array( "text"=>$text['lastmodified'], "fact"=>$row['changedate'] ) ) ); %end:% Can I do sth. like "replace ONLY if $marriagelmhide, or do I have to do an if-switch within the code? ...besides, is there a better solution than to crudely "replace" the $persontext. "Replace" might come back to haunt me, so I don´t like it Bye Michael Quote Link to comment Share on other sites More sharing options...
Michael Schmidt Posted March 9, 2020 Author Report Share Posted March 9, 2020 Anyone? Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted March 9, 2020 Report Share Posted March 9, 2020 It may take some study and practice, but if you're on TNG12+, conditional Mod Mgr tags were introduced which may help achieve what you want. I have not needed them thus far. In this article of the TNG Wiki, Mod_Manager_Enhancements_TNG_v12, check the section on Conditional Processing Tags. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted March 9, 2020 Report Share Posted March 9, 2020 On 3/6/2020 at 6:03 AM, Michael Schmidt said: Can I do sth. like "replace ONLY if $marriagelmhide, or do I have to do an if-switch within the code? The Mod Manager conditional tags like %textexists: for example, apply to installing the mod against the code so that a mod might install on 2 different versions of a module when the code changed from one TNG version to the next. The Mod Manager conditionals are not designed to provide two different execution paths in the code. If you need conditional processing in the code you will need to provide the code to accomplish that. I have used the Mod Manager conditionals to provide different install instructions as a way to resolve conflicts between two mods. Not sure the Mod Manager conditionals will provide what you are looking for. Quote Link to comment Share on other sites More sharing options...
Michael Schmidt Posted March 10, 2020 Author Report Share Posted March 10, 2020 @tngrlkrz: thank you, I had somehow missed that page until now! @Ken Roy: ..but you are right - these conditionals are not the conditionals I seek... But I´ll manage with %parameter:$personlmhide:true% and $personlmhide = true; if ($personlmhide != true ? ... Sooner or later I´ll post a mod to the wiki. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.