Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: TheMaTrIx on January 05, 2006, 11:56:03 AM

Title: [1.1 RC2] vBulletin like Post Display template.
Post by: TheMaTrIx on January 05, 2006, 11:56:03 AM
I created a post display template much like the vB one with some settings you can do from your themes css file.
This is for 1.1 RC2 only:
Add to your CSS:

.userinfo
{
font-weight: bold;
background-color: #7392B0;
background-image: url(images/userinfobg.gif);
background-repeat: repeat-x;
background-position: left bottom;
}


Replace the display.template.php file with the attached one(if you haven't changed your own themes one that is:

http://downloads.the-dome.org/Display.template.rar

Demo: Here (http://fsgateway.com/discuss/index.php?topic=45884.msg391711#msg391711)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: TheMaTrIx on January 07, 2006, 03:42:20 PM
I changed the "reply" "modify" "delete" and "split" icons to show as icons only (originaly they show as icon+text) with the text apearing as link titles when you move your mouse over them.

I had to use a lil bit of a trick for that.

Normaly its like this:

$reply_button = create_button('quote.gif', 145, 'smf240', 'align="middle"');
$modify_button = create_button('modify.gif', 66, 17, 'align="middle"');
$remove_button = create_button('delete.gif', 121, 31, 'align="middle"');
$split_button = create_button('split.gif', 'smf251', 'smf251', 'align="middle"');

The function builds the link and button by 'imagename', 'text to display', 'Alternate word in case image is gone', 'alignment'

I made the following out of it:


$reply_button = create_button('quote.gif" Title="Quote', 'smf240', '', 'align="middle"');
$modify_button = create_button('modify.gif" Title="Modify', '17', '', 'align="middle"');
$remove_button = create_button('delete.gif" Title="Delete', '31', '', 'align="middle"');
$split_button = create_button('split.gif" Title="Split', 'smf251', '', 'align="middle"');


I added the Title= tag to the image name, closing the src= trough the imput parsed into the function.

This trick helps you to keep the modifications purely in template, without having to change any function (sources) files.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: TheMaTrIx on January 07, 2006, 03:58:52 PM
To be able to change the text color in the userinfo block of the post display, add:


color: #colorcode

to

.userinfo
{
font-weight: bold;
background-color: #7392B0;
background-image: url(images/userinfobg.gif);
background-repeat: repeat-x;
background-position: left bottom;
}


so it becomes


.userinfo
{
font-weight: bold;
background-color: #7392B0;
background-image: url(images/userinfobg.gif);
background-repeat: repeat-x;
background-position: left bottom;
        color=#FFFFFF
}


Now, also a note about the size of the avatar box.
I hardcoded the width for it, I'm using 100px max size for avatars, but I can imagine some people use smaller or bigger.

If you open up display.template.php, search for "// Show information about the poster of this message."

the 4th line under it says:

<td class="userinfo" valign="top" align="left" width="100" style="overflow: hidden;">

Change width="100" to whatever you want to use.

You can also set a height="" there so that the userinfo part always uses the same height, no matter what size avatar they are using.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: dtm.exe on January 07, 2006, 04:35:48 PM
Nice.  I'll get this moved to the Tipcs and Tricks board for you :).
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: JayBachatero on January 07, 2006, 04:42:12 PM
Done.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: TheMaTrIx on January 07, 2006, 05:34:42 PM
Its like the absolutely only thing I like about vB and thats how it displays posts !
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: TheMaTrIx on January 16, 2006, 05:20:49 PM
I did some bugfixes on the template.
For some reason I made the modify button and caption apear where the Quote button was supposed to show :p

Thats fixed now. As far as I know and have seen, there are no problems with this template.

If anyone likes some features added to it. Lemme know.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on February 19, 2006, 05:43:34 AM
I am extremely interested in this change, but the problem I have is that your link goes to a page not found. Is there some other location to download it from?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on February 22, 2006, 02:24:47 AM
Ok I can see that apparently this isnt checked on or anything like that guess will see if anyone else knows the process or can teach me the proper way to go about doing a mod like this without, killing my boards. I would love to have this ability and dont fully understand what parts of code I can move. I do understand layout for webpages but I dont fully understand the in's and outs of php. 

I am afraid to jump into files that I dont fully understand as to possibly mess up my board. I dont have a local install on my computer I do pretty much everything live (I know its a mistake, but I back up all the time to counter my mistakes if and when I do make em)

Can anyone help me out? Send me a pm with some info or something like that. I would even be willing to host a file dl if I could just get this done correctly.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: evillair on February 24, 2006, 09:31:02 PM
Quote from: lazereth on February 19, 2006, 05:43:34 AM
I am extremely interested in this change, but the problem I have is that your link goes to a page not found. Is there some other location to download it from?

I too would like to get this...
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on February 25, 2006, 01:06:15 AM
I am going to sit down this weekend and see if I can get this rolling without doing any dmg, and it looking good. I will try to have something posted later this weekend, got a couple things to get done.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on February 25, 2006, 03:33:20 AM
Nevermind I knew I didnt understand the full aspect of closing tags and what not in php. Thus all I was able to do without getting mass script errors telling me that I had to close out single quotes ' ' often with \ was move everything so its one big column. But all the spaceing is still the same and it just makes everything way to long.  I guess I need to sit down and read more about php before venturing into trying to customize smf.

Good luck at figuring that out, if anyone manages to do it and would be willing to toss it out to others, that would be great.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: JayBachatero on February 25, 2006, 04:38:33 PM
Why don't you jus tuse the file provided on the first post?

Meh I just realized the link is broken.  TheMatrix send me the file to my email so that I can attach it to the first post.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on February 25, 2006, 05:54:03 PM
That would be excellent if we could get an active link to that mod :). I am just not knowledgeble enough in php to do it myself.. I am still in the major learning curve.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on March 03, 2006, 05:16:40 PM
Still no reply on this one? Sorry trying to give it sometime, just really would love to add this to my site. Thank you again.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: SeaOfSin on March 06, 2006, 05:50:01 AM
I'd be interested in this to, if someone gets the file
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: B Patterson on March 20, 2006, 07:28:55 PM
It's honestly not as hard as you guys make it seem.  The hardest part is the index.template.php file.  What you need to change is the column that has the users info into a row with 3 columns: 1) avatar, 2 & 3) user info.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: tomis on May 10, 2006, 01:04:41 PM
I've done a lot of similar stuff on my forum.  Basically just by tweaking Display.template.php.  You can see an example here (http://forums.tomisimo.org/index.php?board=7.0).
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: B Patterson on May 10, 2006, 01:16:20 PM
heh... template parse errors :(
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Niteblade on May 10, 2006, 06:38:51 PM
Link in first post give error 404..

How 'bout making this into a mod so that those of us who already have installed a lot of mods can make use of it ?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: tomis on May 11, 2006, 02:56:48 AM
Quote from: bpat1434 on May 10, 2006, 01:16:20 PM
heh... template parse errors :(
It works fine for me. {shrug} If you're actually seeing errors, could you post them? 
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: B Patterson on May 11, 2006, 08:24:59 AM
well I was seeing errors, but now I'm not...
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: tomis on May 11, 2006, 03:22:16 PM
Quote from: bpat1434 on May 11, 2006, 08:24:59 AM
well I was seeing errors, but now I'm not...
Hmmm you must have made the request right when I was overwriting one of the template files.  That's the only explaination I can think of :)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on May 11, 2006, 03:44:56 PM
Can you please post the code YOU used to create yours? It looks good
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on May 12, 2006, 07:31:23 PM
Damn, this does look good. Can someone please reupload the first one, AND tomis can you do yours please??? That looks sweet man.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Niteblade on May 12, 2006, 08:58:40 PM
Quote from: tomis on May 10, 2006, 01:04:41 PM
I've done a lot of similar stuff on my forum.  Basically just by tweaking Display.template.php.  You can see an example here (http://forums.tomisimo.org/index.php?board=7.0).

I agree with the last poster; your looks the best. Please attach your display.template.php file so we can 'adjust' ours to look like yours. :)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: vnt87 on May 14, 2006, 01:01:53 AM
So what does this mod do, exactly? Does it force SMF to display posts in the legacy style, or it does something else? Sorry if the answer is obvious  :P
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on May 14, 2006, 07:20:33 AM
It has the posters info along the top of the post and not the side :)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: tomis on May 14, 2006, 04:14:53 PM
I'm flattered.  I've had several requests now for me to cough up the template code I'm using or to release the whole thing as a template. I'll have to think about what to do.  Right now I just hacked up the templates to make it look good, with out taking the time to properly document what I did or put the language strings over in the language files.  Also, what I've done includes more than just Display.template.php  You also would have to modify where private messages are displayed, where search results/newest posts/replies to my posts are all displayed.  If I were designing the templating system, I would have had a generic "post" template that got included in all those places, making template modifications a lot easier. (Hint hint, developers :)) I have also modified the forum display and a couple other things.  So to sum things up, the code is a real mess right now :)

What do you all think?  Should I clean it up and package it as a template in and of itself?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on May 14, 2006, 04:19:45 PM
^^lol.

Alright, well I can wait for something amazing like this. I dont know about others. If you could re-do it and document what you did, and post it here, that would be great. I have several mods on my board, and for eas I kept the default template just changed it up alot. I would love for you to just give what you did, rather then making it a whole new set of files....

Thanks man.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Niteblade on May 14, 2006, 04:48:15 PM
Ya - a mod would be best because I already have 20+ mods installed. I can't wait to see what kind of errors I get. But, hey. It just needs to works with a clean install of smf v1.1 rc2 - the rest is my headache. :)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on May 14, 2006, 04:53:00 PM
^^^haha. Good idea
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on May 14, 2006, 05:52:57 PM
Quote from: tomis on May 14, 2006, 04:14:53 PM
I'm flattered.  I've had several requests now for me to cough up the template code I'm using or to release the whole thing as a template. I'll have to think about what to do.  Right now I just hacked up the templates to make it look good, with out taking the time to properly document what I did or put the language strings over in the language files.  Also, what I've done includes more than just Display.template.php  You also would have to modify where private messages are displayed, where search results/newest posts/replies to my posts are all displayed.  If I were designing the templating system, I would have had a generic "post" template that got included in all those places, making template modifications a lot easier. (Hint hint, developers :)) I have also modified the forum display and a couple other things.  So to sum things up, the code is a real mess right now :)

What do you all think?  Should I clean it up and package it as a template in and of itself?

I'd find it easier if you just posted the code lol
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on May 14, 2006, 05:57:23 PM
^^He said, he did more things than doin just a few code edits. Would be good to just post it all, but he needs to do it again, as he said he doesnt really remember what he did. Just wait a few days, hopefully he will get around to getting that together.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: tomis on May 15, 2006, 10:45:06 AM
Quote from: theslam2006 on May 14, 2006, 05:57:23 PM
^^He said, he did more things than doin just a few code edits. Would be good to just post it all, but he needs to do it again, as he said he doesnt really remember what he did. Just wait a few days, hopefully he will get around to getting that together.
LOL.  When I get a spare moment, I'll try to go thru the template files and pull out everything I did.  It's really not that hard though if you know a bit of HTML/Php.  It's basically just moving the stuff around that's already in there.  Give me a couple of days and I'll see what I can do. (I've got to do my real work first though.)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: elpvn on May 21, 2006, 10:23:49 AM
TheMatrix, please correct the link, I need it much but couldn't download your display.template.php life  ???

