vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Plugin via an external PHP (https://vborg.vbsupport.ru/showthread.php?t=311310)

Dr.CustUmz 05-13-2014 11:12 AM

Plugin via an external PHP
 
i've dug up about all i can find on using external php files within vb. they all turn up to be something like this HERE

thats not exactly what im trying to accomplish here though.

so i have an xml, within it i have my plugins and all the PHP for the plugins the one i particularly want to include externally is a misc_start plugin that looks a little like:

Code:

<plugin active="1" executionorder="5">
                        <title>DRC - Secret - Project - Misc</title>
                        <hookname>misc_start</hookname>
                        <phpcode><![CDATA[
A WHOLE LOT OF PHP
                        ]]></phpcode>
        </plugin>

i want to be able to just put all that php into an actual php file the user can upload, then call it from within the xml or something... is there how exactly would i go about that =/

or would i still be doing the same thing as shown in the link at the top? even though this is not a template...

vBNinja 05-13-2014 04:00 PM

put the php on a file (name.php)

then in your plugin use:
PHP Code:

require(DIR '/path/to/file/name.php'); 

Example:
If you saved the file in the "includes" folder, you would use
PHP Code:

require(DIR '/includes/name.php'); 

you can use require or require_once, it depends on the situation
change the path to file according to where you saved the file in relation to your forum root

Dr.CustUmz 05-13-2014 11:27 PM

is it ok if i bang my head on the table a few times lmao, thanks man

tbworld 05-13-2014 11:51 PM

Quote:

Originally Posted by Dr.CustUmz (Post 2497693)
is it ok if i bang my head on the table a few times lmao, thanks man

Just make sure you do both sides evenly. :)

We have all been there. :)

Dr.CustUmz 05-15-2014 09:46 AM

Quote:

Originally Posted by tbworld (Post 2497698)
Just make sure you do both sides evenly. :)

We have all been there. :)

just one of those up too long moments lmao

ChiNa 05-17-2014 02:00 PM

@Dr.CustUmz, I hope you are not trying to create a Remote Shell Script :p lol

Dr.CustUmz 05-20-2014 05:25 AM

Quote:

Originally Posted by ChiNa-Man (Post 2498165)
@Dr.CustUmz, I hope you are not trying to create a Remote Shell Script :p lol

lmao you downloaded that? that was just something i was testing lol, pretty good yeah? lol, no but im working on a bunch of other stuff too where i needed to call externals, and just had a brain fart.


All times are GMT. The time now is 09:23 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.01061 seconds
  • Memory Usage 1,730KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete