Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
echo
y2kbg
New
well i guess this is directed to wallphone becase it came from one of his extensions.
Why do you use three echos? is it so it can be read by looking at php source but it would be on one line when viewing html source? what would be the purpose of that?
echo '<ul><b>'.$this->Context->GetDefinition('Friends_RecievedRequest').'</b><li id="AcceptFormPrecursor"><a onClick="document.getElementById(\'FriendAcceptSubmit\').style.display = \'list-item\'; document.getElementById(\'AcceptFormPrecursor\').style.display = \'none\';">' . $this->Context->GetDefinition('AcceptFriend') . '</a></li>';
echo '<li id="FriendAcceptSubmit" style="display: none"><form id="frmFriendAccept" method="post" action="' . GetUrl($this->Context->Configuration, 'account.php', '', 'u', ForceIncomingInt('u', $this->Context->Session->UserID)) . '">';
echo '<p><input type="hidden" value="' . ForceIncomingInt('u', $this->Context->Session->UserID) . '" name="friendid" /><input type="submit" value="'.$this->Context->GetDefinition('AreYouForSure').'" /></form> <a onClick="document.getElementById(\'FriendAcceptSubmit\').style.display = \'none\'; document.getElementById(\'AcceptFormPrecursor\').style.display = \'list-item\';">' . 'Cancel' . '</a></p></li></ul>';
Why do you use three echos? is it so it can be read by looking at php source but it would be on one line when viewing html source? what would be the purpose of that?
0
This discussion has been closed.
Comments
<?php foreach ($row as $item) { ?> <div class="thing"> This is item is called <?=$item['title']?>. </div><?php } ?>
Echos are used all over the place in Vanilla, is there a beneficial reason for this?
I was actually just wondering why he uses 3 echos instead of 1 big one.
I usually don't notice if I am using unnecessary echos. You can go in and out of PHP any time you want, in a loop or whatever, but I try to avoid it because I find the <?php ?> brackets are so hard to type.
I suppose a reason to do this would be to make it easier to cut and paste snippets to move them around. Just make sure each echo belongs to its own opening and closing XHTML element.
But what really confuses me is why that code is from your friends extension?
here is the Credits table i made up:
Thanks To:
EDIT: Dang every time I think of the "Wall Extension" I think you, wallphone, was the creator. oops so this question was actually meant for pol then I guess.