Downloadmanager
Downloadmanager
Hallo zusammen,
ich habe auf meinem Rechner das Serendipity Weblog installiert und teste einige plugins aus bevor ich das Weblog auf den richtigen Server installieren möchte. Bin begeistert von diesem Weblog. Leider habe ich gerade ein kleines Problem. Ich habe den Downloadmanager installiert und er funktionier bei mir nicht. Ich selber habe leider keine Ahnung von programmieren.
Der Folgende Fehler erscheint bei mir im Bereich des Downloadmanagers.
Warning: is_dir() expects parameter 1 to be string, resource given in C:\xampp\htdocs\serendipity\plugins\serendipity_event_downloadmanager\serendipity_event_downloadmanager.php on line 1791
Die Zeile 1791 habe ich mir in der php Datei angeschaut und kann aber damit nichts anfangen.
Folgende Pfade habe ich bei der Installations des Plugins eingegeben.
Permalink
/Serendipity/index.php?/downloads.html
Pfad zu "incoming"
C:/xampp/htdocs/Serendipity/hochladen/incoming
Pfad zu "download" Verzeichnis
C:/xampp/htdocs/Serendipity/hochladen/files
HTTP-path to plugin
/Serendipity/plugins/serendipity_event_downloadmanager/
Würde mich über eure Hilfe freuen.
Gruß
Sela
ich habe auf meinem Rechner das Serendipity Weblog installiert und teste einige plugins aus bevor ich das Weblog auf den richtigen Server installieren möchte. Bin begeistert von diesem Weblog. Leider habe ich gerade ein kleines Problem. Ich habe den Downloadmanager installiert und er funktionier bei mir nicht. Ich selber habe leider keine Ahnung von programmieren.
Der Folgende Fehler erscheint bei mir im Bereich des Downloadmanagers.
Warning: is_dir() expects parameter 1 to be string, resource given in C:\xampp\htdocs\serendipity\plugins\serendipity_event_downloadmanager\serendipity_event_downloadmanager.php on line 1791
Die Zeile 1791 habe ich mir in der php Datei angeschaut und kann aber damit nichts anfangen.
Folgende Pfade habe ich bei der Installations des Plugins eingegeben.
Permalink
/Serendipity/index.php?/downloads.html
Pfad zu "incoming"
C:/xampp/htdocs/Serendipity/hochladen/incoming
Pfad zu "download" Verzeichnis
C:/xampp/htdocs/Serendipity/hochladen/files
HTTP-path to plugin
/Serendipity/plugins/serendipity_event_downloadmanager/
Würde mich über eure Hilfe freuen.
Gruß
Sela
Re: Downloadmanager
Hi
is_dir will tatsächlich einen String als Pfad zum möglichen Ordner und das Plugin gibt eine Ressource - ein naheliegender Fehler. Mir ist nur nicht klar, warum die Warnung bei mir nicht angezeigt wird...
Teste doch bitte mal aus, ob alles funktioniert wie gewünscht, wenn du Zeile 1791 ersetzt mit:
Gruß
is_dir will tatsächlich einen String als Pfad zum möglichen Ordner und das Plugin gibt eine Ressource - ein naheliegender Fehler. Mir ist nur nicht klar, warum die Warnung bei mir nicht angezeigt wird...
Teste doch bitte mal aus, ob alles funktioniert wie gewünscht, wenn du Zeile 1791 ersetzt mit:
Code: Select all
if( is_dir( $path ) ) closedir( $handle );
Re: Downloadmanager
Oder warum bei mir nicht mal die Ordner erstellt wurden....onli wrote:Mir ist nur nicht klar, warum die Warnung bei mir nicht angezeigt wird...
Ich finde auf die Schnelle noch nicht mal ein mkdir im plugin....
(Der Wechsel von $handle auf $path funktioniert übrigens)
Ian
Re: Downloadmanager
Stimmt, die Ordner müssen selbst angelegt werden (das Plugin hat aber auch schon ein paar Jährchen auf dem Buckel).
Super. Das werde ich dann bald hochladen.(Der Wechsel von $handle auf $path funktioniert übrigens)
Re: Downloadmanager
Dann könntest du die Ordnerstruktur sicher auch gleich auf templates_c/dlmanager/incoming und templates_c/dlmanager/files korrigieren, was bestimmt besser ist als sie im S9y root liegen zu haben, und das fehlende mkdir a la
einfügen.
Denn was nützt einem das plugin, wenn man selber Ordner erstellen muss, ohne das man davon weiß?! War das schon immer so?
Gruß
Ian
Code: Select all
if (!is_dir('templates_c/' . $directory)) {
mkdir('templates_c/' . $directory, 0777);
}
Denn was nützt einem das plugin, wenn man selber Ordner erstellen muss, ohne das man davon weiß?! War das schon immer so?
Gruß
Ian
Re: Downloadmanager
Vermutlich ja. Es gibt bestimmte Plugins, die -- gelinde gesagt -- steinalt sind und (soweit ich weiss) auch nicht mehr aktiv gepflegt werden. Ich rate z.B. normalerweise davon ab, den Download-Manager überhaupt zu verwenden -- das Ding produziert u.A. höllischen HTML-Code, der nur mit viel Mühe überhaupt anständig zu gestalten ist.Timbalu wrote:War das schon immer so?
So, und jetzt sind wir mal höflich und hören auf, die Leser dieses (englischsprachigen) Forum dadurch zu verwirren, dass wir hier in einer Sprache, die die meisten von ihnen nicht verstehen, diskutieren. Dafür ist das deutsche Forum da, auch wenn dieses thematisch passender erscheint.
(Sorry for the disturbance, folks. Yes, this thread is in German. We'll try to stop this in the future.)
YL
Re: Downloadmanager
Ok, dann englisch^^
Timbalu, the plugin has 2000 lines of code. As far as i've seen it's not totally awful, but I won't make any unnecessary changes ;)
PS: But I'd test a patch.
Timbalu, the plugin has 2000 lines of code. As far as i've seen it's not totally awful, but I won't make any unnecessary changes ;)
PS: But I'd test a patch.
Last edited by onli on Sat Aug 07, 2010 5:15 pm, edited 1 time in total.
Re: Downloadmanager
Well, for a 'newbie', like Sela called her/him-self, at least the mkdir sounds like a necessity...!onli wrote:...., but I won't make any unnecessary changes
Just to make sure, the 'totally awful' is a Yellowledi....
Regards,
Ian
Re: Downloadmanager
True, i didn't want to call the change itself unnecessary. I just am concerned i'd break the plugin altogether - especially because i've some other things on my todo-list then to dig into this very big plugin. But you noticed my ps? ;)
Re: Downloadmanager
Yes... afterwards
I sent you a PM with some files.
Ian
I sent you a PM with some files.
Ian
Re: Downloadmanager
Hello alltogether, the replacement of the line 1791 with:onli wrote:Hi
is_dir will tatsächlich einen String als Pfad zum möglichen Ordner und das Plugin gibt eine Ressource - ein naheliegender Fehler. Mir ist nur nicht klar, warum die Warnung bei mir nicht angezeigt wird...
Teste doch bitte mal aus, ob alles funktioniert wie gewünscht, wenn du Zeile 1791 ersetzt mit:GrußCode: Select all
if( is_dir( $path ) ) closedir( $handle );
if( is_dir( $path ) ) closedir( $handle );
works very good
Many thanks for your help!!
Regards
Sela
Sela
Re: Downloadmanager
Now, I'm able to upload files with the downloadmanager,
but if I try to dowload the file from the Weblog, it is not woking.
I made a screenshot of the page where I uploaded the data. There is no possibilty to download the Agenda pdf-file. With the right mouse klick I can save the path but I can not download the file.
These are my new settings:
Permalink
/Serendipity/index.php?/downloads.html
Pfad zu "incoming"
C:/xampp/htdocs/Serendipity/templates_c/dlmanager/incoming
Pfad zu "download" Verzeichnis
C:/xampp/htdocs/Serendipity/templates_c/dlmanager/files
HTTP-path to plugin
/Serendipity/plugins/serendipity_event_downloadmanager/
Many thanks again !!
best regards
but if I try to dowload the file from the Weblog, it is not woking.
I made a screenshot of the page where I uploaded the data. There is no possibilty to download the Agenda pdf-file. With the right mouse klick I can save the path but I can not download the file.
These are my new settings:
Permalink
/Serendipity/index.php?/downloads.html
Pfad zu "incoming"
C:/xampp/htdocs/Serendipity/templates_c/dlmanager/incoming
Pfad zu "download" Verzeichnis
C:/xampp/htdocs/Serendipity/templates_c/dlmanager/files
HTTP-path to plugin
/Serendipity/plugins/serendipity_event_downloadmanager/
Many thanks again !!
best regards
- Attachments
-
- download.pdf
- (37.68 KiB) Downloaded 336 times
Re: Downloadmanager
HI Sela
We were making progress knitting a new version which is on its way to be uploaded. We
- changed upload folder to 'serendipity/uploads/dlmanager/incoming' (effects new installations only!)
- changed download folder to 'serendipity/templates_c/.dlmanager/files' (effects new installations only!)
- added misssing mkdir of directories using the recursive mkdir function added with PHP 5.0.0
- corrected is_dir($handle) bug and warning
- added the ability to have a very own plugin stylesheet with some very minor values to start with
- changed the frontend tpls to support these changes
If you can wait, wait. If not, try to add after
at around line 1441
so this should work. If it isn't working, this might be a matter of the pdf file. Try something else first.
Ian
We were making progress knitting a new version which is on its way to be uploaded. We
- changed upload folder to 'serendipity/uploads/dlmanager/incoming' (effects new installations only!)
- changed download folder to 'serendipity/templates_c/.dlmanager/files' (effects new installations only!)
- added misssing mkdir of directories using the recursive mkdir function added with PHP 5.0.0
- corrected is_dir($handle) bug and warning
- added the ability to have a very own plugin stylesheet with some very minor values to start with
- changed the frontend tpls to support these changes
If you can wait, wait. If not, try to add after
Code: Select all
function ADMIN_showDownloads() {
global $serendipity;
[..... some code ......]
if (!$absdownloadspath || strlen($absdownloadspath) < 1) {
$absdownloadspath = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . 'dlmanager/files';
}
Code: Select all
if (!is_dir($absincomingpath)) {
mkdir($absincomingpath, 0777, true);
}
if (!is_dir($absdownloadspath)) {
mkdir($absdownloadspath, 0777, true);
}
Ian
Re: Downloadmanager
Hello Timbalo,
Many thanks for you fast answer. I tried to copy the code you sent me in the php file. Unfortunately it didn't work.
When do you think the new downloadmanager plugin will be online?
Regards
Sela
Many thanks for you fast answer. I tried to copy the code you sent me in the php file. Unfortunately it didn't work.
When do you think the new downloadmanager plugin will be online?
Regards
Sela
Re: Downloadmanager
Its updated already (Version 0.22)!
Ian
PS.
Why do you want to download in an area where you just uploaded. The download is meant to be in frontend only, which should be per default underneath
/yourblog/index.php?serendipity[subpage]=downloadmanager or /yourblog/downloads.html
Ian
PS.
I should really start to read before I post...Sela81 wrote:Now, I'm able to upload files with the downloadmanager,
but if I try to dowload the file from the Weblog, it is not woking.
I made a screenshot of the page where I uploaded the data. There is no possibilty to download the Agenda pdf-file. With the right mouse klick I can save the path but I can not download the file.
Why do you want to download in an area where you just uploaded. The download is meant to be in frontend only, which should be per default underneath
/yourblog/index.php?serendipity[subpage]=downloadmanager or /yourblog/downloads.html
Last edited by Timbalu on Mon Aug 09, 2010 4:15 pm, edited 1 time in total.