Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: integrate with poll script
does the poll script work outside txp?
ie create a standard xhtml page with php extension (test.php) and insert the required poll code there…
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: integrate with poll script
yes, it’s works…
<txp:txp_me />
Offline
Re: integrate with poll script
Disclaimer: I don’t know what I’m talking about below.
I’m not sure if it’s possible to create another DB connection (to a different DB) from within a TXP website. Maybe it’s just a matter to cleverly integrate both databases, let TXP manage the DB connection, and my the poll script play nicely with that situation.
Offline
Re: integrate with poll script
maniqui wrote:
Disclaimer: I don’t know what I’m talking about below.
I’m not sure if it’s possible to create another DB connection (to a different DB) from within a TXP website…
Hi Julián,
I think that you can. I have slimstat installed on a different db.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: integrate with poll script
but without db install (textfile), it works fine
<txp:txp_me />
Offline
Re: integrate with poll script
I’m found a nice poll script called Little Poll
it’s simple in setup. I’ve tested it in simple php page, it’s works fine, but in txp it’s dont work(((
(previous script dont work at all)
Can someone test it in own txp? it’s very nice script, and i want to use it..
in header i get an error:
Tag Error: <txp:php> -> Warning: fopen() [function.fopen]: Filename cannot be empty on line 34
Tag Error: <txp:php> -> Warning: fread() expects parameter 1 to be resource, boolean given on line 35
Tag Error: <txp:php> -> Warning: fclose() expects parameter 1 to be resource, boolean given on line 36
Last edited by Katalonian (2010-07-16 10:01:56)
<txp:txp_me />
Offline
Re: integrate with poll script
I’m more than sure, that problem is with paths within scripts. Try to look though their code and change to absolute paths. For ex. insted of include('script.php');
i should use include('/home/userdir/www/script.php');
– you can look how your absolute url looks like in prefs->diagnostic
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: integrate with poll script
No,trouble not in path.
Tag Error: <txp:php> -> Warning: fopen() [function.fopen]: Filename cannot be empty on line 34
global $filename; line 34 in lp_source.php -> $fp=fopen($filename, “r”); line 35 in lp_source.php -> $file_contents=fread($fp,filesize($filename)-1); line 36 in lp_source.php -> fclose($fp);Last edited by Katalonian (2010-07-16 10:41:40)
<txp:txp_me />
Offline
Re: integrate with poll script
Do you have raw php enabled in the preferences?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: integrate with poll script
yes.
<txp:txp_me />
Offline
Re: integrate with poll script
Why are you so sure that problem is not is path? fread()
can’t read resourse which should be opened by fopen()
1. find where var $filename
is defined and post here it’s value – or add to script debugging output near fopen
– print_r($filename);
2. post here path from diagnostic tab
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: integrate with poll script
the_ghost wrote:
Why are you so sure that problem is not is path?
fread()
can’t read resourse which should be opened byfopen()
Because i do same thing in other simple php file, all work fine
1. find where var
$filename
is defined and post here it’s value – or add to script debugging output nearfopen
–print_r($filename);
// File in which voting scores are kept
$filename = “lplist.txt”;
2. post here path from diagnostic tab
D:\xampp\htdocs\adiu\
<txp:txp_me />
Offline