The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add a word to the title of every new topic in a certain forum folder?
I have a folder in which people post their first impressions / reviews of videogames.
Is there a simple template mod I could do to add a phrase to the end of each topic title (and associated url) in that folder at creation time? Phrase would be "review", so it would change a topic title of "sniper elite" to "sniper elite review". Forum number is 24. |
#2
|
||||
|
||||
Why not just use thread prefixes? [Review] Sniper Elite
|
#3
|
|||
|
|||
you can use prefix or create plugin
Plugin Hook: newpost_process Title: anything Code: PHP Code:
|
Благодарность от: | ||
charlesr |
#4
|
|||
|
|||
Thanks for both of your suggestions.
Boofo: is there a way of defaulting the prefix to a particular prefix in the new thread dropdown? I could only get it to display "no prefix" as the default, so a user would have to change to the "review" prefix manually. I don't really want them to have to DO anything. I set "require prefix" in the forum options, but it doesn't warn them they forgot until after they press submit. Badshah 93: That worked a treat thanks. |
#5
|
||||
|
||||
Check out the "Edit Selected Prefix Permissions" in the Thread Prefix Manager.
|
#6
|
|||
|
|||
Can something be done to the meta description at the same time? I couldn't figure out if the description is generated from a field in the database (couldn't find one) or on the fly from the contents of the first post. How would I figure that out?
Ideally in my simple world it would be as easy as: Code:
if ($foruminfo['forumid'] == 24 and $type == 'thread') { $post['title'] = $post['title'] . ' review'; $thread['description'] = 'A review of ' . $post['title'] . ' - ' . $thread['description']; } |
#7
|
|||
|
|||
Quote:
Create new plugin Hook: showthread_complete Title: ur wish Php Code: PHP Code:
|
Благодарность от: | ||
kh99 |
#8
|
|||
|
|||
The description is the text of the first post, and the value for the description tag is that text with quotes and bbcode removed, censored, then cut down to 500 chars max. That's all done at the time the thread is displayed so if you want to modify the description meta tag on the showthread page then you'd need a plugin using a hook like showthread_complete, and you can modify the string in $thread['meta_description'].
Edit: Oops. Badshah beat me to it. |
Благодарность от: | ||
charlesr |
#9
|
|||
|
|||
Wonderful. Maximum kudos to the both of you.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|