MyBB Hacks

Full Version: PHP in Templates / Complex Templates
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 12 13 14 15 16 17 18 19 20 21 22 23 24
You would need a dedicated plugin for that unfortunately.
I have an idea for that using Rate'U´s plugin xtlastest_videos_on_profile.php

I´m not sure but if you too think that, it will be possible
Hello,
Dear ZiNgA BuRgA,

i have idea to use some code with this great plugin, but i need your help.


so:
i want to create one custom field for users , custom field type most be check box.
for example : i want to have this words for chose:
----------------------------------------
phone
car
home
shop
bike
plane
---------------------------------------
so i want upload a photo for any of them and when users chose one OR have Multiple chose . the code get info and show that photos in post-bit like there users chose.

i think its possible with getting status of any chose in that custom field, from data base. but i need help and complete code ?

Thanks
You're not making much sense.
If English is difficult for you, please try asking someone more familiar with it to translate for you.
maybe some, but that post have the mean of what i want...
look i want show the "my things" for any user on there user post-bit , { LIKE in VB script } OK ?

see this pictures :
http://upload7.ir/images/60509601434328168415.jpg
http://upload7.ir/images/57042321471189846513.jpg

but on mybb we can't do that easily. if we want to show any user Choice we have to ad this code in post-bit template :  

Code:
<img src="images/platforms/{$post['fidX']}.png"/>

or

Code:
<if $post['fidx'] then>
<img src="images/platforms/{$post['fidX']}.png"/>
</if>

in this case that can just show one photo and one Choice , but i need to show Multiple Choice photos

I dunno, maybe this might work

PHP Code:
<?php
foreach(explode("\n", $post['fidX']) as $val)
  echo '<img src="images/platforms/'.$val.'.png"/>';
?>

Thanks for Reply
that work now.
----------------------------------------------------
if possible give some style:

if there is no any Choice form user >>> so style and images all get hide :
for example:

Code:
<fieldset class="postbit">
<img src="images/platforms/'.$val.'.png"/>
</fieldset>

HTML is something for you to figure out.
I'm a bit confused. I don't fully understand the license.

The answer is most likely no, but am I allowed to use and include this plugin into a theme I'm designing and planning to release?

Just asking, to be certain.

Regards,
darkhorus

EDIT:

So apparantly I can http://www.gnu.org/licenses/gpl-faq
Thank you so much for taking the time to do this, I'm sure it'll greatly benefit the community.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Reference URL's