Hello.
How do you create a 'product' plugin file like the one at https://vborg.vbsupport.ru/showthread.php?t=99579 (see the code in Ted S's 'welcome hdr 4 0 6.zip' file download). In the xml file contained in the zip file, it begins with the tags, '<product...>' then '<templates>', then '<plugins>', etc. Was this coded by hand or is there a template that is used to create these types of xml files for importing into the vB Plugin system? I see how to create the <plugins> code using the vB Plugin Manager (Download) in AdminCP, but not the rest. I'd like to create a clean file for creating templates via this type of xml so when I create revisions for others, I can make it where they can 'import' the complete xml 'product/plugin' vs. using a 'txt' file download that says, 'Find' this, 'Add' that, etc. Thanks in advance. |
Quote:
|
You should not code Product/Plugin XML-files by hand. If you set the correct Product everywhere (new templates, phrases, settings,...) it will all be in the file when you export it.
|
Quote:
Thanks in advance. |
<a href="showthread.php?t=92953" title="vBulletin.org Forum - Article 92953">This thread should answer all your questions.</a>
|
Thank you. Thank you. Thank you. This is just what I need to get more power out of this wonderful software.
|
Hello
I would like to use function.php file in my priavte plugins and I didn't find sutable Hook Location I need to change this line : PHP Code:
PHP Code:
|
Is there any 1 can help me here
|
Look in whatever function is contained in $datefunc. If that doesn't work you'll probably need to modify the code.
|
Are AM & PM not defined by Phrases? Couldn't you just change the phrase?
EDIT: No it looks like this is not phrased |
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. |
Fair enough, I don't see why that link I posted wouldn't work the same in a plugin. Just do the same but instead of writing the hook in the PHP file stick it in your plugin. No harm in trying if you haven't already done so :p
Did you get some kind of error or was it just not working? |
I didn't try it yet, as I didn't need it at the time (I need it today).
I'll try soon though and post what happened. |
Is this tutorial current as of vb 3.6.8?
I'm looking for a plugin tutorial and wondered if this is still relavent |
The advice by KirbyDE at the end of the main entry was BY FAR the most useful part for me, but yes, I believe it is all still relevant.
|
At the beginning, thank you for the good basic guide.
But I'm not completely understudying how I can associate my hook with two or more "hookname" at once? E.g. "newreply_post_start", "newthread_post_start". Quote:
Code:
<title>vB Category Icons</title> Is it the only way to make the fully copy of the code into a new hook and associate it with new hookname??? |
This tutorial is old. You can add plugins through the AdminCP via the Plugin Manager.
I don't think it is possible to associate the same code to two hooks. Just copy the code over to a new plugin to create code for another hook. |
Quote:
Quote:
|
Hi, I just want to display a list of users who have posted on a thread at the top of the thread using the hook system. I'm brand new to VBulletin and was wondering if there is a good tutorial or documentation that would help. I've looked in the vb manual and it just has like 2 pages on writing plugins. Can anyone help?
|
Quote:
Is there a way to add WHERE and ORDER statements to this query as well, using hooks? |
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:
|