The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Alternate First Post
When trying to change the HTML of the fist post so you get a different look for the initial post (like they do for the mods section here), I've been using:
PHP Code:
But I don't think that's the best way to do this. And I've been searching for hours now, but postbit is such a common term here, that I can't really make any headway. What's the best way to achieve the look that they use here on vb.org? I'm using an alternate style to accomplish this. But I want the first post to be the only thing different. |
#2
|
||||
|
||||
|
#3
|
||||
|
||||
Perhaps even more then I was looking for. Didn't expect to find something that kept the post on every page. Thanks. I'll consider it.
But, I was hoping to be able to do the editing manually. Something more along the lines of some basic <if> conditionals and where to put them. |
#4
|
||||
|
||||
I'm playing with this on my test site. I only wanted to change the first post for one of my forums though. I created a plugin at "postbit_display_complete" and put in:
PHP Code:
|
#5
|
||||
|
||||
I was hoping for something straightforward just like that. I'll give it a try and post back. Thanks a bunch.
|
#6
|
||||
|
||||
Hrm, seems I get one of those repetitive Parse error: syntax error, unexpected '{' in FILE PATH/includes/class_postbit.php(296) : eval()'d code on line 207 at the top of the page. No changes either. Should I have made a file edit to postbit.php as well?
EDIT: Hrm, it appears there was a parenthesis missing in the plugin code. At the very least, changing this [firstpostid]) to this [firstpostid])) took care of my problem. <perplexed> --------------- Added 04 May 2008 at 05:20 --------------- Another quick question, if you don't mind. Do I need to create a separate plugin for each forum ID, or can I separate forum IDs in the plugin code just by separating them with a comma? |
#7
|
|||
|
|||
Quote:
PHP Code:
|
#8
|
||||
|
||||
Whoops. Looks like when I copied the code from my template and erased part of it, I left an extra parenthesis in there. Sorry about that. I fixed it above. If you want it for several forums, see Opserty's post to use the array for forumids.
|
#9
|
||||
|
||||
Heheh, that's okay. Seems to be working perfectly for me. Many thanks to both of you. I created a template called postbit_articles with the custom HTML, and it's working just the way I had hoped. The only minor little thing I ran into is a small null is not an object error after editing a post in the full editor. Is it possible I left something out in the recreation of the postbit?
|
#10
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|