vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PHP Include in a Post (https://vborg.vbsupport.ru/showthread.php?t=144154)

captainron19 04-06-2007 02:37 PM

PHP Include in a Post
 
Here is what i am trying to do.

I currently run a daily disney trivia email web site at www.disneytrivia.net

I have an include line on my main page to input a php for the daily Disney trivia Question that I change every day via an online form.

I wanted to include this into a post into my forum at www.disney-forums.com

I made a new sub forum, allowed html in it. My intention was to utilize the php include in a post in this forum then close the forum to allow no more posting and hopefully it would change the trivia question each day in that post but I cant seem to get it working.

Is this possible and if so, how do I accomplish this?

The PHP code I am using is as follows:

<table width="340" bordercolor="#0000ff" cellspacing="2" cellpadding="2" border="5"><?include("http://www.disneytrivia.net/front-page-inc.php");?>
<br>

</table>

GruntHalo 04-06-2007 02:51 PM

you might need to make a custom page using templates to make that work but im not sure if it'll work cuz i tried to do that one time and add a php included counter in my footer and it never worked :(

Reeve of shinra 04-06-2007 02:55 PM

Here's how I would go about this:
  1. admincp -> plugins and products -> Create a new product (this is just a container)
  2. Create new plugin -> add it under the new product.
    • Pick a hook for where you want it to show up like "forum home"
    • For the PHP enter:
      PHP Code:

      $dtrivia = include 'http://www.disneytrivia.net/front-page-inc.php'

  3. Admincp -> Style Manager -> edit the template where this should show up and added
    • HTML Code:

      <table width="340" bordercolor="#0000ff" cellspacing="2" cellpadding="2" border="5">
      $dtrivia
      </table><br>


I think that should more or less do the trick.... it will show the trivia on the page if you added the variable to the right template and selected the right hook. It wont make a post however.


All times are GMT. The time now is 09:52 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.01122 seconds
  • Memory Usage 1,719KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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