Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 11-03-2006, 01:07 PM
Spy_Master Spy_Master is offline
 
Join Date: Dec 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
But obviously it's not working and I don't know how to make it work. Any suggestions? Thanks
Reply With Quote
  #2  
Old 11-03-2006, 01:49 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you cant put a php code into the template
use the pluginsystem
Reply With Quote
  #3  
Old 11-03-2006, 02:11 PM
Spy_Master Spy_Master is offline
 
Join Date: Dec 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 11-03-2006, 04:58 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 11-03-2006, 07:15 PM
Spy_Master Spy_Master is offline
 
Join Date: Dec 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 11-03-2006, 08:59 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 11-04-2006, 09:34 AM
Spy_Master Spy_Master is offline
 
Join Date: Dec 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 11-06-2006, 04:12 PM
Spy_Master Spy_Master is offline
 
Join Date: Dec 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anybody help with this? I've still not got a solution.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:28 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05949 seconds
  • Memory Usage 2,221KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete