Advertisement:

Post images (sort of like costumes i guess lol)

Aloittaja Jade Elizabeth, lokakuu 14, 2007, 01:31:35 IP

« edellinen - seuraava »

Jade Elizabeth

omg im so excited about this idea it took me 3 minutes to find the new topic button!!!

i wanna mod that allows me to assign patterns or images to the post of a user

so
if i assign myself this image:
(by the way i wouldnt, i just thought it would be funny)



it would show like this on EVERY POST IVE EVER MADE AND ANY MORE I MAKE!!




http://www.jades-world.com/forums/index.php?topic=238.0  <here you can see how popular the idea is on my forums



it shows as 50% transparent, on the bottom right (or left if you wanna specify) of the post. text goes over it. or you can set it to go around it if you wanna, or make the image more opaque.

so i can assign these on a per user/per group basis. if the user is also in a group, the users personal one takes over.
mods can assign their own but no one elses.
no one but admin can remove or change them (unless their mods and have such permission)

the image doesnt stretch to fill the whole post

admin makes and imports their own images, or if you wanna, you can make preset images, or i will :D to be of help.

images can also be text...if you want to make a text image i guess.


or for patterns, it stretches in height only to reach the top of the post.
so you have to specify "image" or "pattern"  :D

i would pay, but i have no money, have no way of getting money, so instead i offer to make graphics, as im good with that i think :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

ALEJO

Lainaus käyttäjältä: Alundra - lokakuu 14, 2007, 01:31:35 IP
omg im so excited about this idea it took me 3 minutes to find the new topic button!!!
lol!... its a good idea... but it would make the forum slower doesnt?
solo el mas paranoico sobrevive

Jade Elizabeth

not necessarily

you could make the images so small in file size that it didnt take a toll

:D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

can someone pleeeeeeeeeeeeeeeeeease make this

ill do a free portrait of the user who does it
and post it
the original
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

heres some incentive...

http://www.jades-world.com/images/artwork/p91.jpg
above drawn from http://i18.photobucket.com/albums/b108/yuk75/0626071522.jpg

http://www.jades-world.com/images/artwork/p57.jpg
no longer have photo :(

bad photo, but oh well http://www.imgfree.net/images/1637.full.jpg
and i dont have that photo either :(


ill get a recent one up soon lol, as im working on someones, who has the face of an angel i swear lol
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

metallica48423

it wouldn't be terribly hard to do -- a new user setting with a call to it in Display.php and placed in display.template.php

any modder have any ideas?  I know my forum members would like this as well
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

1MileCrash

Not even that complicated, Blackmage.

This can be done with a custom profile field alone. User enters URL of image in profile field, and then you just style that table in display.template with the created variable, like:

style="background-image:url(',$customfield['assignedimage'],'); background-repeat: no-repeat;....ETC

I'll whip it up in a bit.
The only thing php can't do is tell you how much milk is left in the fridge.



Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

1MileCrash

There's nothing to really be completed, and it's not really a mod. Keep in mind the images won't automatically turn "purpleish" - meaning if someone uses a white background with white text then you just won't be able to read it. You could use the php GD image function but that's beyond me, im not familiar with it.

Profile.template.php:

look for:

<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td>

after that, add this:

</tr><tr>
<td><b>Post Image: </b></td>
<td><input type="text" name="default_options[postimage]" size="50" value="', @$context['member']['options']['postimage'], '" /></td>


Display.template.

Find this:

     // Done with the information about the poster... on to the post itself.
      echo '
                     </div>
                  </td>
                  <td valign="top" width="85%" height="100%">


delete it and replace with this:


    // Done with the information about the poster... on to the post itself

echo'

', !empty($context['member']['options']['postimage']) ? '</div>
                  </td>
                  <td valign="top" width="85%" height="100%" style="background-image:url(' , $context['member']['options']['postimage'] , '); background-repeat: no-repeat; background-position: right;">' : '</div>
                  </td>
                  <td valign="top" width="85%" height="100%">', '


And that should do it. Your members would enter the URL of the image itself.
The only thing php can't do is tell you how much milk is left in the fridge.



Altair

Would you have to add this to custom themes too?

1MileCrash

if they have their own display.template or profile.template.
The only thing php can't do is tell you how much milk is left in the fridge.



Altair

#13
Alright, thanks Tippmaster. If I may, I would recommend this as a mod. Easy enough to make it into one and I can see plenty of SMF users that might come it in the Mod Section(If added) that would be interested in it. IMO :)

Is there any way to set it so the images cannot be large then a certain pixel in height?

Jade Elizabeth

ahh i tried the code several times, it works fine in the profile but not the display template, heres that block of code if it helps

// Done with the information about the poster... on to the post itself.
echo '
</div>
</td>
<td valign="top" width="85%" height="100%">
<table width="100%" border="0"><tr>
<td valign="middle"><a href="', $message['href'], '"><img src="', $message['icon_url'] . '" alt="" border="0" /></a></td>
<td valign="middle">
<div style="font-weight: bold;" id="subject_', $message['id'], '">
<a href="', $message['href'], '">', $message['subject'], '</a>
</div>';


how can i make it so that only admin can assign images?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

winaje

I get the following error when checking the test topic I created.  I've double checked that I have got exactly the same code as entered above...

Any help appreciated, thanks.

Template Parse Error!
There was a problem loading the /Themes/default/Display.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected ',' in .../Themes/default/Display.template.php on line 382

373: <br />
374: <a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';
375:
376: // Done with the information about the poster... on to the post itself
377:
378: echo'
379:
380: ', !empty($context['member']['options']['postimage']) ? '</div>
381:                   </td>

382:                   <td valign="top" width="85%" height="100%" style="background-image:url(' , $context['member']['options']['postimage'] , '); background-repeat: no-repeat; background-position: right;">' : '</div>

383:                   </td>
384:                   <td valign="top" width="85%" height="100%">', '
385: <table width="100%" border="0"><tr>
386: <td valign="middle"><a href="', $message['href'], '"><img src="', $message['icon_url'] . '" alt="" border="0" /></a></td>

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

it works if you change

(' , $context['member']['options']['postimage'] , ')
to
(' . $context['member']['options']['postimage'] . ')

well for me it did :P

thanks so much for your help :(
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: