Author Topic: Download Ja/Nein?  (Read 48597 times)

0 Members and 1 Guest are viewing this topic.

Offline desperate_housewif

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Download Ja/Nein?
« Reply #15 on: October 24, 2006, 10:39:58 AM »
Quote
... das Gleiche gilt natürlich auch für die "download_button" ...

Da scheint im Moment noch mein Fehler zu liegen. Sieht schon mal alles gut aus, leider sind jetzt die beiden Button gänzlich weg, bei allen bislang eingestellten Bildern! Ich möchte gern, das bei Bildern, die nicht für den Upload genehmigt werden, die Button grau angezeigt werden.

Für die Downloadbutton wurde doch nur beschrieben, das man in der funktions.php was einfügen muß. Auch in der page_header.php?

Die Punkte 1, 1.1 bis 7 habe ich genau so geändert.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Download Ja/Nein?
« Reply #16 on: October 24, 2006, 12:24:53 PM »
... hast du das http://www.4homepages.de/forum/index.php?topic=11539.msg60515#msg60515 erledigt ...
... in deinem Fall dann natürlich nur die letzte Variante ... mit "Download OFF Button" ...
... dazu müssen keine zusätzlichen Tags in der page_header.php registriert werden ...

PS: ... das Gleiche (Post zuvor) ... bezog sich auf ... richtige Stelle ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline desperate_housewif

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Download Ja/Nein?
« Reply #17 on: October 24, 2006, 12:40:49 PM »
Quote
.. in deinem Fall dann natürlich nur die letzte Variante ... mit "Download OFF Button" ...
Habe beide Varianten versucht, bei beiden keine Button.

Scheint nicht an der functions.php zu liegen, habe mal mit

[qcode]"download_button" => $download_button,
   
//"download_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_button : "",

"download_zip_button" => $download_zip_button,

//"download_zip_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_button : "",[/qcode]

versucht, auch keine Button (alle anderen geänderten Dateien wie im Text beschrieben)

Danach habe ich versucht eine php.Datei nach der anderen wieder mit dem Original zu tauschen. Bei der originalen db_field_definitions.php kamen die Button wieder.

Sieht bei mir jetzt so aus:
[qcode]<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: db_field_definitions.php                             *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.2                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

/* ------------------------------------------------------------------------
If you want to add additional fields in order to store more info on
each image or user, set up these fields by inserting a column to the "4images_images"
or "4images_users" table in your database.

If you add an additional image field and allow upload from the gallery,
add the columns to "4images_images_temp" as well.

Add one line for each new column in the following format:

  $additional_image_fields['%column_name%'] = array("%field_description%", "%admin_field_type%", %is_required%);
or
  $additional_user_fields['%column_name%'] = array("%field_description%", "%admin_field_type%", %is_required%);
 
At the bottom of this file, you will find examples for adding a new field.

----------
%column_name% string

  Replace %column_name% with name of the table column.
  You can use the tag {%column_name%} in the templates to display the value of the
  database field.
  If you want to add a textfield to the templates, do this such like:
 
    <input type="text" name="%column_name%" value="{%column_name%}" />

----------
%field_description% string

  Replace %field_description% with a custom name. This name will be displayed in the Control Panel.
  The value can be displayed in the templates with the tag {lang_%column_name%}.
  It is also recommended to add this tag to the language files (main.php) and to replace "%field_description%"
  with $lang['%column_name%'].

----------
%admin_field_type% string

  Replace %admin_field_type% with the type of input field you would like to use in your
  Control Panel.

  You can use the following formats:

   "text"
     will display an input field type="text".

   "textarea"
     will display a textarea.

   "radio"
     will display radio buttons with Yes/No options.
     Please make sure that the database field type is an integer (for example: "tinyint(1)").
     You can use this field tag for conditional statements in your templates:

     {if %column_name%} Some text {endif %column_name%}

----------
%is_required% bool

  Sets up the field as required when adding data through the Control Panel or the user upload form.

------------------------------------------------------------------------ */

// Example for additional image fields:
//$additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);

// Example for additional user fields
//$additional_user_fields['user_adress'] = array($lang['user_adress'], "text", 1);
$additional_user_fields['user_fullname'] = array($lang['fullname'], "text", 0);
$additional_user_fields['user_camera'] = array($lang['camera'], "text", 0);
$additional_user_fields['user_land'] = array($lang['land'], "text", 0);
$additional_user_fields['user_ort'] = array($lang['ort'], "text", 0);
$additional_user_fields['user_profil'] = array($lang['profil'], "text", 0);
$additional_user_fields['user_zubeh'] = array($lang['zubeh'], "text", 0);
$additional_user_fields['user_bildbea'] = array($lang['bildbea'], "text", 0);
$additional_user_fields['user_text'] = array($lang['text'], "text", 0);
$additional_image_fields['image_downloads_erlaubt'] = array($lang['image_downloads_erlaubt'], "radio", 0);
?>[/qcode]

Die Datenbank sieht bei beiden Einträgen so aus:
« Last Edit: October 24, 2006, 01:37:33 PM by desperate_housewif »

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: Download Ja/Nein?
« Reply #18 on: October 24, 2006, 03:40:11 PM »
Hallo,

gute Idee das ganze, werde es heute Abend mal einbauen und testen  :lol:

Grüße Darkness  :mrgreen:

Offline desperate_housewif

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Download Ja/Nein?
« Reply #19 on: October 24, 2006, 05:48:26 PM »
Hallo Darkness!

Ich glaube, ich habe den Fehler gefunden:

