![]() |
First post on every page of thread.
I had a use for it, so I thought I would share it.
Requires no file edits (Thanks Kirby!). Adds no quarys when viewing threads :) This is something like here on vbulletin.org , it allows you to select forums where the first post of the thread is shown thru out the thread. It uses stock template looks now , if someone wishes to make a template and share it feel free. I will offer support as I can. Ps. If you install this hack please click the install :nervous: Templates for first post: https://vborg.vbsupport.ru/showpost....&postcount=124 https://vborg.vbsupport.ru/showpost....&postcount=161 |
Oh man, just what I needed. I couldn't wait for it to be ported! :D Thanks ALOT :).
|
Quote:
|
wowow thats what i was waitting for
|
For some reason, it won't work with Geshi. It'll give me this: http://www.programmersforums.com/sho...hp?p=51#post51
|
Did you add the new template ?
|
Quote:
::EDIT:: it works flawlessly, thank you :). |
Quote:
|
It seems that the template is uncached because if you goto: http://www.programmersforums.com/sho...hp?p=51#post51 and scroll to the bottom, it seems to be adding a query?
::EDIT:: it says this only for me but: Page generated in 0.20585 seconds with 10 queries (1 queries for uncached templates) Uncached templates: postbit_first (1) |
Ok , I am looking into it now (I know how to do it hard code, but I will find the plugin and update it with update instructions in a few)
|
Quote:
|
Update on a small problem with template cache ,I fixed the zip if you already downloaded you can use this xml in 'plugins' not in product and it will fix it.
|
what about the attachments ! hope u do it soon
|
Attachments should show in the first post (if it had attachments) I will go check.
|
Quote:
open showthread.php find PHP Code:
PHP Code:
PHP Code:
|
The file edit can't be done via a plug-in?
|
None that I have found effective. If you look at the showthread.php you will find no hooks inbetween where it 'has' to be called with out adding a quary.
So I went with this option one line of code adding is better then one quary ;) |
Maybe Kirby will come to the rescue. ;)
|
/me hides from the all knowing Kirby
But I still think one line added is not too bad, yet if someone can offer a more viable solution using hooks I am willing to listen. |
No, sir, it isn't bad at all. But no file edits are even better. ;)
|
Quote:
|
Did you really think I wouldn't be ready for this? LOL
But no added query and no file eidt is the best! ;) |
[high]* vBintense kicks boofo out of my thread until he clicks intall !!!
[/high] I did look though , I may be blind but I could not find a way not to edit the file ;) |
And there may ne no way around it. But if there is a way, Kirby is the one who will find it. ;)
[high]* Boofo will install when the file edit gets taken care of or Kirby can't find a way to do it. ;)[/high] |
[high]* vBintense looks for the all knowing Kirby to point him into this thread :)[/high]
|
[high]* Logikos clicks install because I will use this later. File edit or not :)[/high]
|
Thanks a lot! You're my Hero :)
|
Guess what, I hate File Edits :D
Hook: showthread_query PHP Code:
Don't think there is a way to get this working too without a File Edit, but i'll take a further look. |
Quote:
damm, almost :( |
After looking over the Code for a while, I found a solution that also works for Attachments :)
Hook: showthread_post_start PHP Code:
PHP Code:
By unsetting $thread['attach'] in showthread_post_start, the original $attachments query will not be executed. Then the Plugin on showthread_query runs this Query - with the Postid for the First Post and then restores the original Value for further processing. |
I will try that in a bit , but looking at the second hook code it looks like should be
PHP Code:
|
Edited my last post.
The first Hook was missing a check for $forum['showfirstpost'] |
kk , may I use your change in my update later?
|
Feel free to do whatever you want with the Code :)
|
Many thanks (will test it out, then update once I am more awake).
[high]* vBintense bows down to Kirbys hook knowledge and gets ready to invite boofo back into the thread [/high] ;) |
Update: Thanks to Kirby the file edit is no longer needed, if you have installed before now just simply remove the file edit and upload this xml to 'plugins' not to products.
Now that this does not use file edit maybe a mod can move it to plugins? The zip has been updated with the new product. |
Moved :)
|
I tryed it , via the plug in, they connect to the product (looking at the plugin xml) so it should all tie in should it not?
|
Yes. AFAIK older Versions did not export the Product, but this XML contains it and therefore they will attach. Already removed the sentence from my last Post before you posted ;)
|
I posted to fast then !! :)
Thanks for moving it Kirby , also for teaching me something new about plugins :) |
All times are GMT. The time now is 10:57 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:
|