Quote:
You can join into Queries now: Lets say you wanted to show some custom info on each post. In 3.0x you would modify an exsiting query. Its the biggest query in showthread.php. Starts like "$posts = $db->query_read("". You would have to add you own SELECT statments like table.username AS username, and JOIN statements like LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid). You don't need to do that anymore. If you wanted to do this is 3.5 using hooks you can. Open showthread.php and find around line: 923-924. You should see... PHP Code:
You would simple go into the plugins, add new plugin and write it like so: Plugin Name is "showthread_query" PHP Code:
Just remember to start "$hook_query_fields" variable with a comma. You can also add conditions around this which is great I think. Example: PHP Code:
|
Can't this thread be sticky :-)?
|
Help..
I got this part in my plugin: Quote:
Quote:
Quote:
the template shows. But $guestIC won't show :( What's wrong ? |
Re-read the instructions. Your code that calls the hook is wrong, and you need to enter the hook into the xml file that holds the hooks.
|
Before I make an xml file, I'm building it first as if it was already installed ;)
The plugin is set in the global_start hook, so that's fine. the plugin itself has to add the to be used templated to the cache, that's what I've used that eval line for |
Can one add hooks in plugins (for add-ons)?
I guess not, but I don't lose anything by asking... |
Quote:
Another article by Brad lol :) |
Quote:
|
Quote:
|
Quote:
So hooks would really come in handy here. |
All times are GMT. The time now is 08:02 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|