vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   [How to] Write Plug-ins/Hooks (https://vborg.vbsupport.ru/showthread.php?t=82625)

timetunnel 11-30-2005 03:45 AM

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.

TyleR 11-30-2005 03:46 AM

Quote:

Originally Posted by timetunnel
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.

it's coded by hand, I believe..atleast thats how i've coded mine thus far.

Marco van Herwaarden 11-30-2005 06:54 AM

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.

timetunnel 12-01-2005 12:15 AM

Quote:

Originally Posted by MarcoH64
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.

How? Is this done within vB AdminCP? If so, where? How to create e.g. a new template or phrases using the plugin manager (or wherever in vB) without coding by hand? How to '...set the correct Product everywhere...'? What is that?

Thanks in advance.

Cap'n Steve 12-01-2005 02:48 AM

<a href="showthread.php?t=92953" title="vBulletin.org Forum - Article 92953">This thread should answer all your questions.</a>

timetunnel 12-01-2005 03:21 AM

Thank you. Thank you. Thank you. This is just what I need to get more power out of this wonderful software.

HaMaDa4eVeR 01-31-2006 11:03 AM

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:

return $datefunc($format$timestamp_adjusted); 

with this :
PHP Code:


               $new
=$datefunc($format$timestamp_adjusted);
                
$new=preg_replace('/AM/''After Morining'$new);
$new=preg_replace('/PM/''P - M'$new);

        return  
$new


HaMaDa4eVeR 02-01-2006 01:13 PM

Is there any 1 can help me here

Cap'n Steve 02-01-2006 07:27 PM

Look in whatever function is contained in $datefunc. If that doesn't work you'll probably need to modify the code.

Marco van Herwaarden 02-01-2006 07:50 PM

Are AM & PM not defined by Phrases? Couldn't you just change the phrase?


EDIT: No it looks like this is not phrased


All times are GMT. The time now is 07:57 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
  • Page Generation 0.01452 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete