04-02-2017, 05:43 PM
06-30-2017, 05:16 AM
In the EDITPOST template on a MyBB 1.8.12 board, I'm trying to create a condition where:
IF, the post being edited is the first post in the thread, the subject field can be edited
ELSE, (the post is not the first post,) the subject field cannot be edited
I've been playing around with mixed results, but not having any luck.
#################################################
This BELOW allows all posts in the thread to have the subject field edited. - the logic seems to flow down the IF path...
IF, the post being edited is the first post in the thread, the subject field can be edited
ELSE, (the post is not the first post,) the subject field cannot be edited
I've been playing around with mixed results, but not having any luck.
#################################################
This BELOW allows all posts in the thread to have the subject field edited. - the logic seems to flow down the IF path...
Code:
|
This BELOW allows all posts in the thread to have subject field edited. - again, logic seems to follow the IF path...
Code:
|
This BELOW does not allow editing of the first or any subsequent posts. - the logic seems to follow the ELSE path...
Code:
|
Lastly, same result here where the logic appears to follow the ELSE path...
Code:
|
Clearly, your plugin is functional as I can observe the logic flowing either down the IF or down the ELSE paths.
I'm just misapplying it.
Any help?
07-05-2017, 06:48 AM
^ I updated my previous post so it's less vague. If anybody wants to take a second look, please do.
Thanks
Thanks
07-28-2017, 09:41 PM
Bump Beg
07-30-2017, 03:51 AM
Hi
If i wanted to run a script in headerinclude template, but wanted to exclude it from executing on say showthread.php, what would be the best / correct php syntax to use ?
<if !showthread.php then>
<script src="{$mybb->asset_url}/jscripts/somescript.js"></script>
</if>
If i wanted to run a script in headerinclude template, but wanted to exclude it from executing on say showthread.php, what would be the best / correct php syntax to use ?
<if !showthread.php then>
<script src="{$mybb->asset_url}/jscripts/somescript.js"></script>
</if>
07-31-2017, 03:54 AM
(07-30-2017 03:51 AM)Ashley Wrote: [ -> ]Hi
If i wanted to run a script in headerinclude template, but wanted to exclude it from executing on say showthread.php, what would be the best / correct php syntax to use ?
<if !showthread.php then>
<script src="{$mybb->asset_url}/jscripts/somescript.js"></script>
</if>
Hi, I think it's:
Code:
|
07-31-2017, 04:00 AM
^^ Thanks.
07-31-2017, 04:10 AM
I'm using "PHP and Template Conditionals" plugin but there is always an error where I add <if> conditional, for example:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /srv/users/serverpilot/apps/(appname)/public/forum/global.php(527) : eval()'d code on line 2
I'm using also PHP 7.0, maybe it isn't compatible with PHP 7.0?
EDIT: nothing, sorry, I have uploaded from 2.0 to 2.1 and now it works without problems, I didn't see the update sorry
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /srv/users/serverpilot/apps/(appname)/public/forum/global.php(527) : eval()'d code on line 2
I'm using also PHP 7.0, maybe it isn't compatible with PHP 7.0?
EDIT: nothing, sorry, I have uploaded from 2.0 to 2.1 and now it works without problems, I didn't see the update sorry
02-10-2018, 10:30 PM
(06-30-2017 05:16 AM)L Moody Wrote: [ -> ]In the EDITPOST template on a MyBB 1.8.12 board, I'm trying to create a condition where:Unfortunately this plugin won't really enforce that. At most, you could hide the inputs, but it won't actually stop someone editing a subject. You'd need something more complex, like a plugin, for that.
IF, the post being edited is the first post in the thread, the subject field can be edited
ELSE, (the post is not the first post,) the subject field cannot be edited
If you don't actually care about post subjects though, you could just hide them in posts instead (or display the thread subject there instead).
02-17-2018, 12:19 AM
Were is the download link to this?