vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   PHP in vBulletin posts (https://vborg.vbsupport.ru/showthread.php?t=190723)

vtte 09-12-2008 09:19 AM

PHP in vBulletin posts
 
Hi everyone,

I have a manga viewer script that I wish to include in my forums.

It works by calling a php script however.

I have uploaded this script to my database.

However, I have been told by the admins at vBulletin.com forums that PHP in posts are not allowed and have been re-directed here.

I have searched but cannot find anything related ...

I would like to request a modification for PHP in vBulletin posts ... or if there is one already I would appreciate a link.

Thanks!

Lynne 09-12-2008 02:34 PM

All you want to do is include the php in your showthread pages? You can just write a plugin to include the file.

vtte 09-12-2008 09:25 PM

How would I do this? Could anyone help please, I have no experience in coding at all.

Lynne 09-12-2008 10:36 PM

You could write a plugin that has the code (example stolen from the manual here - Optimizing Plugin Memory Usage):
PHP Code:

include('./plugins/my_script.php'); 

where my_script.php is your script located in the directory /plugins . As for how you choose which hook to use for your plugin, you would use one that is called in the php page you want the script to be a part of. I can't be any more specific with the information given so far.


(And do you really mean you upload the script to your database? That doesn't really make sense to me so I'm not sure what to make of that.)

Opserty 09-12-2008 10:50 PM

May help: Including External Files

vtte 09-12-2008 11:50 PM

Sorry if I have been a little unclear,

Basically I have this script:

Code:

<?php>

  include("mangaviewer/script.php"); 

  ?>

And I just want it to run script.php which is in my directory. But I just want to implement this into a post so it displays in a post. That's all.

I will take a look now at the links you've given me. Thanks


All times are GMT. The time now is 06:39 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
  • Page Generation 0.00976 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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