![]() |
This is a rather old hack I did some time ago for someone, but never really released it as a full hack. :)
Very simple, this hack lets you change the template the first post is using (in either all forums or only one), so it can look differently. Great for article and review forums. :D Before installing the hack, create a new template named "postbit_first" from the current "postbit" template. After you're done, you can edit that template and it will control the first post in the threads. Everything else you need is in the attached file, have fun! :) Chen |
Great for my reviews forum, thank you Firefly. Well done :up:
|
That 'someone' was me :D You can see it on my forums in the 'zine' section. Definitely a great addition to my board, and still my favourite hack :)
|
creepy, I needed this very hack yesterday....
none the less, excelent job!! now I get to us it! :D |
is anyone else getting a parse error in showthread.php? i just installed it on my win32 test server.
|
Im trying to get it working on 2.2.0, anyone had any luck Im getting a parse error in showthread :(
PHP Code:
|
could I seee a pic, pleas anyone?
|
Yes can we have a picture of this in action please :D
|
Quote:
Chen, this is an absolutely brilliant hack for my forums as I have a sponsor and needed to get my sponsor's ads in the faces of people who clicked through to my news articles from other sites. With this hack, I can do that with ease! THANKS!!!!!!!!! |
Screen Shot!
I've edited the left column (the one that usually contains username, registered date, # posts, etc) in the postbit_first template to include basic information about the poster (as they're staff) and an iframe with my sponsor's ad in it. Of course, the great thing about this hack is it's completely customizable. You can edit the postbit_first to look however you want it to! |
Quote:
Code:
Warning: Missing argument 2 for iif() in ./admin/functions.php on line 569 |
Sorry dost, but I'm no hacker. I just stumbled across that fix by accident and it worked for me.
|
And I got this:
Missing argument 2 for getpostbit() in /usr/www/users/gandalf/starwarsguide.com/forums/admin/functions.php on line 57 Line 57 is this: function getpostbit($post,$templatename) { also, my showthread.php has this: $postbits = getpostbit($post); (notice no period in front of the equal sign?) but I still replaced it with: $postbits .= getpostbit($post,iif($counter==1 and $pagenumber==1, 'postbit_first', 'postbit')); Using 2.2.2 |
* gentle bump *
:pleased: |
Reinstall the hack SirSteve. :) Trust me...
|
Quote:
I even did it twice last night! I guess one shouldn't do hacks late at night! :D Thaks FireFly! |
Any way to make it not include the other stuff like Forum Jump, Rate Thread, Author text, New Thread/Post Reply and Forum Rules? I basically don't want my News section to look like the forums.
|
Are you sure that this hack is working FireFly?
|
It is working. Look here:
http://www.sirstevesguide.com/forums...&threadid=3963 Now I just need to get rid of all that other "Forum" stuff so it looks more like a News page! :) |
Well, now I am getting this error:
Warning: Missing argument 2 for getpostbit() in /usr/www/users/gandalf/starwarsguide.com/forums/admin/functions.php on line 57 Guess what line 57 is? function getpostbit($post,$templatename) { However, the hack IS working on the specified forum but this is not one of them! Help! |
Problem.
All my old posts are working fine. But NEW posts made into the specific forum all have an invisible first post?? The post IS still in the database, because you see it at the bottom of the page when you reply... Any ideas?? New Post with invisible: http://forum.racesimcentral.com/show...threadid=24433 Old post visible: http://forum.racesimcentral.com/show...threadid=21590 |
SirSteve
If I remember rightly there's two VERY similar lines in functions.php, one has a . (dot), one doesn't. You're editing the line without a dot. So it's trying to call the script in an area it can't. You have to edit the EXACT line the hack readme tells you to. (from memory) you edited function getpostbit($post, the readme says to edit function .getpostbit($post - notice a dot? :) |
Hmm...! It seems that only the user I've setup in coranto to post news is able to post threads correctly. This is fine and I'll create a sub forum for users to post their news. :)
|
Well, I can't remember what I edited but no errors since so I'll leave it alone until one pops up. I still want to get rid of other stuff that looks like the forums (Forum Jump, Rate Thread, Author text, New Thread/Post Reply and Forum Rules)!
|
Yuck... Firefly it's still doing this to me:
http://forum.racesimcentral.com/show...threadid=24445 |
Click contract all.
|
Are you sure you created a new postbit_first template?
|
Hmm... it seems to be working now that people have replied...
|
I guess there is no hope to get the other "Forum" parts (as described in an earlier post) removed from this first page... :(
|
Quote:
|
There is definately a bug with this of some sort, it's that to see the 1st post on my board, you have to click 'contract all' :)
So I just have to edit my template. Maybe you could mention this in your first post Firefly? :) Thanks to the guy who said about this ;) |
I have the same hack installed (contract/expand) and mine works just fine. I do have another bug though...
Warning: Missing argument 2 for getpostbit() in /usr/www/users/gandalf/starwarsguide.com/forums/admin/functions.php on line 57 |
Gang, this is a very easy hack to do but it can take hours of work to get the templates right - depending on what you want to do with it. If these directions aren't quite right, check out the original instructions on vbulletin.com.
Amy |
Quote:
|
Thanks Amy. :) It took me a while to figure out that the invisble post was because it was 'minimised', to only visible when I clicked expand all. Then I had to setup the template to counter this. Once I did it now works like a dream. :)
|
If anyone wants the template I've used to make this:
http://www.racesimcentral.com/images/news.gif Use and modify this: (NOTE: this uses the expand/contract hack!) Code:
<table bgcolor="{pagebgcolor}" width="90%" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td><td width="100%"><!-- spacer --> |
Is your style still showing the other forum options like Author, New Thread and Post/Reply buttons?
|
Yes it is - but I need it to anyway :D
|
Do you see a way of getting rid of it?
|
No because the first post hack this is just edits what's shown on my screenshot, and then only on the first post. But what you want to do can be done (VERY EASILY).
Create another set of templates, edit the showthread and postbit templates, then under 'Forums & Moderators' click modify, then edit the forum you want to use those templates, and simply under 'Style Options' select the style you want it to use then 'yes' to 'Override users custom styles'... There ya go. ;) I'm sure someone with a bigger talkin tongue can type this out for more of an explanation. ;) |
All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|