MyBB Hacks

Full Version: Template Conditionals
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
str_replace isn't a valid function allowable inside the <func> tag
(03-14-2010 10:12 AM)ZiNgA BuRgA Wrote: [ -> ]The functions available, with the shortcut, are:
htmlspecialchars, htmlspecialchars_uni, intval, file_get_contents, floatval, urlencode, rawurlencode, addslashes, stripslashes, trim, crc32, ltrim, rtrim, chop, md5, nl2br, strrev, strtoupper, strtolower, my_strtoupper, my_strtolower, alt_trow, get_friendly_size, filesize, strlen, my_strlen, my_wordwrap, random_str, unicode_chr, bin2hex, str_rot13, str_shuffle, strip_tags, ucfirst, ucwords, basename, dirname, unhtmlentities

Try

Code:
<?=str_replace("\n", ', ', $post['fid6'])?>

Simple 2 words: Thank you.
Updated to v1.7 - fixes a possible function call exploit.
How would I get the following to work?

Code:
<if {$mybb->user['avatar']} != '' then> 
          <div class="avatar" style="background-image:url('{$mybb->user['avatar']}');"></div> 
</if>

Something like this:

Code:
<if $mybb->user['avatar'] != '' then><div class="avatar" style="background-image:url('{$mybb->user['avatar']}');"></div></if>

(12-12-2012 06:08 AM)RateU Wrote: [ -> ]Something like this:

Code:
<if $mybb->user['avatar'] != '' then><div class="avatar" style="background-image:url('{$mybb->user['avatar']}');"></div></if>


Ah, thanks. Just had to drop those curly brackets.
Hi,
Is this plugin doesn't slow down the board?
Thanks
What?
Define "slow down the board".
(01-31-2013 09:25 AM)ZiNgA BuRgA Wrote: [ -> ]What?
Define "slow down the board".

what I mean: is this plugin does not affect (negatively) site performance (by adding a lot of work to CPU) when used many times in templates? (I hope I'm clear now)

sorry for my bad english.
It depends on what you mean by "a lot of work" (PHP script execution time? additional CPU cycles? memory usage?), as well as what you mean by "used many times" (ten instances? a hundred instances? what templates? what code?).

Pretty much all plugins will have a negative effect on site performance.  It's up to you whether you think the trade off is worth it.
Pages: 1 2 3 4 5 6 7 8 9 10 11
Reference URL's