TorrentFlux.com Hey, OppTupacShakur, you have 11 messages, 0 are new.
05-07-2007, 12:22:24
Home Help Search Profile Logout donate chat
News:


+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  Ajax the index page [Updated v3]
« previous next »
Pages: 1 ... 5 6 [7] 8 Go Down Reply Notify of replies Send this topic Print
Author Topic: Ajax the index page [Updated v3]  (Read 15878 times)
joyntkid
Newbie
*
Offline Offline

Posts: 1



View Profile Email Personal Message (Offline)
« Reply #90 on: 02-26-2007, 22:06:52 » Reply with quote

hmm, i did everything like it said to(i think), but when i go indexajax.php, its just blank.

help?
Report to moderator   Logged
RyconPayne
Newbie
*
Offline Offline

Posts: 2

ryconpayne@darkminds.com rycon_payne RyconPayne

View Profile WWW Email Personal Message (Offline)
« Reply #91 on: 03-07-2007, 05:15:04 » Reply with quote

I also have this error:
Torrent Links:

Warning: parse_url() expects parameter 1 to be string, array given in /home/moe/public_html/torrentflux/indexAjax.php on line 1713
« Last Edit: 03-07-2007, 13:13:03 by RyconPayne » Report to moderator   Logged
saimon
Newbie
*
Offline Offline

Posts: 1



View Profile Personal Message (Offline)
« Reply #92 on: 03-09-2007, 18:14:51 » Reply with quote

Hi!

I also have

Warning: parse_url() expects parameter 1 to be string, array  ....
Report to moderator   Logged
hav0kc
Newbie
*
Offline Offline

Posts: 9



View Profile Personal Message (Offline)
« Reply #93 on: 03-31-2007, 13:48:39 » Reply with quote

hmm I seem to get the same error and my limited knowledge of PHP is not of any help to me.

Also when I turn on Ajax I get the follow error:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/torrent/functionsAjax.php:1745) in /var/www/torrent/indexAjax.php on line 123


And when Ajaxrefresh=flase I get this

Warning: Cannot modify header information - headers already sent by (output started at /var/www/torrent/functionsAjax.php:1745) in /var/www/torrent/indexAjax.php on line 109
Report to moderator   Logged
kevinherring
Newbie
*
Offline Offline

Posts: 11





View Profile Email Personal Message (Offline)
« Reply #94 on: 04-04-2007, 07:11:23 » Reply with quote

does this hack work with version 2.3?
Report to moderator   Logged
Badger
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 6



View Profile Email Personal Message (Offline)
« Reply #95 on: 04-06-2007, 09:13:12 » Reply with quote

does this hack work with version 2.3?
Correct me if I'm wrong. But I couldn't get it to work with 2.3 nor 2.2, so i suppose it doesn't.
I got it working on 2.1 but of course I'd rather use a newer build/version, so if anyone get it working please let me know.
Report to moderator   Logged
Vasto
Newbie
*
Offline Offline

Posts: 1



View Profile Personal Message (Offline)
« Reply #96 on: 04-07-2007, 01:20:22 » Reply with quote

What field type do I make the tables when I try to add them? (I am using WebMin)

EDIT: NVM I'm using 2.3
« Last Edit: 04-18-2007, 20:51:25 by Vasto » Report to moderator   Logged
hav0kc
Newbie
*
Offline Offline

Posts: 9



View Profile Personal Message (Offline)
« Reply #97 on: 04-07-2007, 19:18:20 » Reply with quote

I couldn't get this to work in 2.3 either. Has anyone gotten this to work?
Report to moderator   Logged
kevinherring
Newbie
*
Offline Offline

Posts: 11





View Profile Email Personal Message (Offline)
« Reply #98 on: 04-10-2007, 05:05:30 » Reply with quote

Its a shame, I do miss my old ajax version. 
Qrome: any ideas when ajax will be in the official release?
Steve: Any chance of making a version for 2.3?

Both your work is very much appreciated of course!
Thanks
Kevin
Report to moderator   Logged
steveholt
Jr. Member
**
Offline Offline

TF Base: Linux 2.x
Posts: 60


Debian Packager





View Profile WWW Email Personal Message (Offline)
« Reply #99 on: 04-23-2007, 16:47:49 » Reply with quote

Hi everyone, thanks for your interest in my ajax hack.

