Jump to the post that solved this thread.
Solved: 10 Years, 10 Months, 3 Weeks ago Need conditional please!!!
#1
Solved: 10 Years, 10 Months, 3 Weeks ago
Please help me with a conditional that will only show code if the editpost.php is firstpost
Reply
#2
Solved: 10 Years, 10 Months, 3 Weeks ago
What kind of code do you want to show? You can use the approach that I described (check if Post_id can be found as firstpost in _threads), but the actual way of "showing" code depends on where you want to show it.
[Image: axolis.png]

Project, Portfolio and Product management for freelancers.
Reply
#3
Solved: 10 Years, 10 Months, 3 Weeks ago
I am adding a text code just above the subject simple <td></td> editpost template

This ain't working it hides the code
<if ($script == 'editpost.php' && $firstpost) then>
code
</if>
Reply
#4
Solved: 10 Years, 10 Months, 3 Weeks ago
I am not sure how and where $script is defined. If those are from the plug-in which handles some bb code then you might not have globalized them so they are "locked" in the function. Add global $script, $firstspot to that and try if that works.

I am not sure how that plug-in (php in template?) works either.
[Image: axolis.png]

Project, Portfolio and Product management for freelancers.
Reply
#5
Solved: 10 Years, 10 Months, 3 Weeks ago
I am using templates conditionals plugin that allows you to add conditionals directly into the template
Reply
#6
Solved: 10 Years, 10 Months, 3 Weeks ago
Make sure to make the $script and $firstpost variable global in the function (I assume that it is the plug-in that we have built for some formatting BB-code like functionality).

global $script, $firstpost;

This might work, depending on how the conditionals plugin works and when/how often is the template code rebuilt.
[Image: axolis.png]

Project, Portfolio and Product management for freelancers.
Reply
#7
Solved: 10 Years, 10 Months, 3 Weeks ago
Thank buddy very much I really appreciate all your help.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)