Thankx
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on May 31, 2006, 06:33:50 PM
Any updates on this?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: trenchteam on June 02, 2006, 04:38:30 AM
I am extremely interested in this as well.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on June 02, 2006, 05:38:21 AM
In the mean time why not use the code from the PNPN theme, it's a perfect version for me.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: trenchteam on June 02, 2006, 05:49:29 AM
I would really prefer the default theme with the vbulletin thats why.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on June 02, 2006, 02:36:50 PM
No I mean why not use the code from that skin in your own.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: moparisthebest on June 05, 2006, 11:58:52 PM
Quote from: L.G.S on June 02, 2006, 02:36:50 PM
No I mean why not use the code from that skin in your own.

it doesnt look as good as his modified one, I dont figure anyone has the original link to repost do they? I would appreciate you forever if you do ;)
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: trenchteam on June 06, 2006, 04:54:03 AM
Doesnt look good at all. I've tried it.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: rockinaway on June 10, 2006, 06:22:35 PM
where is the code for this, I want this kinda thing!
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on June 10, 2006, 06:44:26 PM
^Dude. Read the past pages....waste of a post!
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: rockinaway on June 10, 2006, 06:55:37 PM
none of the past page contain the code :P
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: theslam2006 on June 10, 2006, 07:58:56 PM
Erm. Then your blind.

He said he will try to get to it...he DOESNT have the code yet....so that means, NOTHING has been posted to this....so we all need to wait. Or PM him, and remind him, im sure he forgot.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: farg on July 04, 2006, 03:56:15 AM
Quote from: TheMaTrIx on January 05, 2006, 11:56:03 AM
I created a post display template much like the vB one with some settings you can do from your themes css file.

http://downloads.the-dome.org/Display.template.rar

not exist  :(

where I can download it?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on July 04, 2006, 10:58:03 AM
Mannnn read the previous posts, the one just above you says that they are still working on it
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Alan S on August 28, 2006, 04:29:35 PM
im guessing this topic is dead since no ones after repluing in the last 1 3/4 months with a code oh well!
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: J. Williams on August 28, 2006, 04:33:16 PM
Some theme authors have a similar style such as SMFOne and Pn-Pn :P
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: TheMaTrIx on August 30, 2006, 08:52:17 AM
I'm currently developing a v2.0 version of the site this postbit was intended for.
Once I'm done, I'll post the updated version of the postbit here.

And ps, I'm no template dev, I just shared something I thought people would like to use themselves too.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Alan S on August 31, 2006, 08:00:20 AM
Ok , Cool cant wait for it , I prefer the look of the vB post template ,looks cleaner in my opinion.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: christicehurst on October 25, 2006, 08:24:01 AM
I wonder how this is going guys? It's been at least three months now.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: lazereth on December 07, 2006, 11:31:59 AM
Any update on the Progress of this TheMatrix?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Alan S on December 10, 2006, 02:33:44 PM
I doubt it since he hasnt been active for the best part of 1 1/2 months
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on December 10, 2006, 02:41:32 PM
Come on.. This must be so simple to just post the code into this thread and boom it's done..
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on June 01, 2007, 04:06:47 PM
Guess we're never going to get this?
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: Niteblade on June 03, 2007, 07:44:05 PM
Quote from: L.G.S on June 01, 2007, 04:06:47 PM
Guess we're never going to get this?

I've commissioned a theme that does just this. It's just a matter of the coder finding them time to perform it.
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: brianjw on November 10, 2007, 05:32:21 PM
Can you post the code out of the theme, nite0859? :)
brianjw
Title: Re: [1.1 RC2] vBulletin like Post Display template.
Post by: L.G.S on November 11, 2007, 07:18:03 AM
This is a joke. Why can't somebody just post the code? It's not difficult because the theme creator knows where it is, and they would be helping out hundreds of people.