I finally got around to upgrading to 2.3, and I've now updated this hack to v3 which will work with 2.3. You can find links (I can't post attachments anymore, not sure why) to the new files on the first post of this thread.

This problem has been fixed:
Warning: parse_url() expects parameter 1 to be string, array  ....

As has this one:
"Warning: Invalid argument supplied for foreach() in /var/www/torrentflux/indexAjax.php on line 858"

If you get anything mentioning headers already being sent, such as this:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/torrent/functionsAjax.php:1745) in /var/www/torrent/indexAjax.php on line 123
and you're on Linux, then I think you can solve the problem by removing the CR/LF (carriage return/line feed) pairs which are the new line delimiters in most of the TorrentFlux files, whereas Unix format specifies only LFs (line feeds) to terminate each line. The extra character (CR) in the files on Linux causes some output to be sent which causes the headers to be sent early.

To convert the CR/LF pairs to only LF for Linux, you can use a program called tofrodos: http://www.thefreecountry.com/tofrodos/index.shtml

Or, as recommended by others in this thread, you can use sed (sed s/^M$//g -i ...) or tr (run the files through a tr -d '\r' | grep -v ^$).

Whatever you use, just make sure you use it on all the *.php files distributed with TorrentFlux.

If you're still not sure how to add the ajax entries to the torrentflux database, here is the SQL for it:
Code:
INSERT INTO tf_settings VALUES ('ajax_refresh','5'),('ajax_full_refresh','3600'),('use_ajax','0');
Just enter that in whatever you use to access your database.

There's also a patch file for index.php to add the Ajax functionality to it, in case you have modified it with other hacks:
index.php.patch
« Last Edit: 04-23-2007, 17:11:56 by steveholt » Report to moderator   Logged

AthlonXP 2400+ | 3x300GB | 512MB RAM | Debian Testing | TF 2.3 | Python 2.4.4 | Apache 2.2.3 | PHP 5.2.0 (module)
miseryshining
Newbie
*
Offline Offline

Posts: 2



View Profile Personal Message (Offline)
« Reply #100 on: 04-24-2007, 07:35:00 » Reply with quote

works just brilliant (ubuntu/apache2), thanks a lot for the detailed instructions. This should definitely make it into the next release, since it will benefit everyone.
Report to moderator   Logged
kevinherring
Newbie
*
Offline Offline

Posts: 11





View Profile Email Personal Message (Offline)
« Reply #101 on: 04-24-2007, 17:01:57 » Reply with quote

Mr Holt, you are indeed a gentleman.  Thanks a million. :-)
Report to moderator   Logged
Searcher
Newbie
*
Offline Offline

Posts: 7



View Profile WWW Personal Message (Offline)
« Reply #102 on: 05-01-2007, 09:24:55 » Reply with quote

However surprising, this mod works flawlessly for me Grin

Thanks a lot Steve
Report to moderator   Logged
hav0kc
Newbie
*
Offline Offline

Posts: 9



View Profile Personal Message (Offline)
« Reply #103 on: 05-02-2007, 17:17:14 » Reply with quote

hmmm although I should not surprised that something new and cool did not work for me out of the box, I am non-the-less surprised that I got this error when I tried the new indexAjax.php file.

"Parse error: syntax error, unexpected '}' in /var/www/torrent/indexAjax.php on line 344"

I'm sure it is something I did, it's always something I did Shocked)

Any help is greatly appreciated.
Report to moderator   Logged
steveholt
Jr. Member
**
Offline Offline

TF Base: Linux 2.x
Posts: 60


Debian Packager





View Profile WWW Email Personal Message (Offline)
« Reply #104 on: 05-02-2007, 17:46:39 » Reply with quote

"Parse error: syntax error, unexpected '}' in /var/www/torrent/indexAjax.php on line 344"

My file doesn't have a '}' on line 344. Have you modified yours? If so you'll have to post it for me to help you with it. If you haven't, could you check the comments at the top of the file to be sure you're using the correct version (v3), and maybe try redownloading the file to fix the problem.
Report to moderator   Logged

AthlonXP 2400+ | 3x300GB | 512MB RAM | Debian Testing | TF 2.3 | Python 2.4.4 | Apache 2.2.3 | PHP 5.2.0 (module)
Pages: 1 ... 5 6 [7] 8 Go Up Reply Notify of replies Send this topic Print 
« previous next »
Jump to:  


Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP