I'm trying to insert an 'include' in a phpbox (I'm just experimenting cuz I'm new to php)
I included the following:
<?php
include('http://theartgangster.com/aok-forum/pollscript/');
?>
but get a parse error:
Parse error: parse error, unexpected '<' in /home/gangster/public_html/aok-forum/Sources/Load.php(1711) : eval()'d code(35) : eval()'d code on line 1
...the URL is visible in a browser though but why not in the block?
(Don't know if this is the right forum to post this in - Move if necessary)
remove the PhP tags
<?php ?>
Thank you G6! Works great! Now my next problem and I hope you can help me with that...
If I've voted it redirect me to the index.php in the script:
http://theartgangster.com/aok-forum/pollscript/index.php
... is there a way that I can get the result (above page) show in the block itself and not in a seperate new window?
I found this but how can I change the code to php?
In order to get back after voting to the site where the vote is included, you need to put a hidden form field into the HTML template:
<input type="hidden" name="vote_redirect" value="http://www.your-server.com/seite.shtml" />
just echo it out like this
echo '
code here
';
just make sure u dont use any ' (single quotes) inside the code
Aku... you mean like this?
echo '
<input type="hidden" name="vote_redirect" value="http://theartgangster.com/aok-forum/pollscript/index.php" />
';
???
I tried the above but it still redirects me to a new browser window
oh for the new browser u cant really do much except try using an iframe really so it changes when someone votes
In the documentation of the script I found this but when I use a html box it gives me a permission error...
QuoteWith the HTML tag <iframe> you can include the script in an existing page. Place the <iframe> tag where you want it to appear within the page: Example:
<iframe name="voting" src="./voting.php" width="400" height="300" frameborder="0"></iframe>
Maybe I can use the above? I'm trying to figure this out and maybe we can use it as a snippet because I saw there is a need for a vote by guests
well the code is already given in ur post above for the iframe
but u will probably have to use it as a center block since the poll is pretty huge in dimensions width wise
It seems to me I'm not allowed to use this <iframe> code in the blocks?! I get this error when using a html box:
QuoteForbidden
You don't have permission to access /aok-forum/index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/1.3.36 Server at www.theartgangster.com Port 80
Here is the URL of the error: http://theartgangster.com/aok-forum/index.php?action=tpadmin
Iframes work perfectly in a html or script box
but I dont know why you cannot access a file on your own server through it - strange
I think I'll have to contact my hosting server. iframe is a standard feature of SMF and TP or do I need an extra mod to show iframes? Thanks for all the help Aku... hope I can get it to work! :)
well post your exact iframe code its nothing special really in fact even smf admin panel uses iframes (where u get the news)
so its probably an error in ur code somewhere
Thank you, I eventually sorted it out! :) Guests are now able to vote. IP's and cookies prevent them from voting twice. You can set it as you want. Thanks for the help.