Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tucano

Pages: [1] 2
1
I think it might be because of the rustynet template?

2
I cannot  get the paging in categories with subcategories working. Can somebody please help me?
see www.regenwaldfotos.de for example the category Regenwaldfotos has 60 pictures, but it does not show the paging :-(

------------------------------------------------------------------------

Wenn bei mir eine Kategorie eine Subkategorie hat, funktioniert die Seitennummerierung nicht. Kann mir jemand helfen?
Ihr seht die Bidlergalerie unter www.regenwaldfotos.de , dort z.B. die Kategorie Regenwaldfotos hat 60 Bilder, trotzdem wird keine Seitennummerierung angezeigt :-(

3
do you see the paging on the categories with subcategories?

4
*push*

ich hab noch Hoffnung  :lol:

5
Hey naughty,
I've solved the problem for me, as I wrote above. I just wanted to help YOU  :P
Did my solution work for you, or did you not need it anymore?

BTW, I can't wait to go back to Australia. Just need to be patient for another 3 months  8)

6
I don't know what you mean. I'm using a rustynet.de template as well. Did you solve the problem now, or not?
Maybe we can write German ;-)

7
that's how it works for me:

Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        WHERE i.image_active = 1 AND ((c.cat_parent_id = $cat_id AND c.cat_id = i.cat_id) OR (i.cat_id = $cat_id AND c.cat_id = i.cat_id))
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
        LIMIT $offset, $perpage";

8
That's what I'm working on right now as well.
Is this a problem with rustynet-templates only? I guess its in every template.

The solution msut be here somewhere:

categories.php line 119
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id = $cat_id AND c.cat_id = i.cat_id
        ORDER BY ".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
        LIMIT $offset, $perpage";

You have to add an option which also selects the images in the subcategory (cat_parent_id) but I haven't figured out how by now.

9
hat NIEMAND eine Idee? Oder ist meine Anfrage nicht verständlich?


###############


Does NOBODY have an idea? Or didn't I make myself clear?

10
hab oben geedited, meine Fragen sind jetzt alle gelöst bis auf die Umsetzung mit dem thumbnails bei vorhandenen Rechten anzeigen  8)
Ideen sind herzlich willkommen  :D

11
Hi Nicky,
hab schon gesehen, dass du dort unterwegs warst :-)
Um dir den Zugang zu geben, haben wir den Fotos eine eigene Datenbank angelegt... vielleicht liegt es daran :?: Aber danke für deine Hilfe vielmals!!!  :D

12
@tucano

... da du den zweiten Punkt offensichtlich erfolgreich abgearbeitet hast, wäre es nett, wenn du in dem Tutorial-Thread noch mal ein Statement dazu abgibst ... mit 4images-Version und ggf. Hinweisen zur Ausführung ... denn offensichtlich tun sich viele andere 4images-User mit der Problematik "One Image - Three sizes" sehr schwer und so wäre es dann eine Motivation dieses Tutorial auch umzusetzen ...

Danke ... mawenzi

Done :-)


@tucano

... zu 3. ...
... so wie du ein additional_image_field für den Fotografen eingefügt hast, so kannst du auch ein additional_image_field für die Betrachtungsrechte einführen ... ein Tutorial wäre hier http://www.4homepages.de/forum/index.php?topic=20748.0 ... für dieses Feld wäre ein Ratio-Button auszuwählen ... Alle User bzw. Reg. User ... dann kann man unabhängig von der Kategorieeinstellung die Ansichtsrechte für jedes Bild einzeln vergeben ... um die Ansichtsrechte umzusetzen gibt es m.E. zwei Möglichkeiten ...

1. in der includes/functions.php die Rechte für die "Thumbs" neu zu regeln ...
2. in der includes/functions.php z.B $detail_view_all und $detail_view_user registrieren ...
    und in der /templates/<dein_template>/tumbnail_bit.html die Rechte mit {if ...}-Tags regeln ...
    wobei mir das jetzt etwas umständlicher zu sein scheint ...

... eine ähnliche Problematik haben wir hier im Forum mal diskutiert und umgesetzt ...
... Download Ja / Nein (unabhängig von der Kategorieeinstellung) ... hier ... http://www.4homepages.de/forum/index.php?topic=11539.0 ...
... dann gibt es auch noch ein Tutorial "Bild-Uploadoption: Rating Ja / Nein" (unabhängig von der Kategorieeinstellung) ... auch ähnlich ...

Puh... das wird kompliziert.
Habe jetzt folgendes gemacht:

1) In includes/db_field_definitions.php zugefügt
Code: [Select]
$additional_rights_fields['image_rights'] = array($lang['image_rights'], "radio", 1);
2) in lang/deutsch/main.php
Code: [Select]
$lang['image_rights'] = "Bild-Rechte:";
3) in templates/default/member_uploadform.html
Code: [Select]
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><sup class="new">{lang_image_rights}</sup><br>
<input type="radio" name="image_rights" value="1"/>Ja&nbsp;&nbsp;&nbsp;<input type="radio" name="image_rights" value="0" checked="checked"> Nein </p>

4) in templates/default/details.html
Code: [Select]
<tr>
     <td valign="top" class="row2"><b>Rechte:</b></td>
     <td valign="top" class="row2"><p align="justify">{image_rights}</td>
</tr> 

5) in der Datenbank in 4images_images das Feld image_rights als Tinyint angelegt

6) in admin/images.php bei if ($action == "editimage")
Code: [Select]
  show_additional_fields("rights", $image_row, IMAGES_TABLE); bei if ($action == "saveimages")
Code: [Select]
    if (!empty($additional_rights_fields)) {
      foreach ($additional_rights_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key.'_'.$i]) && intval($val[2]) == 1 && trim($HTTP_POST_VARS[$key.'_'.$i]) == "") {
          $error[$key.'_'.$i] = 1;
        }
      }
    } 
bei if ($action == "addimages")
Code: [Select]
    show_additional_fields("rights", array(), IMAGES_TABLE, $i);
7) in includes/functions.php unter dem anderen additional field
Code: [Select]
  if (!empty($additional_rights_fields)) {
    $additional_field_array = array();
    foreach ($additional_rights_fields as $key => $val) {
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
      $additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty($additional_field_array)) {
      $site_template->register_vars($additional_field_array);
    }
  } 


...
Funktionieren tut es aber noch nicht wirklich (die Auswahl Ja/nein wird übernommen und gespeichert, aber wie gebe ich es wieder aus bzw. nutze das?), und das mit den Thumbs muss auch noch gemacht werden in functions.php. Kann mir dabei jemand helfen?

EDITH:
Muss natürlich noch in images.php den case updateimage bei index.php und bei detail.php bearbeiten:
Code: [Select]
if (!empty($additional_rights_fields)) {
    foreach ($additional_rights_fields as $key => $val) {
      if (isset($HTTP_POST_VARS[$key]) && intval($val[2]) == 1 && trim($HTTP_POST_VARS[$key]) == "") {
        $error[$key] = 1;
      }
    }
  } 
und im sql-update dort auch
Code: [Select]
image_rights = '$image_rights'
dann natürlich nicht zu vergessen:
bei if updateimage
Code: [Select]
  if (empty($error)) {
    $additional_sql = "";
    if (!empty($additional_image_fields)) {
      $table_fields = $site_db->get_table_fields(IMAGES_TABLE);
      foreach ($additional_image_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
          $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
        }
      }
    }
    $additional_sql_rights = "";
    if (!empty($additional_rights_fields)) {
      $table_fields = $site_db->get_table_fields(IMAGES_TABLE);
      foreach ($additional_rights_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
          $additional_sql_rights .= ", $key = ".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."";
        }
      }     
    }

    $sql = "UPDATE ".IMAGES_TABLE."
            SET cat_id = $cat_id, user_id = $user_id, image_name = '$image_name', image_photographer = '$image_photographer', image_rights = '$image_rights', image_description = '$image_description', image_keywords = '$image_keywords', image_date = $image_date, image_active = $image_active, image_media_file = '$new_name', image_thumb_file = '$new_thumb_name', image_download_url = '$image_download_url', image_allow_comments = $image_allow_comments, image_downloads = $image_downloads, image_votes = $image_votes, image_rating = '$image_rating', image_hits = $image_hits".$additional_sql."".$additional_sql_rights."
            WHERE image_id = $image_id";
    $result = $site_db->query($sql);

und bei saveimages
Code: [Select]
        $additional_field_sql_rights = "";
        $additional_value_sql_rights = "";
        if (!empty($additional_rights_fields)) {
          $table_fields = $site_db->get_table_fields(IMAGES_TABLE);
          foreach ($additional_rights_fields as $key => $val) {
            if (isset($HTTP_POST_VARS[$key.'_'.$i]) && isset($table_fields[$key])) {
              $additional_field_sql_rights .= ", $key";
              $additional_value_sql_rights .= ", '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key.'_'.$i]))."'";
            }
          }
        }       

        $current_time = time();
        $sql = "INSERT INTO ".IMAGES_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.",".$additional_field_sql_rights.")
                VALUES
                ($cat_id, $user_id, '$image_name', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.",".$additional_value_sql_rights.")";

Tada, und schon funktionierts.
Jetzt jemand noch eine idee für die Umsetzung mit dem thumbs? (if image_rights=ok dann thumb anzeigen?)

13
thanks V@no, funktioniert wunderbar :-)
Benutze 1.76 und habe über das Tutorial One Image - Three Sizes hergefunden – (http://www.4homepages.de/forum/index.php?topic=20496.0) und habe dort die Punkte 1-3 befolgt.
Funktioniert bei mir auch beim Upload über den Admin-Bereich :-)

14
Punkt 2 funktioniert jetzt.
Wäre klasse wenn jemand noch für die anderen Probleme eine Lösung hat :-)

########

Number 2 is working now.
It'd be great if someone has a solution for the other questions :-)

15
Hallo Nicky,
ok, ich schreib auf deutsch ;-)
1) Du kannst die Bilder auf regenwaldfotos.de sehen.

Punkt 2 probiere ich gerade aus :-)

3) Normalerweise kann man ja für jede Kategorie einstellen, ob sie für jedermann sichtbar ist oder nur für registrierte Nutzer. ich habe dank einem Tutorial von hier (hab jetzt denk Link nicht hier) das additional feld freigeschaltet, um einen Fotografen mit anzugeben. Nun möchte ich gerne, dass die Bilder je nach Fotograf freigeschaltet werden können - also im Grunde genommen könnte man beim Bild hochladen ein Feld anlegen, das jeweils gewählt werden muss ob das Bild sichtbar für alle ist oder nur für registrierte User.
Ist das verständlicher?


Pages: [1] 2