Note that this is just off the top of my head and hasn’t been tested, so it may need a bit of tweaking (e.g.: case sensitive). Please let us know if this helps address your issue, and if not, what it seems to be doing (or not doing) wrong.
I guess I should have included a bit of an explanation of what I initially proposed. That may have made your trial and error work a little less painful. Maybe it will help the next person reading this thread, so here goes:
The first $if statement checks for the existence of a %comment:% tag.
If the first $if is true, the second $if is processed, checking if the contents of the %comment:% tag begins with “visit http”, as specified in the true (then) clause of the first $if statement.
If the second $if is true, nothing happens because the true (then) clause is empty in the second $if statement.
If the second $if is false, then the first 64 characters of the %comment:% tag are output, as specified in the false (else) clause in the second $if statement.
If the first $if is false (i.e.: no %comment:% tag exists or it is empty) then nothing is output because no false (else) clause for the first $if statement has been specified.
In any event, it’s good to hear that you ended up with something that works for you. That’s the main thing. Thanks for letting us know.
With what I had gotten to work didn’t actually fully work, if it had no comment tag at all it would just write () so I combined what you wrote with what I had gotten to work