![]() |
Default Pre-selected Post Icon
Here's a simple little hack that allows you, the Admin, to select a particular post icon that will be pre-selected when a member goes to post a new thread or new reply.
This is a bit different from the built-in option, "Show Default Post Icon" in the "Thread Display Options (showthread)" section, which only shows the icon you set if a message doesn't have an icon saved with it. I decided I would rather have a particular icon pre-selected when a member starts a new post, rather than displaying one later if no icon was selected. This is a simple install: Download the XML file and add it as a product. No template edits, no uploads. That's it! :) |
Can you have a different one for each forum?
|
Yes you can. I'll show you how. Unfortunately I don't have a lot of time to figure out a more elegant solution, so you're going to have to manually add another plugin and edit the plugin to suit your needs. I'll show you how.
First, in your Admin CP, Plugin System section, go to Add New Plugin. Set the Product to Default Post Icon. Set the hook location to newthread_forum_start. Enter the title as "Default Post Icon (per forum)". This is the code for the plugin: Code:
if ($foruminfo['forumid'] == '0') If you want another forum to have a different default post icon, then change the next 0 and the next 1 appropriately, the same as you just did. If you want more forums to have different default post icons, you must COPY the FOUR lines that start with "else if" and past that clump of code above the line that's just "else". Make the appropriate changes to each 0 and 1 (forumid and post icon id). I hope that makes sense. (And if you only wanted ONE forum to have a different default post icon, don't worry about the second 0 and 1, leave them as they are; since no forum has a forumid of 0, nothing will happen.) |
Quote:
|
Thanks, works fine! :)
|
Quote:
|
I'd suggest to change that code above into:
PHP Code:
|
I did this and used mlx's code above and it is working like a charm. Thanks for the modification.
Only problem is I can not find the place to modify the default post icon. It is not showing up under vbulletin options for me. double edit: Nevermind I found it. :) I guess I should look harder next time. |
Will this work on VB 3.5.3?
|
Anybody can make this working with 3.6.1?
Thanks in adv |
All times are GMT. The time now is 12:43 AM. |
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:
|