1 (edited by MattF 2008-07-29 07:34)

Topic: Just looking at Trac

Example from changeset 316, (I believe), for the PM mod:

<span class="submit"><input type="submit" name="pm_delete_<?php echo $type ?>" value="<?php echo $lang_pun_pm['Delete message'] ?>" /></span>

Would it not be preferable as such:

<span class="submit"><input type="submit" name="pm_delete_<?php echo $type.'" value="'.$lang_pun_pm['Delete message'] ?>" /></span>

Edit: Could you shift this over to extensions, btw. Realised I've popped it in the wrong section. smile

Re: Just looking at Trac

Thank you for your remark.

Pun Private Messaging is nearly beta now. HTML output isn't optimized yet (in contrast to the code like SQL-queries) since the appearance can be (and will be smile) changed after testing. As you can see, the line you had pointed at has been changed since then. Finally I'll make a global code tidying and fix ambiguous places like this.

Re: Just looking at Trac

Hmm. Though I still like this one as it is more clear to read:

<span class="submit"><input type="submit" name="pm_delete_<?php echo $type ?>" value="<?php echo $lang_pun_pm['Delete message'] ?>" /></span>

Though this way is also clear enough and might be even faster (a bit :-)):

<?php echo '<span class="submit"><input type="submit" name="pm_delete_', $type, '" value="', $lang_pun_pm['Delete message'], '" /></span>'; ?>
Carpe diem