Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: sattninja on June 22, 2010, 08:37:22 PM

Title: adding some lines or boxxes
Post by: sattninja on June 22, 2010, 08:37:22 PM
hi i have been able to rearrange the items under a members avatar in the display.template.php  however is there a way i can clean this up a bit see image

(http://i47.tinypic.com/28cn1o3.jpg)

what i would like to do is either put some boxxes around the items or one box around everything or even simply put lines in between the items

thanks in advance

i have attached the display template just in case
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 22, 2010, 08:40:41 PM
Which items would you like boxes around?
The icons below of the text, or both?
Title: Re: adding some lines or boxxes
Post by: sattninja on June 22, 2010, 09:03:24 PM
ok i will try to explain it the best i can

i would like a  box around each item
posts

joined date

country

then a single box around the thank you info

then a box around the last log in

if not boxxes a line seperating each would be ok also i am no sure how it would look but once i see how it is done i can play with it

thanks alot

Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 22, 2010, 09:04:23 PM
Give me a few minutes, let me see what I can do :)
Title: Re: adding some lines or boxxes
Post by: sattninja on June 22, 2010, 09:05:22 PM
sweet thanks
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 22, 2010, 09:36:54 PM
I have added something for the Avatar only, so you can see what it looks like, the code is


            // Show avatars, images, etc.?
            if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
                echo '
                               <form><fieldset><legend><li class="avatar" style="overflow: auto;">
                                    <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
                                        ', $message['member']['avatar']['image'], '
                                                                            </a>
                                </li></legend></fieldset></form>';



Also attached.
Title: Re: adding some lines or boxxes
Post by: sattninja on June 22, 2010, 09:42:01 PM
thats perfect but what exactly did u add what part of the code
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 22, 2010, 09:44:37 PM
I used the HTML Legend tag, usually, it would span across the entire area, since the area where the user information is is small, spanning the entire area is not too bad, since the content spans the area too.

look for the form, fieldset and legend tags and apply to the other objects, its pretty simple.

P.S send a screen shot of the new layout :P
Title: Re: adding some lines or boxxes
Post by: sattninja on June 22, 2010, 09:53:52 PM
well if i even knew what the hell you were talking about that would prolly help anywho the only difference i see is the

              </a>
                                </li></legend></fieldset></form>';

i tried adding that after the date registered

//Show date registered
         echo  '<li>', $txt['join_date'], ':  ', timeformat($message['member']['registered_timestamp'] ,'%b %d %Y'), '</li>';
                                                                                     </a>
                                </li></legend></fieldset></form>';

and i get parse error
syntax error, unexpected '<'
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 22, 2010, 09:58:02 PM
That happened because you added html outside of the echo''

Tip: start where the Tip is ie." // Show date registered"

You can only add HTML after and echo inside the ' and 'so...
1. find the echo' add html after that and before the final ';

//Show date registered
         echo  '<form><fieldset><legend><li>', $txt['join_date'], ':  ', timeformat($message['member']['registered_timestamp'] ,'%b %d %Y'), '</li>';
                                                                                     </a>
                                </li></legend></fieldset></form>';
Title: Re: adding some lines or boxxes
Post by: sattninja on June 22, 2010, 10:31:00 PM
well thanks for the help man but it just is not workin for me i just replaced the code that wasthere with the code you posted and it gave me an error again then i tried doing what you say and no error but no box either

thanks for trying tho appreciate it
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 22, 2010, 10:49:28 PM
With a little more practice you will get it, If you like I can do them for you, just give me a day or so, I'm doing other things too
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 05:05:18 PM
i found a perfect example the boxxes are a lil dark but this is exactly what i am trying to achieve

(http://i45.tinypic.com/ehyafd.jpg)
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 23, 2010, 05:08:23 PM
Just to let you know, I had made those legend tags go around everything in the user information area their.

Mine looked just like that, when it was almost complete.
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 05:10:41 PM
ok i have benn playing with it but i cannot get it to work i am pretty much fed up man are you going to have time to do the edits for me ?
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 23, 2010, 05:15:14 PM
Yes, I will do them, I just lost all the edits I had, attach a fresh copy of your Display.Template.php I will grab it later and attach it back, do not make any more modifications until Im done with it as upon re uploading of my attachment you will lose any changes you have made, including mods.
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 05:45:00 PM
thanks man i appreciate this i have made some changes since you last loked at it i am attachng a current file and here is a pic of what it exactly looks like now

(http://i50.tinypic.com/21m9094.jpg)
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 05:47:34 PM
you know on another subject can you tell me lookin at this picture do you see how the award image is off i think it should be under the word awards do you know how to fix that

sorry for bein a pia

keep in mind all that is right below the avatar

thanks again
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 23, 2010, 05:53:23 PM
you would find where the Awards mod has edited the file and once again inside the echo, after the code for the awards mod, you would add a <br />
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 06:01:24 PM
// Any custom fields for standard placement?
         if (!empty($message['member']['custom_fields']))
         {
            foreach ($message['member']['custom_fields'] as $custom)
               if (empty($custom['placement']) || empty($custom['value']))
                  echo '
                        <li class="custom">', $custom['title'], ': ', $custom['value'], '</li>'<br />;
         }

that is the code as you can see i added that to the end and i get a parse error i am really not understanding what i am doing wrong man this doesnt seem that hard

the error shows syntax error, unexpected '>'
Title: Re: adding some lines or boxxes
Post by: CapadY on June 23, 2010, 06:11:11 PM
// Any custom fields for standard placement?
         if (!empty($message['member']['custom_fields']))
         {
            foreach ($message['member']['custom_fields'] as $custom)
               if (empty($custom['placement']) || empty($custom['value']))
                  echo '
                        <li class="custom">', $custom['title'], ': ', $custom['value'], '</li><br />';

Give the above code a try ;)
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 06:26:25 PM
inserted the code good news is no errors

bad news no change maybe it is controlled somewhere else i will put a post up in the mod support post
Title: Re: adding some lines or boxxes
Post by: ɔɔɔɔɔɔuɥoɾ on June 23, 2010, 11:22:33 PM
That's not the right area to add the line space, search the file for the awards mod, its labeled there.
Title: Re: adding some lines or boxxes
Post by: sattninja on June 23, 2010, 11:28:36 PM
OK will take a look tomorrow man thanks
Title: Re: adding some lines or boxxes
Post by: I B D on July 11, 2010, 02:24:25 PM
sattninja did any of the posts help?
Title: Re: adding some lines or boxxes
Post by: sattninja on July 11, 2010, 02:28:16 PM
no still havent got it but no big deal