Ich habe jetzt ein Bild hochgeladen mit der Option "Download erlauben" und siehe da, es werden die beiden Downlaodbutton angezeigt. Aber nur da. Alle früheren Bilder sind für den Download deaktiviert.
Dann habe ich mal in der Datenbank unter 4image_images reingeschaut und der Bereich für die Downloadgenehmigung sieht bei mir jetzt so aus wie auf dem Bild unten.

Es unterscheiden sich lediglich die beiden unteren Einträge. Ein Bild war das Neue eingestellte, wo ich den Download erlaubt habe, beim Zweiten habe ich die "1" in der Datenbank geändert. Und siehe da, die Button werden danach bei beiden dargestellt.

Da scheint eine Grundeinstellung erst mal alle Downloads zu verbieten?!? Obwohl die in den jeweiligen Punkten von mawenzi beschriebenen Anweisungen zu Änderung meiner nichtfachmännischen Auffassung her richtig sind.
Oder muß ich jetzt nachträglich alle Bilder in beiden Verzeichnissen (das sind hunderte) per Hand ändern?


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Download Ja/Nein?
« Reply #20 on: October 24, 2006, 05:56:04 PM »
... dein Standard für das Feld steht offensichtlich nicht auf "1" sondern "0"  ...
http://www.4homepages.de/forum/index.php?topic=11539.msg81236#msg81236

PS: ... ich glaub ich sollte hier noch eine "download_option_install.php" hinterlassen ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline desperate_housewif

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Download Ja/Nein?
« Reply #21 on: October 25, 2006, 05:13:58 PM »
Nein, bei beiden auf "1". Oder kann man das in der Datenbank für alle vorhandenen Felder auf einmal ändern?
Das einzige, wo eine Null auftaucht ist in der db_fields-definitions.php

Code: [Select]
$additional_image_fields['image_downloads_erlaubt'] = array($lang['image_downloads_erlaubt'], "radio", 0);

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: Download Ja/Nein?
« Reply #22 on: October 26, 2006, 10:29:15 PM »
Hallo,

ich habe es soweit eingebaut, läuft auch  :wink:

Aber: Wenn ich Neue Bilder aufrufe dann bekomme ich folgende fehler Notice: Undefined index: image_downloads_erlaubt in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 420

Notice: Undefined index: image_downloads_erlaubt in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 422


Woran kann datt denn liegen tun ?

Wer weiss Rat !

Grüße Darkness  :mrgreen:

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Download Ja/Nein?
« Reply #23 on: October 26, 2006, 10:50:04 PM »
... und was steht bei dir in der functions.php in der Zeile 420 ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: Download Ja/Nein?
« Reply #24 on: October 26, 2006, 10:59:10 PM »
Hi,

dummer Fehler gewesen, habs grad gesehen... ich habe:

//"download_button" => $download_button,
"download_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_button : "<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />",
//"download_zip_button" => $download_zip_button,
"download_zip_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_zip_button : "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />",

das eingesetzt.

Danach war der Fehler jetzt habe ich das:

"download_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_button : "<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />",
"download_zip_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_zip_button : "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />",

daraus gemacht und schon funktionierts. Habe Version 1.7.4

Grüße Darkness  :mrgreen:

Ps: Aber der nächste Fehler steht schon an  :roll:

jetzt habe ich jenes für:

Notice: Undefined index: image_potm in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 313

Notice: Undefined index: image_potm in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 313


und in der Zeile 313 steht : $is_potm = $image_row['image_potm']; ??

Idee was es sein kann ??


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Download Ja/Nein?
« Reply #25 on: October 26, 2006, 11:05:13 PM »
... 'image_potm' ... Picture of the month ... ;) ... doch was genau ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: Download Ja/Nein?
« Reply #26 on: October 27, 2006, 09:51:16 AM »
Hallo,

der Fehler wie obne ist wieder da...

Notice: Undefined index: image_potm in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 313

Notice: Undefined index: image_downloads_erlaubt in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 423

Notice: Undefined index: image_downloads_erlaubt in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 425

Notice: Undefined index: image_potm in /homepages/35/d85936339/htdocs/1-7-4/includes/functions.php on line 313


in der functions.php stwht folgendes:

112   $is_new = ($image_row['image_date'] >= (time() - 60 * 60 * 24 * $config['new_cutoff'])) ? 1 : 0;
113   $is_potm = ($image_row['image_potm']);
114   $description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 1, 0, 1) : REPLACE_EMPTY;

und in Zeile 423 - 425 folgendes:

422  //"download_button" => $download_button,
423  "download_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_button : "",
424  //"download_zip_button" => $download_zip_button,
425  "download_zip_button" => ($image_row['image_downloads_erlaubt'] == 1) ? $download_zip_button : "",

Verstehe das nicht, woran kann das liegen ?

Es ist nur wenn ich auf "Neue Bilder" klicke :idea:

Grüße Darkness  :mrgreen:


Offline desperate_housewif

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Download Ja/Nein?
« Reply #27 on: October 27, 2006, 08:47:34 PM »
Hallo, hat jemand noch eine Idee zu meiner Anfrage von oben? Wo liegt der Fehler meiner Grundeinstellung in der Datenbank, warum sind alle auf "0" gesetzt. Oder wie kann ich 700 Bilder in einen Schwung auf "1" setzen?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Download Ja/Nein?
« Reply #28 on: October 28, 2006, 12:22:10 AM »
Code: [Select]
UPDATE PREFIX_images SET image_downloads_erlaubt = '1';
« Last Edit: October 28, 2006, 07:34:57 PM by Nicky »
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline desperate_housewif

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Download Ja/Nein?
« Reply #29 on: October 28, 2006, 10:18:00 AM »
Quote
UPDATE PREFIX_images SET image_downloads_erlaubt = '1';

Danke, aber wo setzte ich den Script ein?
« Last Edit: October 28, 2006, 07:34:47 PM by Nicky »