I am using this hack to include a few php pages as it is intended. Everything works great, other than I cannot get form submits to work. I get a "Your submission could not be processed because a security token was missing."
I've looked around on the forum trying to find an answer, but I can't seem to find one. How can I correct this? Thanks. |
Hello,
I'm on 4.1.2 and I used the code mentioned above to vb 4 PHP Code:
PHP Code:
Or is the problem? Thank you |
Can i put a VB variable in that php file such as {vb:raw totalthreads} ? I tried but not sucess
|
Quote:
|
I could also use some help on including php file into a template.
I have a template with an header, a navbar, the forum/content, footer and a fixed right bar. I wan't to insert this php code(for now) into the right bar: userbox.php PHP Code:
PHP Code:
PHP Code:
The HOOK is parse_templates. When i in the plugin write echo $userboxinsert; the userbox get's inserted but at the top of the screen, so the link works. Would be very happy if someone could help me with this problem! |
Total programming n00b here... asking for help :)
I just came here find out how to get a php-script to run, and was really glad to see you guys already had a page on the issue. My idea is fairly simple: I picked up a rotator script (php) and will upload to it's own directory (/rotator). I intend to have several copies (e.g. games.php, religion.php, cars.php, gadgets.php) and each script points to a different sub-directory, e.g. /games, /religion, /cars, /gadgets, etc.) From there, in the last post of every thread I want to call it but will use an IF THEN to dictate which version it calls. (e.g. IF forum=12 then call cars.php, else if forum=15 then call gadgets.php) <vb:if condition="$GLOBALS['forumid'] == 63 OR $GLOBALS['forumid'] == 54 OR $GLOBALS['forumid'] == 56"> [not sure what to put here in order to call 'games.php'] <vb:if> <vb:if condition="$GLOBALS['forumid'] == 3"> [not sure what to put here to call 'cars.php'] <vb:if> This in turn should then reflect relevant files for specific forum content. I suspect the IF THEN will be placed in the template 'ad_thread_last_post_content' (or via the Advertising/Manage Ads script within ACP). I'm uncertain what hook I could use for this (these would only show on SHOWTHREAD templates - or is postbit_legacy as it's only in the last post?). I will later be adding a similar function to the bottom of specific forums to show different rotator scripts (different sized affiliates). Any chance of a bit advice for getting this off the ground? |
When you say "call" do you mean "display"? Is cars.php a page you can view with content if you browse to it?
If so I think what you are looking for is an IFRAME... the basic syntax would be: Code:
<IFRAME SRC="http://domain.com/rotator/cars/cars.php" WIDTH="100%" HEIGHT="50"></IFRAME> You can search google for more options on the IFRAME tag. |
Although an iframe would suffice (thanks, I hadn't even given it a thought), I was under the impression I could an external php file from within a template..?
I'd prefer to do it as a display/call than within an iframe (which would not show to some browsers). In worst case scenario though, i'll go with an iframe. :) |
I just don't know what you mean by "call" a php file then... You can't do that from a template. You could do it from a plugin but again you're not "calling" a file. You can call a function in a file, but if you want to display output from the php file in a specific location you need to make a template for that file.
|
Quote:
Anyway, my idea is to: 1) breakdown forum into separate categories (e.g. religion, cars, games, etc.) 2) in the last post, 'refer to' a specific script. 2a) e.g. religion forum would refer to a script renamed as 'religion.php' 2b) cars forum would refer to a script renamed as 'cars.php' 3) the scripts within each above file would be the same, but refer to different text files. 4) the cars forum & script would then extract data from the text file for cars, which would ultimately show to the end-user as a affiliate image/link specific to cars. 4b) exactly the same as 4) but with religion context instead, so 'christian stuff' would show up in the religion forum (and other religions too). so when a guest comes to my forum and visits the car section, they'll see links and/or images in the final post which will be pertinent to cars... if they swap over to the religion forum (or games or anything else) they will see the last post giving links/images relevant to those forums too. |
All times are GMT. The time now is 04:28 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|