Advertisement:

Author Topic: [1.1 RC2] vBulletin like Post Display template.  (Read 55771 times)

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
[1.1 RC2] vBulletin like Post Display template.
« 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:
Code: [Select]
.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
« Last Edit: January 07, 2006, 03:35:44 PM by TheMaTrIx »

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #1 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:
Code: [Select]
$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:

Code: [Select]
$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.

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #2 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:

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

so it becomes

Code: [Select]
.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:

Code: [Select]
<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.
« Last Edit: January 07, 2006, 04:03:30 PM by TheMaTrIx »

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #3 on: January 07, 2006, 04:35:48 PM »
Nice.  I'll get this moved to the Tipcs and Tricks board for you :).

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #4 on: January 07, 2006, 04:42:12 PM »
Done.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #5 on: January 07, 2006, 05:34:42 PM »
Its like the absolutely only thing I like about vB and thats how it displays posts !

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #6 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.

Offline lazereth

  • Semi-Newbie
  • *
  • Posts: 17
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #7 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?

Offline lazereth

  • Semi-Newbie
  • *
  • Posts: 17
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #8 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.

Offline evillair

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #9 on: February 24, 2006, 09:31:02 PM »
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...

Offline lazereth

  • Semi-Newbie
  • *
  • Posts: 17
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #10 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.

Offline lazereth

  • Semi-Newbie
  • *
  • Posts: 17
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #11 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.

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #12 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.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline lazereth

  • Semi-Newbie
  • *
  • Posts: 17
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #13 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.

Offline lazereth

  • Semi-Newbie
  • *
  • Posts: 17
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #14 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.

SeaOfSin

  • Guest
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #15 on: March 06, 2006, 05:50:01 AM »
I'd be interested in this to, if someone gets the file

Offline B Patterson

  • Full Member
  • ***
  • Posts: 512
  • Gender: Male
  • Never Miss an Opportunity to be Great
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #16 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.
« Last Edit: March 20, 2006, 10:14:23 PM by bpat1434 »

Offline tomis

  • Semi-Newbie
  • *
  • Posts: 40
  • Hey.
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #17 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.
~

Offline B Patterson

  • Full Member
  • ***
  • Posts: 512
  • Gender: Male
  • Never Miss an Opportunity to be Great
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #18 on: May 10, 2006, 01:16:20 PM »
heh... template parse errors :(

Offline Niteblade

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
    • Prosperent Ads
Re: [1.1 RC2] vBulletin like Post Display template.
« Reply #19 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 ?
affiliate blog