![]() |
$theard_title in posts/bbcode
how do I get the Topic -title shown in the post (and in the bbcode)? "$title" or "$theard_title" does not work.
in phpbb3 it was solved with a simple code snippet: open viewtopic.php find Code:
'MESSAGE' => $message, Code:
'MESSAGE' => str_replace('{title}', $topic_data['topic_title'], $message), |
Show it in what bbcode? You could write a plugin to do a str_replace, I suppose. I'm really not sure what to suggest since I don't have a clear picture of what you are wanting to do.
|
Ok i have to tell you what i want to do with it:
For example if i want to search for the topic title in youtube: http://www.youtube.com/results?searc...&search_query=$theard_title+trailer&gl=DE the link would be in a bbcode ... the "$theard_title" for example would be the parse for the Topic title ..... but isnt working --------------- Added [DATE]1256587704[/DATE] at [TIME]1256587704[/TIME] --------------- do you understand what i mean now? --------------- Added [DATE]1256598545[/DATE] at [TIME]1256598545[/TIME] --------------- no ideas? |
help here pls!
--------------- Added [DATE]1256919424[/DATE] at [TIME]1256919424[/TIME] --------------- no coders here? |
Try it:
AdminCP > Plugins > Add a Plugin Product: vBulletin Hook: postbit_display_complete Title: Replace thread title Execution order: 5 PHP Code:
(you may see a line break here, but it's all a single line) note: str_ireplace (case insensitive) is a bit more intensive than str_replace. Use str_replace if you prefer (your users will forced to use it in lowecase). |
i called it with {title} right?
but it shows nothing. ... not working for me :/ do youve tested it=? Quote:
no help? |
Sorry! I tested but I typed it directly here (without copy/pasting) and there's a typo:
It's "$thread[title]" Final code: PHP Code:
Suggestion for Youtube trailer search: PHP Code:
In a thread titled "Batman Begins" will convert {threadtrailer} to: Search Batman Begins Trailer @ YouTube Or a simplified: PHP Code:
(no thread name in the visible link, only in URL) Note: if you edit the code, do not remove mb_converting_encoding. It is necessary because YouTube use UTF-8, so if your forums use ISO-8559-1, you will ever see "no results" when you click the link in a thread with ANY accentuated character. |
All times are GMT. The time now is 04:47 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:
|