The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHP script in VB custom page
Hi I searched for an answer to this but couldn't find one.
I'm using this hack and it works great. However, I use a script called Code Sort to manage all the linking buttons that my forum has. Previously I linked to a page on the website but having successfully used the custom page for the rules I thought I'd try to put the codes in the same. However, VB doesn't allow normal php code within itself. This is what I want to put in the template Code:
<?php // PHPCodeSort 1.6 codes // subject: The Addicted $listing = "2"; include("/home/user/public_html/codesort/codes-config.php"); include("/home/user/public_html/codesort/show-codes.php"); ?> <BR><BR> <A href="donatecode.php">Donate a code?</A> |
#2
|
|||
|
|||
you cant put a php code into the template
use the pluginsystem |
#3
|
|||
|
|||
Ok I can't put the code in the template. Where would I put it in the plugin? Would I put it in the same plugin as the custom page and if so where? If I need to create a new plugin how would I do that? Or is there a better way entirely of doing it?
Thanks for your help. |
#4
|
|||
|
|||
sorry i've just seen now that you have your own site
put the code in that file i think i'm not the right man for this job because of my english |
#5
|
|||
|
|||
Your english is fine. I'm probably not explaining myself very well. What I want to do is to have that snippet of PHP code and thus display some images on the custom page. However, VB doesn't allow that code to work and therefore I need some way of inputing it so it does work. I don't know how to do that.
Thanks for your help |
#6
|
|||
|
|||
include("/home/user/public_html/codesort/codes-config.php");
include("/home/user/public_html/codesort/show-codes.php"); must work in "your" script but i don't realy understand what's the problem first i think you wanted to include it in a vbscript but i had seen https://vborg.vbsupport.ru/showthread.php?t=98009 and that means that you made the script yourself so the include shout not be a problem and work what is include("/home/user/public_html/codesort/codes-config.php"); include("/home/user/public_html/codesort/show-codes.php"); including? try $out=....... (the code that show-codes includes and put $out in the template |
#7
|
|||
|
|||
I didn't create the script. It's a PHP script that normally works on webpages. Those two includes are to the config file which then means that the codes for listing 2 are shown.
Normal PHP code like the snippet I'm trying to use doesn't work in a template. It just doesn't appear. From searching this board that appears to be a VB thing that it stops normal PHP code from working. I don't know how to get it to work within VB. Thanks for your help |
#8
|
|||
|
|||
Can anybody help with this? I've still not got a solution.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|