The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi guys,
I would like to be able to choose "Template to Use" in forum block manager in Type "New forum posts" just like in html page. How can i configure it so i will be able to set "Template to use" in new forum posts too? |
#2
|
|||
|
|||
![]()
You can't select the template for a "New Posts" block. You can edit or replace the block_newposts template, but that will of course change the template for all "New Posts" blocks you have (if you have more than one).
|
#3
|
|||
|
|||
![]()
If i pay to someone,can he do it?
Like make that option? |
#4
|
|||
|
|||
![]()
Then you need to post in Requests for Paid Services section if you want to pay someone
|
#5
|
|||
|
|||
![]()
But is that possible?
|
#6
|
|||
|
|||
![]()
It is possible. In fact, I don't think it's very difficult. In file includes/block/newposts.php, make this change, around line 81:
Code:
'datecut' => array( 'defaultvalue' => 30, 'displayorder' => 5, 'datatype' => 'integer' ), 'template' => array( 'defaultvalue' => 'block_newposts', 'displayorder' => 6, 'datatype' => 'free' ), ); public function getData() the part in red is added. Note that there's an added comma on the existing line before the added 'template' block. Then around line 209: Code:
// trim the title after fetching the urls $postinfo[$key]['title'] = fetch_trimmed_title($post['title'], $this->config['newposts_titlemaxchars']); } $templater = vB_Template::create($this->config['template']); $templater->register('blockinfo', $this->blockinfo); $templater->register('posts', $postinfo); return $templater->render(); This seems to work but is missing the phrases for the labels on the config page. I'm sure that's just a matter of figuring out what the phrase name should be. Also if you have existing new posts blocks I'm not sure if they'll get the default value. They may disappear until you edit them and save them with a template name in the new field. |
#7
|
|||
|
|||
![]()
That should work but in the
admincp/index.php?loc=plugin.php%3Fdo%3Dproduct There is no option to set a template, can someone assist further? |
#8
|
|||
|
|||
![]()
Do you mean when you want to actually set the template used by a New Forum Posts block? Then you'd go to Forums & Moderators > Forum Blocks Manager, and when you add or edit a New Forum Posts block you should see a field for template name. But as I mentioned above, you won't see it labled unless you also created the appropriate phrases (and I was too lazy to figure out what they should be named when I wrote that post).
Edit: oh, I see now that you're the one who originally asked the question, and it sounds like you understood this already. So maybe I don't understand the question. |
#9
|
|||
|
|||
![]()
Yes, now i absolutely understand, but when i ask people for a quote it goes to $150 and i wonder if someone can help or should i go and pay that much?
|
#10
|
|||
|
|||
![]()
Have you tried to do the changes above? I think that's most of it, unless I didn't understand what you wanted.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|